]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
4 months agoASoC: soc-pcm: remove duplicate param from __soc_pcm_hw_params()
Kuninori Morimoto [Wed, 12 Feb 2025 02:24:54 +0000 (02:24 +0000)] 
ASoC: soc-pcm: remove duplicate param from __soc_pcm_hw_params()

We can get struct snd_soc_pcm_runtime from struct snd_pcm_substream,
no need to have both as function parameter. Let's shrink it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87mseryk5l.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()
Kuninori Morimoto [Wed, 12 Feb 2025 02:24:38 +0000 (02:24 +0000)] 
ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()

snd_soc_dai_set_tdm_slot() calls .xlate_tdm_slot_mask() or
snd_soc_xlate_tdm_slot_mask(), but didn't check its return value.
Let's check it.

This patch might break existing driver. In such case, let's makes
each func to void instead of int.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87o6z7yk61.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: soc-pcm: makes dpcm_dapm_stream_event() void
Kuninori Morimoto [Wed, 12 Feb 2025 02:24:17 +0000 (02:24 +0000)] 
ASoC: soc-pcm: makes dpcm_dapm_stream_event() void

No one uses dpcm_dapm_stream_event() return value, and it always
return 0. Let's makes it void.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87seojyk6m.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: soc-ops: makes snd_soc_read_signed() void
Kuninori Morimoto [Wed, 12 Feb 2025 02:24:06 +0000 (02:24 +0000)] 
ASoC: soc-ops: makes snd_soc_read_signed() void

snd_soc_read_signed() never return error. Let's makes it void.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87tt8zyk6x.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: soc-core: makes snd_soc_set_dmi_name() local
Kuninori Morimoto [Wed, 12 Feb 2025 02:23:52 +0000 (02:23 +0000)] 
ASoC: soc-core: makes snd_soc_set_dmi_name() local

soc-core.c only calls snd_soc_set_dmi_name(), so we don't need to have
EXPORT_SYMBOL_GPL() for it. Let's makes it local function.

No one uses *flavour parameter, let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87v7tfyk7b.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: soc-pcm: no need to check dpcm->fe on dpcm_be_connect()
Kuninori Morimoto [Wed, 12 Feb 2025 02:23:20 +0000 (02:23 +0000)] 
ASoC: soc-pcm: no need to check dpcm->fe on dpcm_be_connect()

All dpcm from for_each_dpcm_be(fe, ...) loop has same fe
(that is the reason to connected to this list). We don't need to
check (dpcm->fe == fe) in this loop.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87wmdvyk87.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agogpiolib: add gpiod_multi_set_value_cansleep
Mark Brown [Thu, 13 Feb 2025 17:32:59 +0000 (17:32 +0000)] 
gpiolib: add gpiod_multi_set_value_cansleep

Merge series from David Lechner <dlechner@baylibre.com>:

This series was inspired by some minor annoyance I have experienced a
few times in recent reviews.

Calling gpiod_set_array_value_cansleep() can be quite verbose due to
having so many parameters. In most cases, we already have a struct
gpio_descs that contains the first 3 parameters so we end up with 3 (or
often even 6) pointer indirections at each call site. Also, people have
a tendency to want to hard-code the first argument instead of using
struct gpio_descs.ndescs, often without checking that ndescs >= the
hard-coded value.

So I'm proposing that we add a gpiod_multi_set_value_cansleep()
function that is a wrapper around gpiod_set_array_value_cansleep()
that has struct gpio_descs as the first parameter to make it a bit
easier to read the code and avoid the hard-coding temptation.

I've just done gpiod_multi_set_value_cansleep() for now since there
were over 10 callers of this one. There aren't as many callers of
the get and atomic variants, but we can add those too if this seems
like a useful thing to do.

Maintainers, if you prefer to have this go through the gpio tree, please
give your Acked-by:. Several maintainers have also requested an
immutable branch, so I expect that will be made available. And if there
is anything leftover after the next kernel release, I will resend it.

4 months agoASoC: Intel: avs: Use str_on_off() in avs_dsp_core_power()
Thorsten Blum [Wed, 12 Feb 2025 09:12:26 +0000 (10:12 +0100)] 
ASoC: Intel: avs: Use str_on_off() in avs_dsp_core_power()

Remove hard-coded strings by using the str_on_off() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250212091227.1217-3-thorsten.blum@linux.dev
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: tegra: Remove the isomgr_bw APIs export
Sheetal [Thu, 13 Feb 2025 11:12:16 +0000 (11:12 +0000)] 
ASoC: tegra: Remove the isomgr_bw APIs export

Commit 4a91fe4c0d683 ("ASoC: tegra: Add interconnect support") exported
tegra_isomgr_adma_setbw, tegra_isomgr_adma_register and
tegra_isomgr_adma_register APIs, but there are no users of these that
required these symbols to be exported.
Hence, remove the exporting of the symbols.

Fixes: 4a91fe4c0d683 ("ASoC: tegra: Add interconnect support")
Signed-off-by: Sheetal <sheetal@nvidia.com>
Link: https://patch.msgid.link/20250213111216.1238344-1-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: use switch statements for acp pci revision id check
Vijendar Mukunda [Thu, 13 Feb 2025 10:36:52 +0000 (16:06 +0530)] 
ASoC: amd: ps: use switch statements for acp pci revision id check

Use switch statements for acp pci revision id check in SoundWire
dma irq handling.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250213103652.1082203-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: adau1701: use gpiod_multi_set_value_cansleep
David Lechner [Mon, 10 Feb 2025 22:33:41 +0000 (16:33 -0600)] 
ASoC: adau1701: use gpiod_multi_set_value_cansleep

Reduce verbosity by using gpiod_multi_set_value_cansleep() instead of
gpiod_set_array_value_cansleep().

Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://patch.msgid.link/20250210-gpio-set-array-helper-v3-15-d6a673674da8@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: imx-common: set sdev->pdata->hw_pdata after common is alloc'd
Laurentiu Mihalcea [Tue, 11 Feb 2025 22:50:18 +0000 (17:50 -0500)] 
ASoC: SOF: imx-common: set sdev->pdata->hw_pdata after common is alloc'd

'imx_unregister_action' uses 'sdev->pdata->hw_pdata' to fetch the pointer
to the common data structure. As such, if 'sdev->pdata->hw_pdata' is not
set before adding 'imx_unregister_action' to the devres list, we risk
derefrencing a NULL pointer if any of the calls between
'devm_add_action_or_reset' and 'sdev->pdata->hw_pdata = common' fails.

