1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-15 11:03:02 +00:00

4128 Commits

Author SHA1 Message Date
Baojun Xu
53a3c6e222
ASoC: tas2781: Support more newly-released amplifiers tas58xx in the driver
TAS5802/TAS5815/TAS5828 has on-chip DSP without current/voltage feedback.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20251002072925.26242-1-baojun.xu@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-10-13 11:08:09 +01:00
Takashi Iwai
6b9c4a05ae ASoC: Updates for v6.18 round 2
Some more updates for v6.18, mostly fixes for the earlier pull request
 with some cleanups and more minor fixes for older code.  We do have one
 new driver, the TI TAS2783A, and some quirks for new platforms.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmjZIZAACgkQJNaLcl1U
 h9DZqgf+L+U/ysqynLO6NncBatsP3QHBxL8Op8DhOUG8cmtKwUHgeNJPaNDPA/rF
 b6WLe6yZBXpBLyDtWo/eHwxC3pdOPJ7JcFWhpZcYMBKfxwszzki72OiZerxkwuUS
 mFVr0EFkB/cbqkw9D8AF5tOMlauSDNjJQUiuNDOKD7BYvFNtuY3wOYvIA/kaW86l
 SlAb3dD4pOhYP8mgPP8v8h83LyHr3NnIEX4uVSQTxZ98zZmL08FB2sCv4bzqZuag
 pI6cDF1qlOT5y1CKLXIZ1JoflrUiEYyB9X1eb/rW2+8/USGzC4enr2cEm4phU3te
 X4MV3N3BulSq03xewX0Jw19mdQE0Hg==
 =91Ur
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v6.18-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v6.18 round 2

Some more updates for v6.18, mostly fixes for the earlier pull request
with some cleanups and more minor fixes for older code.  We do have one
new driver, the TI TAS2783A, and some quirks for new platforms.
2025-09-28 15:41:17 +02:00
Takashi Iwai
329bdcbbd2 Merge branch 'for-linus' into for-next
Pull 6.17-devel branch for applying further changes cleanly.

Signed-off-by: Taksahi Iwai <tiwai@suse.de>
2025-09-28 08:34:58 +02:00
Richard Fitzgerald
33da2d892b ASoC: cs35l56: Add support for CS35L56 B2 silicon
This adds support for changed firmware addresses on the B2 revision of
CS35L56 silicon.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-28 08:27:15 +02:00
Richard Fitzgerald
ab91835e61 ASoC: cs35l56: Set fw_regs table after getting REVID
Defer setting the cs35l56_base.fw_regs pointer until after the REVID has
been read in cs35l56_hw_init(). Also make the corresponding change to the
cs35l56_hda drivers to prevent a build break.

This is preparing for firmware registers that change address between
revisions of the same device.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-28 08:27:15 +02:00
Mark Brown
fd98145543
Support reading Subsystem ID from Device Tree
Merge series from Stefan Binding <sbinding@opensource.cirrus.com>:

In PC systems using ACPI, the driver is able to read back an SSID from
the _SUB property. This SSID uniquely identifies the system, which
enables the driver to read the correct firmware and tuning for that
system from linux-firmware. Currently there is no way of reading this
property from device tree. Add an equivalent property in device tree
to perform the same role.
2025-09-23 10:28:45 +02:00
Niranjan H Y
96384a34dd
ASoc: tas2783A: machine driver amp utility for TI devices
Machine driver amp utility file to initialize and support
multiple tas2783a devices are added.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Niranjan H Y <niranjan.hy@ti.com>
--
v5:
- removed empty line in soc_sdw_ti_amp.c
Link: https://patch.msgid.link/20250912083624.804-3-niranjan.hy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-22 14:00:40 +02:00
Takashi Iwai
b8d8265a0d ASoC: Updates for v6.18
A relatively quiet release for ASoC, we've had a lot of maintainance
 work going on and several new drivers but really the most remarkable
 thing is that we removed a driver, the WL1273 driver used in some old
 Nokia systems that have had the underlying system support removed from
 the kernel.
 
  - Morimoto-san continues his work on cleanups of the core APIs and
    enforcement of abstraction layers.
  - Lots of cleanups and conversions of DT bindings.
  - Substantial maintainance work on the Intel AVS drivers.
  - Support for Qualcomm Glymur and PM4125, Realtek RT1321, Shanghai
    FourSemi FS2104/5S, Texas Instruments PCM1754.
  - Remove support for TI WL1273.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmjNx/QACgkQJNaLcl1U
 h9A+oQf/a/hKhCdmDVl8LE/a5dTExQqpzxvLpWxUBwiYykh5B08n/adS7oALRyBK
 IfkbGfwpA4N2dGtwrluy4VATyQBTe8SUboX6iP1cxifbWG8+EDuVfpkdUl/R3fcK
 gPm41C/2Xk+GoAF4StfijPKg2PV8mUOWmTrxNm2QswGpkXxOFO4PI2GbTwsABDeU
 cv+EK7PUZHhKFUOu1ELLi1HmgI57TMK7Kb3I+ETcKNZ3ZiCaLs7Vkje5z2IUhSZZ
 +Z/EDnLKUmvYRmbkA48aFas4hpafkT7jrmGrk95mju/W0Udd9Ggm4MSF6+9DN4MF
 buaNixQZlIwVz68zapcVtrFedxKLEQ==
 =6T3w
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v6.18

