]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
12 months agoASoC: SOF: ipc4-topology: Use correct queue_id for requesting input pin format
Peter Ujfalusi [Mon, 24 Jun 2024 12:15:18 +0000 (14:15 +0200)]
ASoC: SOF: ipc4-topology: Use correct queue_id for requesting input pin format

It is incorrect to request the input pin format of the destination widget
using the output pin index of the source module as the indexes are not
necessarily matching.
moduleA.out_pin1 can be connected to moduleB.in_pin0 for example.

Use the dst_queue_id to request the input format of the destination module.

This bug remained unnoticed likely because in nocodec topologies we don't
have process modules after a module copier, thus the pin/queue index is
ignored.
For the process module case, the code was likely have been tested in a
controlled way where all the pin/queue/format properties were present to
work.

Update the debug prints to have better information.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: stable@vger.kernel.org # v6.8+
Link: https://patch.msgid.link/20240624121519.91703-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: mediatek: mt6358: Add "Dmic Mode Switch" kcontrol for switch DMIC mode.
Jiaxin Yu [Thu, 13 Jun 2024 02:07:25 +0000 (10:07 +0800)]
ASoC: mediatek: mt6358: Add "Dmic Mode Switch" kcontrol for switch DMIC mode.

There are two hardware connection methods for DMICs on the MT6358. In cases
where more than two DMICs are used, we need to time-multiplex these DMICs.
Therefore, we need to dynamically switch the modes of these DMICs based on
the actual usage scenarios.

            ---- DMIC1
AU_VIN0 ---
            ---- DMIC2

AU_VIN2 --- ----DMIC3

When we want to use DMIC1/2, configure it to one-wire mode. When we want to
use DMIC1/3, configure it to two-wire mode.

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://patch.msgid.link/20240613020725.27874-1-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: nau8822: add MCLK support
Mark Brown [Sun, 23 Jun 2024 12:13:14 +0000 (13:13 +0100)]
ASoC: nau8822: add MCLK support

Merge series from Andrejs Cainikovs <andrejs.cainikovs@gmail.com>:

This change adds local MCLK handling, which would cover a case when a
reference audio clock is present in a system, but is not allowed to be
changed, see [1].

[1]: https://lore.kernel.org/all/ZfBdxrzX3EnPuGOn@ediswmail9.ad.cirrus.com/

12 months agoASoC: qcom: display port changes
Mark Brown [Sun, 23 Jun 2024 12:13:07 +0000 (13:13 +0100)]
ASoC: qcom: display port changes

Merge series from srinivas.kandagatla@linaro.org:

This patchset adds support for.
1. parse Display Port module tokens from ASoC topology
2. add support to DP/HDMI Jack events.
3. fixes a typo in function name in sm8250

Verified these patches on X13s along with changes to tplg in
https://git.codelinaro.org/linaro/qcomlt/audioreach-topology/-/tree/topic/x13s-dp?ref_type=heads
and ucm changes from https://github.com/Srinivas-Kandagatla/alsa-ucm-conf/tree/topic/x13s-dp

x1e80100 is verified by Krzysztof with his changes in tplg

https://git.codelinaro.org/linaro/qcomlt/audioreach-topology/-/merge_requests/7/commits

12 months agoASoC: Few constifications (mostly arguments)
Mark Brown [Sun, 23 Jun 2024 12:13:00 +0000 (13:13 +0100)]
ASoC: Few constifications (mostly arguments)

Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Make few pointers in ASoC functions as pointers to const, so the code is
clearer to read, a bit safer and allows further constifications (e.g.
placing some data as rodata).

12 months agoASoC: Add ak4619 codec support
Mark Brown [Sun, 23 Jun 2024 12:12:52 +0000 (13:12 +0100)]
ASoC: Add ak4619 codec support

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

This is v3 patch-set for ak4619 driver.
It was created by Khanh, and I updated/adjusted to upstream.
It was tested on Renesas V4M GrayH

Link: https://lore.kernel.org/r/877ceotnrg.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87frtb3x4k.wl-kuninori.morimoto.gx@renesas.com
12 months agoASoC: add compatible for ti,pcm5242
Mark Brown [Sun, 23 Jun 2024 12:12:45 +0000 (13:12 +0100)]
ASoC: add compatible for ti,pcm5242

Merge series from Christian Hewitt <christianshewitt@gmail.com>:

Update bindings and add a driver compatible for the pcm5242
chip used on the Odroid HiFi-Shield2 i2c mezzanine board.

12 months agoASoC: codecs: wcd family: cleanups
Mark Brown [Sun, 23 Jun 2024 12:12:38 +0000 (13:12 +0100)]
ASoC: codecs: wcd family: cleanups

Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Set of simple cleanups from similar issues in all Qualcomm WCD93xx
codecs.

The first patch "ASoC: codecs: wcd-mbhc: Constify passed MBHC reg
fields" is a requirement for few others, but except this they are
independent.

12 months agoASoC: dt-bindings: convert everest,es7134.txt &
Mark Brown [Sun, 23 Jun 2024 12:12:31 +0000 (13:12 +0100)]
ASoC: dt-bindings: convert everest,es7134.txt &

Merge series from Neil Armstrong <neil.armstrong@linaro.org>:

Convert the text bindings of the Everest ES7241/ES7134/7144/7154 2 channels
I2S analog to digital converter to dt-schema.

12 months agotlv320adc3xxx: Allow MICBIAS pins to be used as
Mark Brown [Sun, 23 Jun 2024 12:12:24 +0000 (13:12 +0100)]
tlv320adc3xxx: Allow MICBIAS pins to be used as

Merge series from Ricard Wanderlof <ricard.wanderlof@axis.com>:

In some cases, depending on system design, the MICBIAS pins on the
chip are not needed as such, but a couple of extra GPIO pins would be
useful. This patch allows the MICBIAS pins to be configured in the
device tree as general purpose output pins, controlled via the GPIO
framework.

Owing to their originally intended purpose there are some limitations:
when the MICBIAS pins are deactivated, they will float, so will likely
need a pulldown in many applications. When activated, they will
assume the voltage specified by the micbias1-vg and micbias2-vg
properties, respectively, meaning that the resulting output voltage
will be 2.0 V, 2.5 V or AVDD .

