summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek/mt8183
AgeCommit message (Collapse)Author
2019-06-06ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: use modern dai_link styleKuninori Morimoto
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>
2019-06-06ASoC: mediatek: mt8183-da7219-max98357: use modern dai_link styleKuninori Morimoto
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>
2019-05-23ASoC: mediatek: mt8183: move card registration to the end of probeTzung-Bi Shih
mt8183_mt6358_ts3a227_max98357_dev_probe() does not return immediately if devm_snd_soc_register_card() returns fail. As a result, the rest of code still get executed. Two options to fix: 1. add an extra return statement if devm_snd_soc_register_card() returns fail 2. move devm_snd_soc_register_card() to the end of probe Adopt option 2 which is more clear and common. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-23ASoC: mediatek: mt8183: remove unused DAPM pinsTzung-Bi Shih
Kernel emits the following messages when booting. ASoC: DAPM unknown pin Headset Mic ASoC: DAPM unknown pin Headphone Remove the unused DAPM pins. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-23ASoC: Mediatek: MT8183: enable dev runtime suspend and resumeJiaxin Yu
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 Yu
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-20ASoC: Mediatek: MT8183: enable IIR filterShunli Wang
IIR fileter can remove DC offset. It must be enabled when dmic or amic connected to pmic is used. Signed-off-by: Shunli Wang <shunli.wang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-16ASoC: Mediatek: MT8183: set data alignShunli Wang
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 Wang
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-05-02ASoC: Mediatek: MT8183: change supported formats of DL2 and UL1Tzung-Bi Shih
DL2 and UL1 are for BTSCO. They should only provide 16-bit, mono, 8kHz and 16kHz to userspace. Change the formats accordingly. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-04ASoC: Mediatek: MT8183: Fix platform_no_drv_owner.cocci warningsYueHaibing
Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-04ASoC: Mediatek: MT8183: Fix platform_no_drv_owner.cocci warningsYueHaibing
Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-03ASoC: Mediatek: MT8183: Fix build error in mt8183_da7219_max98357_dev_probeYueHaibing
When building CONFIG_SND_SOC_MT8183_DA7219_MAX98357A=m gcc warn this: sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c: In function mt8183_da7219_max98357_dev_probe: sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c:413:13: error: struct snd_soc_dai_link has no member named platform; did you mean platforms? dai_link->platform = NULL; ^~~~~~~~ platforms use 'dai_link->platforms' instead of 'dai_link->platform'. Fixes: 11c0269017b2 ("ASoC: Mediatek: MT8183: Add machine driver with TS3A227") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-03ASoC: Mediatek: MT8183: TS3A227: fix build errorAnders Roxell
When building CONFIG_SND_SOC_MT8183_MT6358_TS3A227E_MAX98357A=m the following error pops up: ../sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c: In function ‘mt8183_mt6358_ts3a227_max98357_dev_probe’: ../sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c:325:13: error: ‘struct snd_soc_dai_link’ has no member named ‘platform’; did you mean ‘platforms’? dai_link->platform = NULL; ^~~~~~~~ platforms Rework to use 'dai_link->platforms' instead of 'dai_link->platform'. Fixes: 11c0269017b2 ("ASoC: Mediatek: MT8183: Add machine driver with TS3A227") Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-01ASoC: Mediatek: MT8183: Add machine driver with DA7219Shunli Wang
This patch adds support for the machine board with mt6358, da7219 and max98357 codecs. Signed-off-by: Shunli Wang <shunli.wang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-01ASoC: Mediatek: MT8183: Add machine driver with TS3A227Shunli Wang
This patch adds support for the machine board with TS3A227. 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 Shih
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-03-18ASoC: mediatek: mt8183: skip for i2s5 in mck_disableTzung-Bi Shih
Skip for i2s5 in mck_disable which is also bypassed in mck_enable. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-13ASoC: mediatek: mt8183: make some functions staticWei Yongjun
Fixes the following sparse warnings: sound/soc/mediatek/mt8183/mt8183-dai-i2s.c:966:5: warning: symbol 'mt8183_dai_i2s_get_share' was not declared. Should it be static? sound/soc/mediatek/mt8183/mt8183-dai-i2s.c:986:5: warning: symbol 'mt8183_dai_i2s_set_priv' was not declared. Should it be static? Fixes: a94aec035a12 ("ASoC: mediatek: mt8183: add platform driver") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-11ASoC: mediatek: use %pOFn instead of device_node.nameKaiChieh Chuang
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 Wang
add mt8183 audio platform and affiliated drivers. Signed-off-by: Shunli Wang <shunli.wang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>