A relatively quiet release for ASoC, we've had a lot of maintainance
work going on and several new drivers but really the most remarkable
thing is that we removed a driver, the WL1273 driver used in some old
Nokia systems that have had the underlying system support removed from
the kernel.

 - Morimoto-san continues his work on cleanups of the core APIs and
   enforcement of abstraction layers.
 - Lots of cleanups and conversions of DT bindings.
 - Substantial maintainance work on the Intel AVS drivers.
 - Support for Qualcomm Glymur and PM4125, Realtek RT1321, Shanghai
   FourSemi FS2104/5S, Texas Instruments PCM1754.
 - Remove support for TI WL1273.
2025-09-20 08:38:17 +02:00
Kuninori Morimoto
cb3c715d89
ASoC: soc-dapm: add snd_soc_dapm_set_idle_bias()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

Many drivers are directly setting dapm->idle_bias, but it will be
impossible soon. adds snd_soc_dapm_set_idle_bias() for them.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87zfbavllj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-18 22:24:18 +01:00
Kuninori Morimoto
2e7f0a8612
ASoC: soc-dapm: add snd_soc_dapm_get_bias_level()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

Many drivers are directly using dapm->idle_bias, but it should get it
via get_idle_bias() function. Makes it as global function.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/871pomx062.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-18 22:24:17 +01:00
Kuninori Morimoto
889dd56f8c
ASoC: soc-dapm: tidyup idle_bias handling - step1
Current soc-dapm is using  "idle_bias_off", and its default settings
came from snd_soc_component "idle_bias_on". It is complicated/confusable.

Let's handling it as "idle_bias".

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/874itix06a.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-18 22:24:15 +01:00
Kuninori Morimoto
3bc0a92cb2
ASoC: soc-dapm: remove suspend_bias_off from snd_soc_dapm_context
We can directly use suspend_bias_off via snd_soc_component, no need
to keep it on dapm. Remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/875xdyx06e.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-18 22:24:14 +01:00
Kuninori Morimoto
e38a80c5c2
ASoC: soc-card: add snd_soc_card_to_dapm()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

Current dapm of card/component are using "instance", but it will be
"pointer" if snd_soc_dapm_context was removed from header.

snd_soc_card_to_dapm() is needed to switch to the new style while
maintaining compatibility

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/877byex06i.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-18 22:24:13 +01:00
Kuninori Morimoto
a1c99b6097
ASoC: soc-component: add snd_soc_component_to_dapm()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

Current dapm of card/component are using "instance", but it will be
"pointer" if snd_soc_dapm_context was removed from header.

snd_soc_component_to_dapm() is needed to switch to the new style while
maintaining compatibility

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/878qiux06m.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-18 22:24:12 +01:00
Kuninori Morimoto
96e311b561
ASoC: soc-dapm: use dapm->component instead of container_of()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

Now, snd_soc_dapm_to_component() (A) will convert dapm to component by
container_of() (a).

(A)	static inline struct snd_soc_component *snd_soc_dapm_to_component(
		struct snd_soc_dapm_context *dapm)
	{
(a)		return container_of(dapm, struct snd_soc_component, dapm);
	}

dapm of component works, but dapm of card will be "unknown" pointer
(= not NULL), because (a) is using "container_of()".

OTOH, ASoC will call snd_soc_dapm_init() (X) to initialize dapm, and
it will be called from snd_soc_bind_card() (p) (for card) or
soc_probe_component() (q) (for component) with component pointer.