12 months agoCirrus Logic Family of ADCs
Mark Brown [Sun, 23 Jun 2024 12:12:16 +0000 (13:12 +0100)]
Cirrus Logic Family of ADCs

Merge series from Paul Handrigan <paulha@opensource.cirrus.com>:

This patchset provides ASoC support for the latest family
of Cirrus Logic multichannel, high performance audio ADCs.
The devices that are supported are CS5302 (2 channel ADC),
CS5304 (4 channel ADC), and CS5308 (8 channel ADC).

12 months agoASoC: dt-bindings: add ti,pcm5242 to pcm512x
Christian Hewitt [Sat, 22 Jun 2024 13:12:44 +0000 (13:12 +0000)]
ASoC: dt-bindings: add ti,pcm5242 to pcm512x

Add ti,pcm5242 to the pcm512x driver file

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://patch.msgid.link/20240622131245.2607533-2-christianshewitt@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: Add support for ti,pcm5242 to the pcm512x driver
Christian Hewitt [Sat, 22 Jun 2024 13:12:45 +0000 (13:12 +0000)]
ASoC: Add support for ti,pcm5242 to the pcm512x driver

Add a compatible string to enable support for the ti,pcm5242 DAC chip
in the pcm512x driver.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://patch.msgid.link/20240622131245.2607533-3-christianshewitt@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: cs530x: Support for cs530x ADCs
Paul Handrigan [Fri, 21 Jun 2024 15:17:57 +0000 (10:17 -0500)]
ASoC: cs530x: Support for cs530x ADCs

Add support for the cs530x family of high performance
ADCs.

Signed-off-by: Paul Handrigan <paulha@opensource.cirrus.com>
Link: https://patch.msgid.link/20240621151757.1661265-3-paulha@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: dt-bindings: cirrus,cs530x: Add initial DT binding
Paul Handrigan [Fri, 21 Jun 2024 15:17:56 +0000 (10:17 -0500)]
ASoC: dt-bindings: cirrus,cs530x: Add initial DT binding

Add the YAML DT bindings for the cs530x high performance
audio ADCs.

Signed-off-by: Paul Handrigan <paulha@opensource.cirrus.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240621151757.1661265-2-paulha@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoc: PCM6240: Return directly after a failed devm_kzalloc() in pcmdevice_i2c_probe()
Hao Ge [Mon, 17 Jun 2024 02:09:54 +0000 (10:09 +0800)]
ASoc: PCM6240: Return directly after a failed devm_kzalloc() in pcmdevice_i2c_probe()

The value “-ENOMEM” was assigned to the local variable “ret”
in one if branch after a devm_kzalloc() call failed at the beginning.
This error code will trigger then a pcmdevice_remove() call with a passed
null pointer so that an undesirable dereference will be performed.
Thus return the appropriate error code directly.

Fixes: 1324eafd37aa ("ASoc: PCM6240: Create PCM6240 Family driver code")
Signed-off-by: Hao Ge <gehao@kylinos.cn>
Link: https://patch.msgid.link/20240617020954.17252-1-hao.ge@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: amd: acp: add pcm constraints for buffer size and period size
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:41 +0000 (12:58 +0530)]
ASoC: amd: acp: add pcm constraints for buffer size and period size

ACP common dma driver has a buffer size and period size restriction
which should be 64 byte aligned. Add pcm constraints for the same.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240617072844.871468-8-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: amd: acp: move i2s clock generation sequence
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:40 +0000 (12:58 +0530)]
ASoC: amd: acp: move i2s clock generation sequence

I2S clock generation registers should be programmed before starting the I2S
dma when I2S controller is programmed as clock master. Move i2s clock
generation register programming sequence prior to i2s dma start.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240617072844.871468-7-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: amd: acp: modify conditional check for programming i2s mclk
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:39 +0000 (12:58 +0530)]
ASoC: amd: acp: modify conditional check for programming i2s mclk

ACP provides different IO configurations(ACP PDM, I2S and SoundWire).
I2S mclk should be programmed only when I2S configuration is selected and
I2S controller is programmed as clock master.
Modify the conditional check for programming i2s mclk.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240617072844.871468-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: amd: acp: remove unused variables from acp_resource structure
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:38 +0000 (12:58 +0530)]
ASoC: amd: acp: remove unused variables from acp_resource structure

Remove unused variables i2s_pin_cfg_offset and i2s_mode from acp_resource
structure entries.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240617072844.871468-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: amd: acp: remove acp_i2s_probe function
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:37 +0000 (12:58 +0530)]
ASoC: amd: acp: remove acp_i2s_probe function

In acp_i2s_probe(), acp_base null check is verified.
As already acp_base null check will be verified in acp platform
driver probe sequence, additional NULL check in acp_i2s_probe() is not
needed. Remove acp_i2s_probe() function.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240617072844.871468-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: Merge up fixes
Mark Brown [Fri, 21 Jun 2024 12:17:21 +0000 (13:17 +0100)]
ASoC: Merge up fixes

We need some of the AMD fixes as a base for new work.

12 months agoASoC: fsl-asoc-card: set priv->pdev before using it
Elinor Montmasson [Thu, 20 Jun 2024 13:25:03 +0000 (15:25 +0200)]
ASoC: fsl-asoc-card: set priv->pdev before using it

priv->pdev pointer was set after being used in
fsl_asoc_card_audmux_init().
Move this assignment at the start of the probe function, so
sub-functions can correctly use pdev through priv.

fsl_asoc_card_audmux_init() dereferences priv->pdev to get access to the
dev struct, used with dev_err macros.
As priv is zero-initialised, there would be a NULL pointer dereference.
Note that if priv->dev is dereferenced before assignment but never used,
for example if there is no error to be printed, the driver won't crash
probably due to compiler optimisations.

