summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek
AgeCommit message (Collapse)AuthorFilesLines
2023-11-03ASoC: mediatek: mt8186_mt6366_rt1019_rt5682s: trivial: fix error messagesEugen Hristev1-2/+2
Property 'playback-codecs' is referenced as 'speaker-codec' in the error message, and this can lead to confusion. Correct the error message such that the correct property name is referenced. Fixes: 0da16e370dd7 ("ASoC: mediatek: mt8186: add machine driver with mt6366, rt1019 and rt5682s") Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231031103139.77395-1-eugen.hristev@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: mediatek: mt8192: Handle component name prefixKrzysztof Kozlowski2-4/+4
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-10-26ASoC: mediatek: mt8188: 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> Reviewed-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20231023095428.166563-15-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: mediatek: mt8186: Handle component name prefixKrzysztof Kozlowski4-6/+6
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-14-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-26ASoC: mediatek: mt8183: 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> Link: https://lore.kernel.org/r/20231023095428.166563-13-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-24ASoC: mediatek: mt8186: remove redundant assignments to variable tdm_conColin Ian King1-2/+0
There are two occurrences where variable tdm_con is being initialized to zero and the next statement re-assigns tdm_con to a new value. The initializations are redundant and can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231023151704.670240-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-24ASoC: mediatek: mt7986: add sample rate checkerMaso Huang1-4/+19
mt7986 only supports 8/12/16/24/32/48/96/192 kHz Signed-off-by: Maso Huang <maso.huang@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231024035019.11732-4-maso.huang@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-24ASoC: mediatek: mt7986: remove the mt7986_wm8960_priv structureMaso Huang1-21/+12
Remove the mt7986_wm8960_priv structure. Signed-off-by: Maso Huang <maso.huang@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231024035019.11732-3-maso.huang@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-24ASoC: mediatek: mt7986: drop the remove callback of mt7986_wm8960Maso Huang1-10/+0
Drop the remove callback of mt7986_wm8960. Signed-off-by: Maso Huang <maso.huang@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231024035019.11732-2-maso.huang@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-19ASoC: mediatek: mt8186_mt6366_rt1019_rt5682s: add rt5650 supportxiazhengqiao2-1/+44
To use RT5650 as the codec and the amp, add a new sound card named mt8186_rt5650. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com> Link: https://lore.kernel.org/r/20231019100322.25425-3-xiazhengqiao@huaqin.corp-partner.google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-10ASoC: mediatek: mt8188-mt6359: add rt5682s supportxiazhengqiao2-2/+121
To use RT5682S as the codec and MAX98390 as the amp, add a new sound card named mt8188_rt5682s. Signed-off-by: xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com> Reviewed-by: Trevor Wu <trevor.wu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231010023738.8241-3-xiazhengqiao@huaqin.corp-partner.google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-10ASoC: DT matching and header cleanupsMark Brown8-9/+7
Merge series from Rob Herring <robh@kernel.org>: This is a series is part of ongoing clean-ups related to device matching and DT related implicit includes. Essentially of_device.h has a bunch of implicit includes and generally isn't needed any nore except for of_match_device(). As we also generally want to get rid of of_match_device() as well, I've done that so we're not updating the includes twice.
2023-10-09ASoC: mt8192-afe-gpio: Drop unused includeLinus Walleij1-1/+0
This driver includes the legacy GPIO header <linux/gpio.h> but is not using any symbols from it. AFE has a custom GPIO implementation that is not using the kernel GPIO framework. Signed-off-by: Linus Walleij <linus.walleij@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/20231006-descriptors-asoc-mediatek-v1-8-07fe79f337f5@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: mt8186-mt6366-rt1019-rt5682s: Drop unused includeLinus Walleij2-2/+0
This driver includes the legacy GPIO header <linux/gpio.h> but is not using any symbols from it. AFE has a custom GPIO implementation that is not using the kernel GPIO framework, so it need not include it either. Signed-off-by: Linus Walleij <linus.walleij@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/20231006-descriptors-asoc-mediatek-v1-7-07fe79f337f5@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: mt8173-rt5650: Drop unused includesLinus Walleij1-2/+0
This driver includes the legacy GPIO header <linux/gpio.h> and <linux/of_gpio.h> but does not use any symbols from either of them so drop the includes. Signed-off-by: Linus Walleij <linus.walleij@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/20231006-descriptors-asoc-mediatek-v1-6-07fe79f337f5@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: mt8173-rt5650-rt5676: Drop unused includesLinus Walleij1-2/+0
This driver includes the legacy GPIO header <linux/gpio.h> and <linux/of_gpio.h> but does not use any symbols from either of them so drop the includes. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231006-descriptors-asoc-mediatek-v1-5-07fe79f337f5@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: mt8173-rt5650-rt5514: Drop unused includesLinus Walleij1-2/+0
This driver includes the legacy GPIO header <linux/gpio.h> and <linux/of_gpio.h> but does not use any symbols from either of them so drop the includes. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231006-descriptors-asoc-mediatek-v1-4-07fe79f337f5@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: mt8173-max98090: Drop unused includeLinus Walleij1-1/+0
This driver includes the legacy GPIO header <linux/gpio.h> but is not using any symbols from it. Drop the include. Signed-off-by: Linus Walleij <linus.walleij@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/20231006-descriptors-asoc-mediatek-v1-3-07fe79f337f5@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: mediatek: mt2701-cs42448: Convert to GPIO descriptorsLinus Walleij1-32/+22
The driver is pretty straight-forward to convert to use GPIO descriptors, however a separate patch is needed to accept the DT GPIO resources ending with "-gpio1" and "-gpio2" instead of the standard "-gpio" or "-gpios" name convention. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231006-descriptors-asoc-mediatek-v1-2-07fe79f337f5@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: Explicitly include correct DT includesRob Herring8-9/+7
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> # for at91 Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-1-13a4f0f7fee6@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-26ASoC: mediatek: convert not to use asoc_xxx()Kuninori Morimoto24-124/+124
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-11ASoC: mediatek: mt8188-mt6359: add SOF supportTrevor Wu1-13/+205
SOF is enabled when adsp phandle is assigned to "mediatek,adsp". The required callback will be assigned when SOF is enabled. Additionally, "mediatek,dai-link" is introduced to decide the supported dai links for a project, so user can reuse the machine driver regardless of dai link combination. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230825024935.10878-4-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11ASoC: mediatek: common: revise SOF common codeTrevor Wu2-15/+106
Originally, normal dai link fixup callback is overwritten by sof fixup callback on mtk_sof_card_late_probe and it relies on the mapping defined on struct sof_conn_stream. It's not flexible. When a new hardware connection is adopted, user needs to update struct sof_conn_stream defined in machine driver which is used to specify the mapping relationship of normal BE and SOF BE. In the patch, mtk_sof_check_tplg_be_dai_link_fixup() is introduced for all normal BEs. In mtk_sof_late_probe, back up normal BE fixup if it exists and then overwrite be_hw_params_fixup by the new callback. There are two cases for FE and BE connection. case 1: SOF FE -> normal BE -> SOF_BE case 2: normal FE -> normal BE In the new fixup callback, it tries to find SOF_BE which connects to the same FE, and then reuses the fixup of SOF_BE. If no SOF_BE exists, it must be case 2, so rollback to the original fixup if it exists. As a result, the predefined relation is not needed anymore. Hardware connection can be controlled by the mixer control for AFE interconn. Then, DPCM finds the BE mapping at runtime. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230825024935.10878-3-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-11ASoC: mediatek: mt8188-mt6359: support dynamic pinctrlTrevor Wu1-0/+21
To avoid power leakage, it is recommended to replace the default pinctrl state with dynamic pinctrl since certain audio pinmux functions can remain in a HIGH state even when audio is disabled. Linking pinctrl with DAPM using SND_SOC_DAPM_PINCTRL will ensure that audio pins remain in GPIO mode by default and only switch to an audio function when necessary. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230825024935.10878-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-28Merge tag 'asoc-v6.6' of ↵Takashi Iwai17-56/+1679
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.6 The rest of the updates for v6.6, some of the highlights include: - A big API cleanup from Morimoto-san, rationalising the places we put functions. - Lots of work on the SOF framework, AMD and Intel drivers, including a lot of cleanup and new device support. - Standardisation of the presentation of jacks from drivers. - Provision of some generic sound card DT properties. - Conversion oof more drivers to the maple tree register cache. - New drivers for AMD Van Gogh, AWInic AW88261, Cirrus Logic cs42l43, various Intel platforms, Mediatek MT7986, RealTek RT1017 and StarFive JH7110.
2023-08-18ASoC: mediatek: Convert to generic PCM copy opsTakashi Iwai1-17/+10
This patch converts the mediatek BT SCO driver code to use the new unified PCM copy callback. It's a straightforward conversion from *_user() to *_iter() variants. As copy_form/to_iter() updates the internal offset at each read/write, we can drop the cur_*_idx counter in the loop, too. Note that copy_from/to_iter() returns the copied bytes, hence the error condition is adjusted accordingly. Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230815190136.8987-20-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-17ASoC: mediatek: mt7986: add machine driver with wm8960Maso Huang3-0/+207
Add support for mt7986 board with wm8960. Signed-off-by: Maso Huang <maso.huang@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230817101338.18782-5-maso.huang@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-17ASoC: mediatek: mt7986: add platform driverMaso Huang4-0/+641
Add mt7986 platform driver. Signed-off-by: Maso Huang <maso.huang@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230817101338.18782-4-maso.huang@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-17ASoC: mediatek: mt7986: support etdm in platform driverMaso Huang1-0/+411
Add mt7986 etdm dai driver support. Signed-off-by: Maso Huang <maso.huang@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230817101338.18782-3-maso.huang@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-17ASoC: mediatek: mt7986: add common headerMaso Huang2-0/+245
Add header files for register definition and structure. Signed-off-by: Maso Huang <maso.huang@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230817101338.18782-2-maso.huang@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-14ASoC: mediatek: merge DAI call back functions into opsKuninori Morimoto1-25/+31
ALSA SoC merges DAI call backs into .ops. This patch merge these into one. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/87sf8t9m6n.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07ASoC: mediatek: mt8186-mt6366-da7219-max98357: Map missing jack kcontrolsAlper Nebi Yasak1-0/+6
Commit 8e9867486806 ("ASoC: mediatek: mt8186-da7219: Expose individual headset jack pins") maps kcontrols for Headphone and Headset Mic jacks for this driver so that PulseAudio and PipeWire can handle jack detection events for these peripherals. The DA7219 codec used here can also distinguish between Headphone and Line Out connections that go into the same physical port. Expose the latter to userspace as a kcontrol as well and add the necessary widgets. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230802175737.263412-19-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: Map missing jack kcontrolsAlper Nebi Yasak1-6/+47
This driver does not properly map jack pins to kcontrols that PulseAudio and PipeWire need to handle jack detection events. The TS3A227 component used here can detect Headphones and Headset Mic connections. Expose each to userspace as kcontrols and add the necessary widgets. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230802175737.263412-18-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07ASoC: mediatek: mt8183-da7219-max98357: Map missing jack kcontrolsAlper Nebi Yasak1-7/+36
This driver does not properly map jack pins to kcontrols that PulseAudio and PipeWire need to handle jack detection events. The DA7219 codec used here can detect Headphones, Headset Mic and Line Out connections. Expose each to userspace as kcontrols and add the necessary widgets. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230802175737.263412-17-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07ASoC: mediatek: mt8173-rt5650: Map missing jack kcontrolsAlper Nebi Yasak1-5/+18
This driver does not properly map jack pins to kcontrols that PulseAudio and PipeWire need to handle jack detection events. The RT5645 codec used here can detect Headphone and Headset Mic connections. Expose both to userspace as kcontrols. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230802175737.263412-16-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07ASoC: mediatek: mt8173-rt5650-rt5676: Map missing jack kcontrolsAlper Nebi Yasak1-5/+18
This driver does not properly map jack pins to kcontrols that PulseAudio and PipeWire need to handle jack detection events. The RT5645 codec used here can detect Headphone and Headset Mic connections. Expose both to userspace as kcontrols. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230802175737.263412-15-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07ASoC: mediatek: mt8173-rt5650-rt5514: Map missing jack kcontrolsAlper Nebi Yasak1-5/+18
This driver does not properly map jack pins to kcontrols that PulseAudio and PipeWire need to handle jack detection events. The RT5645 codec used here can detect Headphone and Headset Mic connections. Expose each to userspace as kcontrols. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230802175737.263412-14-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07ASoC: mediatek: mt8173-max98090: Configure jack as a Headset jackAlper Nebi Yasak1-1/+1
This driver has correctly mapped jack kcontrols for Headphone and Headset Mic. However, it is configuring the jack to only care about Headphone events. The MAX98090 codec used here can detect both connections, so configure the jack as such. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230802175737.263412-13-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-03ASoC: mediatek: mt8186: Remove unused mutex.Sebastian Andrzej Siewior1-2/+0
The mutex mutex_request_dram has no user. Remove mutex_request_dram. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230803083908.9DxbPvOK@linutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2023-07-25Merge tag 'asoc-v6.6-early' of ↵Takashi Iwai3-5/+22
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.6 Here's an initial batch of updates for ASoC for this release cycle. We've got a bunch of new drivers in here, a bit of core work from Morimoto-san and quite a lot of janitorial work. There's several updates that pull in changes from other subsystems in order to build on them: - An adaptor to allow use of IIO DACs and ADCs in ASoC which pulls in some IIO changes. - Create a library function for intlog10() and use it in the NAU8825 driver. - Include the ASoC tests, including the topology tests, in the default KUnit full test coverage. This also involves enabling UML builds of ALSA since that's the default KUnit test environment which pulls in the addition of some stubs to the driver. - More factoring out from Morimoto-san. - Convert a lot of drivers to use the more modern maple tree register cache. - Support for AMD machines with MAX98388 and NAU8821, Cirrus Logic CS35L36, Intel AVS machines with ES8336 and RT5663 and NXP i.MX93.
2023-07-21ASoC: mediatek: mt8188: Simplify with snd_ctl_find_id_mixer()Takashi Iwai1-11/+1
Replace an open code with the new snd_ctl_find_id_mixer(). There is no functional change. Acked-by: Mark Brown <broonie@kernel.org> Cc: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20230720082108.31346-11-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-07-19ASoC: mediatek: mt8188: DPCM used FE and BE merged parametersTrevor Wu1-0/+15
To ensure that DPCM takes into account the backend hardware limitations when user space queries the hw_params of a device, we need to add dpcm_merged_format, dpcm_merged_chan, and dpcm_merged_rate to the FE dai_links. This patch includes only stereo FE dai_links, since multi-channel FEs may be reserved for specific purposes. Therefore, it may not be appropriate to consider BE conditions. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20230706064123.29790-1-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-07-17ASoC: mediatek: mt8186: Convert to devm_platform_ioremap_resource()Yangtao Li1-3/+1
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Link: https://lore.kernel.org/r/20230711034846.69437-3-frank.li@vivo.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-07-10ASoC: mediatek: mt8188: add memory-region supportTrevor Wu1-2/+6
In certain projects, it is necessary to utilize the reserved memory region for audio dma. The patch takes into account the dts property 'memory-region', allowing for the specification of memory for afe memif through device tree. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20230629074348.21670-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-20ASoC: soc-core.c: add index on snd_soc_of_get_dai_name()Kuninori Morimoto1-1/+1
Current snd_soc_of_get_dai_name() doesn't accept index for #sound-dai-cells. It is not useful for user. This patch adds it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pm5qdgng.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16ASoC: Merge fixes due to dependenciesMark Brown10-70/+48
So we can apply the tlv320aic3xxx DT conversion.
2023-06-12ASoC: mediatek: mt8173: Fix irq error pathRicardo Ribalda Delgado1-4/+5
After reordering the irq probe, the error path was not properly done. Lets fix it. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Cc: stable@kernel.org Fixes: 4cbb264d4e91 ("ASoC: mediatek: mt8173: Enable IRQ when pdata is ready") Signed-off-by: Ricardo Ribalda Delgado <ribalda@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230612-mt8173-fixup-v2-2-432aa99ce24d@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-12ASoC: mediatek: mt8173: Fix snd_soc_component_initialize error pathRicardo Ribalda Delgado1-2/+2
If the second component fails to initialize, cleanup the first on. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Cc: stable@kernel.org Fixes: f1b5bf07365d ("ASoC: mt2701/mt8173: replace platform to component") Signed-off-by: Ricardo Ribalda Delgado <ribalda@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230612-mt8173-fixup-v2-1-432aa99ce24d@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-09ASoC: mediatek: mt8192-mt6359: Go back to old headphone pin nameNícolas F. R. A. Prado1-1/+1
This reverts commit cbbc0ec6dea09c ("ASoC: mediatek: mt8192-mt6359: Remove " Jack" from Headphone pin name"). That commit removed the " Jack" suffix with the reasoning that it is automatically added to the name of the kcontrol created, which is true, but this name is also used to look for the DAPM widget that will be toggled when the jack status is updated. Since the widget is still called "Headphone Jack" the jack can't link to the widget and the following error is shown: mt8192_mt6359 sound: ASoC: DAPM unknown pin Headphone It is not possible to also rename the headphone DAPM widget because its name is used by a switch kcontrol, "Headphone Jack Switch", both to link to the headphone widget and to assemble its name. This switch's name is referenced in the upstream UCM file, so renaming it would break userspace. Since the original commit didn't bring any benefit, besides sparing a few CPU cycles, simply revert it. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20230608221050.217968-1-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-08ASoC: mediatek: mt8188-mt6359: Use bitfield macros for registersAngeloGioacchino Del Regno1-13/+19
Replace open coded instances of FIELD_GET() with it, move register definitions at the top of the file and also replace magic numbers with register definitions. While at it, also change a regmap_update_bits() call to regmap_write() because the top 29 bits of AUD_TOP_CFG (31:3) are reserved (unused). Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Link: https://lore.kernel.org/r/20230608084727.74403-6-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>