* [PATCH 0/2] ASoC: rsnd: reborn HDMI sound probing @ 2018-04-11 2:09 Kuninori Morimoto 2018-04-11 2:10 ` [PATCH 1/2] ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 Kuninori Morimoto ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Kuninori Morimoto @ 2018-04-11 2:09 UTC (permalink / raw) To: Mark Brown; +Cc: Linux-ALSA, Yokoyama (Renesas) Hi Mark I noticed rsnd HDMI sound probing had been broken since v4.15. No board is using it at this point, thus, there is no real issue. Kuninori Morimoto (2): ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 ASoC: rsnd: don't assume node full path name for HDMI probing sound/soc/sh/rcar/core.c | 2 +- sound/soc/sh/rcar/dma.c | 4 ++-- sound/soc/sh/rcar/gen.c | 3 ++- sound/soc/sh/rcar/rsnd.h | 2 ++ sound/soc/sh/rcar/ssi.c | 11 +++++++++-- 5 files changed, 16 insertions(+), 6 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 2018-04-11 2:09 [PATCH 0/2] ASoC: rsnd: reborn HDMI sound probing Kuninori Morimoto @ 2018-04-11 2:10 ` Kuninori Morimoto 2018-04-13 11:22 ` Applied "ASoC: rsnd: add RSND_GEN3 for R-Car Gen3" to the asoc tree Mark Brown 2018-04-16 11:40 ` Mark Brown 2018-04-11 2:10 ` [PATCH 2/2] ASoC: rsnd: don't assume node full path name for HDMI probing Kuninori Morimoto 2018-04-12 7:09 ` [PATCH 0/2] ASoC: rsnd: reborn HDMI sound probing Kuninori Morimoto 2 siblings, 2 replies; 9+ messages in thread From: Kuninori Morimoto @ 2018-04-11 2:10 UTC (permalink / raw) To: Mark Brown; +Cc: Linux-ALSA, Yokoyama (Renesas) From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> rsnd driver is supporting Gen3. The difference between Gen1 and Gen2 were very big, but, between Gen2 and Gen3 are not so much. Thus, it is assuming Gen2 and Gen3 have compatible, therefore, there is no RSND_GEN3 and rsnd_is_gen3() macro. But in the future, it will need Gen2 and Gen3 different operation, and for Gen4. This patch adds missing RSND_GEN3 and rsnd_is_gen3() macro. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- sound/soc/sh/rcar/core.c | 2 +- sound/soc/sh/rcar/dma.c | 4 ++-- sound/soc/sh/rcar/gen.c | 3 ++- sound/soc/sh/rcar/rsnd.h | 2 ++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 6a76688..47a55d6 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -111,7 +111,7 @@ static const struct of_device_id rsnd_of_match[] = { { .compatible = "renesas,rcar_sound-gen1", .data = (void *)RSND_GEN1 }, { .compatible = "renesas,rcar_sound-gen2", .data = (void *)RSND_GEN2 }, - { .compatible = "renesas,rcar_sound-gen3", .data = (void *)RSND_GEN2 }, /* gen2 compatible */ + { .compatible = "renesas,rcar_sound-gen3", .data = (void *)RSND_GEN3 }, {}, }; MODULE_DEVICE_TABLE(of, rsnd_of_match); diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c index 41de234..32ac97b 100644 --- a/sound/soc/sh/rcar/dma.c +++ b/sound/soc/sh/rcar/dma.c @@ -695,7 +695,7 @@ static int rsnd_dma_alloc(struct rsnd_dai_stream *io, struct rsnd_mod *mod, rsnd_dma_of_path(mod, io, is_play, &mod_from, &mod_to); - /* for Gen2 */ + /* for Gen2 or later */ if (mod_from && mod_to) { ops = &rsnd_dmapp_ops; attach = rsnd_dmapp_attach; @@ -773,7 +773,7 @@ int rsnd_dma_probe(struct rsnd_priv *priv) return 0; /* - * for Gen2 + * for Gen2 or later */ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "audmapp"); dmac = devm_kzalloc(dev, sizeof(*dmac), GFP_KERNEL); diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c index f04c410..25642e9 100644 --- a/sound/soc/sh/rcar/gen.c +++ b/sound/soc/sh/rcar/gen.c @@ -414,7 +414,8 @@ int rsnd_gen_probe(struct rsnd_priv *priv) ret = -ENODEV; if (rsnd_is_gen1(priv)) ret = rsnd_gen1_probe(priv); - else if (rsnd_is_gen2(priv)) + else if (rsnd_is_gen2(priv) || + rsnd_is_gen3(priv)) ret = rsnd_gen2_probe(priv); if (ret < 0) diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index ab4d555..b1896f1 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -538,6 +538,7 @@ struct rsnd_priv { #define RSND_GEN_MASK (0xF << 0) #define RSND_GEN1 (1 << 0) #define RSND_GEN2 (2 << 0) +#define RSND_GEN3 (3 << 0) /* * below value will be filled on rsnd_gen_probe() @@ -609,6 +610,7 @@ struct rsnd_priv { #define rsnd_is_gen1(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN1) #define rsnd_is_gen2(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN2) +#define rsnd_is_gen3(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN3) #define rsnd_flags_has(p, f) ((p)->flags & (f)) #define rsnd_flags_set(p, f) ((p)->flags |= (f)) -- 1.9.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Applied "ASoC: rsnd: add RSND_GEN3 for R-Car Gen3" to the asoc tree 2018-04-11 2:10 ` [PATCH 1/2] ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 Kuninori Morimoto @ 2018-04-13 11:22 ` Mark Brown 2018-04-16 11:40 ` Mark Brown 1 sibling, 0 replies; 9+ messages in thread From: Mark Brown @ 2018-04-13 11:22 UTC (permalink / raw) To: Kuninori Morimoto Cc: Mark Brown, Nguyen Viet Dung, Yokoyama (Renesas), alsa-devel The patch ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 53041ccf8b8883d2e22525d36ddfff16b80541b6 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Wed, 11 Apr 2018 02:10:29 +0000 Subject: [PATCH] ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 rsnd driver is supporting Gen3. The difference between Gen1 and Gen2 were very big, but, between Gen2 and Gen3 are not so much. Thus, it is assuming Gen2 and Gen3 have compatible, therefore, there is no RSND_GEN3 and rsnd_is_gen3() macro. But in the future, it will need Gen2 and Gen3 different operation, and for Gen4. This patch adds missing RSND_GEN3 and rsnd_is_gen3() macro. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/sh/rcar/core.c | 2 +- sound/soc/sh/rcar/dma.c | 4 ++-- sound/soc/sh/rcar/gen.c | 3 ++- sound/soc/sh/rcar/rsnd.h | 2 ++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 6a76688a8ba9..47a55d6bfd80 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -111,7 +111,7 @@ static const struct of_device_id rsnd_of_match[] = { { .compatible = "renesas,rcar_sound-gen1", .data = (void *)RSND_GEN1 }, { .compatible = "renesas,rcar_sound-gen2", .data = (void *)RSND_GEN2 }, - { .compatible = "renesas,rcar_sound-gen3", .data = (void *)RSND_GEN2 }, /* gen2 compatible */ + { .compatible = "renesas,rcar_sound-gen3", .data = (void *)RSND_GEN3 }, {}, }; MODULE_DEVICE_TABLE(of, rsnd_of_match); diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c index 41de23417c4a..32ac97be26f1 100644 --- a/sound/soc/sh/rcar/dma.c +++ b/sound/soc/sh/rcar/dma.c @@ -695,7 +695,7 @@ static int rsnd_dma_alloc(struct rsnd_dai_stream *io, struct rsnd_mod *mod, rsnd_dma_of_path(mod, io, is_play, &mod_from, &mod_to); - /* for Gen2 */ + /* for Gen2 or later */ if (mod_from && mod_to) { ops = &rsnd_dmapp_ops; attach = rsnd_dmapp_attach; @@ -773,7 +773,7 @@ int rsnd_dma_probe(struct rsnd_priv *priv) return 0; /* - * for Gen2 + * for Gen2 or later */ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "audmapp"); dmac = devm_kzalloc(dev, sizeof(*dmac), GFP_KERNEL); diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c index f04c4100043a..25642e92dae0 100644 --- a/sound/soc/sh/rcar/gen.c +++ b/sound/soc/sh/rcar/gen.c @@ -414,7 +414,8 @@ int rsnd_gen_probe(struct rsnd_priv *priv) ret = -ENODEV; if (rsnd_is_gen1(priv)) ret = rsnd_gen1_probe(priv); - else if (rsnd_is_gen2(priv)) + else if (rsnd_is_gen2(priv) || + rsnd_is_gen3(priv)) ret = rsnd_gen2_probe(priv); if (ret < 0) diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index ab4d55548ed1..b1896f1eb214 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -538,6 +538,7 @@ struct rsnd_priv { #define RSND_GEN_MASK (0xF << 0) #define RSND_GEN1 (1 << 0) #define RSND_GEN2 (2 << 0) +#define RSND_GEN3 (3 << 0) /* * below value will be filled on rsnd_gen_probe() @@ -609,6 +610,7 @@ struct rsnd_priv { #define rsnd_is_gen1(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN1) #define rsnd_is_gen2(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN2) +#define rsnd_is_gen3(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN3) #define rsnd_flags_has(p, f) ((p)->flags & (f)) #define rsnd_flags_set(p, f) ((p)->flags |= (f)) -- 2.17.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Applied "ASoC: rsnd: add RSND_GEN3 for R-Car Gen3" to the asoc tree 2018-04-11 2:10 ` [PATCH 1/2] ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 Kuninori Morimoto 2018-04-13 11:22 ` Applied "ASoC: rsnd: add RSND_GEN3 for R-Car Gen3" to the asoc tree Mark Brown @ 2018-04-16 11:40 ` Mark Brown 1 sibling, 0 replies; 9+ messages in thread From: Mark Brown @ 2018-04-16 11:40 UTC (permalink / raw) To: Kuninori Morimoto Cc: Mark Brown, Nguyen Viet Dung, Yokoyama (Renesas), alsa-devel The patch ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From d188e140ad9723faccefa4ed5dc313cd467123c9 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Wed, 11 Apr 2018 02:10:29 +0000 Subject: [PATCH] ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 rsnd driver is supporting Gen3. The difference between Gen1 and Gen2 were very big, but, between Gen2 and Gen3 are not so much. Thus, it is assuming Gen2 and Gen3 have compatible, therefore, there is no RSND_GEN3 and rsnd_is_gen3() macro. But in the future, it will need Gen2 and Gen3 different operation, and for Gen4. This patch adds missing RSND_GEN3 and rsnd_is_gen3() macro. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/sh/rcar/core.c | 2 +- sound/soc/sh/rcar/dma.c | 4 ++-- sound/soc/sh/rcar/gen.c | 3 ++- sound/soc/sh/rcar/rsnd.h | 2 ++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 6a76688a8ba9..47a55d6bfd80 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -111,7 +111,7 @@ static const struct of_device_id rsnd_of_match[] = { { .compatible = "renesas,rcar_sound-gen1", .data = (void *)RSND_GEN1 }, { .compatible = "renesas,rcar_sound-gen2", .data = (void *)RSND_GEN2 }, - { .compatible = "renesas,rcar_sound-gen3", .data = (void *)RSND_GEN2 }, /* gen2 compatible */ + { .compatible = "renesas,rcar_sound-gen3", .data = (void *)RSND_GEN3 }, {}, }; MODULE_DEVICE_TABLE(of, rsnd_of_match); diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c index 41de23417c4a..32ac97be26f1 100644 --- a/sound/soc/sh/rcar/dma.c +++ b/sound/soc/sh/rcar/dma.c @@ -695,7 +695,7 @@ static int rsnd_dma_alloc(struct rsnd_dai_stream *io, struct rsnd_mod *mod, rsnd_dma_of_path(mod, io, is_play, &mod_from, &mod_to); - /* for Gen2 */ + /* for Gen2 or later */ if (mod_from && mod_to) { ops = &rsnd_dmapp_ops; attach = rsnd_dmapp_attach; @@ -773,7 +773,7 @@ int rsnd_dma_probe(struct rsnd_priv *priv) return 0; /* - * for Gen2 + * for Gen2 or later */ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "audmapp"); dmac = devm_kzalloc(dev, sizeof(*dmac), GFP_KERNEL); diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c index f04c4100043a..25642e92dae0 100644 --- a/sound/soc/sh/rcar/gen.c +++ b/sound/soc/sh/rcar/gen.c @@ -414,7 +414,8 @@ int rsnd_gen_probe(struct rsnd_priv *priv) ret = -ENODEV; if (rsnd_is_gen1(priv)) ret = rsnd_gen1_probe(priv); - else if (rsnd_is_gen2(priv)) + else if (rsnd_is_gen2(priv) || + rsnd_is_gen3(priv)) ret = rsnd_gen2_probe(priv); if (ret < 0) diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index ab4d55548ed1..b1896f1eb214 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -538,6 +538,7 @@ struct rsnd_priv { #define RSND_GEN_MASK (0xF << 0) #define RSND_GEN1 (1 << 0) #define RSND_GEN2 (2 << 0) +#define RSND_GEN3 (3 << 0) /* * below value will be filled on rsnd_gen_probe() @@ -609,6 +610,7 @@ struct rsnd_priv { #define rsnd_is_gen1(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN1) #define rsnd_is_gen2(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN2) +#define rsnd_is_gen3(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN3) #define rsnd_flags_has(p, f) ((p)->flags & (f)) #define rsnd_flags_set(p, f) ((p)->flags |= (f)) -- 2.17.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] ASoC: rsnd: don't assume node full path name for HDMI probing 2018-04-11 2:09 [PATCH 0/2] ASoC: rsnd: reborn HDMI sound probing Kuninori Morimoto 2018-04-11 2:10 ` [PATCH 1/2] ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 Kuninori Morimoto @ 2018-04-11 2:10 ` Kuninori Morimoto 2018-04-13 11:22 ` Applied "ASoC: rsnd: don't assume node full path name for HDMI probing" to the asoc tree Mark Brown ` (2 more replies) 2018-04-12 7:09 ` [PATCH 0/2] ASoC: rsnd: reborn HDMI sound probing Kuninori Morimoto 2 siblings, 3 replies; 9+ messages in thread From: Kuninori Morimoto @ 2018-04-11 2:10 UTC (permalink / raw) To: Mark Brown; +Cc: Linux-ALSA, Yokoyama (Renesas) From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Current ssi.c is assuming below 2 things to probing HDMI node. 1) remote node is including "hdmi0" or "hdmi1" in node name 2) remote_ep->full_name is including full path name But, these assumptions are broken by below 1) Node names should not use numerical suffixes commit 6b5ac2f1cb11 ("arm64: dts: renesas: r8a7795: Drop bogus HDMI node names suffixes") 2) node full_name no longer include full path name commit a7e4cfb0a7ca ("of/fdt: only store the device node basename in full_name") Because of these reasons, ssi.c can't probe HDMI on current kernel. This patch probes HDMI0/1 by using its address. Note is that we need to keep updating for this address for future generation chip. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- sound/soc/sh/rcar/ssi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 333b802..31ffe3f 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -1004,19 +1004,26 @@ static void __rsnd_ssi_parse_hdmi_connection(struct rsnd_priv *priv, struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); struct rsnd_ssi *ssi; + struct device_node *remote_node = of_graph_get_port_parent(remote_ep); + + /* support Gen3 only */ + if (!rsnd_is_gen3(priv)) + return; if (!mod) return; ssi = rsnd_mod_to_ssi(mod); - if (strstr(remote_ep->full_name, "hdmi0")) { + /* HDMI0 */ + if (strstr(remote_node->full_name, "hdmi@fead0000")) { rsnd_flags_set(ssi, RSND_SSI_HDMI0); dev_dbg(dev, "%s[%d] connected to HDMI0\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); } - if (strstr(remote_ep->full_name, "hdmi1")) { + /* HDMI1 */ + if (strstr(remote_node->full_name, "hdmi@feae0000")) { rsnd_flags_set(ssi, RSND_SSI_HDMI1); dev_dbg(dev, "%s[%d] connected to HDMI1\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); -- 1.9.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Applied "ASoC: rsnd: don't assume node full path name for HDMI probing" to the asoc tree 2018-04-11 2:10 ` [PATCH 2/2] ASoC: rsnd: don't assume node full path name for HDMI probing Kuninori Morimoto @ 2018-04-13 11:22 ` Mark Brown 2018-04-13 13:43 ` Mark Brown 2018-04-16 11:40 ` Mark Brown 2 siblings, 0 replies; 9+ messages in thread From: Mark Brown @ 2018-04-13 11:22 UTC (permalink / raw) To: Kuninori Morimoto Cc: Mark Brown, Nguyen Viet Dung, Yokoyama (Renesas), alsa-devel The patch ASoC: rsnd: don't assume node full path name for HDMI probing has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From c24c69f0e4c024576895370cd6676e64b6eed49f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Wed, 11 Apr 2018 02:10:45 +0000 Subject: [PATCH] ASoC: rsnd: don't assume node full path name for HDMI probing Current ssi.c is assuming below 2 things to probing HDMI node. 1) remote node is including "hdmi0" or "hdmi1" in node name 2) remote_ep->full_name is including full path name But, these assumptions are broken by below 1) Node names should not use numerical suffixes commit 6b5ac2f1cb11 ("arm64: dts: renesas: r8a7795: Drop bogus HDMI node names suffixes") 2) node full_name no longer include full path name commit a7e4cfb0a7ca ("of/fdt: only store the device node basename in full_name") Because of these reasons, ssi.c can't probe HDMI on current kernel. This patch probes HDMI0/1 by using its address. Note is that we need to keep updating for this address for future generation chip. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/sh/rcar/ssi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 333b802681ad..31ffe3f0e163 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -1004,19 +1004,26 @@ static void __rsnd_ssi_parse_hdmi_connection(struct rsnd_priv *priv, struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); struct rsnd_ssi *ssi; + struct device_node *remote_node = of_graph_get_port_parent(remote_ep); + + /* support Gen3 only */ + if (!rsnd_is_gen3(priv)) + return; if (!mod) return; ssi = rsnd_mod_to_ssi(mod); - if (strstr(remote_ep->full_name, "hdmi0")) { + /* HDMI0 */ + if (strstr(remote_node->full_name, "hdmi@fead0000")) { rsnd_flags_set(ssi, RSND_SSI_HDMI0); dev_dbg(dev, "%s[%d] connected to HDMI0\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); } - if (strstr(remote_ep->full_name, "hdmi1")) { + /* HDMI1 */ + if (strstr(remote_node->full_name, "hdmi@feae0000")) { rsnd_flags_set(ssi, RSND_SSI_HDMI1); dev_dbg(dev, "%s[%d] connected to HDMI1\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); -- 2.17.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Applied "ASoC: rsnd: don't assume node full path name for HDMI probing" to the asoc tree 2018-04-11 2:10 ` [PATCH 2/2] ASoC: rsnd: don't assume node full path name for HDMI probing Kuninori Morimoto 2018-04-13 11:22 ` Applied "ASoC: rsnd: don't assume node full path name for HDMI probing" to the asoc tree Mark Brown @ 2018-04-13 13:43 ` Mark Brown 2018-04-16 11:40 ` Mark Brown 2 siblings, 0 replies; 9+ messages in thread From: Mark Brown @ 2018-04-13 13:43 UTC (permalink / raw) To: Kuninori Morimoto Cc: Mark Brown, Nguyen Viet Dung, Yokoyama (Renesas), alsa-devel The patch ASoC: rsnd: don't assume node full path name for HDMI probing has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From c24c69f0e4c024576895370cd6676e64b6eed49f Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Wed, 11 Apr 2018 02:10:45 +0000 Subject: [PATCH] ASoC: rsnd: don't assume node full path name for HDMI probing Current ssi.c is assuming below 2 things to probing HDMI node. 1) remote node is including "hdmi0" or "hdmi1" in node name 2) remote_ep->full_name is including full path name But, these assumptions are broken by below 1) Node names should not use numerical suffixes commit 6b5ac2f1cb11 ("arm64: dts: renesas: r8a7795: Drop bogus HDMI node names suffixes") 2) node full_name no longer include full path name commit a7e4cfb0a7ca ("of/fdt: only store the device node basename in full_name") Because of these reasons, ssi.c can't probe HDMI on current kernel. This patch probes HDMI0/1 by using its address. Note is that we need to keep updating for this address for future generation chip. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/sh/rcar/ssi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 333b802681ad..31ffe3f0e163 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -1004,19 +1004,26 @@ static void __rsnd_ssi_parse_hdmi_connection(struct rsnd_priv *priv, struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); struct rsnd_ssi *ssi; + struct device_node *remote_node = of_graph_get_port_parent(remote_ep); + + /* support Gen3 only */ + if (!rsnd_is_gen3(priv)) + return; if (!mod) return; ssi = rsnd_mod_to_ssi(mod); - if (strstr(remote_ep->full_name, "hdmi0")) { + /* HDMI0 */ + if (strstr(remote_node->full_name, "hdmi@fead0000")) { rsnd_flags_set(ssi, RSND_SSI_HDMI0); dev_dbg(dev, "%s[%d] connected to HDMI0\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); } - if (strstr(remote_ep->full_name, "hdmi1")) { + /* HDMI1 */ + if (strstr(remote_node->full_name, "hdmi@feae0000")) { rsnd_flags_set(ssi, RSND_SSI_HDMI1); dev_dbg(dev, "%s[%d] connected to HDMI1\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); -- 2.17.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Applied "ASoC: rsnd: don't assume node full path name for HDMI probing" to the asoc tree 2018-04-11 2:10 ` [PATCH 2/2] ASoC: rsnd: don't assume node full path name for HDMI probing Kuninori Morimoto 2018-04-13 11:22 ` Applied "ASoC: rsnd: don't assume node full path name for HDMI probing" to the asoc tree Mark Brown 2018-04-13 13:43 ` Mark Brown @ 2018-04-16 11:40 ` Mark Brown 2 siblings, 0 replies; 9+ messages in thread From: Mark Brown @ 2018-04-16 11:40 UTC (permalink / raw) To: Kuninori Morimoto Cc: Mark Brown, Nguyen Viet Dung, Yokoyama (Renesas), alsa-devel The patch ASoC: rsnd: don't assume node full path name for HDMI probing has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 9ff7386656f5b7d9524ab7bdf69d508d14800d42 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Wed, 11 Apr 2018 02:10:45 +0000 Subject: [PATCH] ASoC: rsnd: don't assume node full path name for HDMI probing Current ssi.c is assuming below 2 things to probing HDMI node. 1) remote node is including "hdmi0" or "hdmi1" in node name 2) remote_ep->full_name is including full path name But, these assumptions are broken by below 1) Node names should not use numerical suffixes commit 6b5ac2f1cb11 ("arm64: dts: renesas: r8a7795: Drop bogus HDMI node names suffixes") 2) node full_name no longer include full path name commit a7e4cfb0a7ca ("of/fdt: only store the device node basename in full_name") Because of these reasons, ssi.c can't probe HDMI on current kernel. This patch probes HDMI0/1 by using its address. Note is that we need to keep updating for this address for future generation chip. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/sh/rcar/ssi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 333b802681ad..31ffe3f0e163 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -1004,19 +1004,26 @@ static void __rsnd_ssi_parse_hdmi_connection(struct rsnd_priv *priv, struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); struct rsnd_ssi *ssi; + struct device_node *remote_node = of_graph_get_port_parent(remote_ep); + + /* support Gen3 only */ + if (!rsnd_is_gen3(priv)) + return; if (!mod) return; ssi = rsnd_mod_to_ssi(mod); - if (strstr(remote_ep->full_name, "hdmi0")) { + /* HDMI0 */ + if (strstr(remote_node->full_name, "hdmi@fead0000")) { rsnd_flags_set(ssi, RSND_SSI_HDMI0); dev_dbg(dev, "%s[%d] connected to HDMI0\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); } - if (strstr(remote_ep->full_name, "hdmi1")) { + /* HDMI1 */ + if (strstr(remote_node->full_name, "hdmi@feae0000")) { rsnd_flags_set(ssi, RSND_SSI_HDMI1); dev_dbg(dev, "%s[%d] connected to HDMI1\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); -- 2.17.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] ASoC: rsnd: reborn HDMI sound probing 2018-04-11 2:09 [PATCH 0/2] ASoC: rsnd: reborn HDMI sound probing Kuninori Morimoto 2018-04-11 2:10 ` [PATCH 1/2] ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 Kuninori Morimoto 2018-04-11 2:10 ` [PATCH 2/2] ASoC: rsnd: don't assume node full path name for HDMI probing Kuninori Morimoto @ 2018-04-12 7:09 ` Kuninori Morimoto 2 siblings, 0 replies; 9+ messages in thread From: Kuninori Morimoto @ 2018-04-12 7:09 UTC (permalink / raw) To: Mark Brown; +Cc: Linux-ALSA, Nguyen Viet Dung, Yokoyama (Renesas) Hi Mark I got Tested-by privately For all Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com> > I noticed rsnd HDMI sound probing had been broken since v4.15. > No board is using it at this point, thus, there is no real issue. > > Kuninori Morimoto (2): > ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 > ASoC: rsnd: don't assume node full path name for HDMI probing > > sound/soc/sh/rcar/core.c | 2 +- > sound/soc/sh/rcar/dma.c | 4 ++-- > sound/soc/sh/rcar/gen.c | 3 ++- > sound/soc/sh/rcar/rsnd.h | 2 ++ > sound/soc/sh/rcar/ssi.c | 11 +++++++++-- > 5 files changed, 16 insertions(+), 6 deletions(-) ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-04-16 11:40 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-04-11 2:09 [PATCH 0/2] ASoC: rsnd: reborn HDMI sound probing Kuninori Morimoto 2018-04-11 2:10 ` [PATCH 1/2] ASoC: rsnd: add RSND_GEN3 for R-Car Gen3 Kuninori Morimoto 2018-04-13 11:22 ` Applied "ASoC: rsnd: add RSND_GEN3 for R-Car Gen3" to the asoc tree Mark Brown 2018-04-16 11:40 ` Mark Brown 2018-04-11 2:10 ` [PATCH 2/2] ASoC: rsnd: don't assume node full path name for HDMI probing Kuninori Morimoto 2018-04-13 11:22 ` Applied "ASoC: rsnd: don't assume node full path name for HDMI probing" to the asoc tree Mark Brown 2018-04-13 13:43 ` Mark Brown 2018-04-16 11:40 ` Mark Brown 2018-04-12 7:09 ` [PATCH 0/2] ASoC: rsnd: reborn HDMI sound probing Kuninori Morimoto
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.