Fixes: 708b4351f08c ("ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support")
Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>
Link: https://patch.msgid.link/20240620132511.4291-2-elinor.montmasson@savoirfairelinux.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: dt-bindings: convert everest,es7134.txt to dt-schema
Neil Armstrong [Thu, 20 Jun 2024 09:39:58 +0000 (11:39 +0200)]
ASoC: dt-bindings: convert everest,es7134.txt to dt-schema

Convert the text bindings of the Everest ES7134/7144/7154 2 channels
I2S analog to digital converter to dt-schema.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20240620-topic-amlogic-upstream-bindings-convert-everest-v2-2-660985615522@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: dt-bindings: convert everest,es7241.txt to dt-schema
Neil Armstrong [Thu, 20 Jun 2024 09:39:57 +0000 (11:39 +0200)]
ASoC: dt-bindings: convert everest,es7241.txt to dt-schema

Convert the text biddings for the Everest ES7241 2 channels I2S analog
to digital converter to dt-schema.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20240620-topic-amlogic-upstream-bindings-convert-everest-v2-1-660985615522@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: dt-bindings: add missing vender prefix on filename
Kuninori Morimoto [Thu, 20 Jun 2024 00:32:39 +0000 (00:32 +0000)]
ASoC: dt-bindings: add missing vender prefix on filename

Many Sound yaml files doesn't have vender prefix on filename.
Add missing vender prefix for these files.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/87wmmkpi6w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: amd: acp: move chip->flag variable assignment
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:36 +0000 (12:58 +0530)]
ASoC: amd: acp: move chip->flag variable assignment

chip->flag variable assignment will be skipped when acp platform device
creation is skipped. In this case chip>flag value will not be set.
chip->flag variable should be assigned along with other structure
variables for 'chip' structure. Move chip->flag variable assignment
prior to acp platform device creation.

Fixes: 3a94c8ad0aae ("ASoC: amd: acp: add code for scanning acp pdm controller")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240617072844.871468-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: amd: acp: remove i2s configuration check in acp_i2s_probe()
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:35 +0000 (12:58 +0530)]
ASoC: amd: acp: remove i2s configuration check in acp_i2s_probe()

ACP supports different pin configurations for I2S IO. Checking ACP pin
configuration value against specific value breaks the functionality for
other I2S pin configurations. This check is no longer required in i2s dai
driver probe call as i2s configuration check will be verified during acp
platform device creation sequence.
Remove i2s_mode check in acp_i2s_probe() function.

Fixes: b24484c18b10 ("ASoC: amd: acp: ACP code generic to support newer platforms")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240617072844.871468-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: amd: acp: add a null check for chip_pdev structure
Vijendar Mukunda [Mon, 17 Jun 2024 07:28:34 +0000 (12:58 +0530)]
ASoC: amd: acp: add a null check for chip_pdev structure

When acp platform device creation is skipped, chip->chip_pdev value will
remain NULL. Add NULL check for chip->chip_pdev structure in
snd_acp_resume() function to avoid null pointer dereference.

Fixes: 088a40980efb ("ASoC: amd: acp: add pm ops support for acp pci driver")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240617072844.871468-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: rt1318: Add RT1318 audio amplifier driver
Jack Yu [Wed, 19 Jun 2024 05:53:42 +0000 (05:53 +0000)]
ASoC: rt1318: Add RT1318 audio amplifier driver

This is the initial i2s-based amplifier driver for rt1318.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://msgid.link/r/b3055442ce6d4994aa01aa1fad6ba1fe@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: dt-bindings: ak4619: Add initial DT binding
Kuninori Morimoto [Wed, 19 Jun 2024 01:00:23 +0000 (01:00 +0000)]
ASoC: dt-bindings: ak4619: Add initial DT binding

Add Asahi Kasei ak4619 audio codec bindings.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/87h6dpwxug.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: Add ak4619 codec support
Khanh Le [Wed, 19 Jun 2024 00:59:36 +0000 (00:59 +0000)]
ASoC: Add ak4619 codec support

Add support for the Asahi Kasei AK4619 audio codec.

[Kuninori cleanuped and adjusted to upstream code]

Signed-off-by: Khanh Le <khanh.le.xr@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://msgid.link/r/87iky5wxvr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: cs35l56: Accept values greater than 0 as IRQ numbers
Simon Trimmer [Mon, 17 Jun 2024 13:53:38 +0000 (14:53 +0100)]
ASoC: cs35l56: Accept values greater than 0 as IRQ numbers

IRQ lookup functions such as those in ACPI can return error values when
an IRQ is not defined. The i2c core driver converts the error codes to a
value of 0 and the SPI bus driver passes them unaltered to client device
drivers.

The cs35l56 driver should only accept positive non-zero values as IRQ
numbers.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Fixes: 8a731fd37f8b ("ASoC: cs35l56: Move utility functions to shared file")
Link: https://msgid.link/r/20240617135338.82006-1-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: Intel: soc-acpi: mtl: fix speaker no sound on Dell SKU 0C64
Shuming Fan [Wed, 12 Jun 2024 07:57:40 +0000 (15:57 +0800)]
ASoC: Intel: soc-acpi: mtl: fix speaker no sound on Dell SKU 0C64

Dell SKU 0C64 has a single rt1318 amplifier.
The prefix name of control still needs to be set rt1318-1 corresponding to UCM config.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://msgid.link/r/20240612075740.1678082-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd939x: Drop unused num_ports field
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:36 +0000 (18:15 +0200)]
ASoC: codecs: wcd939x: Drop unused num_ports field

The driver does not use few 'num_ports' in 'struct wcd939x_sdw_priv'.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-23-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd939x: Drop unused RX/TX direction enum
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:35 +0000 (18:15 +0200)]
ASoC: codecs: wcd939x: Drop unused RX/TX direction enum

The enum with RX/TX soundwire direction is not used.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-22-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd939x: Constify wcd939x_sdw_ch_info
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:34 +0000 (18:15 +0200)]
ASoC: codecs: wcd939x: Constify wcd939x_sdw_ch_info

Driver does not modify static wcd939x_sdw_ch_info array, so it can be
made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-21-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd939x: Constify static data
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:33 +0000 (18:15 +0200)]
ASoC: codecs: wcd939x: Constify static data

