ASoC: mediatek: mt8195: Remove afe-dai component and rework codec link
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Wed, 10 Jan 2024 10:57:57 +0000 (11:57 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 10 Jan 2024 13:31:56 +0000 (13:31 +0000)
commite70b8dd26711704b1ff1f1b4eb3d048ba69e29da
tree7f737acf8e2e8b94db49829c63da5b6f0053007f
parent4d4e1b6319e5c4425ea3faeaf9a10b8b4c16c1e1
ASoC: mediatek: mt8195: Remove afe-dai component and rework codec link

Remove the extra 'mt8195-afe-pcm-dai' component, register the DAI
drivers to the main AFE component, and rework the DAI linking between
the headset codec (RT5682/RT5682S) and the TDM interface in the probe
function to stop assigning name, relying on the of_node of the codec.
Also replace the COMP_DUMMY codec entry with a COMP_EMPTY for the
ETDM2_IN and remove it entirely from ETDM1_OUT to fix the registration
flow for this sound card.

While at it, since we also need to swap the codec init function from
ETDM2_IN to ETDM1_OUT, remove the static assignment of both `ops` and
`init` for both, as we now assign these dynamically during probe.

Fixes: 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://msgid.link/r/20240110105757.539089-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
sound/soc/mediatek/mt8195/mt8195-mt6359.c