Commit graph

49447 commits

Author SHA1 Message Date
Takashi Iwai 9c2f5b6eb8
ASoC: SOF: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-25-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:30 +09:00
Takashi Iwai 8c26836f5b
ASoC: sh: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-24-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:29 +09:00
Takashi Iwai e93c3b9606
ASoC: samsung: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-23-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:28 +09:00
Takashi Iwai 18db1c4851
ASoC: rockchip: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-22-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:27 +09:00
Takashi Iwai 078f57bd55
ASoC: qcom: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-21-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:26 +09:00
Takashi Iwai 8a72584d0d
ASoC: pxa: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-20-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:26 +09:00
Takashi Iwai 62c6137ab2
ASoC: mxs: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-19-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:25 +09:00
Takashi Iwai bfc05938eb
ASoC: meson: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-18-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:24 +09:00
Takashi Iwai 9d819c244a
ASoC: mediatek: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-17-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:23 +09:00
Takashi Iwai 3299aa652d
ASoC: loongson: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-16-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:22 +09:00
Takashi Iwai 7ca27af84f
ASoC: kirkwood: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-15-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:21 +09:00
Takashi Iwai f7d09b7d4d
ASoC: jz4740: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-14-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:21 +09:00
Takashi Iwai 590d82e6e6
ASoC: intel: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-13-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:20 +09:00
Takashi Iwai 76560b808b
ASoC: generic: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-12-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:19 +09:00
Takashi Iwai fe756e1e54
ASoC: fsl: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-11-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:18 +09:00
Takashi Iwai 591002b84a
ASoC: cirrus: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-10-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:17 +09:00
Takashi Iwai 37f8d0d000
ASoC: bcm: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-9-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:16 +09:00
Takashi Iwai ef993723af
ASoC: au1x: Use *-y instead of *-objs Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-8-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:16 +09:00
Takashi Iwai 907cb79d41
ASoC: atmel: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-7-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:15 +09:00
Takashi Iwai fa8e54828e
ASoC: apple: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-6-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:14 +09:00
Takashi Iwai 0721401357
ASoC: amd: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-5-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:13 +09:00
Takashi Iwai 01e8f66b43
ASoC: adi: Use *-y instead of *-objs in Makefile
Signed-off-by: Takashi Iwai <tiwai@suse.de>
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Link: https://lore.kernel.org/r/20240507155540.24815-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:12 +09:00
Takashi Iwai 1c3fa66628
ASoC: codecs: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-3-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:12 +09:00
Takashi Iwai fd25e1c132
ASoC: core: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240507155540.24815-2-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-08 11:39:11 +09:00
Mark Brown 80513607df
ASoC: Constify static snd_pcm_hardware
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Static 'struct snd_pcm_hardware' is not modified by few drivers and its
copy is passed to the core, so it can be made const for increased code
safety.
2024-05-07 23:38:40 +09:00
Mark Brown 741e987d04
ASoC: use 'time_left' instead of 'timeout' with
Merge series from Wolfram Sang <wsa+renesas@sang-engineering.com>:

There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_*() functions causing patterns like:

        timeout = wait_for_completion_timeout(...)
        if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
obvious and self explaining.

This is part of a tree-wide series. The rest of the patches can be found here
(some parts may still be WIP):

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/time_left

Because these patches are generated, I audit them before sending. This is why I
will send series step by step. Build bot is happy with these patches, though.
No functional changes intended.
2024-05-07 10:38:11 +09:00
Mark Brown d98b07124b
ASoC: Use snd_soc_substream_to_rtd() for accessing
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:

Do not open-code snd_soc_substream_to_rtd() when accessing
snd_pcm_substream->private_data.  This makes code more consistent with
rest of ASoC and allows in the future to move the field to any other
place or add additional checks in snd_soc_substream_to_rtd().
2024-05-07 10:38:02 +09:00
Mark Brown ba04ff2006
ALSA/ASoC: Intel: clarify Copyright information
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

This patchset does not change any functionality. It only clarifies the
Copyright information in ASoC/HDAudio contributions, where an "All
rights reserved" notice was mistakenly added in a number of files over
the years, likely due to copy/paste. The Intel template never included
this statement.
2024-05-07 10:37:51 +09:00
Krzysztof Kozlowski bd381c9d15
ASoC: qcom: q6apm-dai: drop unused 'q6apm_dai_rtd' fields
Remove few unused fields from 'struct q6apm_dai_rtd'.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430140954.328127-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07 00:32:47 +09:00
Mark Brown 6b045e2e21
ASoC: SOF: Intel: remove circular dependency for
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

The SoundWire BPT support will rely on the HDaudio DMA. This exposes a
circular dependency module dependency which has to be resolved by
splitting common parts used by HDaudio and SoundWire parts, and
'generic' parts used by HDaudio only.

This patchset does not change any functionality, it just moves code
around, exposes symbols that are used in the new module. The code has
been in use for more than one kernel cycle already so it really
shouldn't break any existing platforms.

The main issue with such code moves is that it makes backports or
fixes more complicated. That's the main reason why we held back these
patches until we were reasonably confident on the maturity of MTL and
LNL drivers.
2024-05-07 00:31:25 +09:00
Mark Brown f283219b27
ASoC: SOF: Intel: HDA/DMIC updates
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

The first patch handles a problematic configuration where the wrong
machine driver/topology is used: when the hardware reports an external
HDaudio codec the direction is to ignore/discard ACPI SoundWire
devices.

The last two patch deal with DMIC format configurations and allow
users to select S16_LE even if the DMIC and internal copiers only
support 24 or 32-bits. The code changes are located in sound/soc/sof/
but in the scope of Intel DAIs.
2024-05-07 00:31:18 +09:00
Krzysztof Kozlowski 74a15fabd2
ASoC: uniphier: Constify static snd_pcm_hardware
Static 'struct snd_pcm_hardware' is not modified by the driver and its
copy is passed to the core, so it can be made const for increased code
safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240429-n-asoc-const-snd-pcm-hardware-v1-4-c6ce60989834@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07 00:00:22 +09:00
Krzysztof Kozlowski 7b5ce9f0c5
ASoC: meson: Constify static snd_pcm_hardware
Static 'struct snd_pcm_hardware' is not modified by the driver and its
copy is passed to the core, so it can be made const for increased code
safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240429-n-asoc-const-snd-pcm-hardware-v1-3-c6ce60989834@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07 00:00:22 +09:00
Krzysztof Kozlowski ed90156037
ASoC: fsl: Constify static snd_pcm_hardware
Static 'struct snd_pcm_hardware' is not modified by the driver and its
copy is passed to the core, so it can be made const for increased code
safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240429-n-asoc-const-snd-pcm-hardware-v1-2-c6ce60989834@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07 00:00:21 +09:00
Krzysztof Kozlowski e6fa3509cb
ASoC: qcom: Constify static snd_pcm_hardware
Static 'struct snd_pcm_hardware' is not modified by the driver and its
copy is passed to the core, so it can be made const for increased code
safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240429-n-asoc-const-snd-pcm-hardware-v1-1-c6ce60989834@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07 00:00:20 +09:00
Wolfram Sang 4e1f953a4a
ASoC: codecs: wm8996: use 'time_left' variable with wait_for_completion_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:

	timeout = wait_for_completion_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240430115438.29134-5-wsa+renesas@sang-engineering.com
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07 00:00:16 +09:00
Wolfram Sang 19c70b4668
ASoC: codecs: wm8994: use 'time_left' variable with wait_for_completion_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:

	timeout = wait_for_completion_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240430115438.29134-4-wsa+renesas@sang-engineering.com
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07 00:00:15 +09:00
Wolfram Sang 0800660d8c
ASoC: codecs: wm8993: use 'time_left' variable with wait_for_completion_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:

	timeout = wait_for_completion_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Fix to the proper variable type 'unsigned long' while here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240430115438.29134-3-wsa+renesas@sang-engineering.com
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07 00:00:15 +09:00
Wolfram Sang cfcd957e63
ASoC: codecs: wm8962: use 'time_left' variable with wait_for_completion_timeout()
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:

	timeout = wait_for_completion_timeout(...)
	if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240430115438.29134-2-wsa+renesas@sang-engineering.com
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-07 00:00:14 +09:00
Krzysztof Kozlowski 47aa51677c
ASoC: sunxi: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-13-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:56 +09:00
Krzysztof Kozlowski 3e72659310
ASoC: samsung: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-12-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:56 +09:00
Krzysztof Kozlowski 22f5680a9c
ASoC: meson: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-11-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:55 +09:00
Krzysztof Kozlowski 410a45140f
ASoC: mediatek: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-10-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:54 +09:00
Krzysztof Kozlowski ffad75cebb
ASoC: loongson: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-9-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:53 +09:00
Krzysztof Kozlowski fe42c3b75b
ASoC: kirkwood: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-8-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:52 +09:00
Krzysztof Kozlowski 3b62178720
ASoC: img: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-7-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:52 +09:00
Krzysztof Kozlowski b695d8be5b
ASoC: fsl: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-6-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:51 +09:00
Krzysztof Kozlowski a84d840775
ASoC: amd: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-5-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:50 +09:00
Krzysztof Kozlowski a80f2f8443
ASoC: arm: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-4-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:49 +09:00
Krzysztof Kozlowski 72a666f47f
ASoC: ti: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-3-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:48 +09:00
Krzysztof Kozlowski 3beb985abb
ASoC: tegra: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-2-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:47 +09:00
Krzysztof Kozlowski 77678a25d1
ASoC: qcom: Use snd_soc_substream_to_rtd() for accessing private_data
Do not open-code snd_soc_substream_to_rtd().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-1-6f8a8902b479@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:47 +09:00
Pierre-Louis Bossart 83e495d7b2
ASoC: soc-topology-test: clarify Copyright information
For some reason a number of files included the "All rights reserved"
statement. Good old copy-paste made sure this mistake proliferated.

Remove the "All rights reserved" in all Intel-copyright to align with
internal guidance.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20240503140359.259762-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:40 +09:00
Pierre-Louis Bossart 94001147a0
ASoC: Intel: avs: clarify Copyright information
For some reason a number of files included the "All rights reserved"
statement. Good old copy-paste made sure this mistake proliferated.

Remove the "All rights reserved" in all Intel-copyright to align with
internal guidance.

Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20240503140359.259762-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:39 +09:00
Pierre-Louis Bossart 618ae0d7e7
ASoC: Intel: catpt: clarify Copyright information
For some reason a number of files included the "All rights reserved"
statement. Good old copy-paste made sure this mistake proliferated.

Remove the "All rights reserved" in all Intel-copyright to align with
internal guidance.

Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20240503140359.259762-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:38 +09:00
Pierre-Louis Bossart 884077bd71
ASoC: codecs: Intel: clarify Copyright information
For some reason a number of files included the "All rights reserved"
statement. Good old copy-paste made sure this mistake proliferated.

Remove the "All rights reserved" in all Intel-copyright to align with
internal guidance.

Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20240503140359.259762-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:38 +09:00
Pierre-Louis Bossart 5cf4ffa411
ASoC: Intel: common: clarify Copyright information
For some reason a number of files included the "All rights reserved"
statement. Good old copy-paste made sure this mistake proliferated.

Remove the "All rights reserved" in all Intel-copyright to align with
internal guidance.

Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20240503140359.259762-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:37 +09:00
Pierre-Louis Bossart 0e0440535d
ASoC: Intel: boards: clarify Copyright information
For some reason a number of files included the "All rights reserved"
statement. Good old copy-paste made sure this mistake proliferated.

Remove the "All rights reserved" in all Intel-copyright to align with
internal guidance.

Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20240503140359.259762-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:36 +09:00
Pierre-Louis Bossart 293ad28116
ASoC: SOF: Intel: clarify Copyright information
For some reason a number of files included the "All rights reserved"
statement. Good old copy-paste made sure this mistake proliferated.

Remove the "All rights reserved" in all Intel-copyright to align with
internal guidance.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20240503140359.259762-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:59:35 +09:00
Amadeusz Sławiński 6490bec6d5
ASoC: Intel: avs: boards: Properly name input device
Machine boards expose input device for use with userspace. Current name
in some cases is incorrect, fix it.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240506121106.3792340-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 23:56:00 +09:00
Shenghao Ding 1ae14f3520
ASoC: tas2781: Fix a warning reported by robot kernel test
Fix a warning reported by robot kernel test that 'fw_entry' in function
'tas2781_load_calibration' is used uninitialized with compiler
sh4-linux-gcc (GCC) 13.2.0, an update of copyright and a correction of the
comments.

Fixes: ef3bcde75d ("ASoc: tas2781: Add tas2781 driver")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://lore.kernel.org/r/20240505122346.1326-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-06 00:03:54 +09:00
Pierre-Louis Bossart 6fe61f31ea
ASoC: SOF: Intel: move hda.c to different module
Now that most of the code moves are done, we can add a new module and
the required EXPORT_SYMBOL definitions.

