ASoC: mediatek: mt8195: extract SOF common code
authorChunxu Li <chunxu.li@mediatek.com>
Fri, 15 Jul 2022 08:59:03 +0000 (16:59 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 18 Jul 2022 12:45:16 +0000 (13:45 +0100)
commit0caf1120c58395108344d5df4e09359b67e95094
treebaeae5d6483fb4ff5899b2c478369d4056564207
parentc3fc63479e372747ffa99b4602f962d2862a13b3
ASoC: mediatek: mt8195: extract SOF common code

The functions related to SOF can be reused in different machine drivers,
such as mt8195 or mt8186, so extract the common code to avoid duplication.

Set mtk_soc_card_data which include machine private data and SOF private
data as card drvdata, then the difference between machine private can be
ignored such as mt8195_mt6359_priv or mt8186_mt6366_priv, at the same
time the SOF related code can be reused in different machine drivers.

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220715085903.7796-1-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/common/Makefile
sound/soc/mediatek/common/mtk-dsp-sof-common.c [new file with mode: 0644]
sound/soc/mediatek/common/mtk-dsp-sof-common.h [new file with mode: 0644]
sound/soc/mediatek/common/mtk-soc-card.h [new file with mode: 0644]
sound/soc/mediatek/mt8195/mt8195-mt6359.c