Set 'sdev->pdata->hw_pdata' to point to 'common' as soon as 'common' is
allocated.

Fixes: 651e0ed391b1 (" ASoC: SOF: imx: introduce more common structures and functions")
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/20250211225018.2642-1-laurentiumihalcea111@gmail.com
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agogpiolib: add gpiod_multi_set_value_cansleep()
David Lechner [Mon, 10 Feb 2025 22:33:27 +0000 (16:33 -0600)] 
gpiolib: add gpiod_multi_set_value_cansleep()

Add a new gpiod_multi_set_value_cansleep() helper function with fewer
parameters than gpiod_set_array_value_cansleep().

Calling gpiod_set_array_value_cansleep() can get quite verbose. In many
cases, the first arguments all come from the same struct gpio_descs, so
having a separate function where we can just pass that cuts down on the
boilerplate.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20250210-gpio-set-array-helper-v3-1-d6a673674da8@baylibre.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
4 months agoASoC: fsl_micfil: Add decimation filter bypass mode support
Shengjiu Wang [Thu, 6 Feb 2025 03:03:06 +0000 (11:03 +0800)] 
ASoC: fsl_micfil: Add decimation filter bypass mode support

When decimation filter bypass mode is enabled, PDM data can be
written into FIFO directly without any processing.

The interface of this mode is DSD big endian format, when
user needs this format, then this mode is enabled.

This mode is only for the i.MX943 platform currently.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20250206030306.2618620-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoarm64: dts: rockchip: Add SPDIF on RK3588
Mark Brown [Mon, 10 Feb 2025 17:23:23 +0000 (17:23 +0000)] 
arm64: dts: rockchip: Add SPDIF on RK3588

Merge series from Alexey Charkov <alchark@gmail.com>:

RK3588(s) uses a several SPDIF transmitters which are software
compatible with those found in RK3568. This series adds the required
device tree nodes in SoC .dtsi and enables the dedicated optical
SPDIF output on the H96 Max V58.

Note that only SPDIF 0/1 are meant as externally connected outputs,
while SPDIF 2/3/4/5 are internally routed to the various display
encoders inside the SoC. Thus, using SPDIF 0/1 only requires their
device tree nodes to be enabled (provided that the signal is routed
somewhere usable on the board itself), while the rest rely on driver
support on the display connector side and are therefore not touched
here.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
---
Alexey Charkov (3):
      dt-bindings: ASoC: rockchip: Add compatible for RK3588 SPDIF
      arm64: dts: rockchip: Add SPDIF nodes to RK3588(s) device trees
      arm64: dts: rockchip: Enable SPDIF output on H96 Max V58

 .../devicetree/bindings/sound/rockchip-spdif.yaml  |  4 ++
 arch/arm64/boot/dts/rockchip/rk3588-base.dtsi      | 64 ++++++++++++++++++++++
 arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi     | 30 ++++++++++
 .../arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts | 24 ++++++++
 4 files changed, 122 insertions(+)
---
base-commit: 4ec376748558ba132a2a49513acd3b08774384e3
change-id: 20250109-rk3588-spdif-e49aa49145d3

Best regards,
--
Alexey Charkov <alchark@gmail.com>

4 months agoASoC: codecs: wcd93xx-sdw: fix of_property_read_bool() warnings
Johan Hovold [Mon, 10 Feb 2025 13:21:28 +0000 (14:21 +0100)] 
ASoC: codecs: wcd93xx-sdw: fix of_property_read_bool() warnings