Driver does not modify few static data (MBHC reg fields, IRQ chip), so
make them const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-20-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd938x: Drop unused num_ports field
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:32 +0000 (18:15 +0200)]
ASoC: codecs: wcd938x: Drop unused num_ports field

The driver does not use few 'num_ports' in 'struct wcd938x_sdw_priv'.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-19-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd938x: Drop unused RX/TX direction enum
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:31 +0000 (18:15 +0200)]
ASoC: codecs: wcd938x: Drop unused RX/TX direction enum

The enum with RX/TX soundwire direction is not used.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-18-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd938x: Constify wcd938x_sdw_ch_info
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:30 +0000 (18:15 +0200)]
ASoC: codecs: wcd938x: Constify wcd938x_sdw_ch_info

Driver does not modify static wcd938x_sdw_ch_info array, so it can be
made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-17-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd938x: Constify static data
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:29 +0000 (18:15 +0200)]
ASoC: codecs: wcd938x: Constify static data

Driver does not modify few static data (MBHC reg fields, IRQ chip), so
make them const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-16-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd937x: Drop unused chipid member
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:28 +0000 (18:15 +0200)]
ASoC: codecs: wcd937x: Drop unused chipid member

The driver stores the read chipid in 'struct wcd937x_priv' but never
needs it after.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-15-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd937x: Drop unused state container fields
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:27 +0000 (18:15 +0200)]
ASoC: codecs: wcd937x: Drop unused state container fields

The driver does not use few 'struct wcd937x_priv' and 'struct
wcd937x_sdw_priv' members, so just drop them for smaller code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-14-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd937x: Drop unused enums, defines and types
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:26 +0000 (18:15 +0200)]
ASoC: codecs: wcd937x: Drop unused enums, defines and types

Few declarations (defines, struct codec_port_info, enums) are not used
and can be safely dropped.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-13-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd937x: Constify wcd937x_sdw_ch_info
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:25 +0000 (18:15 +0200)]
ASoC: codecs: wcd937x: Constify wcd937x_sdw_ch_info

Driver does not modify static wcd937x_sdw_ch_info array, so it can be
made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-12-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd937x: Constify static data
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:24 +0000 (18:15 +0200)]
ASoC: codecs: wcd937x: Constify static data

Driver does not modify few static data (MBHC reg fields, IRQ chip), so
make them const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-11-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd934x: Handle nicer probe deferral and simplify with dev_err_probe()
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:23 +0000 (18:15 +0200)]
ASoC: codecs: wcd934x: Handle nicer probe deferral and simplify with dev_err_probe()

wcd934x_codec_parse_data() function is called only from probe(), so
printing errors on resource acquisition is discouraged, because it can
pollute dmesg in case of probe deferral.  The actual deferral is here
unlikely, but still the code is a bit simpler with dev_err_probe().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-10-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd934x: Drop unused mic bias voltage fields
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:22 +0000 (18:15 +0200)]
ASoC: codecs: wcd934x: Drop unused mic bias voltage fields

Driver stores the voltage of mic bias in fields in state container
structure, but actually never reads them - except for the mic2 bias
(micb2_mv field).  Drop the fields from the structure so the code will
be a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-9-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd934x: Constify static data
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:21 +0000 (18:15 +0200)]
ASoC: codecs: wcd934x: Constify static data

Driver does not modify few static data (arrays with sample rates, MBHC
reg fields, regmap config), so make them const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-8-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd934x: Drop unused interp path enum
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:20 +0000 (18:15 +0200)]
ASoC: codecs: wcd934x: Drop unused interp path enum

The enum with inter path is not used.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-7-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd9335: Drop unused dmic rate handling
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:19 +0000 (18:15 +0200)]
ASoC: codecs: wcd9335: Drop unused dmic rate handling

Driver was prepared to adjust DMIC microphone parameters according to
DMIC clock rate which is read from platform data or Devicetree.  The
latter part never happened, so the code is always called with
dmic_clk_rate=0, prints error and uses default/fallback values.  All
this part can be simplified by dropping dead parts of code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-6-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd9335: Drop unneeded error message
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:18 +0000 (18:15 +0200)]
ASoC: codecs: wcd9335: Drop unneeded error message

Error-level should not be used as debugging.  The code (function
wcd9335_get_dmic_clk_val()) will always be called with same parameters,
so this is not really useful debug anyway, so drop it.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-5-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd9335: Handle nicer probe deferral and simplify with dev_err_probe()
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:17 +0000 (18:15 +0200)]
ASoC: codecs: wcd9335: Handle nicer probe deferral and simplify with dev_err_probe()

wcd9335_parse_dt() function is called only from probe(), so printing
errors on resource acquisition is discouraged, because it can pollute
dmesg.  Use dev_err_probe() to fix this and also make the code a bit
simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-4-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd9335: Constify static data
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:16 +0000 (18:15 +0200)]
ASoC: codecs: wcd9335: Constify static data

Driver does not modify few static data (arrays with sample rates,
interrupt description, regmap config), so make them const for code
safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-3-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd9335: Drop unused state container fields
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:15 +0000 (18:15 +0200)]
ASoC: codecs: wcd9335: Drop unused state container fields

The driver does not use few 'struct wcd9335_codec' members, so just drop
them for smaller code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-2-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: wcd-mbhc: Constify passed MBHC reg fields
Krzysztof Kozlowski [Wed, 12 Jun 2024 16:15:14 +0000 (18:15 +0200)]
ASoC: codecs: wcd-mbhc: Constify passed MBHC reg fields

The wcd-mbhc-v2 helper code/module does not modify passed array of
registry fields, thus it can be made const for code safety.  It will
also allow individual drivers to allocate the array in rodata.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-1-0d15885b2a06@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoc: tas2781: Enable RCA-based playback without DSP firmware download
Shenghao Ding [Fri, 14 Jun 2024 13:36:45 +0000 (21:36 +0800)]
ASoc: tas2781: Enable RCA-based playback without DSP firmware download

