aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/mediatek/common/mtk-afe-platform-driver.c
AgeCommit message (Collapse)AuthorFilesLines
2024-04-16ASoC: mediatek: Add common mtk_afe_component_probe callbackAngeloGioacchino Del Regno1-0/+18
Multiple MediaTek AFE PCM component drivers are using their own .probe() callback, but most of those are simply duplicated functions as they are doing exactly the same thing over and over. Add a common probe callback for this component to reduce duplication. Reviewed-by: Alexandre Mergnat <[email protected]> Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-09-26ASoC: mediatek: convert not to use asoc_xxx()Kuninori Morimoto1-2/+2
ASoC is now unified asoc_xxx() into snd_soc_xxx(). This patch convert asoc_xxx() to snd_soc_xxx(). Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-07-23ASoC: mediatek: use asoc_substream_to_rtd()Kuninori Morimoto1-1/+1
Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2020-03-27ASoC: mediatek: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI ↵Kuninori Morimoto1-1/+1
pointer Signed-off-by: Kuninori Morimoto <[email protected]> Tested-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2019-12-12ASoC: mediatek: Use managed buffer allocationTakashi Iwai1-10/+2
Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped, as well as the superfluous snd_pcm_lib_preallocate_free_for_all() call. As of the result, hw_free and pcm_destruct ops became empty and got removed. Signed-off-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2019-12-11ASoC: mediatek: Drop superfluous ioctl PCM opsTakashi Iwai1-1/+0
ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Matthias Brugger <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2019-10-08ASoC: mediatek: remove snd_pcm_opsKuninori Morimoto1-16/+12
snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2019-02-06ASoC: mediatek: Drop superfluous PCM preallocation error checksTakashi Iwai1-3/+3
snd_pcm_lib_preallocate_pages() and co always succeed, so the error check is simply redundant. Drop it. Reviewed-by: Jaroslav Kysela <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2018-06-29ASoC: mediatek: sub dai use list_headKaiChieh Chuang1-40/+24
use list_head for sub_dais, since original sub_dais array is sparsely occupied Signed-off-by: KaiChieh Chuang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-31ASoC: mediatek: export mtk-afe symbols as neededArnd Bergmann1-0/+5
The new mt6797-afe driver uses some functions in a common file, which works for a built-in driver but fails for a loadable module: ERROR: "mtk_afe_pcm_free" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined! ERROR: "mtk_afe_add_sub_dai_control" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined! ERROR: "mtk_afe_pcm_new" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined! ERROR: "mtk_afe_combine_sub_dai" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined! ERROR: "mtk_afe_pcm_ops" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined! This exports the five symbols above for modules. Fixes: b3c702f56bf5 ("ASoC: mt6797: combine DAI to register component") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-25ASoC: mt6797: combine DAI to register componentKaiChieh Chuang1-3/+3
Signed-off-by: KaiChieh Chuang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-25ASoC: mediatek: add sub dai to mtk_base_afeKaiChieh Chuang1-0/+78
In MediaTek SoC chip we have multiple DAI, such as I2S, ADDA, PCM, etc. Organize each DAI in to one sub dai, with its dai driver, controls, widgets, routes. add mtk_afe_combine_sub_dai() to combine dai driver from each DAI. add mtk_afe_add_sub_dai_control() to register the control, widget, routes to component. Signed-off-by: KaiChieh Chuang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-05-02ASoC: mediatek: avoid using snd_soc_platformKai Chieh Chuang1-1/+1
avoid using snd_soc_platform, which is removed after 4.18 Signed-off-by: KaiChieh Chuang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-27ASoC: mediatek: preallocate pages use platform deviceKai Chieh Chuang1-2/+2
preallocate pages should use platform device, since we set dma mask for platform device. Signed-off-by: KaiChieh Chuang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-04-26ASoC: mediatek: switch to SPDX license tagRyder Lee1-9/+1
Add SPDX identifiers to all remaining files in sound/soc/mediatek/ Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-02-12ASoC: mt2701/mt8173: replace platform to componentKuninori Morimoto1-3/+6
Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto <[email protected]> Tested-by: Garlic Tseng <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-06-29ASoC: mediatek: implement mediatek common structureGarlic Tseng1-0/+90
implement mediatek basic structure, include common private data, afe fe dai operator and afe platform driver. Signed-off-by: Garlic Tseng <[email protected]> Signed-off-by: Mark Brown <[email protected]>