No functionality change, just a new module added.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20240503135221.229202-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-05 23:45:48 +09:00
Pierre-Louis Bossart 3b7bd0c139
ASoC: SOF: Intel: remove circular dependency on hda_sdw_process_wakeen()
hda_sdw_process_wakeen() is used in hda-loader.c, but defined in
hda.c. This code split will create a circular dependency when hda.c is
moved to a different module. Rather than an invasive code change, this
patch follows the model used for sdw_check_wakeen_irq() with an
abstraction. For now all abstractions point to the same common
routine, which is arguably not great, but this also provides us with a
future-proof way of addressing platform-specific wake processing.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20240503135221.229202-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-05 23:45:47 +09:00
Pierre-Louis Bossart 136b37369c
ASoC: SOF: Intel: move tracepoint creation
CREATE_TRACEPOINTS is supposed to be used once. To avoid modpost
issues when creating modules, let's move the tracepoint creation in a
single object file.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20240503135221.229202-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-05 23:45:47 +09:00
Pierre-Louis Bossart 0bfbe91a2d
ASoC: SOF: Intel: move common code from hda.c
To avoid circular dependencies when moving hda.c to a separate module,
we need to move the common code to hda-ipc.c and hda-dsp.c

No functionality change, just code move.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20240503135221.229202-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-05 23:45:46 +09:00
Pierre-Louis Bossart 456644cbea
ASoC: SOF: Intel: start splitting top-level from common parts
The existing code relies on the 'HDA_COMMON' module and namespace. We
need to start splitting top-level parts from the low-level ones,
otherwise we will not be able to reuse the low-level parts DMA support
for SoundWire/BPT.

In the end the dependencies will be:

         +----------------------------------------------+
         |                                              |
         |                                              v
sof-pci-intel-xxx --> sof-intel-hda ------------> sof-hda-common
                          |                             ^
                          |                             |
                          +-> soundwire_intel --> sof_hda_sdw_bpt

This patch adds the initial split between the sof-pci-intel-xxx
modules and the common parts, in a follow-up patch we will further
split the HDA_COMMON parts

Since the PCI modules are not all independent, i.e. the CNL parts are
also used in JSL and TGL, additional Kconfig and namespace modules
were added.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20240503135221.229202-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-05 23:45:45 +09:00
Pierre-Louis Bossart e4c6eba86d
ASoC: SOF: Intel: regroup all SoundWire/Intel functions in hda.c
To avoid circular dependencies between SOF/Intel and SoundWire/Intel,
we need to split the top-level hda.c from the rest of the code. This
patch first regroups all SoundWire related code in hda.c.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20240503135221.229202-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-05 23:45:44 +09:00
Pierre-Louis Bossart 9e7fd21ab0
ASoC: SOF: Intel: hda-stream: export stream_get_position() helper
Export this helper so that we can report the DPIB position if the BPT
DMA do not complete - this is very useful to see if the DMA started or
gets stuck somehow with invalid bandwidth configurations.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20240503135221.229202-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-05 23:45:43 +09:00
Peter Ujfalusi f9209644ae
ASoC: SOF: ipc4-topology: Correct DAI copier config and NHLT blob request
In case of capture and when the DAI copier have single bit depth supported
on it's input side we should use this format instead of the one in
fe_params.

Regardless of the stream direction for the NHLT blob lookup when the DAI
copier only supports single bit depth on the DAI side we should only look
for a blob which matches with this single configuration.

For DMIC if the DAI copier supports multiple bit depths, try to request
32-bit blob first if the requested bit depth is 16-bit.
If the 32-bit blob is available then look for marching (32-bit) copier
format to make sure that both the blob and copier have correct parameters.

Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@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>
Link: https://lore.kernel.org/r/20240503133253.108201-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-05 23:45:38 +09:00
Peter Ujfalusi b679302526
ASoC: SOF: ipc4-topology: Allow selective update in sof_ipc4_update_hw_params
Add a bitmask parameter to sof_ipc4_update_hw_params() to be able to select
the param to be updated.
This feature can be used when not all params should be updated, for example
if caller only wants to update the format in the params, leaving the
channels and rates untouched.

Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@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>
Link: https://lore.kernel.org/r/20240503133253.108201-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-05 23:45:37 +09:00
Pierre-Louis Bossart 5a7543d0ca
ASoC: SOF: Intel: discard SoundWire configuration if HDaudio codec is reported
The machine driver and topology selection starts with I2S, then
SoundWire and last uses HDaudio as a fallback. That assumes that the
ACPI information is correct but there are of course exceptions to the
rule.

On a Lenovo platform, an external HDaudio codec is detected, but the
ACPI tables expose TWO RT711 jack codecs. This patch skips the
SoundWire selection in case an external HDaudio codec is detected -
which only works with the additional assumption that no one will mix
HDaudio and SoundWire.

Closes: https://github.com/thesofproject/linux/issues/4962
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter 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: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240503133253.108201-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-05 23:45:35 +09:00
Uwe Kleine-König ba2a2c378a
ASoC: codecs: Drop explicit initialization of struct i2c_device_id::driver_data to 0
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240502074722.1103986-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-03 11:08:06 +09:00
Vijendar Mukunda 09068d624c
ASoC: amd: acp: fix for acp platform device creation failure
ACP pin configuration varies based on acp version.
ACP PCI driver should read the ACP PIN config value and based on config
value, it has to create a platform device in below two conditions.
1) If ACP PDM configuration is selected from BIOS and ACP PDM controller
exists.
2) If ACP I2S configuration is selected from BIOS.

Other than above scenarios, ACP PCI driver should skip the platform
device creation logic, i.e. ACP PCI driver probe sequence should never
fail if other acp pin configuration is selected. It should skip platform
device creation logic.

check_acp_pdm() function was implemented for ACP6.x platforms to check
ACP PDM configuration. Previously, this code was safe guarded by
FLAG_AMD_LEGACY_ONLY_DMIC flag check.

This implementation breaks audio use cases for Huawei Matebooks which are
based on ACP3.x varaint uses I2S configuration.
In current scenario, check_acp_pdm() function returns -ENODEV value
which results in ACP PCI driver probe failure without creating a platform
device even in case of valid ACP pin configuration.

Implement check_acp_config() as a common function which invokes platform
specific acp pin configuration check functions for ACP3.x, ACP6.0 & ACP6.3
& ACP7.0 variants and checks for ACP PDM controller.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218780
Fixes: 4af565de9f ("ASoC: amd: acp: fix for acp pdm configuration check")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20240502140340.4049021-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-05-03 11:07:36 +09:00
Takashi Iwai fdb3f29dfe ALSA: hda/realtek: Fix build error without CONFIG_PM
The alc_spec.power_hook is defined only with CONFIG_PM, and the recent
fix overlooked it, resulting in a build error without CONFIG_PM.
Fix it with the simple ifdef and set __maybe_unused for the function.

We may drop the whole CONFIG_PM dependency there, but it should be
done in a separate cleanup patch later.

Fixes: 1e707769df ("ALSA: hda/realtek - Set GPIO3 to default at S4 state for Thinkpad with ALC1318")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405012104.Dr7h318W-lkp@intel.com/
Message-ID: <20240502062442.30545-1-tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-02 08:25:06 +02:00
Takashi Iwai a30a7a29c3 ASoC: Fixes for v6.9
This is much larger than is ideal, partly due to your holiday but also
 due to several vendors having come in with relatively large fixes at
 similar times.  It's all driver specific stuff.
 
 The meson fixes from Jerome fix some rare timing issues with blocking
 operations happening in triggers, plus the continuous clock support
 which fixes clocking for some platforms.  The SOF series from Peter
 builds to the fix to avoid spurious resets of ChainDMA which triggered
 errors in cleanup paths with both PulseAudio and PipeWire, and there's
 also some simple new debugfs files from Pierre which make support a lot
 eaiser.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmYyS2oACgkQJNaLcl1U
 h9AlSAf+NgAd1gg90evWysvl7bmkYqRulKjCR3/qXnuA1TMtCgb3skPEqwHZlF8B
 Jj1C6oTelxJQj7ISdACEKE4I5fj2SnOKv2VbSohQymEhBsJKNCWzJjduX3mxVzj5
 dBJWdEs6yWUslN2xPhiSAcxPej0Vqid64oBzoAhBCFnd8wTylCZUBV54guRGxDXQ
 abrnx6Xvue3sAoWQlOJFP4xhOd1rwb7RA30Mih+ODdZ4kmprSr1wLyvFJSbOvcq3
 snj1fctHJFW0XqL+Pk72+9nnf38+bOb67vUOPLsh9t1hCM7hfvMPwIEpccADHAhm
 hJbIlaAXStWpLYL3vNspmaifPWS5Fg==
 =Q9f5
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.9-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.9

This is much larger than is ideal, partly due to your holiday but also
due to several vendors having come in with relatively large fixes at
similar times.  It's all driver specific stuff.

The meson fixes from Jerome fix some rare timing issues with blocking
operations happening in triggers, plus the continuous clock support
which fixes clocking for some platforms.  The SOF series from Peter
builds to the fix to avoid spurious resets of ChainDMA which triggered
errors in cleanup paths with both PulseAudio and PipeWire, and there's
also some simple new debugfs files from Pierre which make support a lot
eaiser.
2024-05-01 18:05:13 +02:00
Takashi Iwai 39815cdfc8 ALSA: hda/realtek: Fix conflicting PCI SSID 17aa:386f for Lenovo Legion models
Unfortunately both Lenovo Legion Pro 7 16ARX8H and Legion 7i 16IAX7
got the very same PCI SSID while the hardware implementations are
completely different (the former is with TI TAS2781 codec while the
latter is with Cirrus CS35L41 codec).  The former model got broken by
the recent fix for the latter model.

For addressing the regression, check the codec SSID and apply the
proper quirk for each model now.

Fixes: 24b6332c2d ("ALSA: hda: Add Lenovo Legion 7i gen7 sound quirk")
Cc: <stable@vger.kernel.org>
Link: https://bugzilla.suse.com/show_bug.cgi?id=1223462
Message-ID: <20240430163206.5200-1-tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-30 18:35:31 +02:00
Kailang Yang 1e707769df ALSA: hda/realtek - Set GPIO3 to default at S4 state for Thinkpad with ALC1318
There is a chance of damaging the IC when S4 resume.
Add safe mode for no stream to disable GPIO3.
Thinkpad with ALC1318 platform need to add this workaround.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/a853dc4f0a4e412381d5f60565181247@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-30 18:34:53 +02:00
Mark Brown 9f6bdb0aa1
ASoC: doc: dapm: various improvements
Merge series from Luca Ceresoli <luca.ceresoli@bootlin.com>:

This series applies various improvements to the DAPM documentation: a
rewrite of a few sections for clarity, style improvements and typo fixes.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
Changes in v2:
- avoid wrapping in patch 3 as suggested by Alex
- Link to v1: https://lore.kernel.org/r/20240416-dapm-docs-v1-0-a818d2819bf6@bootlin.com

---
Luca Ceresoli (12):
      ASoC: doc: dapm: fix typos
      ASoC: doc: dapm: fix struct name
      ASoC: doc: dapm: minor rewording
      ASoC: doc: dapm: remove dash after colon
      ASoC: doc: dapm: clarify it's an internal API
      ASoC: doc: dapm: replace "map" with "graph"
      ASoC: doc: dapm: extend initial descrption
      ASoC: doc: dapm: describe how widgets and routes are registered
      ASoC: doc: dapm: fix and improve section "Registering DAPM controls"
      ASoC: doc: dapm: improve section "Codec/DSP Widget Interconnections"
      ASoC: doc: dapm: update section "DAPM Widget Events"
      ASoC: doc: dapm: update event types

 Documentation/sound/soc/dapm-graph.svg | 375 +++++++++++++++++++++++++++++++++
 Documentation/sound/soc/dapm.rst       | 174 ++++++++++-----
 2 files changed, 492 insertions(+), 57 deletions(-)
---
base-commit: c942a0cd36
change-id: 20240315-dapm-docs-79bd51f267db

Best regards,
--
Luca Ceresoli <luca.ceresoli@bootlin.com>
2024-05-01 00:00:17 +09:00
Mark Brown c5782bb546
ASoC: meson: tdm fixes
Merge series from Jerome Brunet <jbrunet@baylibre.com>:

This patchset fixes 2 problems on TDM which both find a solution
by properly implementing the .trigger() callback for the TDM backend.

ATM, enabling the TDM formatters is done by the .prepare() callback
because handling the formatter is slow due to necessary calls to CCF.

The first problem affects the TDMIN. Because .prepare() is called on DPCM
backend first, the formatter are started before the FIFOs and this may
cause a random channel shifts if the TDMIN use multiple lanes with more
than 2 slots per lanes. Using trigger() allows to set the FE/BE order,
solving the problem.

There has already been an attempt to fix this 3y ago [1] and reverted [2]
It triggered a 'sleep in irq' error on the period IRQ. The solution is
to just use the bottom half of threaded IRQ. This is patch #1. Patch #2
and #3 remain mostly the same as 3y ago.

For TDMOUT, the problem is on pause. ATM pause only stops the FIFO and
the TDMOUT just starves. When it does, it will actually repeat the last
sample continuously. Depending on the platform, if there is no high-pass
filter on the analog path, this may translate to a constant position of
the speaker membrane. There is no audible glitch but it may damage the
speaker coil.

Properly stopping the TDMOUT in pause solves the problem. There is
behaviour change associated with that fix. Clocks used to be continuous
on pause because of the problem above. They will now be gated on pause by
default, as they should. The last change introduce the proper support for
continuous clocks, if needed.

