Skip to content

Commit fed0805

Browse files
morimotobroonie
authored andcommitted
ASoC: mediatek: mt8195: use snd_soc_dlc_is_dummy()
We can use snd_soc_dlc_is_dummy(). Let's use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent bf2a7ff commit fed0805

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sound/soc/mediatek/mt8195/mt8195-mt6359.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,11 +1379,11 @@ static int mt8195_mt6359_soc_card_probe(struct mtk_soc_card_data *soc_card_data,
13791379
for_each_card_prelinks(card, i, dai_link) {
13801380
if (strcmp(dai_link->name, "DPTX_BE") == 0) {
13811381
if (dai_link->num_codecs &&
1382-
strcmp(dai_link->codecs->dai_name, "snd-soc-dummy-dai"))
1382+
!snd_soc_dlc_is_dummy(dai_link->codecs))
13831383
dai_link->init = mt8195_dptx_codec_init;
13841384
} else if (strcmp(dai_link->name, "ETDM3_OUT_BE") == 0) {
13851385
if (dai_link->num_codecs &&
1386-
strcmp(dai_link->codecs->dai_name, "snd-soc-dummy-dai"))
1386+
!snd_soc_dlc_is_dummy(dai_link->codecs))
13871387
dai_link->init = mt8195_hdmi_codec_init;
13881388
} else if (strcmp(dai_link->name, "DL_SRC_BE") == 0 ||
13891389
strcmp(dai_link->name, "UL_SRC1_BE") == 0 ||
@@ -1423,7 +1423,7 @@ static int mt8195_mt6359_soc_card_probe(struct mtk_soc_card_data *soc_card_data,
14231423
codec_init |= RT5682_CODEC_INIT;
14241424
}
14251425
} else {
1426-
if (strcmp(dai_link->codecs->dai_name, "snd-soc-dummy-dai")) {
1426+
if (!snd_soc_dlc_is_dummy(dai_link->codecs)) {
14271427
if (!(codec_init & DUMB_CODEC_INIT)) {
14281428
dai_link->init = mt8195_dumb_amp_init;
14291429
codec_init |= DUMB_CODEC_INIT;

0 commit comments

Comments
 (0)