Using of_property_read_bool() for non-boolean properties has been
deprecated in favour of of_property_present() and since commit
c141ecc3cecd ("of: Warn when of_property_read_bool() is used on
non-boolean properties") this also generates a warning:

OF: /soc@0/soundwire@3330000/wcd9380-tx@0,3: Read of boolean property 'qcom,tx-port-mapping' with a value.

Switch to using of_property_present() to look for "qcom,tx-port-mapping"
properties.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://patch.msgid.link/20250210132128.7734-1-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: tscs454: Use str_enable_disable() in pll_power_event()
Thorsten Blum [Mon, 10 Feb 2025 11:59:37 +0000 (12:59 +0100)] 
ASoC: tscs454: Use str_enable_disable() in pll_power_event()

Remove hard-coded strings by using the str_enable_disable() helper
function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250210115937.53654-1-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agodt-bindings: ASoC: rockchip: Add compatible for RK3588 SPDIF
Alexey Charkov [Mon, 20 Jan 2025 09:01:27 +0000 (13:01 +0400)] 
dt-bindings: ASoC: rockchip: Add compatible for RK3588 SPDIF

Add a compatible string for SPDIF on RK3588, which is similar to the
one on RK3568.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20250120-rk3588-spdif-v1-1-1415f5871dc7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoAdd SDCA DisCo parsing support
Mark Brown [Mon, 10 Feb 2025 13:06:28 +0000 (13:06 +0000)] 
Add SDCA DisCo parsing support

Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:

The MIPI SoundWire Device Class for Audio (SDCA) specification defines
most details of the hardware in ACPI using the MIPI Discovery and
Configuration (DisCo) specification. This patch chain adds support for
parsing most of this information into the kernel such that future work
can make use of it to construct CODEC devices and soundcards.

The most notable outstanding work here, is parsing the separate
properties for the Control Numbers (roughly equivalent to channels)
within an individual Control. The separate Control Numbers are
supported but currently only the scheme were a single default etc. is
supplied for all.  This should not be super hard to add in the future
but isn't currently required by any of the hardware I am working to
support.

4 months agoRefactor imx drivers and introduce support for
Mark Brown [Mon, 10 Feb 2025 13:06:19 +0000 (13:06 +0000)] 
Refactor imx drivers and introduce support for

Merge series from Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>:

A rather aggressive but arguably much needed refactorization of the SOF
imx drivers. The refactorization is meant to address the code duplication
in the imx drivers and decrease the coding effort required for introducing
a new imx platform.

After refactorization and imx95 introduction, only two drivers remain:
imx8 (meant for the imx8 series: imx8 (imx8qm), imx8x (imx8qxp), imx8m,
and imx8ulp) and imx9 (meant for the imx9 series: imx95 (for now)).

The series also includes the introduction of the imx95 driver.

4 months agoASoC: amd: Add support for ACP7.0 & ACP7.1
Mark Brown [Fri, 7 Feb 2025 17:50:59 +0000 (17:50 +0000)] 
ASoC: amd: Add support for ACP7.0 & ACP7.1

Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>:

This patch series includes the below changes
- Refactor existing ACP6.3 platform ACP PCI driver, SoundWire
  DMA driver code.
- Add Audio IO support for ACP7.0 and ACP7.1 platforms for
SoundWire IO and ACP PDM controller combination.
- Add SoundWire generic machine driver changes for legacy stack
(No DSP enabled) for ACP7.0 & ACP7.1 platforms.
- Add SoundWire machines for ACP7.0 & ACP7.1 platforms.

4 months agoASoC: SDCA: Add support for PDE Entity properties
Charles Keepax [Wed, 5 Feb 2025 11:38:01 +0000 (11:38 +0000)] 
ASoC: SDCA: Add support for PDE Entity properties

Add support for parsing the Power Domain Entity properties from
DisCo/ACPI.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250205113801.3699902-11-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SDCA: Add support for clock Entity properties
Charles Keepax [Wed, 5 Feb 2025 11:38:00 +0000 (11:38 +0000)] 
ASoC: SDCA: Add support for clock Entity properties

Add support for parsing the Clock Source Entity properties from
DisCo/ACPI.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250205113801.3699902-10-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SDCA: Add support for IT/OT Entity properties
Charles Keepax [Wed, 5 Feb 2025 11:37:59 +0000 (11:37 +0000)] 
ASoC: SDCA: Add support for IT/OT Entity properties

Add support for parsing the Input/Output Terminal Entity properties from
DisCo/ACPI.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250205113801.3699902-9-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SDCA: Add Channel Cluster parsing
Charles Keepax [Wed, 5 Feb 2025 11:37:58 +0000 (11:37 +0000)] 
ASoC: SDCA: Add Channel Cluster parsing

Within SDCA collections of Channels are referred to as Clusters, each
Channel within a Cluster can have various properties attached to it.
For example a stereo audio stream, would have a Cluster with 2 Channels
one marked as left and the other as right. Various Clusters are
specified in DisCo/ACPI and controls then allow the class driver to
select between these channel configurations. Add support for parsing
these Cluster definitions.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250205113801.3699902-8-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SDCA: Add parsing for Control range structures
Charles Keepax [Wed, 5 Feb 2025 11:37:57 +0000 (11:37 +0000)] 
ASoC: SDCA: Add parsing for Control range structures

DisCo/SDCA contains small buffers of data that hold ranges of valid
values for the various SDCA Controls. Add support for parsing these
from ACPI.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250205113801.3699902-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SDCA: Add SDCA Control parsing
Charles Keepax [Wed, 5 Feb 2025 11:37:56 +0000 (11:37 +0000)] 
ASoC: SDCA: Add SDCA Control parsing

Each SDCA Entity will contain a number of Controls, these are
basically equivalent to registers. Although a single Control will only
ever contain a single field. Some of these would map directly to ALSA
controls once more of the SDCA class driver is implemented. These
controls are parsed out of the DisCo ACPI tables.

One small todo here is that each Control can have multiple
sub-entries (Control Numbers), these are typically used to represent
channels. Whilst support is present for these, currently the
ACPI properties that would allow differing defaults for each channel
are not parsed. But there is nothing here that should prevent that
being added in the future.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250205113801.3699902-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SDCA: Add support for Entity 0
Charles Keepax [Wed, 5 Feb 2025 11:37:55 +0000 (11:37 +0000)] 
ASoC: SDCA: Add support for Entity 0

Within SDCA there is a special Entity called Entity 0 which is used
to hold Function level controls. Whilst Entity 0 isn't a full SDCA
Entity, it is helpful to add an sdca_entity structure for it. This
will allow it to be treated identically in the code that handles
SDCA Controls.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250205113801.3699902-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SDCA: Parse initialization write table
Pierre-Louis Bossart [Wed, 5 Feb 2025 11:37:54 +0000 (11:37 +0000)] 
ASoC: SDCA: Parse initialization write table

Each SDCA Function may contain a table of register writes that should be
written out before the Function is used. Add code to parse this table
from the DisCo tables in ACPI.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250205113801.3699902-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SDCA: Add code to parse Function information
Pierre-Louis Bossart [Wed, 5 Feb 2025 11:37:53 +0000 (11:37 +0000)] 
ASoC: SDCA: Add code to parse Function information

Add a helper function to parse all the Function and Entity
information from ACPI. In SDCA each device may have several Functions
and each corresponds to a specific audio capability such as say
amplifier playback or microphone capture. Each Function then contains
a number of Entities that represent individual parts of the audio
signal chain and are linked together in a graph similar to DAPM.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250205113801.3699902-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SDCA: Minor formatting and naming tweaks
Charles Keepax [Wed, 5 Feb 2025 11:37:52 +0000 (11:37 +0000)] 
ASoC: SDCA: Minor formatting and naming tweaks

Fix up some variable/struct member naming, add some missing kerneldoc
and fix some minor formatting/whitespace issues.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250205113801.3699902-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: imx: add driver for the imx95 chip
Laurentiu Mihalcea [Fri, 7 Feb 2025 16:22:46 +0000 (11:22 -0500)] 
ASoC: SOF: imx: add driver for the imx95 chip

Add SOF support for the imx95 chip. Although the support is just
for the imx95 chip, the driver is intended for all chips in the imx9
family.

Note that the imx95 support could have just as easily been added
to the imx8 platform driver but a new platform driver was created
because the intention is to keep the families in separate drivers.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250207162246.3104-8-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: imx: merge imx8 and imx8ulp drivers
Laurentiu Mihalcea [Fri, 7 Feb 2025 16:22:45 +0000 (11:22 -0500)] 
ASoC: SOF: imx: merge imx8 and imx8ulp drivers

Now that the common interface for imx chip has been introduced,
there's no longer a need to have a separate platform driver for
imx8ulp. As such, merge the driver with the imx8 driver. Furthermore,
delete the old driver as it's no longer useful.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250207162246.3104-7-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: imx: merge imx8 and imx8m drivers
Laurentiu Mihalcea [Fri, 7 Feb 2025 16:22:44 +0000 (11:22 -0500)] 
ASoC: SOF: imx: merge imx8 and imx8m drivers

Now that the common interface for imx chip has been introduced,
there's no longer a need to have a separate platform driver for
imx8m. As such, merge the driver with the imx8 driver. Furthermore,
delete the old driver as it's no longer useful.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250207162246.3104-6-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: imx8: drop unneeded/unused macros/header includes
Laurentiu Mihalcea [Fri, 7 Feb 2025 16:22:43 +0000 (11:22 -0500)] 
ASoC: SOF: imx8: drop unneeded/unused macros/header includes

Drop some unneeded/unused macro definitions and header includes.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250207162246.3104-5-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: imx8: use IMX_SOF_* macros
Laurentiu Mihalcea [Fri, 7 Feb 2025 16:22:42 +0000 (11:22 -0500)] 
ASoC: SOF: imx8: use IMX_SOF_* macros

The definition of 'struct sof_dev_desc' has the following properties
for imx chips:

  1) FW path is the same for all chips.
  2) Topology path is the same for all chips.
  3) FW name can be written as: "sof-${machine_name}.ri"
  4) IPC3 is the only supported protocol

