ASoC: mediatek: Add common machine soundcard driver probe mechanism
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tue, 16 Apr 2024 07:13:53 +0000 (09:13 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 16 Apr 2024 10:59:54 +0000 (19:59 +0900)
commitbce93a162505f0bc0499888ace2f66bd56fb94b3
tree6d7108927aa096169e7bc54225cabbdde9d22cd5
parent62c48dd33b4f2e037554d1322ae4f9f60e9461ef
ASoC: mediatek: Add common machine soundcard driver probe mechanism

Add a common machine soundcard driver probe function that supports both
DSP and AFE-direct usecases and also provides a hook for legacy machine
soundcard driver probe mechanisms.

Note that the hook is there because, even for legacy probe, a lot of the
actual code can still be commonized, hence still reducing duplication
for the legacy devicetree retrocompatibility cases.

This common probe function deprecates all of the inconsistent previous
probe mechanisms and aims to settle all of the MediaTek card drivers on
consistent and common devicetree properties describing wanted DAIs,
device specific DAI configuration and DAI links to codecs found on
each device/board.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/common/mtk-soc-card.h
sound/soc/mediatek/common/mtk-soundcard-driver.c
sound/soc/mediatek/common/mtk-soundcard-driver.h