[1]: https://lore.kernel.org/linux-amlogic/20211020114217.133153-1-jbrunet@baylibre.com
[2]: https://lore.kernel.org/linux-amlogic/20220421155725.2589089-1-narmstrong@baylibre.com
2024-04-30 23:36:23 +09:00
Mark Brown 395f23e920
ASoC: Intel: updates for 6.10 - part6
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Last batch of cleanups from Brent Lu, with Chromebooks now supported
with fewer modular machine drivers.
2024-04-30 23:35:08 +09:00
Mark Brown a226d08a36
ASoC: Intel: avs: PCM code cleanup
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

A set of changes that aims to improve readability of cohesiveness of the
pcm code for the avs-driver.

Start off with a change that synchronizes DAI open/close - DAIs are
started up in ascending order yet their shutdown does not follow the
scheme - it is done in the ascending order too, rather than desceding
one. This patch is a dependency for the next one in line.

To align the HDAudio DAI startup/shutdown with the non-HDAudio
equivalents, relocate the code from component to DAI. The reason above
is a dependency stems from codec driver requirements - HDAudio code
found in sound/pci/hda/ expects substream->runtime->private_data to
point to a valid stream (HOST) pointer.

With the hard part done, the follow up changes update the existing code
to reduce it is complexity - removal of duplicates, renaming of
ambiguous functions and adding new fields to DAI-data object so that the
number of local variables and casts is reduced.
2024-04-30 23:35:00 +09:00
Mark Brown 228132b4d8
ASoC: Constify local snd_sof_dsp_ops
Merge series from Krzysztof Kozlowski <krzk@kernel.org>:

The core code does not modify the 'struct snd_sof_dsp_ops' passed via
pointer in various places, so this can be made pointer to const in few
places.  This in turn allows few drivers to have the local (usually
static) 'struct snd_sof_dsp_ops' as const which increased code safety,
as it is now part of rodata.

Not all drivers can be made safer that way. Intel and AMD rely on
customizing that 'struct snd_sof_dsp_ops' before passing to SOF, so they
won't benefit.  They don't lose anything., either.
2024-04-30 23:34:51 +09:00
Mark Brown af2ab6ccb9
ASoc: SOF: misc updates for 6.10
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Fixes when fw_lib_prefix is not set, updated error messages, improved
dmesg logs to SoundWire configurations not supported by ACPI
tables/topology and support for IEC61937 passthrough.
2024-04-30 23:34:44 +09:00
Mark Brown 34c43ad927
ASoC: Intel: updates for 6.10 - part5
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

This patchset corrects a couple of mistakes corrected, improves
snd_soc_card allocation.  The new functionality is mostly for
SoundWire platforms, with new SKUs for Dell and Acer, and support for
the Cirrus Logic bridge/sidecar amplifier topology.
2024-04-30 23:34:37 +09:00
Joao Schim 9a8cadddd9
ASoC: sunxi: DMIC: Add controls for adjusting the mic gains
The AllWinner H6 and later SoCs that sport a DMIC block contain a set of registers to control
the gain (left + right) of each of the four supported channels.

Add ASoC controls for changing each of the stereo channel gains using alsamixer and alike

Signed-off-by: Joao Schim <joao@schimsalabim.eu>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20240429194920.1596257-1-joao@schimsalabim.eu
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 11:54:02 +09:00
Pierre-Louis Bossart c158cf9147 ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node()
The documentation for device_get_named_child_node() mentions this
important point:

"
The caller is responsible for calling fwnode_handle_put() on the
returned fwnode pointer.
"

Add fwnode_handle_put() to avoid a leaked reference.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fixes: 08c2a4bc9f ("ALSA: hda: move Intel SoundWire ACPI scan to dedicated module")
Message-ID: <20240426152731.38420-1-pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-29 17:32:27 +02:00
Krzysztof Kozlowski 8b6d678fed
ASoC: SOF: mediatek: mt8195: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-14-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:58 +09:00
Krzysztof Kozlowski fe80673f59
ASoC: SOF: mediatek: mt8186: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-13-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:57 +09:00
Krzysztof Kozlowski 48d5f1800d
ASoC: SOF: intel: byt: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-12-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:56 +09:00
Krzysztof Kozlowski 936cc56044
ASoC: SOF: intel: bdw: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-11-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:55 +09:00
Krzysztof Kozlowski 232e0da9fa
ASoC: SOF: imx8ulp: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-10-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:54 +09:00
Krzysztof Kozlowski 66d49ab5fb
ASoC: SOF: imx8m: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-9-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:54 +09:00
Krzysztof Kozlowski ab85c44973
ASoC: SOF: imx8: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-8-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:53 +09:00
Krzysztof Kozlowski 04f2f516be
ASoC: SOF: amd: acp: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-7-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:52 +09:00
Krzysztof Kozlowski 6032eefc2c
ASoC: SOF: intel: hda: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-6-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:51 +09:00
Krzysztof Kozlowski 8f2b0d55ab
ASoC: SOF: intel: pci-tng: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made
const for increased code safety.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-5-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:50 +09:00
Krzysztof Kozlowski a0db037df9
ASoC: SOF: pcm: Constify local snd_sof_dsp_ops
Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that
functioon does not modify pointed data.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-3-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:49 +09:00
Krzysztof Kozlowski ee5acc1e03
ASoC: SOF: ipc3: Constify local snd_sof_dsp_ops
Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that
functioon does not modify pointed data.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-2-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:48 +09:00
Krzysztof Kozlowski ffca099bbf
ASoC: SOF: debug: Constify local snd_sof_dsp_ops
Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that
functioon does not modify pointed data.

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-1-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:47 +09:00
Peter Ujfalusi eed4872a42
ASoC: SOF: ipc4-topology: Advertise passthrough capable PCMs (using ChainDMA)
If a PCM is set to use ChainDMA then add it to the card->components string
after a marker of iec61937-pcm:, for example on current HDA platforms where
HDMI is set to use ChainDMA:
iec61937-pcm:5,4,3 (the order of the PCM ids can differ)

UCM is expected to parse and use this property to allow applications to
use bytestream passthrough in a standard way.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@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>
Link: https://lore.kernel.org/r/20240426153902.39560-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:36 +09:00
Pierre-Louis Bossart 7ff01ca730
ASoC: SOF: Intel: hda: list SoundWire peripherals on mismatch
Most of the SoundWire support issues come from bad ACPI information,
or configuration reported by ACPI that are not supported by the SOF
driver/topology. The users see a "No SoundWire machine driver found"
message without any details, and the fallback to HDaudio w/ HDMI is
used.

We can reduce our support load with a clear dev_info() log that will
give us a clear hint on the mismatch and why a machine driver/topology
were not found.

Example log on a MTL device:
[   13.158599] sof-audio-pci-intel-mtl 0000:00:1f.3: No SoundWire machine driver found for the ACPI-reported configuration:
[   13.158603] sof-audio-pci-intel-mtl 0000:00:1f.3: link 0 mfg_id 0x025d part_id 0x0713 version 0x3
[   13.158606] sof-audio-pci-intel-mtl 0000:00:1f.3: link 1 mfg_id 0x025d part_id 0x1316 version 0x3
[   13.158608] sof-audio-pci-intel-mtl 0000:00:1f.3: link 2 mfg_id 0x025d part_id 0x1316 version 0x3