The structure takes quite a few lines of code. Since the intention
is to add support for more imx8 chips in the same driver, we need
to try and reduce the number of lines taken by information that's
not particularly useful. As such, we can use 'IMX_SOF_DEV_DESC()'
to reduce the declaration of the structure to just one line. The
only information that's particularly useful can be seen from the
parameters of the macro.

Of course, if any of the assumptions don't apply anymore, driver
writers can simply declare the 'struct sof_dev_desc' the "old
fashioned way". No reason to make the macro suit multiple needs.

The same logic applies to the array of 'struct snd_soc_dai_driver'.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250207162246.3104-4-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: imx8: use common imx chip interface
Laurentiu Mihalcea [Fri, 7 Feb 2025 16:22:41 +0000 (11:22 -0500)] 
ASoC: SOF: imx8: use common imx chip interface

The common interface for imx chips (defined in imx-common.c) contains the
definitions for a lot of functions required by the SOF core. As such, the
platform driver can just use the common definitions instead of duplicating
code by re-defining aforementioned functions.

Make the transition to the new common interface. This consists of:

  1) Removing unneeded functions, which are already defined in the
  common interface.

  2) Defining some chip-specific operations/structures required by the
  interface to work.

  3) Dropping structure definitions that are no longer needed.

  4) Adapting some existing functions to the new interface.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250207162246.3104-3-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: imx: introduce more common structures and functions
Laurentiu Mihalcea [Fri, 7 Feb 2025 16:22:40 +0000 (11:22 -0500)] 
ASoC: SOF: imx: introduce more common structures and functions

The SOF drivers for imx chips have a lot of duplicate code and
routines/code snippets that could certainly be reused among drivers.

As such, introduce a new set of structures and functions that will help
eliminate the redundancy and code size of the drivers.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250207162246.3104-2-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: Intel: soc-acpi-intel-ptl-match typo fixups
Mark Brown [Fri, 7 Feb 2025 16:21:57 +0000 (16:21 +0000)] 
ASoC: Intel: soc-acpi-intel-ptl-match typo fixups

Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

Fix copy paste of lnl into ptl.

4 months agoASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l2_rt1320_l13
Peter Ujfalusi [Fri, 7 Feb 2025 12:36:37 +0000 (20:36 +0800)] 
ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l2_rt1320_l13

s/lnl/ptl

Fixes: a7ebb0255188 ("ASoC: Intel: soc-acpi-intel-ptl-match: add rt713_vb_l2_rt1320_l13 support")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250207123637.215320-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: Intel: soc-acpi-intel-ptl-match: add rt712_vb + rt1320 support
Peter Ujfalusi [Fri, 7 Feb 2025 12:36:36 +0000 (20:36 +0800)] 
ASoC: Intel: soc-acpi-intel-ptl-match: add rt712_vb + rt1320 support

s/lnl/ptl

Fixes: bd40d912728f ("ASoC: Intel: soc-acpi-intel-ptl-match: add rt712_vb + rt1320 support")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250207123637.215320-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: amd_sdw: Add quirks for Dell SKU's
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:19 +0000 (11:58 +0530)] 
ASoC: amd: amd_sdw: Add quirks for Dell SKU's

This patch adds a quirk to include the codec amplifier function for Dell
SKU's listed in quirk table.

Note: In these SKU's, the RT722 codec amplifier is excluded, and an
external amplifier is used instead.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-26-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: acp: amd-acp70-acpi-match: Add RT1320 & RT722 combination soundwire machine
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:18 +0000 (11:58 +0530)] 
ASoC: amd: acp: amd-acp70-acpi-match: Add RT1320 & RT722 combination soundwire machine

This patch adds below machine configuration for the ACP7.0 & ACP7.1
platforms.

Link 0: RT722 codec with three endpoints: Headset, Speaker, and DMIC.
Link 1: RT1320 amplifier.

Note:
The Speaker endpoint on the RT722 codec is not used.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-25-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: acp: amd-acp70-acpi-match: Add rt722 support
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:17 +0000 (11:58 +0530)] 
ASoC: amd: acp: amd-acp70-acpi-match: Add rt722 support

Patch adds driver data and match table for rt722 multi-function codec on
acp7.0 and acp7.1 platforms at sdw link0 for legacy(NO DSP) stack.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-24-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: acp: add RT711, RT714 & RT1316 support for ACP7.0 platform
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:16 +0000 (11:58 +0530)] 
ASoC: amd: acp: add RT711, RT714 & RT1316 support for ACP7.0 platform

Add support for corresponding codecs on ACP7.0 platform hardware
configuration.

SDW0: RT711 Jack
SDW0: RT1316 Left Speaker
SDW0: RT1316 Right Speaker
SDW1: RT714 DMIC

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-23-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: acp: add machine driver changes for ACP7.0 and ACP7.1 platforms
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:15 +0000 (11:58 +0530)] 
ASoC: amd: acp: add machine driver changes for ACP7.0 and ACP7.1 platforms

Add SoundWire generic machine driver changes for legacy stack(No DSP) for
ACP7.0 and ACP7.1 platforms.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-22-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: update Pink Sardine platform Kconfig description
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:14 +0000 (11:58 +0530)] 
ASoC: amd: update Pink Sardine platform Kconfig description

Update Pink Sardine platform Kconfig option description.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-21-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: update file description and copyright year
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:13 +0000 (11:58 +0530)] 
ASoC: amd: ps: update file description and copyright year

