ASoC: mediatek: Add common snd_soc_ops .startup() callback
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tue, 16 Apr 2024 07:13:59 +0000 (09:13 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 16 Apr 2024 10:59:59 +0000 (19:59 +0900)
commitfe071237dee6d617e5cb0eb4856b23576a877479
treed83a3b191766c0bb1bb37c9a52493e67d1db659d
parent44a53c8ec9cad02ce7dfd55094e8d7aeb48eb73c
ASoC: mediatek: Add common snd_soc_ops .startup() callback

MediaTek platforms are typically setting PCM rate and channels
constraints for playback, capture and HDMI/DisplayPort playback:
commonize the startup callback by adding the PCM constraints data
to the mtk_platform_card_data structure and by reusing the common
mtk_soundcard_startup() function for all of them by getting back
the parameters from the aforementioned struct.

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-8-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/common/mtk-soundcard-driver.c
sound/soc/mediatek/common/mtk-soundcard-driver.h