Skip to content

Commit b56ec29

Browse files
wenliangwubroonie
authored andcommitted
ASoC: mediatek: mt8195: 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: 1de9a54 ("ASoC: mediatek: mt8195: support etdm in platform driver") Signed-off-by: Trevor Wu <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 23badca commit b56ec29

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sound/soc/mediatek/mt8195/mt8195-dai-etdm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2567,6 +2567,9 @@ static void mt8195_dai_etdm_parse_of(struct mtk_base_afe *afe)
25672567

25682568
/* etdm in only */
25692569
for (i = 0; i < 2; i++) {
2570+
dai_id = ETDM_TO_DAI_ID(i);
2571+
etdm_data = afe_priv->dai_priv[dai_id];
2572+
25702573
ret = snprintf(prop, sizeof(prop),
25712574
"mediatek,%s-chn-disabled",
25722575
of_afe_etdms[i].name);

0 commit comments

Comments
 (0)