Skip to contentSkip to conversation

ASoC: mediatek: add missing initialization

PATCH In review Trevor Wu 3 participants 6 messages Mar 1, 2023

Subsystems (3)
lore
Share & tools
lore

Trevor Wu

author
#0 lore raw

v2 cover ASoC: mediatek: add missing initialization

Fix dts parsing problem in mt8188 and mt8195 etdm dai drivers.

Changes since v1:
- split the patch into two commits and add Fixes tag.

Trevor Wu (2):
ASoC: mediatek: mt8188: add missing initialization
ASoC: mediatek: mt8195: add missing initialization

 sound/soc/mediatek/mt8188/mt8188-dai-etdm.c | 3 +++
 sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 3 +++
 2 files changed, 6 insertions(+)
Signature · 1 line
2.18.0
author
#1 lore raw

PATCH v2 1/2 ASoC: mediatek: mt8188: add missing initialization

In etdm dai driver, dai_etdm_parse_of() function is used to parse dts properties to get parameters. There are two for-loops which are sepearately for all etdm and etdm input only cases. In etdm in only loop, dai_id is not initialized, so it keeps the value intiliazed in another loop.

In the patch, add the missing initialization to fix the unexpected parsing problem.

Fixes 2babb4777489 ("ASoC: mediatek: mt8188: support etdm in platform driver")
---
 sound/soc/mediatek/mt8188/mt8188-dai-etdm.c | 3 +++
 1 file changed, 3 insertions(+)
sound/soc/mediatek/mt8188/mt8188-dai-etdm.c +3 -0
index 1c53d4cb19bb..7a37752d4244 100644
@@ -2498,6 +2498,9 @@ static void mt8188_dai_etdm_parse_of(struct mtk_base_afe *afe)
 
 	/* etdm in only */
 	for (i = 0; i < 2; i++) {
+		dai_id = ETDM_TO_DAI_ID(i);
+		etdm_data = afe_priv->dai_priv[dai_id];
+
 		snprintf(prop, sizeof(prop), "mediatek,%s-chn-disabled",
 			 of_afe_etdms[i].name);
 
Signature · 1 line
2.18.0
maintainer Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] ASoC: mediatek: mt8188: add missing initialization

Il 01/03/23 12:01, Trevor Wu ha scritto:

Quoted 11 lines

In etdm dai driver, dai_etdm_parse_of() function is used to parse dts properties to get parameters. There are two for-loops which are sepearately for all etdm and etdm input only cases. In etdm in only loop, dai_id is not initialized, so it keeps the value intiliazed in another loop.

In the patch, add the missing initialization to fix the unexpected parsing problem.

Fixes 2babb4777489 ("ASoC: mediatek: mt8188: support etdm in platform driver")
author
#3 lore raw

PATCH v2 2/2 ASoC: mediatek: mt8195: add missing initialization

In reply to Trevor Wu

In etdm dai driver, dai_etdm_parse_of() function is used to parse dts properties to get parameters. There are two for-loops which are sepearately for all etdm and etdm input only cases. In etdm in only loop, dai_id is not initialized, so it keeps the value intiliazed in another loop.

In the patch, add the missing initialization to fix the unexpected parsing problem.

Fixes 1de9a54acafb ("ASoC: mediatek: mt8195: support etdm in platform driver")
---
 sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 3 +++
 1 file changed, 3 insertions(+)
sound/soc/mediatek/mt8195/mt8195-dai-etdm.c +3 -0
index c2e268054773..f2c9a1fdbe0d 100644
@@ -2567,6 +2567,9 @@ static void mt8195_dai_etdm_parse_of(struct mtk_base_afe *afe)
 
 	/* etdm in only */
 	for (i = 0; i < 2; i++) {
+		dai_id = ETDM_TO_DAI_ID(i);
+		etdm_data = afe_priv->dai_priv[dai_id];
+
 		ret = snprintf(prop, sizeof(prop),
 			       "mediatek,%s-chn-disabled",
 			       of_afe_etdms[i].name);
Signature · 1 line
2.18.0
maintainer Reviewed-by on v2 2/2
#4 lore raw

Re: [PATCH v2 2/2] ASoC: mediatek: mt8195: add missing initialization

Il 01/03/23 12:02, Trevor Wu ha scritto:

Quoted 11 lines

In etdm dai driver, dai_etdm_parse_of() function is used to parse dts properties to get parameters. There are two for-loops which are sepearately for all etdm and etdm input only cases. In etdm in only loop, dai_id is not initialized, so it keeps the value intiliazed in another loop.

In the patch, add the missing initialization to fix the unexpected parsing problem.

Fixes 1de9a54acafb ("ASoC: mediatek: mt8195: support etdm in platform driver")
maintainer
#5 lore raw
In reply to Trevor Wu
Quoted 10 lines · Trevor Wu

Fix dts parsing problem in mt8188 and mt8195 etdm dai drivers.

Changes since v1:
- split the patch into two commits and add Fixes tag.

Trevor Wu (2):
ASoC: mediatek: mt8188: add missing initialization
ASoC: mediatek: mt8195: add missing initialization

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: mediatek: mt8188: add missing initialization

      commit: 23badca4248a9a467f630adbd1557f664585e1db
[2/2] ASoC: mediatek: mt8195: add missing initialization
      commit: b56ec2992a2e43bc3e60d6db86849d31640e791f

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