Update files description for acp pci driver, SoundWire DMA driver, PDM
driver and acp header file as new support is added for ACP7.0 & ACP7.1
platforms.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-20-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: update module description
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:12 +0000 (11:58 +0530)] 
ASoC: amd: ps: update module description

Update module description for Pink Sardine platform acp pci driver,
SoundWire dma driver and PDM driver modules.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-19-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: add soundwire wake interrupt handling
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:11 +0000 (11:58 +0530)] 
ASoC: amd: ps: add soundwire wake interrupt handling

Add SoundWire wake interrupt handling for ACP7.0 & ACP7.1 platforms.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-18-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: add soundwire dma interrupts handling for ACP7.0 platform
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:10 +0000 (11:58 +0530)] 
ASoC: amd: ps: add soundwire dma interrupts handling for ACP7.0 platform

Add Soundwie dma interrupts handling for ACP7.0 & ACP7.1 platforms.
Add acp pci revision id conditional checks for handling platform specific
implementation.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-17-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: implement function to restore dma config for ACP7.0 platform
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:09 +0000 (11:58 +0530)] 
ASoC: amd: ps: implement function to restore dma config for ACP7.0 platform

Implement function to restore the dma configuration during system level
resume for ACP7.0 & ACP7.1 platforms. Add a conditional check to invoke
restore dma configuration function based on acp pci revision id.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-16-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: add ACP7.0 & ACP7.1 specific soundwire dma driver changes
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:08 +0000 (11:58 +0530)] 
ASoC: amd: ps: add ACP7.0 & ACP7.1 specific soundwire dma driver changes

Add SoundWire dma driver changes specific to ACP7.0 & ACP7.1 platforms.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-15-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: add pm ops related hw_ops for ACP7.0 & ACP7.1 platforms
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:07 +0000 (11:58 +0530)] 
ASoC: amd: ps: add pm ops related hw_ops for ACP7.0 & ACP7.1 platforms

Add ACP7.0 & ACP7.1 platform specific PM ops related hw_ops.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-14-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: add pci driver hw_ops for ACP7.0 & ACP7.1 variants
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:06 +0000 (11:58 +0530)] 
ASoC: amd: ps: add pci driver hw_ops for ACP7.0 & ACP7.1 variants

Add below ACP pci driver hw_ops for ACP7.0 & ACP7.1 variants.
- acp_init()
- acp_deinit()
- acp_get_config()

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-13-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: rename acp_restore_sdw_dma_config() function
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:05 +0000 (11:58 +0530)] 
ASoC: amd: ps: rename acp_restore_sdw_dma_config() function

Rename acp_restore_sdw_dma_config() as acp63_restore_sdw_dma_config()
which is specific to ACP6.3 platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-12-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: refactor soundwire dma interrupts enable/disable sequence
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:04 +0000 (11:58 +0530)] 
ASoC: amd: ps: refactor soundwire dma interrupts enable/disable sequence

Refactor SoundWire dma interrupts enable/disable sequence by passing
interrupt mask values as an arguments. This will allow to use same function
for enabling/disabling SoundWire dma interrupts for different platforms.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-11-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: refactor soundwire dma driver code
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:03 +0000 (11:58 +0530)] 
ASoC: amd: ps: refactor soundwire dma driver code

Refactor existing SoundWire dma driver code by adding acp_rev check for
ACP6.3 platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-10-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: store acp revision id in SoundWire dma driver private data
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:02 +0000 (11:58 +0530)] 
ASoC: amd: ps: store acp revision id in SoundWire dma driver private data

Store acp pci revision id in SoundWire dma driver private data structure.
It will be used to distinguish platform specific code.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-9-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: refactor soundwire dma interrupt handling
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:01 +0000 (11:58 +0530)] 
ASoC: amd: ps: refactor soundwire dma interrupt handling

Move the Soundwire DMA interrupt handling to separate function.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-8-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: add soundwire dma irq thread callback
Vijendar Mukunda [Fri, 7 Feb 2025 06:28:00 +0000 (11:58 +0530)] 
ASoC: amd: ps: add soundwire dma irq thread callback

Add acp pci driver Soundwire DMA irq thread callaback
for ACP6.3 platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-7-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: add callback to read acp pin configuration
Vijendar Mukunda [Fri, 7 Feb 2025 06:27:59 +0000 (11:57 +0530)] 
ASoC: amd: ps: add callback to read acp pin configuration

Add pci driver callback to read acp pin configuration for
ACP6.3 platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: add callback functions for acp pci driver pm ops
Vijendar Mukunda [Fri, 7 Feb 2025 06:27:58 +0000 (11:57 +0530)] 
ASoC: amd: ps: add callback functions for acp pci driver pm ops

Add acp pci driver pm ops related callback functions for ACP6.3
platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: add acp pci driver hw_ops for acp6.3 platform
Vijendar Mukunda [Fri, 7 Feb 2025 06:27:57 +0000 (11:57 +0530)] 
ASoC: amd: ps: add acp pci driver hw_ops for acp6.3 platform

Add ACP6.3 platform specific PCI driver hw_ops for acp init/de-init
sequence.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: use macro for ACP6.3 pci revision id
Vijendar Mukunda [Fri, 7 Feb 2025 06:27:56 +0000 (11:57 +0530)] 
ASoC: amd: ps: use macro for ACP6.3 pci revision id

Use macro for ACP6.3 PCI revision id instead of hard coded value.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: ps: rename structure names, variable and other macros
Vijendar Mukunda [Fri, 7 Feb 2025 06:27:55 +0000 (11:57 +0530)] 
ASoC: amd: ps: rename structure names, variable and other macros

Rename macros and structure names, variable with ACP63 tag which are
specific to ACP6.3 platform.
Rename 'stream_index' and 'sdw_dma_data' variable names to avoid check
patch warnings.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20250207062819.1527184-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: tas2781: Switch to use %ptTsr
Andy Shevchenko [Thu, 6 Feb 2025 19:25:15 +0000 (21:25 +0200)] 
ASoC: tas2781: Switch to use %ptTsr

Use %ptTsr instead of open-coded variant to print contents of time64_t type
in human readable form.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250206192537.1133763-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: Improve the spcm and ipc4 copier prints
Mark Brown [Thu, 6 Feb 2025 20:45:08 +0000 (20:45 +0000)] 
ASoC: SOF: Improve the spcm and ipc4 copier prints

Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Introduce new wrapper to present spcm related debug and error prints in
a unified way and provide additional details to help to understand the
reasons and configuration used when the log was captured.