(p)	static int snd_soc_bind_card(...)
	{
		...
(X)		snd_soc_dapm_init(..., NULL);
		...                    ^^^^
	}

(q)	static int soc_probe_component(...)
	{
		...
(X)		snd_soc_dapm_init(..., component);
		...                 ^^^^^^^^^
	}

And snd_soc_dapm_init() (X) will fill dapm->component (x)

(X)	void snd_soc_dapm_init(..., component, ...)
	{
		...
(x)		dapm->component	= component;
		...
	}

We can simply use dapm->component in snd_soc_dapm_to_component() (A).
In this case, dapm of card (p) will be just NULL.

Use dapm->component instead of container_of().
The picky note can be removed by this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87a53ax06q.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-18 22:24:11 +01:00
Kuninori Morimoto
c8df096bca
ASoC: soc-dapm: add snd_soc_dapm_to_card()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

Some drivers need to get card from dapm (which will be removed).
We need such function. Add it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87bjnqx06v.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-18 22:24:10 +01:00
Kuninori Morimoto
6b8ba0db92
ASoC: soc-dapm: add snd_soc_dapm_to_dev()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

Some drivers need to get dev from dapm (which will be removed).
We need such function. Add it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87cy86x06z.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-18 22:24:09 +01:00
Mark Brown
32bd60d5ec
ASoC: cs35l56: Handle vendor-specific UEFI
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

This series adds handling for vendor-specific UEFI variables from Lenovo
and HP. These vendors will switch to using their UEFI variables instead
of the normal Cirrus Logic-defined mechanisms.

The model of speaker fitted (Speaker ID) is normally signaled by a GPIO,
and the driver is given access to this GPIO. Lenovo and HP will both stop
giving the driver access to the GPIO and instead the BIOS will create a
UEFI variable giving the value of the GPIO.

HP will also start using their own UEFI variable to store amp calibration
data. The content of the variable is the same as the Cirrus Logic variable,
only the UEFI name and GUID are changed.

Change in v2:
Removed unused target_uid variable and code that set it in patch 6.

Richard Fitzgerald (6):
  ASoC: cs-amp-lib: Rename defines for Cirrus Logic EFI
  ASoC: cs-amp-lib: Add handling for Lenovo and HP UEFI speaker ID
  ASoC: cs35l56: Check for vendor-specific speaker ID value
  ASoC: cs-amp-lib-test: Add tests for cs_amp_get_vendor_spkid()
  ASoC: cs-amp-lib: Add HP-specific EFI variable for calibration data
  ASoC: cs-amp-lib-test: Add test for getting cal data from HP EFI

 include/sound/cs-amp-lib.h         |   1 +
 sound/soc/codecs/cs-amp-lib-test.c | 252 ++++++++++++++++++++++++++++-
 sound/soc/codecs/cs-amp-lib.c      | 139 +++++++++++++++-
 sound/soc/codecs/cs35l56-shared.c  |  12 +-
 4 files changed, 395 insertions(+), 9 deletions(-)

--
2.39.5
2025-09-16 22:42:25 +01:00
Richard Fitzgerald
267b9cdee5
ASoC: cs-amp-lib: Add handling for Lenovo and HP UEFI speaker ID
Add handling of the Lenovo-specific and HP-specific EFI variables for
speaker ID.

Future Lenovo and HP models will not give the codec driver access to the
speaker detect GPIO. Instead, the BIOS will read the GPIO and create an
EFI variable with a value indicating the state of the GPIO.

The Lenovo and HP EFI variables are both defined to have only two valid
values. But the variable name, GUID and values are different.

This adds a new exported function cs_amp_get_vendor_spkid().

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Message-ID: <20250909113039.922065-3-rf@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-09 12:42:06 +01:00
Baojun Xu
7ceb69ca82 ASoC: tas2781: Add tas2118, tas2x20, tas5825 support
Add tas2020, tas2118, tas2120, tas2320, tas2570, tas2572, tas5825
tas5827 support in tas2781 driver.
Tas2118, tas2x20, tas257x have no on-chip DSP, tas582x have on-chip
DSP but have no calibration required stereo smart amplifier.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-09 08:42:50 +02:00
Alex Tran
06aba2126b
ASoC: codecs: tlv320dac33: Remove unused struct tlv320dac33_platform_data and header file tlv320dac33-plat.h
Remove the tlv320dac33_platform_data struct and header file
tlv320dac33-plat.h as they are not used anywhere in the kernel
or outside this driver.

Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
Message-ID: <20250901184008.1249535-3-alex.t.tran@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-08 16:33:30 +01:00
Joris Verhaegen
2c92e2fbe9 ALSA: compress_offload: Add 64-bit safe timestamp infrastructure
The copied_total field in struct snd_compr_tstamp is a 32-bit
value that can overflow on long-running high-bitrate streams,
leading to incorrect calculations for buffer availablility.