In parallel, we will also provide an update to `alsa-info` to log all
SoundWire peripherals found in ACPI tables.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20240426153902.39560-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:35 +09:00
Pierre-Louis Bossart 5d4788b264
ASoC: SOF: Intel: hda: simplify and reduce indentation for hda_sdw_machine_select()
Simplify code to return when no links are enabled. No functional
change, just code cleanup before updates.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20240426153902.39560-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:35 +09:00
Yong Zhi 490e6c9b81
ASoC: SOF: topology: remove incorrect widget id in error message
In sof_widget_ready() function, the shift field of
struct snd_soc_tplg_dapm_widget is incorrectly used to print
widget id in dev_err(scomp->dev, "error: failed to add widget id %d ..",
this patch removes the useless tw->shift from the error output.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426153902.39560-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:34 +09:00
Peter Ujfalusi b32487ca7b
ASoC: SOF: debug: Handle cases when fw_lib_prefix is not set, NULL
The firmware libraries are not supported by IPC3, the fw_lib_path is not
a valid parameter and it is always NULL.
Do not create the debugfs file for IPC3 at all as it is not applicable.

With IPC4 some vendors/platforms might not support loadable libraries and
the fw_lib_prefix is left to NULL to indicate this.
Handle such case with allocating "Not supported" string.

Reviewed-by: Marc Herbert <marc.herbert@intel.com>
Fixes: 17f4041244 ("ASoC: SOF: debug: show firmware/topology prefix/names")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426153902.39560-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:16:33 +09:00
Mark Brown 9b4f41684b
ASoC: Merge up fixes
Some new SOF changes depend on the fixes there.
2024-04-30 00:15:57 +09:00
Maciej Strozek b831b4dca4
ASoC: intel: sof_sdw: Add support for cs42l43-cs35l56 sidecar amps
The cs42l43 has both a SPI master and an I2S interface, these can
be used to populate 2 cs35l56 amplifiers as sidecar devices along
side the cs42l43. Giving a system that looks like:

  +-----+           +---------+ <- SPI -> +---------+
  | CPU | <- SDW -> | CS42L43 |           | CS35L56 |
  +-----+           +---------+ <- I2S -> +---------+

Add a quirk to specify this feature is present and use it to add
codec to codec DAI link to connect the amplifiers into the sound
card, add appropriate widgets, and setup clocking on the
amplifiers.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152123.36284-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:10:07 +09:00
Charles Keepax da52441802
ASoC: Intel: sof_sdw: Add callbacks to register sidecar devices
Add support for systems that have additional non-SoundWire devices
(sidecars) connected to one of the SoundWire devices in the
system. This is done through the addition of two callbacks, one used
at endpoint parsing time that will return the number of devices and
DAI links to be added, and another called later as the DAI links are
created that will populate those devices into the appropriate arrays.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152123.36284-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:10:06 +09:00
Charles Keepax 628cc5d0c4
ASoC: Intel: sof_sdw: Delay update of the codec_conf array
Move the population of the codec_conf array from endpoint parsing
time to link creation time. This is slightly cleaner as the
population is done whilst the DAI links are also being populated,
putting all population together. However, primarily this facilitates
allowing additional non-SoundWire devices to be easily added into
the array in future feature additions.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152123.36284-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:10:05 +09:00
Pierre-Louis Bossart 0bab4cfd7c
ASoC: Intel: sof-sdw: really remove FOUR_SPEAKER quirk
Two independent GitHub PRs let to the addition of one quirk after it
was removed..

Fixes: b10cb955c6 ("ASoC: Intel: sof_sdw: add quirk for Dell SKU 0C0F")
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152123.36284-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:10:04 +09:00
Bard Liao 6be269d274
ASoC: Intel: sof_sdw: add a space before cfg-amp in components
UCM parse amp with Regex " cfg-amp:([0-9]+)". The "ASoC: Intel: sof_sdw:
remove FOUR_SPEAKER quirks" patch removed "cfg-spk:%d " from components
which removed the necessary space as well and cause UCM can't parse the
amp number properly.

Fixes: 744866d28f ("ASoC: Intel: sof_sdw: remove FOUR_SPEAKER quirks")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152123.36284-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:10:04 +09:00
Pierre-Louis Bossart 2086b55fd6
ASoC: Intel: sof-sdw: don't set card long_name
UCM can load a board-specific file based on the card long_name. Remove
the constant "Intel Soundwire SOF" long_name so that the ASoC core can
set the long_name based on DMI information.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152123.36284-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:10:03 +09:00
Peter Ujfalusi 38068d91cf
ASoC: Intel: sof_sdw: Allocate snd_soc_card dynamically
The static card_sof_sdw struct is modified during runtime and in case the
module is not removed, but the card is, then the next time the card is
created the card_sof_sdw will contain information from the previous card
which might lead to hard to debug issues, side effects.

Move the snd_soc_card into mc_private and use that to make sure that the
card is initialized correctly.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@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>
Link: https://lore.kernel.org/r/20240426152123.36284-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:10:02 +09:00
Mac Chiang 6d339113df
ASoC: Intel: soc-acpi-intel-lnl-match: adds RT714 and RT1318 support
This patch adds support for corresponding codecs on LNL hardware
configuration:

SDW0: RT714 DMIC
SDW1: RT1318 Left Speaker
SDW2: RT1318 Right Speaker

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152123.36284-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:10:01 +09:00
Pierre-Louis Bossart 64bfd26d98
ASoC: Intel: soc-acpi: mtl: add support for Acer Swift Go 14
This device has an RT712 on link0, but does not rely on RT1712 for the
DMIC. PCH-attached DMICs are used instead.

Closes: https://github.com/thesofproject/linux/issues/4923
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152123.36284-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:10:00 +09:00
Pierre-Louis Bossart 02e6f7cb48
ASoC: Intel: soc-acpi: mtl: add Dell SKU 0C64 and 0CC6
SKU 0C64 relies on rt713 (jack codec) on link0, rt1318 (single
amplifier) on link1 and rt1713 (dmic) on link3.

SKU 0CC6 relies on rt713 (jack codec) on link0, rt1318 (two
amplifiers) on link 1-2 and rt1713 (dmic) on link3.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152123.36284-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:59 +09:00
Peter Ujfalusi 69d0f88b9a
ASoC: Intel: skl_hda_dsp_generic: Use devm_kasprintf for the components string
Instead of using a global char array, allocate the string with
devm_kasprintf if needed.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@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>
Link: https://lore.kernel.org/r/20240426152123.36284-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:59 +09:00
Peter Ujfalusi 33e59e50ee
ASoC: Intel: skl_hda_dsp_generic: Allocate snd_soc_card dynamically
The static hda_soc_card might be modified during runtime which might cause
issues on next time when the card is created.
For example if the dmic_num was set with module parameter then removed for
the next module loading then the card's components will still going to
point to the previous boot's cfg-dmics:X string.

There might be other places where devm allocated memory have been freed but
the hda_soc_card still pointing to the now unallocated memory (the memory
is freed when the platform device is removed).

Fix this issue by moving the snd_soc_card into skl_hda_private and use it
for the card registration to ensure that it is correctly initialized every
time.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@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>
Link: https://lore.kernel.org/r/20240426152123.36284-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:58 +09:00
Cezary Rojewski e85e75b679
ASoC: Intel: avs: Clean up hw constraints initialization
Provide a separate function that initializes all PCM hardware
constraints for the driver. No functional changes.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-9-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:52 +09:00
Cezary Rojewski cdcb770a60
ASoC: Intel: avs: Store pointer to link_stream in dma_data
While the HDAudio codec driver expectations must be met - store valid
pointer to HDAudio LINK stream in substream->runtime->private_data - the
code is more readable and easier to maintain if dma_data stores pointers
to both HOST and LINK stream.

DAI BE operations can refer to the LINK stream with data->link_stream,
similarly to how DAI FE operations access the HOST stream with
data->host_stream.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:51 +09:00
Cezary Rojewski 0f8843ca4f
ASoC: Intel: avs: Remove redundancy around DAI prepare
Drop unused arguments in the avs_dai_prepare() function. With the
function updated, it matches its template in snd_soc_dai_ops and can be
referenced throughout the pcm.c file without need of any wrappers.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:50 +09:00
Cezary Rojewski 3a48d146aa
ASoC: Intel: avs: Remove redundancy around DAI startup
Half of the arguments in avs_dai_startup() are unused and can be
dropped. With the function updated, it matches its template in
snd_soc_dai_ops and can be referenced throughout the pcm.c file without
need of any wrappers.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:50 +09:00
Cezary Rojewski c303a994e5
ASoC: Intel: avs: Store pointer to adev in DAI dma_data
Reduce the number of to_avs_dev() casts by storing the driver context in
DAI's dma_data.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:49 +09:00
Cezary Rojewski b9d59f970e
ASoC: Intel: avs: Remove redundancy around DAI shutdown
Move avs_dai_nonhda_be_shutdown() to avs_dai_shutdown() as the function
is common for all transfer types, not just non-HDAudio ones. Use it
to simplify avs_dai_fe_shutdown().

While at it, fix explicit kfree(data) and use the destructor instead.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:48 +09:00
Cezary Rojewski 140df6d4d5
ASoC: Intel: avs: Relocate HDA BE DAI specific operations
DAI's startup()/shutdown() shall deal with allocation and freeing of
resources needed to facilitate streaming over it. Currently for HDAudio
BE DAIs some of that task is done in component->open()/close(). Relocate
the relevant pieces to address that.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:47 +09:00
Cezary Rojewski 31a70a71b3
ASoC: pcm: Reverse iterate DAIs when shutting them down
During startup snd_soc_dai_startup() is launched in ascending order and
the exact same thing is done during shutdown procedure. Reverse the
order in the latter so that it is symmetric to the former.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240426095733.3946951-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-30 00:09:46 +09:00
Pierre-Louis Bossart 79ac4c1443 ALSA: hda: intel-dsp-config: harden I2C/I2S codec detection
The SOF driver is selected whenever specific I2C/I2S HIDs are reported
as 'present' in the ACPI DSDT. In some cases, an HID is reported but
the hardware does not actually rely on I2C/I2S.  This false positive
leads to an invalid selection of the SOF driver and as a result an
invalid topology is loaded.

This patch hardens the detection with a check that the NHLT table is
consistent with the report of an I2S-based codec in DSDT. This table
should expose at least one SSP endpoint configured for an I2S-codec
connection.

Tested on Huawei Matebook D14 (NBLB-WAX9N) using an HDaudio codec with
an invalid ES8336 ACPI HID reported:

[    7.858249] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[    7.858312] snd_hda_intel 0000:00:1f.3: snd_intel_dsp_find_config: no valid SSP found for HID ESSX8336, skipped

Reported-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Tested-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Closes: https://github.com/thesofproject/linux/issues/4934
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20240426152818.38443-1-pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-29 17:02:21 +02:00
Brent Lu 3d84e07025
ASoC: Intel: sof-rt5682: support bclk as PLL source on rt5682s
For rt5682s codec, we could use bclk as PLL source when the frequency
is 3.072MHz but no 2.4MHz. Update the code to select correct pll_id
and clk_id for 3.072MHz bclk.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-24-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:21 +09:00
Brent Lu 4524b1e3ef
ASoC: Intel: sof-rt5682: get bclk frequency from topology
A different bclk frequency 3.072MHz was introduced to tgl platform and
is used in mtl topologies. Use SOF API to get frequency from topology
instead of hardcoding.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-23-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:20 +09:00
Brent Lu b5aaf6a56d
ASoC: Intel: sof-rt5682: setup pll_id only when needed
The variable 'pll_id' is needed only when we use snd_soc_dai_set_pll()
to setup PLL. Move the code segment to improve some readability.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-22-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:19 +09:00
Brent Lu 76f33e2f93
ASoC: Intel: sof-rt5682: add driver_data to sof_rt5682 board
Move default BYT/CHT quirk to driver_data of sof_rt5682 board. This
fixes a problem that DMI quirk of Minnowboard board got overwritten in
probe function since it's a BYT board.

Fixes: c68e07970e ("ASoC: intel: sof_rt5682: Add quirk for number of HDMI DAI's")
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-21-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:18 +09:00
Brent Lu 76fb0d3221
ASoC: Intel: sof_rt5682: add icl_rt5682_def for icl boards
Add the board config icl_rt5682_def to rt5682 machine driver for all
icl boards using default SSP port allocation (headphone codec on SSP0).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-20-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:17 +09:00
Brent Lu 207255f3ae
ASoC: Intel: sof-rt5682: remove SOF_RT5682_MCLK_BYTCHT_EN
We don't need this quirk flag since 'is_legacy_cpu' will be true if
this is a BYT/CHT board.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:17 +09:00
Brent Lu e91d54f8b1
ASoC: Intel: sof-rt5682: add mclk_en to sof_rt5682_private
Add a variable mclk_en to sof_rt5682_private structure to reduce
global variable access. No functional change.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-18-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:16 +09:00
Brent Lu 0cb6a8134c
ASoC: Intel: glk_rt5682_max98357a: delete driver
Delete this driver and use sof_rt5682 machine driver instead.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-17-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:15 +09:00
Brent Lu 5498a4edbf
ASoC: Intel: sof_rt5682: support MAX98357A on glk boards
For glk boards, MAX98357A speaker amplifier is supported by machine
driver glk_rt5682_mx98357a with sound card name glkrt5682max. Use same
name for backward compatibility with existing devices on market.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:14 +09:00
Brent Lu 44567d3d62
ASoC: Intel: sof_rt5682: add glk_rt5682_def for glk boards
Add the board config glk_rt5682_def to rt5682 machine driver for all
glk boards using default SSP port allocation (headphone codec on SSP2,
speaker amplifiers on SSP1).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:13 +09:00
Brent Lu 8d6114b81d
ASoC: Intel: bxt_da7219_max98357a: remove glk support
Remove glk platform support and use sof_da7219 machine driver instead
for existing glk boards with MAX98357A speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:12 +09:00
Brent Lu f46b768b72
ASoC: Intel: sof_da7219: support MAX98357A on glk boards
For glk boards, MAX98357A speaker amplifier is supported by machine
driver bxt_da7219_max98357a with sound card name glkda7219max. Use
same name for backward compatibility with existing devices on market.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:12 +09:00
Brent Lu c7f9523d21
ASoC: Intel: sof_da7219: add glk_da7219_def for glk boards
Add the board config glk_da7219_def to da7219 machine driver for all
glk boards using default SSP port allocation (headphone codec on SSP2,
speaker amplifiers on SSP1).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:11 +09:00
Brent Lu 35ca48662c
ASoC: Intel: bxt_da7219_max98357a: remove cml support
Remove cml platform support and use sof_da7219 machine driver instead
for existing cml boards with MAX98357A speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:10 +09:00
Brent Lu e895d16f4e
ASoC: Intel: sof_da7219: support MAX98357A on cml boards
For cml boards, MAX98357A speaker amplifier is supported by machine
driver bxt_da7219_max98357a with sound card name cmlda7219max. Use
same name for backward compatibility with existing devices on market.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:09 +09:00
Brent Lu 7873252c0e
ASoC: Intel: sof_da7219: support MAX98357A
Add support to Maxim MAX98357A speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:08 +09:00
Bard Liao 5b093b0b47
ASoC: Intel: sof_rt5682: add missing MAX98357A config
sof_rt5682 supports MAX98357A/MAX98360A amp. Select SND_SOC_MAX98357A
as needed.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:07 +09:00
Brent Lu 12e5fe68d0
ASoC: Intel: bxt_da7219_max98357a: remove MAX98390 support
Remove MAX98390 support and use sof_da7219 machine driver instead for
existing cml boards with MAX98390 speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:07 +09:00
Brent Lu 5a2bc761fa
ASoC: Intel: sof_da7219: support MAX98390 on cml boards
For cml boards, MAX98390 speaker amplifier is supported by machine
driver bxt_da7219_max98357a with sound card name cml_max98390_da7219.
Use same name for backward compatibility with existing devices on
market.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:06 +09:00
Brent Lu a0cf86d813
ASoC: Intel: sof_da7219: add cml_da7219_def for cml boards
Add the board config cml_da7219_def to da7219 machine driver for all
cml boards using default SSP port allocation (headphone codec on SSP0,
speaker amplifiers on SSP1).

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:05 +09:00
Brent Lu b7654a7e21
ASoC: Intel: sof_da7219: support MAX98390
Add support to Maxim MAX98390 speaker amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:04 +09:00
Brent Lu 3b3ed47526
ASoC: Intel: sof_maxim_common: support MAX98390 on cml boards
Add support for 2xMAX98390 speaker amplifier running in I2S mode for
existing cml boards.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:03 +09:00
Brent Lu d2d377fc22
ASoC: Intel: nau8825/rt5682: move speaker widget to common modules
Two machine drivers sof_rt5682 and sof_nau8825 always register two
speaker widgets 'Left Spk' and 'Right Spk' regardless the actual
number of speakers. Move the widget registration to speaker common
modules to avoid useless speaker widgets for 1 or 4 speaker boards.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:49:02 +09:00
Pierre-Louis Bossart fbd741f099
ASoC: cs35l56: fix usages of device_get_named_child_node()
The documentation for device_get_named_child_node() mentions this
important point:

"
The caller is responsible for calling fwnode_handle_put() on the
returned fwnode pointer.
"

Add fwnode_handle_put() to avoid leaked references.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152939.38471-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:56 +09:00
Pierre-Louis Bossart e8a6a5ad73
ASoC: da7219-aad: fix usage of device_get_named_child_node()
The documentation for device_get_named_child_node() mentions this
important point:

"
The caller is responsible for calling fwnode_handle_put() on the
returned fwnode pointer.
"

Add fwnode_handle_put() to avoid a leaked reference.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426153033.38500-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:56 +09:00
Jerome Brunet 6db26f9ea4
ASoC: meson: cards: select SND_DYNAMIC_MINORS
Amlogic sound cards do create a lot of pcm interfaces, possibly more than
8. Some pcm interfaces are internal (like DPCM backends and c2c) and not
exposed to userspace.

Those interfaces still increase the number passed to snd_find_free_minor(),
which eventually exceeds 8 causing -EBUSY error on card registration if
CONFIG_SND_DYNAMIC_MINORS=n and the interface is exposed to userspace.

select CONFIG_SND_DYNAMIC_MINORS for Amlogic cards to avoid the problem.

Fixes: 7864a79f37 ("ASoC: meson: add axg sound card support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20240426134150.3053741-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:55 +09:00
Jerome Brunet a5a89037d0
ASoC: meson: axg-tdm: add continuous clock support
Some devices may need the clocks running, even while paused.
Add support for this use case.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20240426152946.3078805-5-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:50 +09:00
Jerome Brunet f949ed458a
ASoC: meson: axg-tdm-interface: manage formatters in trigger
So far, the formatters have been reset/enabled using the .prepare()
callback. This was done in this callback because walking the formatters use
a mutex. A mutex is used because formatter handling require dealing
possibly slow clock operation.

With the support of non-atomic, .trigger() callback may be used which also
allows to properly enable and disable formatters on start but also
pause/resume.

This solve a random shift on TDMIN as well repeated samples on for TDMOUT.

Fixes: d60e4f1e4b ("ASoC: meson: add tdm interface driver")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20240426152946.3078805-4-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:49 +09:00
Jerome Brunet dcba52ace7
ASoC: meson: axg-card: make links nonatomic
Non atomic operations need to be performed in the trigger callback
of the TDM interfaces. Those are BEs but what matters is the nonatomic
flag of the FE in the DPCM context. Just set nonatomic for everything so,
at least, what is done is clear.

Fixes: 7864a79f37 ("ASoC: meson: add axg sound card support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20240426152946.3078805-3-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:49 +09:00
Jerome Brunet b11d26660d
ASoC: meson: axg-fifo: use threaded irq to check periods
With the AXG audio subsystem, there is a possible random channel shift on
TDM capture, when the slot number per lane is more than 2, and there is
more than one lane used.

The problem has been there since the introduction of the axg audio support
but such scenario is pretty uncommon. This is why there is no loud
complains about the problem.

Solving the problem require to make the links non-atomic and use the
trigger() callback to start FEs and BEs in the appropriate order.

This was tried in the past and reverted because it caused the block irq to
sleep while atomic. However, instead of reverting, the solution is to call
snd_pcm_period_elapsed() in a non atomic context.

Use the bottom half of a threaded IRQ to do so.

Fixes: 6dc4fa179f ("ASoC: meson: add axg fifo base driver")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20240426152946.3078805-2-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-29 23:48:48 +09:00
Aman Dhoot 2d5af3ab9e ALSA: hda/realtek: Fix mute led of HP Laptop 15-da3001TU
This patch simply add SND_PCI_QUIRK for HP Laptop 15-da3001TU to fixed
mute led of laptop.

Signed-off-by: Aman Dhoot <amandhoot12@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/CAMTp=B+3NG65Z684xMwHqdXDJhY+DJK-kuSw4adn6xwnG+b5JA@mail.gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-29 14:14:46 +02:00
Takashi Iwai 6b844f0626 Merge branch 'topic/emu10k1-fix' into for-next
Pull emu10k1 fixes from Oswald Buddenhagen

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-28 12:00:57 +02:00
Oswald Buddenhagen 1aa41272ef ALSA: emu10k1: move code for entering E-MU card FPGA programming mode
... into snd_emu1010_load_firmware_entry(). This makes it clearer that
these steps belong together tightly, as implied by prior commits.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240428093717.3198716-5-oswald.buddenhagen@gmx.de>
2024-04-28 12:00:36 +02:00
Oswald Buddenhagen 4c0c36863c ALSA: emu10k1: move snd_emu1010_load_firmware_entry() to io.c
It is a low-level I/O access function, so io.c is the natural place for
it.

While we're moving the code, reduce the scope of some variables, use
compound assignment operators, and add/adjust some comments.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240428093717.3198716-4-oswald.buddenhagen@gmx.de>
2024-04-28 12:00:36 +02:00
Oswald Buddenhagen b83587eaf2 ALSA: emu10k1: make snd_emu1010_load_firmware_entry() void
There is only one call site, and there we already know that we actually
have a firmware.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240428093717.3198716-3-oswald.buddenhagen@gmx.de>
2024-04-28 12:00:36 +02:00
Oswald Buddenhagen 7868e4c179 ALSA: emu10k1: simplify E-MU card FPGA reset sequence
Firstly, it is pointless to explicitly disable the power to the dock
prior to resetting the FPGA, as the latter will do the former anyway.

Secondly, it doesn't make much sense to check whether the FPGA is
already programmed. It's much simpler to just presume it is, and issue
the self-reset command. If it isn't, the effect isn't worse than the
checks themselves. As a side effect, we lose the info if the reset
fails, but there is no plausible way how that could happen unless the
card burns out while operating, and in that case we'll detect a firmware
upload failure a bit later anyway.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240428093717.3198716-2-oswald.buddenhagen@gmx.de>
2024-04-28 12:00:36 +02:00
Oswald Buddenhagen 15c7e87aa8 ALSA: emu10k1: make E-MU FPGA writes potentially more reliable
We did not delay after the second strobe signal, so another immediately
following access could potentially corrupt the written value.

This is a purely speculative fix with no supporting evidence, but after
taking out the spinlocks around the writes, it seems plausible that a
modern processor could be actually too fast. Also, it's just cleaner to
be consistent.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240428093716.3198666-7-oswald.buddenhagen@gmx.de>
2024-04-28 11:58:12 +02:00
Oswald Buddenhagen e8289fd3fa ALSA: emu10k1: fix E-MU dock initialization
A side effect of making the dock monitoring interrupt-driven was that
we'd be very quick to program a freshly connected dock. However, for
unclear reasons, the dock does not work when we do that - despite the
FPGA netlist upload going just fine. We work around this by adding a
delay before programming the dock; for safety, the value is several
times as much as was determined empirically.

Note that a badly timed dock hot-plug would have triggered the problem
even before the referenced commit - but now it would happen 100% instead
of about 3% of the time, thus making it impossible to work around by
re-plugging.

Fixes: fbb64eedf5 ("ALSA: emu10k1: make E-MU dock monitoring interrupt-driven")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218584
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240428093716.3198666-6-oswald.buddenhagen@gmx.de>
2024-04-28 11:58:12 +02:00
Oswald Buddenhagen 2d3f481088 ALSA: emu10k1: use mutex for E-MU FPGA access locking
The FPGA access through the GPIO port does not interfere with other
sound processor register access, so there is no need to subject it to
emu_lock. And after moving all FPGA access out of the interrupt handler,
it does not need to be IRQ-safe, either.

What's more, attaching the dock causes a firmware upload, which takes
several seconds. We really don't want to disable IRQs for this long, and
even less also have someone else spin with IRQs disabled waiting for us.

Therefore, use a mutex for FPGA access locking.

This makes the code somewhat more noisy, as we need to wrap bigger
sections into the mutex, as it needs to enclose the spinlocks.

The latter has the "side effect" of fixing dock FPGA programming in a
corner case: a really badly timed mixer access right between entering
FPGA programming mode and uploading the netlist would mess up the
protocol.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240428093716.3198666-5-oswald.buddenhagen@gmx.de>
2024-04-28 11:58:12 +02:00
Oswald Buddenhagen f848337cd8 ALSA: emu10k1: move the whole GPIO event handling to the workqueue
The actual event processing was already done by workqueue items. We can
move the event dispatching there as well, rather than doing it already
in the interrupt handler callback.

This change has a rather profound "side effect" on the reliability of
the FPGA programming: once we enter programming mode, we must not issue
any snd_emu1010_fpga_{read,write}() calls until we're done, as these
would badly mess up the programming protocol. But exactly that would
happen when trying to program the dock, as that triggers GPIO interrupts
as a side effect. This is mitigated by deferring the actual interrupt
handling, as workqueue items are not re-entrant.

To avoid scheduling the dispatcher on non-events, we now explicitly
ignore GPIO IRQs triggered by "uninteresting" pins, which happens a lot
as a side effect of calling snd_emu1010_fpga_{read,write}().

Fixes: fbb64eedf5 ("ALSA: emu10k1: make E-MU dock monitoring interrupt-driven")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218584
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240428093716.3198666-4-oswald.buddenhagen@gmx.de>
2024-04-28 11:58:12 +02:00
Oswald Buddenhagen 28deafd0fb ALSA: emu10k1: factor out snd_emu1010_load_dock_firmware()
Pulled out of the next patch to improve its legibility.

As the function is now available, call it directly from
snd_emu10k1_emu1010_init(), thus making the MicroDock firmware loading
synchronous - there isn't really a reason not to. Note that this does
not affect the AudioDocks of rev1 cards, as these have no independent
power supplies, and thus come up only a while after the main card is
initialized.

As a drive-by, adjust the priorities of two messages to better reflect
their impact.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240428093716.3198666-3-oswald.buddenhagen@gmx.de>
2024-04-28 11:58:12 +02:00
Oswald Buddenhagen 398321d753 ALSA: emu10k1: fix E-MU card dock presence monitoring
While there are two separate IRQ status bits for dock attach and detach,
the hardware appears to mix them up more or less randomly, making them
useless for tracking what actually happened. It is much safer to check
the dock status separately and proceed based on that, as the old polling
code did.

Note that the code assumes that only the dock can be hot-plugged - if
other option card bits changed, the logic would break.

Fixes: fbb64eedf5 ("ALSA: emu10k1: make E-MU dock monitoring interrupt-driven")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218584
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240428093716.3198666-2-oswald.buddenhagen@gmx.de>
2024-04-28 11:58:12 +02:00
Takashi Sakamoto 078c95fe8c ALSA: kunit: use const qualifier for immutable data
Some data for testing is immutable. In the case, the const qualifier is
available for any loader to place it to read-only segment.

Fixes: 3e39acf56e ("ALSA: core: Add sound core KUnit test")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240425233653.218434-1-o-takashi@sakamocchi.jp>
2024-04-28 11:56:44 +02:00
Colin Ian King 957a36c4fc ALSA: kunit: make read-only array buf_samples static const
Don't populate the read-only array buf_samples on the stack at
run time, instead make it static const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240425160754.114716-1-colin.i.king@gmail.com>
2024-04-26 17:07:01 +02:00
Kent Overstreet 0069455bcb fix missing vmalloc.h includes
Patch series "Memory allocation profiling", v6.

Overview:
Low overhead [1] per-callsite memory allocation profiling. Not just for
debug kernels, overhead low enough to be deployed in production.

Example output:
  root@moria-kvm:~# sort -rn /proc/allocinfo
   127664128    31168 mm/page_ext.c:270 func:alloc_page_ext
    56373248     4737 mm/slub.c:2259 func:alloc_slab_page
    14880768     3633 mm/readahead.c:247 func:page_cache_ra_unbounded
    14417920     3520 mm/mm_init.c:2530 func:alloc_large_system_hash
    13377536      234 block/blk-mq.c:3421 func:blk_mq_alloc_rqs
    11718656     2861 mm/filemap.c:1919 func:__filemap_get_folio
     9192960     2800 kernel/fork.c:307 func:alloc_thread_stack_node
     4206592        4 net/netfilter/nf_conntrack_core.c:2567 func:nf_ct_alloc_hashtable
     4136960     1010 drivers/staging/ctagmod/ctagmod.c:20 [ctagmod] func:ctagmod_start
     3940352      962 mm/memory.c:4214 func:alloc_anon_folio
     2894464    22613 fs/kernfs/dir.c:615 func:__kernfs_new_node
     ...

Usage:
kconfig options:
 - CONFIG_MEM_ALLOC_PROFILING
 - CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT
 - CONFIG_MEM_ALLOC_PROFILING_DEBUG
   adds warnings for allocations that weren't accounted because of a
   missing annotation

sysctl:
  /proc/sys/vm/mem_profiling

Runtime info:
  /proc/allocinfo

Notes:

[1]: Overhead
To measure the overhead we are comparing the following configurations:
(1) Baseline with CONFIG_MEMCG_KMEM=n
(2) Disabled by default (CONFIG_MEM_ALLOC_PROFILING=y &&
    CONFIG_MEM_ALLOC_PROFILING_BY_DEFAULT=n)
(3) Enabled by default (CONFIG_MEM_ALLOC_PROFILING=y &&
    CONFIG_MEM_ALLOC_PROFILING_BY_DEFAULT=y)
(4) Enabled at runtime (CONFIG_MEM_ALLOC_PROFILING=y &&
    CONFIG_MEM_ALLOC_PROFILING_BY_DEFAULT=n && /proc/sys/vm/mem_profiling=1)
(5) Baseline with CONFIG_MEMCG_KMEM=y && allocating with __GFP_ACCOUNT
(6) Disabled by default (CONFIG_MEM_ALLOC_PROFILING=y &&
    CONFIG_MEM_ALLOC_PROFILING_BY_DEFAULT=n)  && CONFIG_MEMCG_KMEM=y
(7) Enabled by default (CONFIG_MEM_ALLOC_PROFILING=y &&
    CONFIG_MEM_ALLOC_PROFILING_BY_DEFAULT=y) && CONFIG_MEMCG_KMEM=y

Performance overhead:
To evaluate performance we implemented an in-kernel test executing
multiple get_free_page/free_page and kmalloc/kfree calls with allocation
sizes growing from 8 to 240 bytes with CPU frequency set to max and CPU
affinity set to a specific CPU to minimize the noise. Below are results
from running the test on Ubuntu 22.04.2 LTS with 6.8.0-rc1 kernel on
56 core Intel Xeon:

                        kmalloc                 pgalloc
(1 baseline)            6.764s                  16.902s
(2 default disabled)    6.793s  (+0.43%)        17.007s (+0.62%)
(3 default enabled)     7.197s  (+6.40%)        23.666s (+40.02%)
(4 runtime enabled)     7.405s  (+9.48%)        23.901s (+41.41%)
(5 memcg)               13.388s (+97.94%)       48.460s (+186.71%)
(6 def disabled+memcg)  13.332s (+97.10%)       48.105s (+184.61%)
(7 def enabled+memcg)   13.446s (+98.78%)       54.963s (+225.18%)

Memory overhead:
Kernel size:

   text           data        bss         dec         diff
(1) 26515311	      18890222    17018880    62424413
(2) 26524728	      19423818    16740352    62688898    264485
(3) 26524724	      19423818    16740352    62688894    264481
(4) 26524728	      19423818    16740352    62688898    264485
(5) 26541782	      18964374    16957440    62463596    39183

Memory consumption on a 56 core Intel CPU with 125GB of memory:
Code tags:           192 kB
PageExts:         262144 kB (256MB)
SlabExts:           9876 kB (9.6MB)
PcpuExts:            512 kB (0.5MB)

Total overhead is 0.2% of total memory.

Benchmarks:

Hackbench tests run 100 times:
hackbench -s 512 -l 200 -g 15 -f 25 -P
      baseline       disabled profiling           enabled profiling
avg   0.3543         0.3559 (+0.0016)             0.3566 (+0.0023)
stdev 0.0137         0.0188                       0.0077


hackbench -l 10000
      baseline       disabled profiling           enabled profiling
avg   6.4218         6.4306 (+0.0088)             6.5077 (+0.0859)
stdev 0.0933         0.0286                       0.0489

stress-ng tests:
stress-ng --class memory --seq 4 -t 60
stress-ng --class cpu --seq 4 -t 60
Results posted at: https://evilpiepirate.org/~kent/memalloc_prof_v4_stress-ng/

[2] https://lore.kernel.org/all/20240306182440.2003814-1-surenb@google.com/


This patch (of 37):

The next patch drops vmalloc.h from a system header in order to fix a
circular dependency; this adds it to all the files that were pulling it in
implicitly.

[kent.overstreet@linux.dev: fix arch/alpha/lib/memcpy.c]
  Link: https://lkml.kernel.org/r/20240327002152.3339937-1-kent.overstreet@linux.dev
[surenb@google.com: fix arch/x86/mm/numa_32.c]
  Link: https://lkml.kernel.org/r/20240402180933.1663992-1-surenb@google.com
[kent.overstreet@linux.dev: a few places were depending on sizes.h]
  Link: https://lkml.kernel.org/r/20240404034744.1664840-1-kent.overstreet@linux.dev
[arnd@arndb.de: fix mm/kasan/hw_tags.c]
  Link: https://lkml.kernel.org/r/20240404124435.3121534-1-arnd@kernel.org
[surenb@google.com: fix arc build]
  Link: https://lkml.kernel.org/r/20240405225115.431056-1-surenb@google.com
Link: https://lkml.kernel.org/r/20240321163705.3067592-1-surenb@google.com
Link: https://lkml.kernel.org/r/20240321163705.3067592-2-surenb@google.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Tested-by: Kees Cook <keescook@chromium.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Alex Gaynor <alex.gaynor@gmail.com>
Cc: Alice Ryhl <aliceryhl@google.com>
Cc: Andreas Hindborg <a.hindborg@samsung.com>
Cc: Benno Lossin <benno.lossin@proton.me>
Cc: "Björn Roy Baron" <bjorn3_gh@protonmail.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Gary Guo <gary@garyguo.net>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Wedson Almeida Filho <wedsonaf@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-04-25 20:55:49 -07:00
Damien Le Moal 7c155fdf37 ASoC: Intel: avs: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY
Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY macro.

Link: https://lore.kernel.org/r/20240325070944.3600338-5-dlemoal@kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
2024-04-25 12:53:29 -05:00
Andy Shevchenko 541b8a266e ALSA: control: Use list_for_each_entry_safe()
Instead of reiterating the list, use list_for_each_entry_safe()
that allows to continue without starting over.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Message-ID: <20240424145020.1057216-1-andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-24 17:08:48 +02:00
Stefan Binding 25f46354dc ALSA: hda/realtek: Add quirks for Lenovo 13X
Add laptop using CS35L41 HDA.
This laptop does not have _DSD, so require entries in property
configuration table for cs35l41_hda driver.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Message-ID: <20240423162303.638211-3-sbinding@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-24 09:21:20 +02:00
Stefan Binding 7a62ab9180 ALSA: hda: cs35l41: Support Lenovo 13X laptop without _DSD
This laptop does not have the correct _DSD settings, so needs to
obtain its configuration from the configuration table.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Message-ID: <20240423162303.638211-2-sbinding@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-24 09:21:11 +02:00
Colin Ian King fe2a841337
ASoc: PCM6240: Fix spelling mistake: "deley" -> "delay"
There is a spelling mistake in a dev_err message. Fix it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240423074428.1313777-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-24 10:13:36 +09:00
Jack Yu bda16500dd
ASoC: rt715-sdca: volume step modification
Volume step (dB/step) modification to fix format error
which shown in amixer control.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/b1f546ad16dc4c7abb7daa7396e8345c@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-23 17:50:38 +09:00
Dan Carpenter 181d58cfe9
ASoC: cs35l41: Delete unnecessary condition in cs35l41_pcm_hw_params()
This code returns -EINVAL if "i" is out of bounds a few lines earlier.
Delete this unnecessary check and pull the code in a tab.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/1ee32bfb-6f6c-4b61-887b-6f655abbfc47@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-23 14:24:01 +09:00
Simon Trimmer f2602fba47
ASoC: cs35l56: Avoid static analysis warning of uninitialised variable
Static checkers complain that the silicon_uid variable passed by
pointer to cs35l56_read_silicon_uid() could later be used
uninitialised when calling cs_amp_get_efi_calibration_data().

cs35l56_read_silicon_uid() must have succeeded to call
cs_amp_get_efi_calibration_data() and that would have populated the
variable.

However, initialise the value so we are not haunted by it forevermore.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Fixes: e1830f66f6 ("ASoC: cs35l56: Add helper functions for amp calibration")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240422103211.236063-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-23 10:34:08 +09:00
Mark Brown 710f9a3673
ASoC: PCM6240: New driver
Merge series from Shenghao Ding <shenghao-ding@ti.com>:

mixer-test report:
 root@am335x-evm:/bin# mixer-test
 TAP version 13
 # Card 0 - TI BeagleBone Black (TI BeagleBone Black)
 1..455
 ok 1 get_value.0.64
 # 0.64 PCMD3180 i2c2 Profile id
 ok 2 name.0.64
 ok 3 write_default.0.64
 ok 4 write_valid.0.64
 ok 5 write_invalid.0.64
 ok 6 event_missing.0.64
 ok 7 event_spurious.0.64
 ok 8 get_value.0.63
 # 0.63 PCMD3180 i2c2 Dev3 Ch8 Digi Volume
 ok 9 name.0.63
 ok 10 write_default.0.63
 ok 11 write_valid.0.63
 ok 12 write_invalid.0.63
 ok 13 event_missing.0.63
 ok 14 event_spurious.0.63
 ok 15 get_value.0.62
 # 0.62 PCMD3180 i2c2 Dev3 Ch7 Digi Volume
 ok 16 name.0.62
 ok 17 write_default.0.62
 ok 18 write_valid.0.62
 ok 19 write_invalid.0.62
 ok 20 event_missing.0.62
 ok 21 event_spurious.0.62
 ok 22 get_value.0.61
 # 0.61 PCMD3180 i2c2 Dev3 Ch6 Digi Volume
 ok 23 name.0.61
 ok 24 write_default.0.61
 ok 25 write_valid.0.61
 ok 26 write_invalid.0.61
 ok 27 event_missing.0.61
 ok 28 event_spurious.0.61
 ok 29 get_value.0.60
 # 0.60 PCMD3180 i2c2 Dev3 Ch5 Digi Volume
 ok 30 name.0.60
 ok 31 write_default.0.60
 ok 32 write_valid.0.60
 ok 33 write_invalid.0.60
 ok 34 event_missing.0.60
 ok 35 event_spurious.0.60
 ok 36 get_value.0.59
 # 0.59 PCMD3180 i2c2 Dev3 Ch4 Digi Volume
 ok 37 name.0.59
 ok 38 write_default.0.59
 ok 39 write_valid.0.59
 ok 40 write_invalid.0.59
 ok 41 event_missing.0.59
 ok 42 event_spurious.0.59
 ok 43 get_value.0.58
 # 0.58 PCMD3180 i2c2 Dev3 Ch3 Digi Volume
 ok 44 name.0.58
 ok 45 write_default.0.58
 ok 46 write_valid.0.58
 ok 47 write_invalid.0.58
 ok 48 event_missing.0.58
 ok 49 event_spurious.0.58
 ok 50 get_value.0.57
 # 0.57 PCMD3180 i2c2 Dev3 Ch2 Digi Volume
 ok 51 name.0.57
 ok 52 write_default.0.57
 ok 53 write_valid.0.57
 ok 54 write_invalid.0.57
 ok 55 event_missing.0.57
 ok 56 event_spurious.0.57
 ok 57 get_value.0.56
 # 0.56 PCMD3180 i2c2 Dev3 Ch1 Digi Volume
 ok 58 name.0.56
 ok 59 write_default.0.56
 ok 60 write_valid.0.56
 ok 61 write_invalid.0.56
 ok 62 event_missing.0.56
 ok 63 event_spurious.0.56
 ok 64 get_value.0.55
 # 0.55 PCMD3180 i2c2 Dev3 Ch8 Fine Volume
 ok 65 name.0.55
 ok 66 write_default.0.55
 ok 67 write_valid.0.55
 ok 68 write_invalid.0.55
 ok 69 event_missing.0.55
 ok 70 event_spurious.0.55
 ok 71 get_value.0.54
 # 0.54 PCMD3180 i2c2 Dev3 Ch7 Fine Volume
 ok 72 name.0.54
 ok 73 write_default.0.54
 ok 74 write_valid.0.54
 ok 75 write_invalid.0.54
 ok 76 event_missing.0.54
 ok 77 event_spurious.0.54
 ok 78 get_value.0.53
 # 0.53 PCMD3180 i2c2 Dev3 Ch6 Fine Volume
 ok 79 name.0.53
 ok 80 write_default.0.53
 ok 81 write_valid.0.53
 ok 82 write_invalid.0.53
 ok 83 event_missing.0.53
 ok 84 event_spurious.0.53
 ok 85 get_value.0.52
 # 0.52 PCMD3180 i2c2 Dev3 Ch5 Fine Volume
 ok 86 name.0.52
 ok 87 write_default.0.52
 ok 88 write_valid.0.52
 ok 89 write_invalid.0.52
 ok 90 event_missing.0.52
 ok 91 event_spurious.0.52
 ok 92 get_value.0.51
 # 0.51 PCMD3180 i2c2 Dev3 Ch4 Fine Volume
 ok 93 name.0.51
 ok 94 write_default.0.51
 ok 95 write_valid.0.51
 ok 96 write_invalid.0.51
 ok 97 event_missing.0.51
 ok 98 event_spurious.0.51
 ok 99 get_value.0.50
 # 0.50 PCMD3180 i2c2 Dev3 Ch3 Fine Volume
 ok 100 name.0.50
 ok 101 write_default.0.50
 ok 102 write_valid.0.50
 ok 103 write_invalid.0.50
 ok 104 event_missing.0.50
 ok 105 event_spurious.0.50
 ok 106 get_value.0.49
 # 0.49 PCMD3180 i2c2 Dev3 Ch2 Fine Volume
 ok 107 name.0.49
 ok 108 write_default.0.49
 ok 109 write_valid.0.49
 ok 110 write_invalid.0.49
 ok 111 event_missing.0.49
 ok 112 event_spurious.0.49
 ok 113 get_value.0.48
 # 0.48 PCMD3180 i2c2 Dev3 Ch1 Fine Volume
 ok 114 name.0.48
 ok 115 write_default.0.48
 ok 116 write_valid.0.48
 ok 117 write_invalid.0.48
 ok 118 event_missing.0.48
 ok 119 event_spurious.0.48
 ok 120 get_value.0.47
 # 0.47 PCMD3180 i2c2 Dev2 Ch8 Digi Volume
 ok 121 name.0.47
 ok 122 write_default.0.47
 ok 123 write_valid.0.47
 ok 124 write_invalid.0.47
 ok 125 event_missing.0.47
 ok 126 event_spurious.0.47
 ok 127 get_value.0.46
 # 0.46 PCMD3180 i2c2 Dev2 Ch7 Digi Volume
 ok 128 name.0.46
 ok 129 write_default.0.46
 ok 130 write_valid.0.46
 ok 131 write_invalid.0.46
 ok 132 event_missing.0.46
 ok 133 event_spurious.0.46
 ok 134 get_value.0.45
 # 0.45 PCMD3180 i2c2 Dev2 Ch6 Digi Volume
 ok 135 name.0.45
 ok 136 write_default.0.45
 ok 137 write_valid.0.45
 ok 138 write_invalid.0.45
 ok 139 event_missing.0.45
 ok 140 event_spurious.0.45
 ok 141 get_value.0.44
 # 0.44 PCMD3180 i2c2 Dev2 Ch5 Digi Volume
 ok 142 name.0.44
 ok 143 write_default.0.44
 ok 144 write_valid.0.44
 ok 145 write_invalid.0.44
 ok 146 event_missing.0.44
 ok 147 event_spurious.0.44
 ok 148 get_value.0.43
 # 0.43 PCMD3180 i2c2 Dev2 Ch4 Digi Volume
 ok 149 name.0.43
 ok 150 write_default.0.43
 ok 151 write_valid.0.43
 ok 152 write_invalid.0.43
 ok 153 event_missing.0.43
 ok 154 event_spurious.0.43
 ok 155 get_value.0.42
 # 0.42 PCMD3180 i2c2 Dev2 Ch3 Digi Volume
 ok 156 name.0.42
 ok 157 write_default.0.42
 ok 158 write_valid.0.42
 ok 159 write_invalid.0.42
 ok 160 event_missing.0.42
 ok 161 event_spurious.0.42
 ok 162 get_value.0.41
 # 0.41 PCMD3180 i2c2 Dev2 Ch2 Digi Volume
 ok 163 name.0.41
 ok 164 write_default.0.41
 ok 165 write_valid.0.41
 ok 166 write_invalid.0.41
 ok 167 event_missing.0.41
 ok 168 event_spurious.0.41
 ok 169 get_value.0.40
 # 0.40 PCMD3180 i2c2 Dev2 Ch1 Digi Volume
 ok 170 name.0.40
 ok 171 write_default.0.40
 ok 172 write_valid.0.40
 ok 173 write_invalid.0.40
 ok 174 event_missing.0.40
 ok 175 event_spurious.0.40
 ok 176 get_value.0.39
 # 0.39 PCMD3180 i2c2 Dev2 Ch8 Fine Volume
 ok 177 name.0.39
 ok 178 write_default.0.39
 ok 179 write_valid.0.39
 ok 180 write_invalid.0.39
 ok 181 event_missing.0.39
 ok 182 event_spurious.0.39
 ok 183 get_value.0.38
 # 0.38 PCMD3180 i2c2 Dev2 Ch7 Fine Volume
 ok 184 name.0.38
 ok 185 write_default.0.38
 ok 186 write_valid.0.38
 ok 187 write_invalid.0.38
 ok 188 event_missing.0.38
 ok 189 event_spurious.0.38
 ok 190 get_value.0.37
 # 0.37 PCMD3180 i2c2 Dev2 Ch6 Fine Volume
 ok 191 name.0.37
 ok 192 write_default.0.37
 ok 193 write_valid.0.37
 ok 194 write_invalid.0.37
 ok 195 event_missing.0.37
 ok 196 event_spurious.0.37
 ok 197 get_value.0.36
 # 0.36 PCMD3180 i2c2 Dev2 Ch5 Fine Volume
 ok 198 name.0.36
 ok 199 write_default.0.36
 ok 200 write_valid.0.36
 ok 201 write_invalid.0.36
 ok 202 event_missing.0.36
 ok 203 event_spurious.0.36
 ok 204 get_value.0.35
 # 0.35 PCMD3180 i2c2 Dev2 Ch4 Fine Volume
 ok 205 name.0.35
 ok 206 write_default.0.35
 ok 207 write_valid.0.35
 ok 208 write_invalid.0.35
 ok 209 event_missing.0.35
 ok 210 event_spurious.0.35
 ok 211 get_value.0.34
 # 0.34 PCMD3180 i2c2 Dev2 Ch3 Fine Volume
 ok 212 name.0.34
 ok 213 write_default.0.34
 ok 214 write_valid.0.34
 ok 215 write_invalid.0.34
 ok 216 event_missing.0.34
 ok 217 event_spurious.0.34
 ok 218 get_value.0.33
 # 0.33 PCMD3180 i2c2 Dev2 Ch2 Fine Volume
 ok 219 name.0.33
 ok 220 write_default.0.33
 ok 221 write_valid.0.33
 ok 222 write_invalid.0.33
 ok 223 event_missing.0.33
 ok 224 event_spurious.0.33
 ok 225 get_value.0.32
 # 0.32 PCMD3180 i2c2 Dev2 Ch1 Fine Volume
 ok 226 name.0.32
 ok 227 write_default.0.32
 ok 228 write_valid.0.32
 ok 229 write_invalid.0.32
 ok 230 event_missing.0.32
 ok 231 event_spurious.0.32
 ok 232 get_value.0.31
 # 0.31 PCMD3180 i2c2 Dev1 Ch8 Digi Volume
 ok 233 name.0.31
 ok 234 write_default.0.31
 ok 235 write_valid.0.31
 ok 236 write_invalid.0.31
 ok 237 event_missing.0.31
 ok 238 event_spurious.0.31
 ok 239 get_value.0.30
 # 0.30 PCMD3180 i2c2 Dev1 Ch7 Digi Volume
 ok 240 name.0.30
 ok 241 write_default.0.30
 ok 242 write_valid.0.30
 ok 243 write_invalid.0.30
 ok 244 event_missing.0.30
 ok 245 event_spurious.0.30
 ok 246 get_value.0.29
 # 0.29 PCMD3180 i2c2 Dev1 Ch6 Digi Volume
 ok 247 name.0.29
 ok 248 write_default.0.29
 ok 249 write_valid.0.29
 ok 250 write_invalid.0.29
 ok 251 event_missing.0.29
 ok 252 event_spurious.0.29
 ok 253 get_value.0.28
 # 0.28 PCMD3180 i2c2 Dev1 Ch5 Digi Volume
 ok 254 name.0.28
 ok 255 write_default.0.28
 ok 256 write_valid.0.28
 ok 257 write_invalid.0.28
 ok 258 event_missing.0.28
 ok 259 event_spurious.0.28
 ok 260 get_value.0.27
 # 0.27 PCMD3180 i2c2 Dev1 Ch4 Digi Volume
 ok 261 name.0.27
 ok 262 write_default.0.27
 ok 263 write_valid.0.27
 ok 264 write_invalid.0.27
 ok 265 event_missing.0.27
 ok 266 event_spurious.0.27
 ok 267 get_value.0.26
 # 0.26 PCMD3180 i2c2 Dev1 Ch3 Digi Volume
 ok 268 name.0.26
 ok 269 write_default.0.26
 ok 270 write_valid.0.26
 ok 271 write_invalid.0.26
 ok 272 event_missing.0.26
 ok 273 event_spurious.0.26
 ok 274 get_value.0.25
 # 0.25 PCMD3180 i2c2 Dev1 Ch2 Digi Volume
 ok 275 name.0.25
 ok 276 write_default.0.25
 ok 277 write_valid.0.25
 ok 278 write_invalid.0.25
 ok 279 event_missing.0.25
 ok 280 event_spurious.0.25
 ok 281 get_value.0.24
 # 0.24 PCMD3180 i2c2 Dev1 Ch1 Digi Volume
 ok 282 name.0.24
 ok 283 write_default.0.24
 ok 284 write_valid.0.24
 ok 285 write_invalid.0.24
 ok 286 event_missing.0.24
 ok 287 event_spurious.0.24
 ok 288 get_value.0.23
 # 0.23 PCMD3180 i2c2 Dev1 Ch8 Fine Volume
 ok 289 name.0.23
 ok 290 write_default.0.23
 ok 291 write_valid.0.23
 ok 292 write_invalid.0.23
 ok 293 event_missing.0.23
 ok 294 event_spurious.0.23
 ok 295 get_value.0.22
 # 0.22 PCMD3180 i2c2 Dev1 Ch7 Fine Volume
 ok 296 name.0.22
 ok 297 write_default.0.22
 ok 298 write_valid.0.22
 ok 299 write_invalid.0.22
 ok 300 event_missing.0.22
 ok 301 event_spurious.0.22
 ok 302 get_value.0.21
 # 0.21 PCMD3180 i2c2 Dev1 Ch6 Fine Volume
 ok 303 name.0.21
 ok 304 write_default.0.21
 ok 305 write_valid.0.21
 ok 306 write_invalid.0.21
 ok 307 event_missing.0.21
 ok 308 event_spurious.0.21
 ok 309 get_value.0.20
 # 0.20 PCMD3180 i2c2 Dev1 Ch5 Fine Volume
 ok 310 name.0.20
 ok 311 write_default.0.20
 ok 312 write_valid.0.20
 ok 313 write_invalid.0.20
 ok 314 event_missing.0.20
 ok 315 event_spurious.0.20
 ok 316 get_value.0.19
 # 0.19 PCMD3180 i2c2 Dev1 Ch4 Fine Volume
 ok 317 name.0.19
 ok 318 write_default.0.19
 ok 319 write_valid.0.19
 ok 320 write_invalid.0.19
 ok 321 event_missing.0.19
 ok 322 event_spurious.0.19
 ok 323 get_value.0.18
 # 0.18 PCMD3180 i2c2 Dev1 Ch3 Fine Volume
 ok 324 name.0.18
 ok 325 write_default.0.18
 ok 326 write_valid.0.18
 ok 327 write_invalid.0.18
 ok 328 event_missing.0.18
 ok 329 event_spurious.0.18
 ok 330 get_value.0.17
 # 0.17 PCMD3180 i2c2 Dev1 Ch2 Fine Volume
 ok 331 name.0.17
 ok 332 write_default.0.17
 ok 333 write_valid.0.17
 ok 334 write_invalid.0.17
 ok 335 event_missing.0.17
 ok 336 event_spurious.0.17
 ok 337 get_value.0.16
 # 0.16 PCMD3180 i2c2 Dev1 Ch1 Fine Volume
 ok 338 name.0.16
 ok 339 write_default.0.16
 ok 340 write_valid.0.16
 ok 341 write_invalid.0.16
 ok 342 event_missing.0.16
 ok 343 event_spurious.0.16
 ok 344 get_value.0.15
 # 0.15 PCMD3180 i2c2 Dev0 Ch8 Digi Volume
 ok 345 name.0.15
 ok 346 write_default.0.15
 ok 347 write_valid.0.15
 ok 348 write_invalid.0.15
 ok 349 event_missing.0.15
 ok 350 event_spurious.0.15
 ok 351 get_value.0.14
 # 0.14 PCMD3180 i2c2 Dev0 Ch7 Digi Volume
 ok 352 name.0.14
 ok 353 write_default.0.14
 ok 354 write_valid.0.14
 ok 355 write_invalid.0.14
 ok 356 event_missing.0.14
 ok 357 event_spurious.0.14
 ok 358 get_value.0.13
 # 0.13 PCMD3180 i2c2 Dev0 Ch6 Digi Volume
 ok 359 name.0.13
 ok 360 write_default.0.13
 ok 361 write_valid.0.13
 ok 362 write_invalid.0.13
 ok 363 event_missing.0.13
 ok 364 event_spurious.0.13
 ok 365 get_value.0.12
 # 0.12 PCMD3180 i2c2 Dev0 Ch5 Digi Volume
 ok 366 name.0.12
 ok 367 write_default.0.12
 ok 368 write_valid.0.12
 ok 369 write_invalid.0.12
 ok 370 event_missing.0.12
 ok 371 event_spurious.0.12
 ok 372 get_value.0.11
 # 0.11 PCMD3180 i2c2 Dev0 Ch4 Digi Volume
 ok 373 name.0.11
 ok 374 write_default.0.11
 ok 375 write_valid.0.11
 ok 376 write_invalid.0.11
 ok 377 event_missing.0.11
 ok 378 event_spurious.0.11
 ok 379 get_value.0.10
 # 0.10 PCMD3180 i2c2 Dev0 Ch3 Digi Volume
 ok 380 name.0.10
 ok 381 write_default.0.10
 ok 382 write_valid.0.10
 ok 383 write_invalid.0.10
 ok 384 event_missing.0.10
 ok 385 event_spurious.0.10
 ok 386 get_value.0.9
 # 0.9 PCMD3180 i2c2 Dev0 Ch2 Digi Volume
 ok 387 name.0.9
 ok 388 write_default.0.9
 ok 389 write_valid.0.9
 ok 390 write_invalid.0.9
 ok 391 event_missing.0.9
 ok 392 event_spurious.0.9
 ok 393 get_value.0.8
 # 0.8 PCMD3180 i2c2 Dev0 Ch1 Digi Volume
 ok 394 name.0.8
 ok 395 write_default.0.8
 ok 396 write_valid.0.8
 ok 397 write_invalid.0.8
 ok 398 event_missing.0.8
 ok 399 event_spurious.0.8
 ok 400 get_value.0.7
 # 0.7 PCMD3180 i2c2 Dev0 Ch8 Fine Volume
 ok 401 name.0.7
 ok 402 write_default.0.7
 ok 403 write_valid.0.7
 ok 404 write_invalid.0.7
 ok 405 event_missing.0.7
 ok 406 event_spurious.0.7
 ok 407 get_value.0.6
 # 0.6 PCMD3180 i2c2 Dev0 Ch7 Fine Volume
 ok 408 name.0.6
 ok 409 write_default.0.6
 ok 410 write_valid.0.6
 ok 411 write_invalid.0.6
 ok 412 event_missing.0.6
 ok 413 event_spurious.0.6
 ok 414 get_value.0.5
 # 0.5 PCMD3180 i2c2 Dev0 Ch6 Fine Volume
 ok 415 name.0.5
 ok 416 write_default.0.5
 ok 417 write_valid.0.5
 ok 418 write_invalid.0.5
 ok 419 event_missing.0.5
 ok 420 event_spurious.0.5
 ok 421 get_value.0.4
 # 0.4 PCMD3180 i2c2 Dev0 Ch5 Fine Volume
 ok 422 name.0.4
 ok 423 write_default.0.4
 ok 424 write_valid.0.4
 ok 425 write_invalid.0.4
 ok 426 event_missing.0.4
 ok 427 event_spurious.0.4
 ok 428 get_value.0.3
 # 0.3 PCMD3180 i2c2 Dev0 Ch4 Fine Volume
 ok 429 name.0.3
 ok 430 write_default.0.3
 ok 431 write_valid.0.3
 ok 432 write_invalid.0.3
 ok 433 event_missing.0.3
 ok 434 event_spurious.0.3
 ok 435 get_value.0.2
 # 0.2 PCMD3180 i2c2 Dev0 Ch3 Fine Volume
 ok 436 name.0.2
 ok 437 write_default.0.2
 ok 438 write_valid.0.2
 ok 439 write_invalid.0.2
 ok 440 event_missing.0.2
 ok 441 event_spurious.0.2
 ok 442 get_value.0.1
 # 0.1 PCMD3180 i2c2 Dev0 Ch2 Fine Volume
 ok 443 name.0.1
 ok 444 write_default.0.1
 ok 445 write_valid.0.1
 ok 446 write_invalid.0.1
 ok 447 event_missing.0.1
 ok 448 event_spurious.0.1
 ok 449 get_value.0.0
 # 0.0 PCMD3180 i2c2 Dev0 Ch1 Fine Volume
 ok 450 name.0.0
 ok 451 write_default.0.0
 ok 452 write_valid.0.0
 ok 453 write_invalid.0.0
 ok 454 event_missing.0.0
 ok 455 event_spurious.0.0
 # Totals: pass:455 fail:0 xfail:0 xpass:0 skip:0 error:0
2024-04-22 09:56:30 +09:00
Mark Brown 512622407c
ASoC: dapm: improve debugfs output and introduce
Merge series from Luca Ceresoli <luca.ceresoli@bootlin.com>:

This patch series improves the tools available to understand and debug
DAPM.
2024-04-22 09:56:22 +09:00
Mark Brown bd74e9c31f
ASoC: nau8821: Add delay control for ADC
Merge series from Seven Lee <wtli@nuvoton.com>:

Change the original fixed delay to the assignment from the property. It
will make it more flexible to different platforms to avoid pop noise at
the beginning of recording.
2024-04-22 09:56:15 +09:00
Mark Brown d3f36e78d7
ASoC: Intel: avs: Switch to acpi-nhlt
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

The change is based on rafael/acpi-nhlt [1] immutable branch which
Rafael kindly prepared for me. Without the topmost changes to ACPI/NHLT,
the patches present will fail to compile.

Recent changes for the ACPI tree [2] refactored interfaces of the NHLT
table. Currently we have two implementations - one found in acpi
subsystem (unused) and one in sound/hda/. As NHLT is part of ACPI, idea
is to make the former useful and then switch all users of existing
sound/hda/intel-nhlt.c to this new interface over time and remove the
duplicate afterward.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/?h=acpi-nhlt
[2]: https://lore.kernel.org/linux-acpi/20240319083018.3159716-1-cezary.rojewski@intel.com/
2024-04-22 09:55:47 +09:00
Nathan Chancellor 3a56855bb5 ALSA: scarlett2: Zero initialize ret in scarlett2_ag_target_ctl_get()
Clang warns (or errors with CONFIG_WERROR):

  sound/usb/mixer_scarlett2.c:3697:6: error: variable 'err' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
   3697 |         if (private->autogain_updated) {
        |             ^~~~~~~~~~~~~~~~~~~~~~~~~
  sound/usb/mixer_scarlett2.c:3707:9: note: uninitialized use occurs here
   3707 |         return err;
        |                ^~~
  sound/usb/mixer_scarlett2.c:3697:2: note: remove the 'if' if its condition is always true
   3697 |         if (private->autogain_updated) {
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  sound/usb/mixer_scarlett2.c:3688:9: note: initialize the variable 'err' to silence this warning
   3688 |         int err;
        |                ^
        |                 = 0
  1 error generated.

Initialize ret to zero to ensure ret is initialized in all paths within
scarlett2_ag_target_ctl_get(), which matches the style of other
functions in this driver.

Fixes: e30ea5340c ("ALSA: scarlett2: Add autogain target controls")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Message-ID: <20240419-alsa-scarlett2-fix-wsometimes-uninitialized-v1-1-e2ace8642e08@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-21 19:30:53 +02:00
Amadeusz Sławiński f5d20b253d
ASoC: Intel: avs: Switch to ACPI NHLT
Now that NHLT support in ACPI framework was introduced, migrate avs
driver to new API.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240419084307.2718881-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 23:35:13 +09:00
Shenghao Ding 6bb1b70690
ASoc: PCM6240: Add compile item for PCM6240 Family driver
PCM6240 driver implements a flexible and configurable setting for register
and filter coefficients, to one, two or even multiple PCM6240 Family Audio
chips.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://lore.kernel.org/r/20240407091846.1299-4-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 23:30:51 +09:00
Shenghao Ding d537f7b52d
ASoc: PCM6240: Create header file for PCM6240 Family driver code
PCM6240 driver implements a flexible and configurable setting for register
and filter coefficients, to one, two or even multiple PCM6240 Family Audio
chips.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://lore.kernel.org/r/20240407091846.1299-3-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 23:30:50 +09:00
Shenghao Ding 1324eafd37
ASoc: PCM6240: Create PCM6240 Family driver code
PCM6240 driver implements a flexible and configurable setting for register
and filter coefficients, to one, two or even multiple PCM6240 Family Audio
chips.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://lore.kernel.org/r/20240407091846.1299-2-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 23:30:49 +09:00
Luca Ceresoli 5b1047dcf8
ASoC: dapm: debugfs: show the widget type
To make the widget debugfs files more informative, add a line showing the
widget type string.

Keeping backward compatibility is nice to have being debugfs, and ease of
parsing by both humans and software is also good. To maximize both with a
reasonable effort add a new line without thouching the already complex
format of the first line. The syntax is meant to be a key/value pair.

The existing vizdapm tool continues working after this change, ignoring the
new line.

The new format is:

  Left ADC: Off  in 1 out 0 - R2(0x2) mask 0x2
   stream Left HiFi Capture inactive
   widget-type adc
   out  "static" "Capture" "cs42l51.0-004a"
   in  "static" "Left PGA" "cs42l51.0-004a"

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20240416-vizdapm-ng-v1-2-5d33c0b57bc5@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 09:58:16 +09:00
Luca Ceresoli cbd9eed871
ASoC: dapm: debugfs: add component to route lines
debugfs entries for DAPM widgets have the following form:

  Left ADC: Off  in 1 out 0 - R2(0x2) mask 0x2
   stream Left HiFi Capture inactive
   out  "static" "Capture"
   in  "static" "Left PGA"

Lines with the "in" and "out" prefixes describe routes from/to other
widgets presenting the path name and the connected widget name.

This is ambiguous in case of cards having multiple widgets with the same
name in different components. For example the STM32MP157A-DK1 board
(arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi) has a "Capture" widget in both
the "cs42l51.0-004a" and the "hdmi-audio-codec.1.auto" components.

Avoid the ambiguity by adding the component name to the "in" and "out"
lines. Add the new field at the end to minimize backward compatibility
issues. The existing vizdapm tool continues working after this change.

The output becomes:

  Left ADC: Off  in 1 out 0 - R2(0x2) mask 0x2
   stream Left HiFi Capture inactive
   out  "static" "Capture" "cs42l51.0-004a"
   in  "static" "Left PGA" "cs42l51.0-004a"

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20240416-vizdapm-ng-v1-1-5d33c0b57bc5@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 09:58:15 +09:00
Seven Lee ad8ba241bc
ASoC: nau8821: Remove redundant ADC controls
Remove redundant left/right adc channel enable controls.

Signed-off-by: Seven Lee <wtli@nuvoton.com>
Link: https://lore.kernel.org/r/20240415070649.3496487-4-wtli@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 09:57:10 +09:00
Seven Lee b37fdd42c0
ASoC: nau8821: Add delay control for ADC
Change the original fixed delay to the assignment from the property.
It will make it more flexible to different platforms to avoid pop
noise at the beginning of recording.

Signed-off-by: Seven Lee <wtli@nuvoton.com>
Link: https://lore.kernel.org/r/20240415070649.3496487-3-wtli@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-21 09:57:09 +09:00
Srinivas Kandagatla 32ac501957
ASoC: codecs: wsa881x: set clk_stop_mode1 flag
WSA881x codecs do not retain the state while clock is stopped, so mark
this with clk_stop_mode1 flag.

Fixes: a0aab9e140 ("ASoC: codecs: add wsa881x amplifier support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240419140012.91384-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-20 10:03:24 +09:00
Takashi Iwai 32cb23a0f9 ALSA: seq: dummy: Allow UMP conversion
Although the purpose of dummy seq client is a direct pass-through,
it's sometimes helpful for debugging if it can convert to a certain
UMP MIDI version.  This patch adds an option to specify the UMP event
conversion.  As default, it skips the conversion and does
passthrough, while user can pass ump=1 or ump=2 to enforce the
conversion to UMP MIDI1 or MIDI2 format.

Message-ID: <20240419101105.15571-1-tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-19 12:11:47 +02:00
Takashi Iwai f25f17dc5c ALSA: seq: ump: Fix conversion from MIDI2 to MIDI1 UMP messages
The conversion from MIDI2 to MIDI1 UMP messages had a leftover
artifact (superfluous bit shift), and this resulted in the bogus type
check, leading to empty outputs.  Let's fix it.

Fixes: e9e02819a9 ("ALSA: seq: Automatic conversion of UMP events")
Cc: <stable@vger.kernel.org>
Link: https://github.com/alsa-project/alsa-utils/issues/262
Message-ID: <20240419100442.14806-1-tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-19 12:07:14 +02:00
Ai Chao 7ee5faad0f ALSA: hda/realtek - Enable audio jacks of Haier Boyue G42 with ALC269VC
The Haier Boyue G42 with ALC269VC cannot detect the MIC of headset,
the line out and internal speaker until
ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS quirk applied.

Signed-off-by: Ai Chao <aichao@kylinos.cn>
Cc: <stable@vger.kernel.org>
Message-ID: <20240419082159.476879-1-aichao@kylinos.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-04-19 12:00:57 +02:00
Cezary Rojewski 84049e2db5
ASoC: Intel: avs: Remove unused IRQ-related code
Most IRQ-related code is duplicated in the driver. Switch to the new
implementation and remove unused members.

While the change is non-trivial, from functional perspective status quo
is achieved.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240419084857.2719593-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-19 18:57:06 +09:00
Cezary Rojewski 7ce6ceeb77
ASoC: Intel: avs: New IRQ handling implementation
The existing code can be both improved and simplified. To make this
change easier to manage, first add new implementation and then remove
deadcode in a separate patch.

Simplification achieved with:
- reduce the amount of resources requested by the driver i.e.: IPC and
  CLDMA request_irq() merged into one
- reduce the number of DSP ops from 2 to 1:
  irq_handler/thread() vs dsp_interrupt()
- drop ambiguity around CLDMA interrupt, let skl.c handle that
  explicitly as it is the only user

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20240419084857.2719593-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-19 18:57:05 +09:00
Joao Paulo Goncalves d18ca8635d
ASoC: ti: davinci-mcasp: Fix race condition during probe
When using davinci-mcasp as CPU DAI with simple-card, there are some
conditions that cause simple-card to finish registering a sound card before
davinci-mcasp finishes registering all sound components. This creates a
non-working sound card from userspace with no problem indication apart
from not being able to play/record audio on a PCM stream. The issue
arises during simultaneous probe execution of both drivers. Specifically,
the simple-card driver, awaiting a CPU DAI, proceeds as soon as
davinci-mcasp registers its DAI. However, this process can lead to the
client mutex lock (client_mutex in soc-core.c) being held or davinci-mcasp
being preempted before PCM DMA registration on davinci-mcasp finishes.
This situation occurs when the probes of both drivers run concurrently.
Below is the code path for this condition. To solve the issue, defer
davinci-mcasp CPU DAI registration to the last step in the audio part of
it. This way, simple-card CPU DAI parsing will be deferred until all
audio components are registered.

Fail Code Path:

simple-card.c: probe starts
simple-card.c: simple_dai_link_of: simple_parse_node(..,cpu,..) returns EPROBE_DEFER, no CPU DAI yet
davinci-mcasp.c: probe starts
davinci-mcasp.c: devm_snd_soc_register_component() register CPU DAI
simple-card.c: probes again, finish CPU DAI parsing and call devm_snd_soc_register_card()
simple-card.c: finish probe
davinci-mcasp.c: *dma_pcm_platform_register() register PCM  DMA
davinci-mcasp.c: probe finish

Cc: stable@vger.kernel.org
Fixes: 9fbd58cf4a ("ASoC: davinci-mcasp: Choose PCM driver based on configured DMA controller")
Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Reviewed-by: Jai Luthra <j-luthra@ti.com>
Link: https://lore.kernel.org/r/20240417184138.1104774-1-jpaulo.silvagoncalves@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-19 09:42:04 +09:00
Amadeusz Sławiński 4cbb5050bf
ASoC: Intel: avs: Set name of control as in topology
When creating controls attached to widgets, there are a lot of rules if
they get their name prefixed with widget name or not. Due to that
controls ended up with weirdly looking names like "ssp0_fe DSP Volume",
while topology set it to "DSP Volume".

Fix this by setting no_wname_in_kcontrol_name to true in avs topology
widgets which disables unwanted behaviour.

Fixes: be2b81b519 ("ASoC: Intel: avs: Parse control tuples")
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240418142621.2487478-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-19 09:42:03 +09:00