- 15 Jun, 2021 2 commits
-
-
Dmitry Osipenko authored
Squash all machine drivers into a single-universal one. This reduces code duplication, eases addition of a new drivers and upgrades older code to a modern Linux kernel APIs. Suggested-by: Jonathan Hunter <jonathanh@nvidia.com> Co-developed-by: Ion Agorria <ion@agorria.com> Signed-off-by: Ion Agorria <ion@agorria.com> Co-developed-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210529154649.25936-3-digetx@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dmitry Osipenko authored
The driver_name="tegra" is now required by the newer ALSA UCMs, otherwise Tegra UCMs don't match by the path/name. All Tegra machine drivers are specifying the card's name, but it has no effect if model name is specified in the device-tree since it overrides the card's name. We need to set the driver_name to "tegra" in order to get a usable lookup path for the updated ALSA UCMs. The new UCM lookup path has a form of driver_name/card_name. The old lookup paths that are based on driver module name continue to work as before. Note that UCM matching never worked for Tegra ASoC drivers if they were compiled as built-in, this is fixed by supporting the new naming scheme. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210529154649.25936-2-digetx@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 14 Jun, 2021 25 commits
-
-
Tan Zhongjun authored
The platform_get_irq() prints error message telling that interrupt is missing, hence there is no need to duplicated that message. Signed-off-by: Tan Zhongjun <tanzhongjun@yulong.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210610040037.1064-1-hbut_tan@163.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210611035351.3878091-1-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210611050235.4182746-1-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivasa Rao Mandadapu authored
Add four speaker support on MI2S secondary block by using I2S SD1 line on gpio52 pin, and add channel map control support in the lpass-cpu audio driver. Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210609133039.4648-1-srivasam@codeaurora.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Martin Blumenstingl authored
The Realtek rt5640 codec driver can be used with the generic sound card drivers, so it should be selectable. For example, with the addition of #sound-dai-cells = <0> property in DT, it can be used with simple and graph card drivers. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20210612200650.1301661-1-martin.blumenstingl@googlemail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210611034122.3871022-1-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210610132705.138706-1-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tan Zhongjun authored
Clean up the check for irq.dev_err is superfluous as platform_get_irq() already prints an error.Remove curly braces to confirm to styling requirements. Signed-off-by: Tan Zhongjun <tanzhongjun@yulong.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210610125052.1280-1-hbut_tan@163.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jaroslav Kysela authored
In case, where the loops are not executed for a reason, the uninitialized variable 'err' is returned to the caller. Make code fully predictible and assign zero in the declaration. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Cc: Mark Brown <broonie@kernel.org> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20210614071746.1787072-1-perex@perex.czSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210610133120.141405-1-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210611022115.3583765-1-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Yingliang authored
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210611044256.3899583-1-yangyingliang@huawei.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge series "ASoC: codecs: add wcd938x support" from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>: This patchset adds support for Qualcomm WCD938X codec. Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire devices, RX and TX respectively supporting 4 x ADCs, ClassH, Ear, Aux PA, 2xHPH, 7 x TX diff inputs, 8 DMICs and MBHC. Eventhough this device has two SoundWire devices, only tx device has access to main codec Control/Status Registers! For codec driver to be functional it would need both tx and rx Soundwire devices to be up and this is taken care by using device component framework and device-links are used to ensure proper pm dependencies. Ex tx does not enter suspend before rx or codec is suspended. This patchset along with other SoundWire patches on the list have been tested on SM8250 MTP device. Thanks, srini Changes since v8: - moved Kconfig and Makefile changes to last patch as suggested by Mark - removed array of enums and used static entries instead. Suggested by Mark - return true if put succeeds, Suggested by Mark - removed some unneeded semi-colons in switch Srinivas Kandagatla (9): ASoC: dt-bindings: wcd938x: add bindings for wcd938x ASoC: codecs: wcd-clsh: add new version support ASoC: codecs: wcd938x: add basic driver ASoC: dt-bindings: wcd938x-sdw: add bindings for wcd938x-sdw ASoC: codecs: wcd938x-sdw: add SoundWire driver ASoC: codecs: wcd938x: add basic controls ASoC: codecs: wcd938x: add playback dapm widgets ASoC: codecs: wcd938x: add capture dapm widgets ASoC: codecs: wcd938x: add audio routing and Kconfig .../bindings/sound/qcom,wcd938x-sdw.yaml | 70 + .../bindings/sound/qcom,wcd938x.yaml | 146 + sound/soc/codecs/Kconfig | 14 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/wcd-clsh-v2.c | 348 +- sound/soc/codecs/wcd-clsh-v2.h | 16 + sound/soc/codecs/wcd938x-sdw.c | 315 ++ sound/soc/codecs/wcd938x.c | 3753 +++++++++++++++++ sound/soc/codecs/wcd938x.h | 720 ++++ 9 files changed, 5376 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd938x-sdw.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml create mode 100644 sound/soc/codecs/wcd938x-sdw.c create mode 100644 sound/soc/codecs/wcd938x.c create mode 100644 sound/soc/codecs/wcd938x.h -- 2.21.0
-
Srinivas Kandagatla authored
This patch adds audio routing for both playback and capture and Makefile and Kconfigs changes for wcd938x Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210609090943.7896-10-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
This patch adds required dapm widgets for capture path. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210609090943.7896-9-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
This patch adds required dapm widgets for playback. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210609090943.7896-8-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
This patch adds basic controls found in wcd938x codec. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210609090943.7896-7-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
This patch adds support to SoundWire devices on WCD9380/WCD9385 Codec Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210609090943.7896-6-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire devices RX and TX respectively. This bindings is for those slave devices on WCD9380/WCD9385. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210609090943.7896-5-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
This patch adds basic SoundWire codec driver to support for WCD938X TX and RX devices. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210609090943.7896-4-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
From WCD937X Class H controller has changed significantly, so add support to this new version for WCD937X and WCD938X Codecs. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210609090943.7896-3-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivas Kandagatla authored
Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire device RX and TX respectively, supporting 4 x ADCs, ClassH, Ear, Aux PA, 2xHPH, 7 x TX diff inputs, 8 DMICs, MBHC. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210609090943.7896-2-srinivas.kandagatla@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yang Li authored
Eliminate the following coccicheck warning: ./sound/soc/codecs/wcd-mbhc-v2.c:990:2-3: Unneeded semicolon. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/1623221171-105359-1-git-send-email-yang.lee@linux.alibaba.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Srinivasa Rao Mandadapu authored
The DMA interrupt clear register overwritten during simultaneous playback and capture in lpass platform interrupt handler. It's causing playback or capture stuck in similtaneous plaback on speaker and capture on dmic test. Update appropriate reg fields of corresponding channel instead of entire register write. Fixes: commit c5c8635a ("ASoC: qcom: Add LPASS platform driver") Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210609072310.26099-1-srivasam@codeaurora.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge tag 'asoc-hdmi-codec-improvements-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into asoc-5.14 Improvements to the hdmi-codec driver and ALSA infrastructure around it to support the HDMI Channel Mapping and IEC958 controls
-
- 10 Jun, 2021 2 commits
-
-
Maxime Ripard authored
The IEC958 status bit is usually set by the userspace after hw_params has been called, so in order to use whatever is set by the userspace, we need to implement the prepare hook. Let's add it to the hdmi_codec_ops, and mandate that either prepare or hw_params is implemented. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210525132354.297468-6-maxime@cerno.tech
-
Maxime Ripard authored
The IEC958 status bits can be exposed and modified by the userspace through dedicated ALSA controls. This patch implements those controls for the hdmi-codec driver. It relies on a default value being setup at probe time that can later be overridden by the control put. The hw_params callback is then called with a buffer filled with the proper bits for the current parameters being passed on so the underlying driver can just reuse those bits as is. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210525132354.297468-5-maxime@cerno.tech
-
- 08 Jun, 2021 6 commits
-
-
Maxime Ripard authored
We're going to add more controls to support the IEC958 output, so let's rework the control registration a bit to support more of them. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210525132354.297468-4-maxime@cerno.tech
-
Maxime Ripard authored
In some situations, like a codec probe, we need to provide an IEC status default but don't have access to the sampling rate and width yet since no stream has been configured yet. Each and every driver has its own default, whereas the core iec958 code also has some buried in the snd_pcm_create_iec958_consumer functions. Let's split these functions in two to provide a default that doesn't rely on the sampling rate and width, and another function to fill them when available. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20210525132354.297468-3-maxime@cerno.tech
-
Maxime Ripard authored
The doc currently mentions that the IEC958 Playback Default should be exposed on the PCM iface, and the Playback Mask on the mixer iface. It's a bit confusing to advise to have two related controls on two separate ifaces, and it looks like the drivers that currently expose those controls use any combination of the mixer and PCM ifaces. Let's try to clarify the situation a bit, and encourage to at least have the controls on the same iface. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20210525132354.297468-2-maxime@cerno.tech
-
Wan Jiabing authored
Fix following coccicheck warning: ./sound/soc/codecs/wcd934x.c:5136:2-3: Unneeded semicolon ./sound/soc/codecs/wcd934x.c:2466:2-3: Unneeded semicolon ./sound/soc/codecs/wcd934x.c:2527:2-3: Unneeded semicolon Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Link: https://lore.kernel.org/r/20210608030656.24052-1-wanjiabing@vivo.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
snd_soc_runtime_get_dai_fmt() is using discriminatory terms. This patch fixup it. Fixes: ba9e82a1 ("ASoC: soc-core: add snd_soc_runtime_get_dai_fmt()") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/874ke9dxkp.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Christophe JAILLET authored
If an error occurs after a successful 'of_iomap()' call, it must be undone by a corresponding 'iounmap()' call, as already done in the remove function. While at it, remove the useless initialization of 'ret' at the beginning of the function. Fixes: 4bd8597d ("ASoC: mediatek: add btcvsd driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/0c2ba562c3364e61bfbd5b3013a99dfa0d9045d7.1622989685.git.christophe.jaillet@wanadoo.frSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 07 Jun, 2021 5 commits
-
-
Mark Brown authored
Merge series "ASoC: adds new .auto_selectable_formats support" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: Hi Mark These are v3 of "ASoC: adds new .get_fmt support", but renamed Subject. This is a little bit challenging patch-set. The idea/code is almost same as v1 / v2. v3 has "priority" support. We need to set dai_link->dai_fmt to select CPU/Codec settings, and it is selected by Sound Card Driver, today. Because of it, Sound Card user need to know both CPU / Codec available dai_fmt, and needs to select it. For example simple-card / audio-graph case, it is selected by "format" and "bitclock/frame-master/inversion" on DT. But, it can be automatically selected if both CPU and Codec drivers indicate it to ALSA SoC Framework, somehow. By this patch, dai_fmt can be automatically selected from each driver if both CPU / Codec driver had .auto_selectable_formats. Automatically selectable *field* is depends on each drivers. For example, some driver want to select format "automatically", but want to select other fields "manually", because of complex limitation. Or other example, in case of both CPU and Codec are possible to be clock provider, but the quality was different. In these case, user need/want to *manually* select each fields from Sound Card driver. It uses Sound Card specified fields preferentially, and try to select non-specific fields from CPU and Codec driver settings if driver had .auto_selectable_formats. In other words, we can select all dai_fmt via Sound Card driver same as before. Select dai_fmt 100% automatically is very difficult and will be very complex, but select automatically some fields only is very easy, I guess. This patch-set is based on such assumption. v1 -> v2 - Add more detail explanation on git-log, code, comment. - Possible to be Clock/Frame provider is depends on driver's situation. v2 -> v3 - has priority - tidyup function explanation for snd_soc_dai_get_fmt() - Each driver don't try to have SND_SOC_DAIFMT_CBx_CFx to avoid confusion Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (7): ASoC: soc-core: move snd_soc_runtime_set_dai_fmt() to upside ASoC: soc-core: add snd_soc_runtime_get_dai_fmt() ASoC: ak4613: add .auto_selectable_formats support ASoC: pcm3168a: add .auto_selectable_formats support ASoC: rsnd: add .auto_selectable_formats support ASoC: fsi: add .auto_selectable_formats support ASoC: hdmi-codec: add .auto_selectable_formats support include/sound/soc-dai.h | 55 +++++++ sound/soc/codecs/ak4613.c | 11 ++ sound/soc/codecs/hdmi-codec.c | 21 +++ sound/soc/codecs/pcm3168a.c | 26 +++ sound/soc/sh/fsi.c | 15 ++ sound/soc/sh/rcar/core.c | 31 +++- sound/soc/soc-core.c | 288 ++++++++++++++++++++++++++-------- sound/soc/soc-dai.c | 63 ++++++++ sound/soc/soc-utils.c | 29 ++++ 9 files changed, 475 insertions(+), 64 deletions(-) -- 2.25.1
-
Colin Ian King authored
The pointer node is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. The function is missing a of_node_put on node, fix this by adding the call before returning. Addresses-Coverity: ("Unused value") Fixes: 0d6a04da ("ASoC: Add Rockchip rk817 audio CODEC support") Signed-off-by: Colin Ian King <colin.king@canonical.com> Tested-by: Chris Morgan <macromorgan@hotmail.com> Link: https://lore.kernel.org/r/20210603113659.82031-1-colin.king@canonical.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jiapeng Chong authored
Fix the following coccicheck warnings: ./sound/soc/codecs/rk817_codec.c:49:2-3: Unneeded semicolon. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: https://lore.kernel.org/r/1622802209-45031-1-git-send-email-jiapeng.chong@linux.alibaba.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Merge tag 'tb-mfd-asoc-v5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into asoc-5.14 Immutable branch between MFD and ASoC due for the v5.14 merge window
-
Kuninori Morimoto authored
By this patch, DAI format might be automatically selected (Depends on paired DAI). Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87a6ognc5i.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-