This patch adds a 64-bit safe timestamping mechanism.
A new UAPI struct, snd_compr_tstamp64, is added which uses 64-bit
types for byte counters. The relevant ops structures across the
ASoC and core compress code are updated to use this new struct.
ASoC drivers are updated to use u64 counters.

Internal timestamps being u64 now, a compatibility function is added
to convert the 64-bit timestamp back to the 32-bit format for legacy
ioctl callers.

Reviewed-by: Miller Liang <millerliang@google.com>
Tested-by: Joris Verhaegen <verhaegen@google.com>
Signed-off-by: Joris Verhaegen <verhaegen@google.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250905091301.2711705-2-verhaegen@google.com
2025-09-08 09:33:24 +02:00
Mark Brown
bfa4d097f2
More minor SDCA bug fixes
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:

Just some minor SDCA bug fixes and some minor structure reordering to
improve the padding.
2025-09-04 19:31:51 +01:00
Charles Keepax
ec630c2c8c
ASoC: SDCA: Reorder members of hide struct to remove holes
Remove some padding holes in the sdca_entity_hide struct by reordering
the members.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Message-ID: <20250820163717.1095846-4-ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-04 12:53:07 +01:00
Maciej Strozek
28edfaa10c
ASoC: SDCA: Add quirk for incorrect function types for 3 systems
Certain systems have CS42L43 DisCo that claims to conform to version 0.6.28
but uses the function types from the 1.0 spec. Add a quirk as a workaround.

Closes: https://github.com/thesofproject/linux/issues/5515
Cc: stable@vger.kernel.org
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250901151518.3197941-1-mstrozek@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-02 10:50:29 +01:00
Kuninori Morimoto
8a9772ec08
ASoC: soc-dapm: rename snd_soc_kcontrol_component() to snd_soc_kcontrol_to_component()
We have 2 similar functions, both converts date from snd_kcontrol to
snd_soc_component.

(A)	snd_soc_kcontrol_component()
(B)	snd_soc_dapm_kcontrol_component()

(A) is just wrapper for snd_kcontrol_chip().
(B) is for more complex conversion.

Having similar functions is confusable. So (A) will be replaced to
original snd_kcontrol_chip(). (B) will be stay, but the function
name should be xx_to_xx().

And it is defined at soc-component.h. It should be implemented at
soc-dapm.c.

This patch renames it to snd_soc_dapm_kcontrol_to_component(), and
move to soc-dapm.c.

This patch keeps compatible by using define, but old name will be replaced
on each drivers and removed from ASoC in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/871poyy53x.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-01 13:37:59 +01:00
Kuninori Morimoto
f6883f0f03
ASoC: soc-dapm: rename dapm_kcontrol_get_value() to snd_soc_dapm_kcontrol_get_value()
dapm_kcontrol_get_value() is global function, adds snd_soc_ prefix

This patch keeps compatible by using define, but old name will be replaced
on each drivers and removed from ASoC in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87349ey546.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-01 13:37:58 +01:00
Kuninori Morimoto
2532041865
ASoC: soc-dapm: rename snd_soc_dapm_kcontrol_dapm() to snd_soc_dapm_kcontrol_to_dapm()
snd_soc_dapm_kcontrol_dapm() is unclear naming, rename it to
snd_soc_dapm_kcontrol_to_dapm(). This is prepare for dapm cleanup.

This patch keeps compatible by using define, but old name will be replaced
on each drivers and removed from ASoC in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/874ituy54c.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-01 13:37:57 +01:00
Kuninori Morimoto
bbf7a84787
ASoC: soc-dapm: rename snd_soc_dapm_kcontrol_widget() to snd_soc_dapm_kcontrol_to_widget()
snd_soc_dapm_kcontrol_widget() is unclear naming, rename it to
snd_soc_dapm_kcontrol_to_widget(). This is prepare for dapm cleanup.

