Commit Graph

12 Commits

Author SHA1 Message Date
Kuninori Morimoto de9e70137f
ASoC: mediatek: convert not to use asoc_xxx()
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>
2023-09-26 17:18:38 +02:00
Nícolas F. R. A. Prado 59429a5ecc
ASoC: mediatek: mt2701-wm8960: Register to module device table
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-3-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-09 13:44:24 +00:00
Miaoqian Lin 05654431a1
ASoC: mediatek: Fix missing of_node_put in mt2701_wm8960_machine_probe
This node pointer is returned by of_parse_phandle() with
refcount incremented in this function.
Calling of_node_put() to avoid the refcount leak.

Fixes: 8625c1dbd8 ("ASoC: mediatek: Add mt2701-wm8960 machine driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220404093526.30004-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-05 10:44:31 +01:00
Rikard Falkeborn abed054f03
ASoC: mediatek: Constify static snd_soc_ops
These are only assigned to the ops field in the snd_soc_dai_link struct
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/20211012205521.14098-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-13 12:59:28 +01:00
Kuninori Morimoto 0cd08b10ae
ASoC: mediatek: use asoc_substream_to_rtd()
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-07-23 19:07:32 +01:00
Kuninori Morimoto c8ac82127c
ASoC: mediatek: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI 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>
2020-03-27 14:44:40 +00:00
Kuninori Morimoto b664e06d53
ASoC: mediatek: mt2701-wm8960: use modern dai_link style
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-06 21:25:12 +01:00
Kuninori Morimoto 0310820c27
ASoC: tidyup for_each_card_prelinks() dai_link
commit 7fe072b4df ("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>
2018-09-21 09:21:03 -07:00
Kuninori Morimoto 7fe072b4df
ASoC: add for_each_card_prelinks() macro
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>
2018-09-20 10:18:34 -07:00
zhong jiang e1e38ea14e
ASoC: remove unneeded static set .owner field in platform_driver
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>
2018-09-12 10:52:25 +01:00
Ryder Lee 3a280ed132
ASoC: mediatek: switch to SPDX license tag
Add SPDX identifiers to all remaining files in sound/soc/mediatek/

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-26 15:09:36 +01:00
Ryder Lee 8625c1dbd8 ASoC: mediatek: Add mt2701-wm8960 machine driver
Add wm8960 machine driver and config option for MT2701.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-29 11:37:53 +01:00