aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-11-25ASoC: mediatek: remove unnecessary CONFIG_PMJiaxin Yu1-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>
2021-07-11ASoC: mediatek: mt8183: Fix Unbalanced pm_runtime_enable in mt8183_afe_pcm_dev_probeZhang Qilong1-16/+27
Add missing pm_runtime_disable() when probe error out. It could avoid pm_runtime implementation complains when removing and probing again the driver. Fixes:a94aec035a122 ("ASoC: mediatek: mt8183: add platform driver") Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Link: https://lore.kernel.org/r/20210618141104.105047-3-zhangqilong3@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23ASoC: mediatek: use asoc_substream_to_rtd()Kuninori Morimoto1-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>
2020-05-07ASoC: mediatek: mt8183: fix error handling of platform_get_irq()Tzung-Bi Shih1-4/+3
platform_get_irq() returns negative value on error instead of 0. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200507015442.191336-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27ASoC: mediatek: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointerKuninori Morimoto1-1/+1
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>
2019-12-12ASoC: mediatek: Use managed buffer allocationTakashi Iwai1-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>
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 <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>
2019-10-08ASoC: mediatek: remove snd_pcm_opsKuninori Morimoto1-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>
2019-10-08ASoC: mt8183: fix audio playback slowly after playback during bootupJiaxin Yu1-0/+15
Before regmap_reinit_cache we must reset audio regs as default values. So we use reset controller unit(toprgu) to reset audio hw. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Reviewed-by: Yingjoe Chen <yingjoe.chen@mediatek.com> Link: https://lore.kernel.org/r/1569580317-21181-5-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-23ASoC: Mediatek: MT8183: enable dev runtime suspend and resumeJiaxin Yu1-4/+1
System suspend will power off audio, so we need regcache sync when system resume. Remove pm_runtime_get_sync in dev probe and pm_runtime_put_sync in dev remove.So that audio dev can triggle runitme suspend and resume. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-21ASoC: Mediatek: MT8183: fix compile errorJiaxin Yu1-9/+9
mtk_regmap_update_bits() has been changed to take a shift and warn when reg >= 0 but shift < 0.So the hd_align_mshift must not have shift. Change it from XXX_HD_ALIGN_MASK_SFT to XXX_HD_ALIGN_MASK. Fixes: cf61f5b01531 ("ASoC: Mediatek: MT8183: set data align") Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-16ASoC: Mediatek: MT8183: set data alignShunli Wang1-0/+18
This patch sets register and bit information about data align for every memory interface. Signed-off-by: Shunli Wang <shunli.wang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-02ASoC: Mediatek: MT8183: add I2S2 control path from UL2 and UL3Shunli Wang1-0/+38
This patch add the control path from UL2 or UL3 to I2S2. The patch is based on broonie tree "for-next" branch. Signed-off-by: Shunli Wang <shunli.wang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-19ASoC: mediatek: Fix UBSAN warning.Pi-Hsun Shih1-20/+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>
2019-02-11ASoC: mediatek: use %pOFn instead of device_node.nameKaiChieh Chuang1-1/+1
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-25ASoC: mediatek: mt8183: add platform driverShunli Wang1-0/+1237
add mt8183 audio platform and affiliated drivers. Signed-off-by: Shunli Wang <shunli.wang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>