This patch keeps compatible by using define, but old name will be replaced
on each drivers and removed from ASoC in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/875xeay54j.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-09-01 13:37:56 +01:00
Takashi Iwai
826f35b829 ALSA: synth: Use guard() for preset locks
Define a macro for the preset locking/unlocking pairs for soundfont
using guard() macro as a further code cleanup.

The new macro is put in soundfont.h (and some function renames) along
with it for avoiding unnecessary troubles with clang.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829151335.7342-6-tiwai@suse.de
2025-09-01 13:54:27 +02:00
Takashi Iwai
3abb538fff ALSA: gus: Use guard() for mutex locks
Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

As replaced with the guard(mutex), no longer used snd_gf1_mem_lock()
is dropped, too.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829145300.5460-8-tiwai@suse.de
2025-09-01 13:53:02 +02:00
Takashi Iwai
7c4a379e06 ALSA: emu10k1: Use guard() for emu1010 FPGA locking
The snd_emu1010_fpga_lock() and _unlock() call pairs can be simplified
gracefully with the introduction of guard().

Only code refactoring, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-28-tiwai@suse.de
2025-09-01 13:52:40 +02:00
Mark Brown
0e58316d6a
ASoC: SOF: sof-client-probes-ipc4: Query available
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

This series improves the IPC4 probes implementation by improving the
report quality and adds support for querying the available probes
on the firmware side.
2025-08-29 23:19:49 +01:00
Jyri Sarha
782d461317
ASoC: SOF: IPC4: Add GET macros for module id and module instance id
Add SOF_IPC4_MOD_INSTANCE_GET() and SOF_IPC4_MOD_ID_GET() for getting
the ids from ipc4 header presentation.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-ID: <20250829093022.32094-3-peter.ujfalusi@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-29 13:34:16 +02:00
Takashi Iwai
a23160c879 ALSA: hda: Use auto cleanup macros for DSP loader locks
There are temporary DSP locking/unlocking patterns found in various
places, and those can be cleaned up nicely with the guard() macro
calling snd_hdac_dsp_lock() and *_unlock().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-7-tiwai@suse.de
2025-08-29 11:52:14 +02:00
Takashi Iwai
5d8c9c987f ALSA: hda: Introduce auto cleanup macros for PM
The temporary power up/down of the codec via snd_hda_power_up() and
_down() (or snd_hda_power_up_pm() and _down_pm()) is seen in various
places.  This patch introduces simple auto-cleanup macros for those
call patterns, so that the drivers don't have to call the
corresponding power-down calls explicitly.

Namely,
	err = snd_hda_power_up(codec);
	if (err < 0)
		return err;
	....
	snd_power_down(codec);

can drop the *_down() call by replacing with
	CLASS(snd_hda_power, pm)(codec);
	if (pm.err < 0)
		return pm.err;

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-2-tiwai@suse.de
2025-08-29 11:52:13 +02:00
Mark Brown
f43095de82
ASoC: renesas: msiof: Make small adjustments to avoid
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Current Renesas MSIOF get unknown error when first used.
This patch-set will fixup this issue.
2025-08-28 21:44:52 +02:00
Takashi Iwai
8ea3449574 Merge branch 'for-linus' into for-next 2025-08-21 17:10:48 +02:00
Takashi Iwai
279eb50aa8 ASoC: Fixes for v6.17
A few fixes that came in during the past week, there's some updates for
 the CS35L56 which adjust the driver for production silicon and a fix for
 buggy resume of the ES9389.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmimWXAACgkQJNaLcl1U
 h9BGKAf+MczirBmF8BaLvCYqWRWmqhSMuNsKibzl8E3Acf2/NHhX1sdKsqOPss4L
 Lje68EfywFP8U8/iARv6Aiijm1oIpF6C6U5GAd5ArInfmkIgITGF+OYObAmZdVbm
 7NX8xSk4KgwCzZOv+3JG34wECmVtXrBnNpd7/Bo+RM+xxcxyUVUFcdMPuoUQvef9
 Jc2cRDn9N9Lo7qi9DgXaBBH/cW4cgic1+CWEmoxSMtQJ1hXaxgaRYskfb5j4Sb1f
 w1Lhw46eMMuTOkKQ1G8sJ0zqM/bS8ZkT0IFSSNDSRXXpLThPj/fNBjxYYBM01brG
 r0shD5ju/2OgS13wWMPkfijzaU5dWw==
 =nURg
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v6.17

