summaryrefslogtreecommitdiffstats
path: root/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1011-rt5682.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: mediatek: mt8195: merge machine driverTrevor Wu2022-04-041-1198/+0
| | | | | | | | | | | | | | | | | Because most functions can be reused in different codec combinations, mt8195 machine drivers are combined to one common file. The model and compatible string are used to decide which codecs are being used. As a result, We can prevent from copy-paste functions when new codec combination is introduced. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220324053851.27350-3-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8195: add playback support to PCM1_BE dai_linkTrevor Wu2021-12-311-0/+1
| | | | | | | | | PCM1_BE should be a dai_link for both playback and capture. In the patch, the missing DPCM playback support is added. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20211230084731.31372-3-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8195: update control for RT5682 seriesTrevor Wu2021-12-291-3/+53
| | | | | | | | | | | | | | | Playback pop is observed and the root cause is the reference clock provided by MT8195 is diabled before RT5682 finishes the control flow. To ensure the reference clock supplied to RT5682 is disabled after RT5682 finishes all register controls. We replace BCLK with MCLK for RT5682 reference clock, and makes use of set_bias_level_post to handle MCLK which guarantees MCLK is off after all RT5682 register access. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reviewed-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20211228064821.27865-1-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8195: release device_node after snd_soc_register_cardTzung-Bi Shih2021-12-241-37/+16
| | | | | | | | | | | Device nodes can be released after components have bound. Shortens the lifecycle of the device nodes. Releases the reference counts after snd_soc_register_card. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20211224064719.2031210-5-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8195-mt6359: reduce log verbosity in probe()Tzung-Bi Shih2021-12-201-2/+0
| | | | | | | | | | | | Eliminates error messages if snd_soc_register_card() failed. Kernel emits messages if device probe error anyway. This is mainly for removing the following error messages during boot. >>> snd_soc_register_card fail -517 Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20211220093408.207206-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: assign correct type to argumentJiaxin Yu2021-12-141-2/+2
| | | | | | | | | | | | | | | | | | | Fix the following sparse warning: (new ones prefixed by >>) >> sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c:370:33: sparse: sparse: incorrect type in argument 3 (different base types) sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c:370:33: sparse: expected unsigned int to sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c:370:33: sparse: got restricted snd_pcm_format_t [usertype] Correct discription of format, use S32_LE and S24_LE to distinguish the different 32bit. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20211209073224.21793-1-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8195: add headset codec rt5682s supportTrevor Wu2021-12-061-7/+22
| | | | | | | | | | mt8195 machine driver adds rt5682s support in this patch. Card name can be specified from dts by model property, and driver makes use of the name to distinguish which headset codec is on the board. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20211129141057.12422-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8195: Constify static snd_soc_opsRikard Falkeborn2021-11-301-1/+1
| | | | | | | | | | These are only assigned to the ops field in the snd_soc_dai_link which is a pointer to const struct snd_soc_ops. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20211127093147.17368-1-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8195: add machine driver with mt6359, rt1011 and rt5682Trevor Wu2021-10-291-0/+1155
This patch adds support for mt8195 board with mt6359, rt1011 and rt5682. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20211020071428.14297-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>