ASoC: mediatek: Assign dummy when codec not specified for a DAI link
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Wed, 13 Mar 2024 11:01:29 +0000 (12:01 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 25 Mar 2024 14:19:08 +0000 (14:19 +0000)
commit5f39231888c63f0a7708abc86b51b847476379d8
tree066b6576c9e64fa54b3830bd31e65e8a0e928624
parentd6c01755805d346a1382d2d81c214b2ca557487a
ASoC: mediatek: Assign dummy when codec not specified for a DAI link

MediaTek sound card drivers are checking whether a DAI link is present
and used on a board to assign the correct parameters and this is done
by checking the codec DAI names at probe time.

If no real codec is present, assign the dummy codec to the DAI link
to avoid NULL pointer during string comparison.

Fixes: 4302187d955f ("ASoC: mediatek: common: add soundcard driver common code")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://msgid.link/r/20240313110147.1267793-5-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/common/mtk-soundcard-driver.c