In only loading RCA (Reconfigurable Architecture) binary case, no DSP
program will be working inside tas2563/tas2781, that is dsp-bypass mode,
do not support speaker protection, or audio acoustic algorithms in this
mode.

Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240614133646.910-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: dt-bindings: audio-graph-card2: add support for aux devices
Kuninori Morimoto [Tue, 18 Jun 2024 00:10:15 +0000 (00:10 +0000)]
ASoC: dt-bindings: audio-graph-card2: add support for aux devices

Add device tree property to define auxiliary devices to be added to
Audio Graph Card which is already supported on Simle Card.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://msgid.link/r/87jzin3yc8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: nau8822: add MCLK support
Andrejs Cainikovs [Thu, 13 Jun 2024 08:46:52 +0000 (10:46 +0200)]
ASoC: nau8822: add MCLK support

This change adds MCLK clock handling directly within driver.
When used in combination with simple-audio-card, and mclk-fs is set,
simple-audio-card will change MCLK frequency before configuring PLL.
In some cases, however, MCLK reference clock should be static (see [1]),
which means it needs to be moved away from simple-audio-card.

[1]: https://lore.kernel.org/all/ZfBdxrzX3EnPuGOn@ediswmail9.ad.cirrus.com/

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Link: https://msgid.link/r/20240613084652.13113-4-andrejs.cainikovs@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: nau8822: set NAU8822_REFIMP_80K only once
Andrejs Cainikovs [Thu, 13 Jun 2024 08:46:51 +0000 (10:46 +0200)]
ASoC: nau8822: set NAU8822_REFIMP_80K only once

Following bias state machine logic this bit is set twice before playback.
This change makes sure this bit set is set only once.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Suggested-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Link: https://msgid.link/r/20240613084652.13113-3-andrejs.cainikovs@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: nau8822: move nau8822_set_dai_sysclk()
Andrejs Cainikovs [Thu, 13 Jun 2024 08:46:50 +0000 (10:46 +0200)]
ASoC: nau8822: move nau8822_set_dai_sysclk()

Next commit in series makes a change which calls nau8822_set_pll() from
nau8822_set_dai_sysclk(). Moving latter after the former would avoid a
forward declaration, and this is exactly what this change does.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Link: https://msgid.link/r/20240613084652.13113-2-andrejs.cainikovs@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: tlv320adc3xxx: Add support for using MICBIAS pins as GPO
Ricard Wanderlof [Fri, 7 Jun 2024 15:22:05 +0000 (17:22 +0200)]
ASoC: tlv320adc3xxx: Add support for using MICBIAS pins as GPO

Add boolean ti,micbias1-gpo and ti,micbias2-gpo devicetree properties.

When set, the respective MICBIAS pins can be used as general purpose
outputs controlled via the GPIO framework, in addition to the two
configurable GPIO pins.

This is useful in applications where the MICBIAS functionality is
not required, but it is useful to have a couple of extra GPIO pins.

The voltage on the respective MICBIAS pin in the active state is
governed by the ti,micbias1-vg and ti,micbias2-vg properties,
respectively (same properties as when the pins are used as
MICBIAS pins).

Signed-off-by: Ricard Wanderlof <ricard.wanderlof@axis.com>
Link: https://msgid.link/r/20240607-tlv320adc3xxx-micbias-gpo-v3-2-59dbec8b98f4@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: dt-bindings: tlv320adc3xxx: Add MICBIAS-as-GPO properties
Ricard Wanderlof [Fri, 7 Jun 2024 15:22:04 +0000 (17:22 +0200)]
ASoC: dt-bindings: tlv320adc3xxx: Add MICBIAS-as-GPO properties

Add properties for configuring the MICBIAS pins as general purpose
outputs, with some limitations: The voltage on the pin when activated
may be set using another property to 2.0 V, 2.5 V or AVDD.
When deactivated the pin will float.

Signed-off-by: Ricard Wanderlof <ricard.wanderlof@axis.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240607-tlv320adc3xxx-micbias-gpo-v3-1-59dbec8b98f4@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: qcom: x1e80100: Add USB DisplayPort plug support
Krzysztof Kozlowski [Thu, 6 Jun 2024 10:49:22 +0000 (11:49 +0100)]
ASoC: qcom: x1e80100: Add USB DisplayPort plug support

Add support for handling jack events of USB (DisplayPort).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # X13s
Link: https://msgid.link/r/20240606104922.114229-5-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: qcom: sc8280xp: add Display port Jack
Srinivas Kandagatla [Thu, 6 Jun 2024 10:49:21 +0000 (11:49 +0100)]
ASoC: qcom: sc8280xp: add Display port Jack

Add support for Display Port Jack events.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # X13s
Link: https://msgid.link/r/20240606104922.114229-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: qcom: common: add Display port Jack function
Srinivas Kandagatla [Thu, 6 Jun 2024 10:49:20 +0000 (11:49 +0100)]
ASoC: qcom: common: add Display port Jack function

Add a common function to add Display port jack.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # X13s
Link: https://msgid.link/r/20240606104922.114229-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: qcom: q6dsp: parse Display port tokens
Srinivas Kandagatla [Thu, 6 Jun 2024 10:49:19 +0000 (11:49 +0100)]
ASoC: qcom: q6dsp: parse Display port tokens

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # X13s
Link: https://msgid.link/r/20240606104922.114229-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: Constify return of snd_soc_dai_get_pcm_stream()
Krzysztof Kozlowski [Mon, 17 Jun 2024 13:03:23 +0000 (15:03 +0200)]
ASoC: Constify return of snd_soc_dai_get_pcm_stream()

Returned 'struct snd_soc_pcm_stream' by snd_soc_dai_get_pcm_stream() is
not modified by the users, so it can be changed as pointer to const.
This is a necessary step towards making the 'dai->driver' a pointer to
const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-5-8004f346ee38@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: Constify DAI passed to get_channel_map
Krzysztof Kozlowski [Mon, 17 Jun 2024 13:03:22 +0000 (15:03 +0200)]
ASoC: Constify DAI passed to get_channel_map

