summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek/mt8192/mt8192-dai-adda.c
AgeCommit message (Collapse)AuthorFilesLines
2024-03-25ASoC: mediatek: Commonize ADDA rate transform functions and enumsAngeloGioacchino Del Regno1-87/+3
Both the enumerations for UL/DL rates, delay data and the functions adda_{dl,ul}_rate_transform were duplicated for each MediaTek SoC dai-adda driver: move the common bits to a new mtk-dai-adda-common file and its header. While at it, also add the "mtk_" prefix to the exported functions. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://msgid.link/r/20240313110147.1267793-4-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: mediatek: mt8192: Handle component name prefixKrzysztof Kozlowski1-2/+2
Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231023095428.166563-16-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-28ASoC: mt8192: Fix range for sidetone positive gainMark Brown1-1/+1
The Sidetone_Positive_Gain_dB control reports a range of 0..100 as valid but the put() function rejects anything larger than 24. Fix this. There are numerous other problems with this control, the name is very non idiomatic and it should be a TLV, but it's ABI so probably we should leave those alone. Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230223-asoc-mt8192-quick-fixes-v1-4-9a85f90368e1@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-28ASoC: mt8192: Report an error if when an invalid sidetone gain is writtenMark Brown1-0/+2
Reporting an error on invalid values is optional but helpful to userspace so do so. Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230223-asoc-mt8192-quick-fixes-v1-3-9a85f90368e1@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-28ASoC: mt8192: Fix event generation for controlsMark Brown1-7/+18
ALSA controls put() operations should return 1 if the value changed and 0 if it remains the same, fix the mt8192 driver to do so. Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230223-asoc-mt8192-quick-fixes-v1-2-9a85f90368e1@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-28ASoC: mt8192: Remove spammy log messagesMark Brown1-33/+0
There are a lot of info level log messages in the mt8192 ADDA driver which are trivially triggerable from userspace, many in normal operation. Remove these to avoid spamming the console. Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230223-asoc-mt8192-quick-fixes-v1-1-9a85f90368e1@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10ASoC: mediatek: mt8192: Delete a redundant condition branchZhen Lei1-2/+0
The statement of the "if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2)" branch is the same as the "else" branch. Delete it to simplify code. No functional change. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20210510083640.3368-1-thunder.leizhen@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-04ASoC: mediatek: mt8192: support adda in platform driverJiaxin Yu1-0/+1471
This patch adds mt8192 adda dai driver. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1604390378-23993-5-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>