A few fixes that came in during the past week, there's some updates for
the CS35L56 which adjust the driver for production silicon and a fix for
buggy resume of the ES9389.
2025-08-21 09:02:28 +02:00
Richard Fitzgerald
8dadc11b67
ASoC: cs35l56: Handle new algorithms IDs for CS35L63
CS35L63 uses different algorithm IDs from CS35L56.
Add a new mechanism to handle different alg IDs between parts in the
CS35L56 driver.

Fixes: 978858791ced ("ASoC: cs35l56: Add initial support for CS35L63 for I2C and SoundWire")

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20250820142209.127575-3-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-20 15:27:01 +01:00
Stefan Binding
f135fb24ef
ASoC: cs35l56: Update Firmware Addresses for CS35L63 for production silicon
Production silicon for CS36L63 has some small differences compared to
pre-production silicon. Update firmware addresses, which are different.

No product was ever released with pre-production silicon so there is no
need for the driver to include support for it.

Fixes: 978858791ced ("ASoC: cs35l56: Add initial support for CS35L63 for I2C and SoundWire")

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://patch.msgid.link/20250820142209.127575-2-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-20 15:27:00 +01:00
Shenghao Ding
c0ed3c2edc ALSA: hda/tas2781: Add name prefix tas2781 for tas2781's dvc_tlv and amp_vol_tlv
With some new devices adding into the driver, dvc_tlv and amp_vol_tlv will
cause confusion for customers on which devices they support.

Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>

Link: https://patch.msgid.link/20250816042741.1659-1-shenghao-ding@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-08-18 11:10:57 +02:00
Thorsten Blum
c308bb4190 ALSA: hda: Use min() to simplify snd_hda_get_devices()
Use min() to simplify snd_hda_get_devices() and improve its readability.

Change the function parameter 'max_devices' from 'int' to 'unsigned int'
to avoid a min() signedness error. Update all related local variables
and the function's return type to 'unsigned int' accordingly.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250813205507.215658-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-08-14 08:39:54 +02:00
Mark Brown
3a9c44f953
ASoC: unpack snd_soc_component_xxx_bias_level()
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

This is prepare patch for it.
2025-08-12 16:30:05 +01:00
Baojun Xu
f4ee43ae6e ALSA: hda: Add TAS5825 support
Add TAS5825 support in TI's HDA driver.
TAS5825 is an on-chip DSP, but no calibration is required,
and no global address support smart amplifier devices.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250810122358.1575-1-baojun.xu@ti.com
2025-08-11 09:13:42 +02:00
Shenghao Ding
e83dcd139e ASoC: tas2781: Add keyword "init" in profile section
Since version 0x105, the keyword 'init' was introduced into the profile,
which is used for chip initialization, particularly to store common
settings for other non-initialization profiles.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20250803131110.1443-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-10 21:09:13 +01:00
Chancel Liu
32dffd4c3e ASoC: dmaengine_pcm: Add port_window_size to DAI dma data struct
The port_window_size is a struct member of dma slave channel runtime
config. It's the length of the register area in words the data need to
be accessed on the device side. It is only used for devices which is
using an area instead of a single register to send or receive the data.
Typically the DMA loops in this area in order to transfer the data.

It's useful for cases that reading/writing multiple registers in DMA
transactions.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20250808061741.187414-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-10 21:09:12 +01:00
Kuninori Morimoto
cf25eb8eae
ASoC: soc-component: unpack snd_soc_component_init_bias_level()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

This patch unpack component wrapper to cleanup it.

This patch keeps compatible by using define, but old name will be replaced
on each drivers and removed from ASoC in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87y0rx6oyx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-10 21:08:55 +01:00
Kuninori Morimoto
7509e7e428
ASoC: soc-component: unpack snd_soc_component_get_bias_level()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

This patch unpack component wrapper to cleanup it.

The function will be kept by using macro for a while, but will be
replaced/cleanuped in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87zfcd6oz0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-10 21:08:54 +01:00
Kuninori Morimoto
7b900b5878
ASoC: soc-component: unpack snd_soc_component_force_bias_level()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

This patch unpack component wrapper to cleanup it.

The function will be kept by using macro for a while, but will be
replaced/cleanuped in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/871ppp83jk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-10 21:08:53 +01:00