Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: mediatek: mt8183: Handle component name prefix

Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names,
to include also the component's name prefix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231023095428.166563-13-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
e84c7f5d 343b6259

+2 -2
+2 -2
sound/soc/mediatek/mt8183/mt8183-dai-i2s.c
··· 276 276 277 277 switch (event) { 278 278 case SND_SOC_DAPM_PRE_PMU: 279 - if (strcmp(w->name, APLL1_W_NAME) == 0) 279 + if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) 280 280 mt8183_apll1_enable(afe); 281 281 else 282 282 mt8183_apll2_enable(afe); 283 283 break; 284 284 case SND_SOC_DAPM_POST_PMD: 285 - if (strcmp(w->name, APLL1_W_NAME) == 0) 285 + if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) 286 286 mt8183_apll1_disable(afe); 287 287 else 288 288 mt8183_apll2_disable(afe);