summaryrefslogtreecommitdiffstats
path: root/sound/soc/mediatek/mt6797
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: mediatek: convert not to use asoc_xxx()Kuninori Morimoto2023-09-261-3/+3
| | | | | | | | | ASoC is now unified asoc_xxx() into snd_soc_xxx(). This patch convert asoc_xxx() to snd_soc_xxx(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/877codh2qg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt6797-afe-pcm: Convert to platform remove callback ↵Uwe Kleine-König2023-03-201-4/+2
| | | | | | | | | | | | | | | | | | | | | | returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230315150745.67084-109-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: use helper functionKuninori Morimoto2023-01-311-3/+5
| | | | | | | | | | Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/87sffrea3z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt6797-mt6351: Register to module device tableNícolas F. R. A. Prado2022-11-091-0/+1
| | | | | | | | | | | | Register the compatibles for this module on the module device table so it can be automatically loaded when a matching device is found on the system. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://lore.kernel.org/r/20221107160437.740353-4-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mt6797-mt6351: Fix refcount leak in mt6797_mt6351_dev_probeMiaoqian Lin2022-06-061-1/+5
| | | | | | | | | | | of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: f0ab0bf250da ("ASoC: add mt6797-mt6351 driver and config option") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220603083417.9011-1-linmq006@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: remove unnecessary CONFIG_PMJiaxin Yu2021-11-251-2/+0
| | | | | | | | | | | | | | | | | | The unnecessary conditional inclusion caused the following warning. Such as: >> sound/soc/mediatek/mt8192/mt8192-afe-pcm.c:2368:32: warning: unused >> variable 'mt8192_afe_pm_ops' [-Wunused-const-variable] static const struct dev_pm_ops mt8192_afe_pm_ops = { Because runtime_pm already handles the case without CONFIG_PM, we can remove CONFIG_PM condition. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Reported-by: kernel test robot <lkp@intel.com> Acked-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20211125042422.2349-1-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: sync parameter naming (rate/sample_bits)Kuninori Morimoto2021-01-211-4/+4
| | | | | | | | | | | | | | This patch syncs naming rule. - xxx_rates; + xxx_rate; - xxx_samplebits; + xxx_sample_bits; Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ft32olha.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-231-2/+2
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87d04r0yth.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: Fix error handlingTang Bin2020-05-061-4/+3
| | | | | | | | | | | | | If the function platform_get_irq() failed, the negative value returned will not be detected here. So fix error handling in mt6797_afe_pcm_dev_probe(). And when get irq failed, the function platform_get_irq() logs an error message, so remove redundant message here. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20200506143009.13368-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI ↵Kuninori Morimoto2020-03-271-1/+1
| | | | | | | | | pointer Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87o8snir6s.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: Use managed buffer allocationTakashi Iwai2019-12-121-1/+0
| | | | | | | | | | | | 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 <tiwai@suse.de> Link: https://lore.kernel.org/r/20191211172019.23206-1-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: Drop superfluous ioctl PCM opsTakashi Iwai2019-12-111-1/+0
| | | | | | | | | | ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20191210145406.21419-10-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: remove snd_pcm_opsKuninori Morimoto2019-10-081-5/+6
| | | | | | | | | snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87k19n90du.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mt6797: use devm_platform_ioremap_resource() to simplify codeYueHaibing2019-07-311-4/+1
| | | | | | | | | | Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190727150738.54764-7-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt6797-mt6351: use modern dai_link styleKuninori Morimoto2019-06-061-39/+76
| | | | | | | | | ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: Fix UBSAN warning.Pi-Hsun Shih2019-03-191-16/+0
| | | | | | | | | | | | | | | | In sound/soc/mediatek/common/mtk-afe-fe-dai.c, when xxx_reg is -1, it's a no-op to call mtk_regmap_update_bits, but since both xxx_reg and xxx_shift are set to -1, the (1 << xxx_shift) in the argument would trigger a UBSAN warning. Fix the warning by setting those xxx_shift to 0 instead. Note that since the code explicitly checks .mono_shift >= 0 and .fs_shift >= 0 before using them in '<<' operator, those two members are not set to 0. Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Convert a few more users to using %pOFn instead of device_node.nameRob Herring2018-11-161-1/+1
| | | | | | | | | | | | | | | | | | | In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: Olivier Moysan <olivier.moysan@st.com> Cc: Arnaud Pouliquen <arnaud.pouliquen@st.com> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Cc: alsa-devel@alsa-project.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tidyup for_each_card_prelinks() dai_linkKuninori Morimoto2018-09-211-3/+3
| | | | | | | | | commit 7fe072b4df5d0 ("ASoC: add for_each_card_prelinks() macro") added new for_each_card_prelinks() macro, but it had typo. This patch fixup it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: add for_each_card_prelinks() macroKuninori Morimoto2018-09-201-6/+7
| | | | | | | | To be more readable code, this patch adds new for_each_card_prelinks() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: remove unneeded static set .owner field in platform_driverzhong jiang2018-09-121-1/+0
| | | | | | | | | | platform_driver_register will set the .owner field. So it is safe to remove the redundant assignment. The issue is detected with the help of Coccinelle. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mt6797: sub dai use list_headKaiChieh Chuang2018-06-295-40/+81
| | | | | Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mt6797-mt6351: add hostless phone call pathKai Chieh Chuang2018-05-311-0/+46
| | | | | Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mt6797: add Hostless DAIKai Chieh Chuang2018-05-315-0/+129
| | | | | | | | add path for hosltess lpbk from ADDA Capture to ADDA Playback add path for hostless phone call between ADDA DAI and PCM DAI Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mt6797: add PCM interfaceKai Chieh Chuang2018-05-315-0/+494
| | | | | Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mt6797: combine DAI to register componentKaiChieh Chuang2018-05-251-10/+43
| | | | | Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mt6797: extract DAI adda in separate fileKaiChieh Chuang2018-05-254-354/+392
| | | | | Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mt6797: switch to SPDX license tagKai Chieh Chuang2018-04-278-94/+24
| | | | | | Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mt6797: add structure define and clock control function for 6797Kai Chieh Chuang2018-04-275-0/+1101
| | | | | Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: add mt6797-mt6351 driver and config optionKai Chieh Chuang2018-04-272-0/+205
| | | | | Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mt6797: add mt6797 platform driverKai Chieh Chuang2018-04-251-0/+1241
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>