Change the way we print information about the ipc4 copier module to
use type specific prints, again to provide better information for
debugging.

4 months agoAdd static channel mapping between soundwire master
Mark Brown [Thu, 6 Feb 2025 20:45:03 +0000 (20:45 +0000)] 
Add static channel mapping between soundwire master

Merge series from Mohammad Rafi Shaik <quic_mohs@quicinc.com>:

Add static channel map support between soundwire master and slave.

Currently, the channel value for each soundwire port is hardcoded in the
wcd937x-sdw driver and the same channel  value is configured in the
soundwire master.

The Qualcomm board like the QCM6490-IDP require static channel map
settings for the soundwire master and slave ports.

If another boards which are using enable wcd937x, the channel mapping
index values between master and slave may be different depending on the
board hw design and requirements. If the above properties are not used
in a SoC specific device tree, the channel mapping index values are set
to default.

With the introduction of the following channel mapping properties, it is
now possible to configure the master channel mapping directly from the
device tree.

Added qcom_swrm_set_channel_map api to set the master channel values
which allows more flexible to configure channel values in runtime for
specific active soundwire ports.

Add get and set channel maps support from codec to cpu dais in common
Qualcomm sdw driver.

4 months agoASoC: cpcap: Implement jack headset detection
Mark Brown [Thu, 6 Feb 2025 20:44:59 +0000 (20:44 +0000)] 
ASoC: cpcap: Implement jack headset detection

Merge series from Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>:

cpcap audio codec found on cpcap PMIC supports headset detection
and PTT button through its 3.5 mm jack. This series implements
support for those capabilities.

4 months agoASoC: and adn use snd_soc_ret()
Mark Brown [Thu, 6 Feb 2025 20:44:54 +0000 (20:44 +0000)] 
ASoC: and adn use snd_soc_ret()

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

Each ASoC framwark is using own snd_xxx_ret() function, but we can share
these. This patch-set adds new snd_soc_ret() and use it.

checkpatch indicates that ENOTSUPP is not a SUSV4 error code, prefer to
use EOPNOTSUPP. So this patch-set adds it, but not remove existing ENOTSUPP.

Link: https://lore.kernel.org/r/8734gvsg5i.wl-kuninori.morimoto.gx@renesas.com
4 months agoThis is continued work on Samsung S9(SM-9600)
Mark Brown [Thu, 6 Feb 2025 20:44:50 +0000 (20:44 +0000)] 
This is continued work on Samsung S9(SM-9600)

Merge series from Dzmitry Sankouski <dsankouski@gmail.com>:

Contains starqltechn device tree changes.
- sound (headphones and mics only)

4 months agoASoC: Intel: avs: Add support for MalibouLake
Mark Brown [Thu, 6 Feb 2025 20:44:46 +0000 (20:44 +0000)] 
ASoC: Intel: avs: Add support for MalibouLake

Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

The avs-driver is the go-to driver for Intel Automotive. MalibouLake
(MBL) and RedondoLake (RDL) are representatives of the project. These
inherit majority of the featureset from RaptorLake-M (RPL-M) and
AlderLake-N (ADL-N) respectively. The onboard codec for these is TI's
pcm3168a.

In summary, the patchset:

- modifies existing pcm3168a.c to be x86/ACPI friendly
- updates the DSP firmware booting sequence for cAVS 2.5 platforms to
  improve its behaviour on some specific revisions/steppings of the
  hardware
- adds new machine board driver, avs_pcm3168a
- adds selector entry for RPL-M devices in intel-dspcfg

While there 'ALSA: hda:' patch within the list, I'd prefer the patchset
to go through Mark's tree to avoid conflicts with follow ups to this
one.

Longer version:

Currently the pcm3168a is supported on ARM/DT (ti/j721e-evm.c being the
only user). To make it x86/ACPI friendly, add relevant ACPI-match table
and relax driver's probing conditions.
The default format is 2ch, 24-bits, 48000kHz. As per specification,
24-bits are supported by the chip and it works in production in contrary
to what the existing code suggests. A fix is provided to align the code
with the spec.

Now, a single DSP firmware binary covers a wide range of platforms - a
single one covers AlderLake, RaptorLake and all their derevatires except
for AlderLake-N based due to MEU differences. While most of the hardware
capabilities are read by the firmware during runtime, some information is
not accessible from the DSP level. Provide the HDAudio controller
revision/stepping information to the firmware to address that.

With that done, expand number of modules supported with WovHostModule
(WHM). WHM is a processing module which is tailored for ultra-low-power
scenarios. From software perspective, as most of its config is similar
to the Copier module, code reuse is advised. To make the reuse possible,
existing gateway configuration code is refactor - not only to add
support for WHM but also make it easier to understand. Multiple smaller
functions instead of all-in-one one.

4 months agoASoC: audio-graph-card2: use snd_soc_ret()
Kuninori Morimoto [Wed, 5 Feb 2025 00:16:36 +0000 (00:16 +0000)] 
ASoC: audio-graph-card2: use snd_soc_ret()

We can use snd_soc_ret() to indicate error message when return.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/877c652ql8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: audio-graph-card: use snd_soc_ret()
Kuninori Morimoto [Wed, 5 Feb 2025 00:16:31 +0000 (00:16 +0000)] 
ASoC: audio-graph-card: use snd_soc_ret()

We can use snd_soc_ret() to indicate error message when return.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/878qql2qlc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: simple-card-utils: use snd_soc_ret()
Kuninori Morimoto [Wed, 5 Feb 2025 00:16:27 +0000 (00:16 +0000)] 
ASoC: simple-card-utils: use snd_soc_ret()

We can use snd_soc_ret() to indicate error message when return.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87a5b12qlg.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: simple-card: use snd_soc_ret()
Kuninori Morimoto [Wed, 5 Feb 2025 00:16:23 +0000 (00:16 +0000)] 
ASoC: simple-card: use snd_soc_ret()

We can use snd_soc_ret() to indicate error message when return.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87bjvh2qlk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: soc-pcm: use snd_soc_ret()
Kuninori Morimoto [Wed, 5 Feb 2025 00:16:19 +0000 (00:16 +0000)] 
ASoC: soc-pcm: use snd_soc_ret()

Many functions uses below style for error return

dev_err(dev, "message");
return -Exxxx;