get_channel_map() is supposed to obtain map of channels without
modifying the state of the given DAI, so make the pointer to 'struct
snd_soc_dai' as pointing to const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-4-8004f346ee38@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: Constify passed data to core function
Krzysztof Kozlowski [Mon, 17 Jun 2024 13:03:21 +0000 (15:03 +0200)]
ASoC: Constify passed data to core function

Several ASoC functions receive pointers to data which is not modified,
e.g. pointers to 'snd_soc_dai', 'snd_soc_pcm_runtime',
'snd_pcm_hw_params' and 'snd_soc_dai_link'.

All these pointers can be made as a pointer to const.  This makes code
safer, serves as clear annotation of function's intentions (no ownership
passed to the function, no modifications) and allows putting pointed
structures in rodata (if ever applicable).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-3-8004f346ee38@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: Constify of_phandle_args in snd_soc_dai_link_component
Krzysztof Kozlowski [Mon, 17 Jun 2024 13:03:20 +0000 (15:03 +0200)]
ASoC: Constify of_phandle_args in snd_soc_dai_link_component

ASoC core code does not modify contents of 'of_phandle_args' in 'struct
snd_soc_dai_link_component', so the pointer can be made as a pointer to
const.  This makes code safer, serves as clear annotation of core's
intentions and allows putting pointed structures in rodata (if ever
applicable).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-2-8004f346ee38@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: Constify of_phandle_args in snd_soc_dai_driver
Krzysztof Kozlowski [Mon, 17 Jun 2024 13:03:19 +0000 (15:03 +0200)]
ASoC: Constify of_phandle_args in snd_soc_dai_driver

ASoC core code does not modify contents of 'of_phandle_args' in 'struct
snd_soc_dai_driver', so the pointer can be made as a pointer to const.
This makes code safer, serves as clear annotation of core's intentions
and allows putting pointed structures in rodata (if ever applicable).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-1-8004f346ee38@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: Constify DAI ops auto_selectable_formats
Krzysztof Kozlowski [Mon, 17 Jun 2024 12:57:35 +0000 (14:57 +0200)]
ASoC: Constify DAI ops auto_selectable_formats

The static arrays passed as 'auto_selectable_formats' are not modified
by the drivers nor by the core code, so make it const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Link: https://msgid.link/r/20240617125735.582963-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: soc-dai.h: Constify DAI ops auto_selectable_formats
Krzysztof Kozlowski [Mon, 17 Jun 2024 12:57:34 +0000 (14:57 +0200)]
ASoC: soc-dai.h: Constify DAI ops auto_selectable_formats

The core ASoC code does not modify contents of the
'auto_selectable_formats' array passed in 'struct snd_soc_dai_ops', so
make it const for code safety.

Reviewed-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240617125735.582963-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: audio-graph-card2: add support for aux devices
Kuninori Morimoto [Mon, 17 Jun 2024 04:26:38 +0000 (04:26 +0000)]
ASoC: audio-graph-card2: add support for aux devices

Add device tree property to define auxiliary devices to be added to
Audio Graph Card which is already supported on Simle Card.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://msgid.link/r/878qz4ry81.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: SOF: mediatek: Constify struct mtk_adsp_ipc_ops
Christophe JAILLET [Thu, 13 Jun 2024 20:59:09 +0000 (22:59 +0200)]
ASoC: SOF: mediatek: Constify struct mtk_adsp_ipc_ops

'struct mtk_adsp_ipc_ops' is not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security.

In order to do it, "struct mtk_adsp_ipc" also needs to be adjusted to this
new const qualifier.

On a x86_64, with allmodconfig:
Before:
======
   text    data     bss     dec     hex filename
  15533    2383       0   17916    45fc sound/soc/sof/mediatek/mt8195/mt8195.o

After:
=====
   text    data     bss     dec     hex filename
  15557    2367       0   17924    4604 sound/soc/sof/mediatek/mt8195/mt8195.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://msgid.link/r/a45d6b2b5ec040ea0fc78fca662c2dca3f13a49f.1718312321.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: dt-bindings: realtek,rt5514: Convert to dtschema
Animesh Agarwal [Sun, 16 Jun 2024 09:52:19 +0000 (15:22 +0530)]
ASoC: dt-bindings: realtek,rt5514: Convert to dtschema

Convert the RT5514 audio CODEC bindings to DT Schema. Make bindings
complete by adding 'spi-max-frequency', 'wakeup-source' properties.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://msgid.link/r/20240616095223.260786-1-animeshagarwal28@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: dt-bindings: realtek,rt5631: Convert to dtschema
Animesh Agarwal [Sun, 16 Jun 2024 07:49:30 +0000 (13:19 +0530)]
ASoC: dt-bindings: realtek,rt5631: Convert to dtschema

Convert the ALC5631/RT5631 audio CODEC bindings to DT Schema.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://msgid.link/r/20240616074936.151267-1-animeshagarwal28@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: fsl: imx-pcm-fiq: add missing MODULE_DESCRIPTION() macro
Jeff Johnson [Mon, 17 Jun 2024 03:52:26 +0000 (20:52 -0700)]
ASoC: fsl: imx-pcm-fiq: add missing MODULE_DESCRIPTION() macro

With ARCH=arm, make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/fsl/imx-pcm-fiq.o

Add the missing invocation of the MODULE_DESCRIPTION() macro.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://msgid.link/r/20240616-md-arm-sound-soc-fsl-v2-1-228772e81a54@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: lpass: add support for v2.5 rx macro
Mark Brown [Sat, 15 Jun 2024 15:24:35 +0000 (16:24 +0100)]
ASoC: codecs: lpass: add support for v2.5 rx macro

Merge series from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:

This patchset adds support to reading codec version and also adds
support for v2.5 codec version in rx macro.

LPASS 2.5 and up versions have changes in some of the rx blocks which
are required to get headset functional correctly.

Tested this on SM8450, X13s and x1e80100 crd.

This changes also fixes issue with sm8450, sm8550, sm8660 and x1e80100.

12 months agoASoC: codec: lpass-rx-macro: add support for 2.5 codec version
Srinivas Kandagatla [Thu, 13 Jun 2024 10:49:33 +0000 (11:49 +0100)]
ASoC: codec: lpass-rx-macro: add support for 2.5 codec version

LPASS Codec v2.5 has significant changes in the rx register strides.
Due to this headset playback on SM8550, SM8650, x1e80100 and all SoCs
after SM8450 have only Left working.

This patch adjusts the registers to accomdate 2.5 changes. With this
fixed now L and R are functional on Headset playback.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Link: https://lore.kernel.org/r/20240612-lpass-codec-v25-v4-3-f63d3676dbc4@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions
Srinivas Kandagatla [Thu, 13 Jun 2024 10:49:32 +0000 (11:49 +0100)]
ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions

LPASS Codec v2.5 has significant changes in the rx block register strides.
This is a preparatory patch to do the required changes in the existing driver
to be able to accomdate these changes.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Link: https://lore.kernel.org/r/20240612-lpass-codec-v25-v4-2-f63d3676dbc4@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: codecs: lpass-macro: add helpers to get codec version
Srinivas Kandagatla [Thu, 13 Jun 2024 10:49:31 +0000 (11:49 +0100)]
ASoC: codecs: lpass-macro: add helpers to get codec version

LPASS Digital codec have changes in register layout across multiple
versions. Add a proper way read the codec version allowint all the lpass
macro drivers (tx, rx, wsa, va) to configure the registers correctly.

LPASS VA macro has the required registers to read the codec version.
Read the the version and make it available to other lpass codec macros
using the common helper functions.

Existing method of using LPASS IP version is not accurate as the same
the codec versioning is totally independent of LPASS IP block versions.

These helper functions should be able to provide a convient way to get
the codec version, and will help scale the drivers in right direction.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Link: https://lore.kernel.org/r/20240612-lpass-codec-v25-v4-1-f63d3676dbc4@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agodt-bindings: sound: Convert max98088 to dtschema
Abdulrasaq Lawani [Wed, 12 Jun 2024 16:36:50 +0000 (12:36 -0400)]
dt-bindings: sound: Convert max98088 to dtschema

Convert the max98088 audio codec txt bindings to DT schema.

Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240612163730.515819-1-abdulrasaqolawani@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: dt-bindings: convert tas571x.txt to dt-schema
Neil Armstrong [Tue, 11 Jun 2024 07:30:04 +0000 (09:30 +0200)]
ASoC: dt-bindings: convert tas571x.txt to dt-schema

Convert the text bindings for the Texas Instruments
TAS5711/TAS5717/TAS5719/TAS5721 stereo power amplifiers to
dt-schema.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240611-topic-amlogic-upstream-bindings-convert-tas57xx-v2-1-38269edc1d95@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: q6apm-lpass-dai: close graph on prepare errors
Srinivas Kandagatla [Thu, 13 Jun 2024 12:13:05 +0000 (13:13 +0100)]
ASoC: q6apm-lpass-dai: close graph on prepare errors

There is an issue around with error handling and graph management with
the exising code, none of the error paths close the graph, which result in
leaving the loaded graph in dsp, however the driver thinks otherwise.

This can have a nasty side effect specially when we try to load the same
graph to dsp, dsp returns error which leaves the board with no sound and
requires restart.

Fix this by properly closing the graph when we hit errors between
open and close.