We can merge these into snd_soc_ret() which can use same error
format. Let's cleaup code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87cyfx2qlo.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: soc-utils: care -EOPNOTSUPP on snd_soc_ret()
Kuninori Morimoto [Wed, 5 Feb 2025 00:16:14 +0000 (00:16 +0000)] 
ASoC: soc-utils: care -EOPNOTSUPP on snd_soc_ret()

We get below warning by checkpatch on soc-utils.
Adds EOPNOTSUPP, but not remove existing ENOTSUPP.

WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ed0d2qlt.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: add common snd_soc_ret() and use it
Kuninori Morimoto [Wed, 5 Feb 2025 00:16:10 +0000 (00:16 +0000)] 
ASoC: add common snd_soc_ret() and use it

Each soc-xxx.c is using own snd_xxx_ret(), but we want to share it.
Let's add common snd_soc_ret() for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87frkt2qlx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: ipc4: Add support for split firmware releases
Peter Ujfalusi [Thu, 6 Feb 2025 08:52:37 +0000 (10:52 +0200)] 
ASoC: SOF: ipc4: Add support for split firmware releases

A split SOF release consists of a base firmware and two libraries:
<fw_filename>-openmodules.ri for processing (audio) modules
<fw_filename>-debug.ri for debug and developer modules

To handle this new release model add infrastructure to try to load the two
library after boot optionally.

This approach will allow flexibility on handling platforms in sof-bin with
single or split configuration:
single release: base firmware only
split release: base firmware + openmodules + debug

The files for the split firmware are located at the firmware directory.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250206085237.19214-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: dapm: unexport dapm_mark_endpoints_dirty()
Masahiro Yamada [Wed, 5 Feb 2025 16:53:08 +0000 (01:53 +0900)] 
ASoC: dapm: unexport dapm_mark_endpoints_dirty()

The symbol provider (sound/soc/soc-dapm.c) and the symbol consumer
(sound/soc/soc-core.c) belong to the same module, snd-soc-core.ko.

There is no need to export it.

I deleted the comment, as other modules cannot use it any more.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://patch.msgid.link/20250205165310.3466254-1-masahiroy@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: ipc4-pcm: Move out be_rate initialization from for loop in fixup
Peter Ujfalusi [Thu, 6 Feb 2025 09:49:14 +0000 (11:49 +0200)] 
ASoC: SOF: ipc4-pcm: Move out be_rate initialization from for loop in fixup

Instead of initializing the be_rate within the loop by checking i == 0 at
each iteration, move the be_rate reference initialization from the loop.
For BE single rate check we will have single comparison done at each
iteration compared to two in case the num_input_formats were higher than 1.

We still need to run the loop from index 0 to check for FE-BE rate match.

The patch also fixes bogus reports from gcc static analyzer thinking that
be_rate is used uninitialized later in the function (which was not true).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250206094914.21135-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: dapm: unexport snd_soc_dapm_update_dai()
Masahiro Yamada [Wed, 5 Feb 2025 16:53:34 +0000 (01:53 +0900)] 
ASoC: dapm: unexport snd_soc_dapm_update_dai()

The symbol provider (sound/soc/soc-dapm.c) and the symbol consumer
(sound/soc/soc-pcm.c) belong to the same module, snd-soc-core.ko.

There is no need to export it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://patch.msgid.link/20250205165337.3466336-1-masahiroy@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: dapm: unexport snd_soc_dapm_init()
Masahiro Yamada [Wed, 5 Feb 2025 16:52:16 +0000 (01:52 +0900)] 
ASoC: dapm: unexport snd_soc_dapm_init()

The symbol provider (sound/soc/soc-dapm.c) and the symbol consumer
(sound/soc/soc-core.c) belong to the same module, snd-soc-core.ko.

There is no need to export it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://patch.msgid.link/20250205165226.3466137-1-masahiroy@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: mediatek: mt8186: Remove unused mt8186_afe_(suspend|resume)_clock
Dr. David Alan Gilbert [Thu, 6 Feb 2025 01:40:28 +0000 (01:40 +0000)] 
ASoC: mediatek: mt8186: Remove unused mt8186_afe_(suspend|resume)_clock

mt8186_afe_resume_clock() and mt8186_afe_suspend_clock() were
added in 2022 by
commit 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control
in platform driver")

but have remained unused.

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://patch.msgid.link/20250206014028.237423-1-linux@treblig.org
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: qcom: sdw: Add get and set channel maps support from codec to cpu dais
Mohammad Rafi Shaik [Thu, 6 Feb 2025 11:22:25 +0000 (16:52 +0530)] 
ASoC: qcom: sdw: Add get and set channel maps support from codec to cpu dais

Add get and set channel maps support from codec to cpu dais.

Implemented logic to get the channel map in case of only sdw stream and
set channel map only for specific cpu dais.

Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Link: https://patch.msgid.link/20250206112225.3270400-5-quic_mohs@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agosoundwire: qcom: Add set_channel_map api support
Mohammad Rafi Shaik [Thu, 6 Feb 2025 11:22:24 +0000 (16:52 +0530)] 
soundwire: qcom: Add set_channel_map api support

Added qcom_swrm_set_channel_map api to set the master channel mask for
TX and RX paths based on the provided slots.

Added a new field ch_mask to the qcom_swrm_port_config structure.
This field is used to store the master channel mask, which allows more
flexible to configure channel mask in runtime for specific active
soundwire ports.

Modified the qcom_swrm_port_enable function to configure master
channel mask. If the ch_mask is set to SWR_INVALID_PARAM or is zero,
the function will use the default channel mask.

Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://patch.msgid.link/20250206112225.3270400-4-quic_mohs@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: codecs: wcd937x: Add static channel mapping support in wcd937x-sdw
Mohammad Rafi Shaik [Thu, 6 Feb 2025 11:22:23 +0000 (16:52 +0530)] 
ASoC: codecs: wcd937x: Add static channel mapping support in wcd937x-sdw

Add static channel mapping between master and slave ports in wcd937x-sdw
driver.

Currently, the channel mask for each soundwire port is hardcoded in the
wcd937x-sdw driver, and the same channel mask value is configured in the
soundwire master.

The Qualcomm boards like the QCM6490-IDP require different channel mask
settings for the soundwire master and slave ports.

Implemented logic to read TX/RX channel mappings from device tree
properties (qcom,tx-channel-mapping and qcom,rx-channel-mapping).

Modified the wcd937x_connect_port to handle master channel masks during
port enable/disable operations.