Fixes: 30ad723b93ad ("ASoC: qdsp6: audioreach: add q6apm lpass dai support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # X13s
Link: https://lore.kernel.org/r/20240613-q6apm-fixes-v1-1-d88953675ab3@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
12 months agoASoC: cs35l56: Disconnect ASP1 TX sources when ASP1 DAI is hooked up
Richard Fitzgerald [Thu, 13 Jun 2024 13:25:27 +0000 (14:25 +0100)]
ASoC: cs35l56: Disconnect ASP1 TX sources when ASP1 DAI is hooked up

If the ASP1 DAI is hooked up by the machine driver the ASP TX mixer
sources should be initialized to disconnected. There aren't currently
any available products using the ASP so this doesn't affect any
existing systems.

The cs35l56 does not have any fixed default for the mixer source
registers. When the cs35l56 boots, its firmware patches these registers
to setup a system-specific routing; this is so that Windows can use
generic SDCA drivers instead of needing knowledge of chip-specific
registers. The setup varies between end-products, which each have
customized firmware, and so the default register state varies between
end-products. It can also change if the firmware on an end-product is
upgraded - for example if a change was needed to the routing for Windows
use-cases. It must be emphasized that the settings applied by the
firmware are not internal magic tuning; they are statically implementing
use-case setup that on Linux would be done via ALSA controls.

The driver is currently syncing the mixer controls with whatever
initial state the firmware wrote to the registers, so that they report
the actual audio routing. But if the ASP DAI is hooked up this can create
a powered-up DAPM graph without anything intentionally setting up a path.
This can lead to parts of the audio system powering up unexpectedly.

For example when cs35l56 is connected to cs42l43 using a codec-codec link,
this can create a complete DAPM graph which then powers-up cs42l43. But
the cs42l43 can only be clocked from its SoundWire bus so this causes a
bunch of errors in the kernel log where cs42l43 is unexpectedly powered-up
without a clock.

If the host is taking ownership of the ASP (either directly or as a
codec-to-codec link) there is no need to keep the mixer settings that the
firmware wrote. The driver has ALSA controls for setting these using
standard Linux mechanisms. So if the machine driver hooks up the ASP the
ASP mixers are initialized to "None" (no input). This prevents unintended
DAPM-graph power-ups, and means the initial state of the mixers is
always going to be None.

Since the initial state of the mixers can vary from system to system and
potentially between firmware upgrades, no use-case manager can currently
assume that cs35l56 has a known initial state. The firmware could just as
easily default them to "None" as to any input source. So defaulting them
to "None" in the driver is not increasing the entropy of the system.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240613132527.46537-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
13 months agoASoC: amd: add missing MODULE_DESCRIPTION() macros
Jeff Johnson [Thu, 13 Jun 2024 03:26:26 +0000 (20:26 -0700)]
ASoC: amd: add missing MODULE_DESCRIPTION() macros

With ARCH=x86, make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/renoir/snd-acp3x-rn.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/yc/snd-soc-acp6x-mach.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-i2s.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-pdm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-legacy-common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-pci.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/ps/snd-soc-ps-mach.o

Add the missing invocations of the MODULE_DESCRIPTION() macro.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://lore.kernel.org/r/20240612-md-sound-soc-amd-v1-1-ad1de0409c11@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
13 months agoASoC: topology: Fix route memory corruption
Amadeusz Sławiński [Thu, 13 Jun 2024 09:01:26 +0000 (11:01 +0200)]
ASoC: topology: Fix route memory corruption

It was reported that recent fix for memory corruption during topology
load, causes corruption in other cases. Instead of being overeager with
checking topology, assume that it is properly formatted and just
duplicate strings.

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Closes: https://lore.kernel.org/linux-sound/171812236450.201359.3019210915105428447.b4-ty@kernel.org/T/#m8c4bd5abf453960fde6f826c4b7f84881da63e9d
Suggested-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240613090126.841189-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
13 months agoASoC: rt722-sdca-sdw: add debounce time for type detection
Jack Yu [Wed, 12 Jun 2024 09:01:07 +0000 (09:01 +0000)]
ASoC: rt722-sdca-sdw: add debounce time for type detection

Add debounce time in headset type detection for better performance.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/7e502e9a9dd94122a1b60deb5ceb60fb@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
13 months agoASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback
Peter Ujfalusi [Wed, 12 Jun 2024 12:12:03 +0000 (15:12 +0300)]
ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback

If the ipc_prepare() callback fails for a module instance, on error rewind
we must skip the ipc_unprepare() call for ones that has positive use count.

The positive use count means that the module instance is in active use, it
cannot be unprepared.

The issue affects capture direction paths with branches (single dai with
multiple PCMs), the affected widgets are in the shared part of the paths.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20240612121203.15468-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
13 months agoFixes for McASP and dmaengine_pcm
Mark Brown [Wed, 12 Jun 2024 17:26:15 +0000 (18:26 +0100)]
Fixes for McASP and dmaengine_pcm

Merge series from Jai Luthra <j-luthra@ti.com>:

This series fixes two patches:

1. Fix the dmaengine API usage by calling dmaengine_synchronize() after
   dmaengine_terminate_async() when xrun events occur in application
2. Use the McASP AFIFO property from DT to refine the period size,
   instead of hardcoding minimum to 64 samples

13 months agoASoC: dt-bindings: wlf,wm8804: Convert to dtschema
Animesh Agarwal [Tue, 11 Jun 2024 12:22:51 +0000 (17:52 +0530)]
ASoC: dt-bindings: wlf,wm8804: Convert to dtschema

Convert the WM8804 audio codec bindings to DT schema.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240611122258.47406-1-animeshagarwal28@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
13 months agoASoC: dt-bindings: wlf,wm8782: Convert to dtschema
Animesh Agarwal [Tue, 11 Jun 2024 12:44:00 +0000 (18:14 +0530)]
ASoC: dt-bindings: wlf,wm8782: Convert to dtschema

Convert the WM8782 audio codec bindings to DT schema.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240611124405.63427-1-animeshagarwal28@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
13 months agoASoC: dt-bindings: linux,spdif: Convert spdif-reciever.txt to dtschema
Animesh Agarwal [Thu, 6 Jun 2024 04:12:00 +0000 (09:42 +0530)]
ASoC: dt-bindings: linux,spdif: Convert spdif-reciever.txt to dtschema

Convert the dummy SPDIF receiver bindings to DT schema.

Signed-off-by: Animesh Agarwal <animeshagarwal28@gmail.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240606041212.78428-1-animeshagarwal28@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
13 months agoASoC: samsung: midas_wm1811: Fix error code in probe()
Dan Carpenter [Sat, 8 Jun 2024 14:24:31 +0000 (17:24 +0300)]
ASoC: samsung: midas_wm1811: Fix error code in probe()

This accidentally returns success instead of -EINVAL.

Fixes: c91d0c2e198d ("ASoC: samsung: midas_wm1811: Add GPIO-based headset jack detection")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Artur Weber <aweber.kernel@gmail.com>
Link: https://lore.kernel.org/r/01590109-cf27-404b-88ff-b42bb73ca1c6@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
13 months agoASoC: cs35l56: Attempt to read from cirrus,speaker-id device property first
Simon Trimmer [Tue, 11 Jun 2024 13:25:56 +0000 (14:25 +0100)]
ASoC: cs35l56: Attempt to read from cirrus,speaker-id device property first

When cs35l56 is connected via cs42l43 there isn't an ACPI node for the
cs35l56 so all properties are under the cs42l43 ACPI node. We're adding
a property as a way for the cs42l43 driver to pass this info in via a
software node.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240611132556.1557075-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
13 months agoASoC: ti: omap-hdmi: Fix too long driver name
Primoz Fiser [Mon, 10 Jun 2024 12:58:47 +0000 (14:58 +0200)]
ASoC: ti: omap-hdmi: Fix too long driver name

Set driver name to "HDMI". This simplifies the code and gets rid of
the following error messages:

  ASoC: driver name too long 'HDMI 58040000.encoder' -> 'HDMI_58040000_e'

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20240610125847.773394-1-primoz.fiser@norik.com
Signed-off-by: Mark Brown <broonie@kernel.org>
13 months agoASoC: ti: davinci-mcasp: Set min period size using FIFO config
Jai Luthra [Tue, 11 Jun 2024 12:32:56 +0000 (18:02 +0530)]
ASoC: ti: davinci-mcasp: Set min period size using FIFO config

The minimum period size was enforced to 64 as older devices integrating
McASP with EDMA used an internal FIFO of 64 samples.

With UDMA based platforms this internal McASP FIFO is optional, as the
DMA engine internally does some buffering which is already accounted for
when registering the platform. So we should read the actual FIFO
configuration (txnumevt/rxnumevt) instead of hardcoding frames.min to
64.

Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Link: https://lore.kernel.org/r/20240611-asoc_next-v3-2-fcfd84b12164@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>