Added wcd937x_get_channel_map api to retrieve the current master
channel map for TX and RX paths.

Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Link: https://patch.msgid.link/20250206112225.3270400-3-quic_mohs@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: dt-bindings: wcd937x-sdw: Add static channel mapping support
Mohammad Rafi Shaik [Thu, 6 Feb 2025 11:22:22 +0000 (16:52 +0530)] 
ASoC: dt-bindings: wcd937x-sdw: Add static channel mapping support

Add static channel mapping between master and slave rx/tx ports for
Qualcomm wcd937x soundwire codec.

Currently, the channel map index value for each soundwire port is
hardcoded in the wcd937x-sdw driver, and the same channel map index
value is configured in the soundwire master.

The Qualcomm board like the QCM6490-IDP require static channel map
settings for the soundwire master and slave ports.

If another boards which are using enable wcd937x, the channel mapping
index values between master and slave may be different depending on the
board hw design and requirements. If the above properties are not used
in a SoC specific device tree, the channel mapping index values are set
to default.

With the introduction of the following channel mapping properties, it is
now possible to configure the master channel mapping directly from the
device tree.

The qcom,tx-channel-mapping property specifies the static channel mapping
between the slave and master tx ports in the order of slave port channels
which is adc1, adc2, adc3, adc4, dmic0, dmic1, mbhc, dmic2, dmic3, dmci4,
dmic5, dmic6, dmic7.

The qcom,rx-channel-mapping property specifies the static channel mapping
between the slave and master rx ports in the order of slave port channels
which is hph_l, hph_r, clsh, comp_l, comp_r, lo, dsd_r, dsd_l.

Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250206112225.3270400-2-quic_mohs@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: ipc4-topology: Improve the information in prepare_copier prints
Peter Ujfalusi [Thu, 6 Feb 2025 09:28:28 +0000 (11:28 +0200)] 
ASoC: SOF: ipc4-topology: Improve the information in prepare_copier prints

It is useful to know the explicit type and if the copier (host/dai) is
configured to use ChainDMA or not and also the stream_tag for the host
copier.

Change the prints to carry more information for debugging purposes.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250206092828.7569-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: pcm: Add snd_sof_pcm specific wrappers for dev_dbg() and dev_err()
Peter Ujfalusi [Thu, 6 Feb 2025 09:28:27 +0000 (11:28 +0200)] 
ASoC: SOF: pcm: Add snd_sof_pcm specific wrappers for dev_dbg() and dev_err()

Introduce spcm_dbg() and spcm_err() macros to provide consistent printing
for debug and error messages which includes usable information in the
print's prefix.

Update the prints in pcm.c, ipc3-pcm.c and ipc4-pcm.c to take advantage of
the features provided by the macros.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250206092828.7569-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: pcm: Move period/buffer configuration print after platform open
Peter Ujfalusi [Thu, 6 Feb 2025 09:28:26 +0000 (11:28 +0200)] 
ASoC: SOF: pcm: Move period/buffer configuration print after platform open

The platform specific pcm_open call via snd_sof_pcm_platform_open() can
modify the initial buffer configuration via constraints.

Move the prints as last step in the sof_pcm_open() function to reflect the
final setup.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250206092828.7569-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: Relocate and rework functionality for PCM stream freeing
Peter Ujfalusi [Thu, 6 Feb 2025 09:28:25 +0000 (11:28 +0200)] 
ASoC: SOF: Relocate and rework functionality for PCM stream freeing

Move the sof_pcm_stream_free() from sof-audio.c to pcm.c as static function
and add wrapper to free all active stream, which is going to be used in
ipc3/4 topology code (removes duplicated code).

With this change most of the PCM stream related code is located in one
source file for easier lookup and simplified flow.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20250206092828.7569-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: dt-bindings: atmel,at91-ssc: Convert to YAML format
Andrei Simion [Mon, 3 Feb 2025 09:11:12 +0000 (11:11 +0200)] 
ASoC: dt-bindings: atmel,at91-ssc: Convert to YAML format

Convert devicetree binding atmel-ssc.txt to YAML format.
Update the documentation supported file for MICROCHIP SSC DRIVER.

Signed-off-by: Andrei Simion <andrei.simion@microchip.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20250203091111.21667-1-andrei.simion@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: rt722: get lane mapping property
Bard Liao [Tue, 4 Feb 2025 07:52:24 +0000 (15:52 +0800)] 
ASoC: rt722: get lane mapping property

Rt722 supports multi-lane and the driver doesn't call sdw_slave_read_prop()
to get all properties. Add sdw_slave_read_lane_mapping() to get the
required lane mapping property.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20250204075224.162661-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: SOF: mediatek: Use str_on_off() helper function
Thorsten Blum [Tue, 4 Feb 2025 15:38:04 +0000 (16:38 +0100)] 
ASoC: SOF: mediatek: Use str_on_off() helper function

Remove hard-coded strings by using the str_on_off() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250204153806.3587-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: amd: acp: Use str_low_high() helper function
Thorsten Blum [Tue, 4 Feb 2025 15:33:32 +0000 (16:33 +0100)] 
ASoC: amd: acp: Use str_low_high() helper function

Remove hard-coded strings by using the str_low_high() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250204153333.3045-3-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: dmic: Add DSD big endian format support
Shengjiu Wang [Wed, 5 Feb 2025 06:24:44 +0000 (14:24 +0800)] 
ASoC: dmic: Add DSD big endian format support

Add DSD big endian format support in this generic dmic driver:
DSD_U16_BE and DSD_U32_BE.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20250205062444.1694810-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
4 months agoASoC: simple-card-utils.c: add missing dlc->of_node
Kuninori Morimoto [Tue, 4 Feb 2025 23:50:08 +0000 (23:50 +0000)] 
ASoC: simple-card-utils.c: add missing dlc->of_node

commit 90de551c1bf ("ASoC: simple-card-utils.c: enable multi Component
support") added muiti Component support, but was missing to add
dlc->of_node. Because of it, Sound device list will indicates strange
name if it was DPCM connection and driver supports dai->driver->dai_args,
like below

> aplay -l
card X: sndulcbmix [xxxx], device 0: fe.(null).rsnd-dai.0 (*) []
...                                     ^^^^^^

It will be fixed by this patch

> aplay -l
card X: sndulcbmix [xxxx], device 0: fe.sound@ec500000.rsnd-dai.0 (*) []
...                                     ^^^^^^^^^^^^^^

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/87ikpp2rtb.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>