Commit Graph

1461773 Commits

Author SHA1 Message Date
Kuninori Morimoto
7ffb66fd96
ASoC: mediatek: mt8173-rt5650: tidyup error message
mt8173_rt5650_dev_probe() has strange error message

=>	ret = device_property_read_u32(...);
	      ^^^^^^^^^^^^^^^^^^^^^^^^
	if (ret)
=>		dev_err(... "%s snd_soc_register_card fail %d\n", ...);
				^^^^^^^^^^^^^^^^^^^^^

It should be "device_property_read_u32() fail". Fix it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/875x2zcjxn.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-01 14:56:18 +01:00
David Heidelberg
bff7fad101
ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema
Convert CS35L36 Speaker Amplifier to yaml.

Changes:
 - maintainers email to the generic Cirrus email
 - Both the codec and downstream worked just fine without
   VP-supply provided. Align with datasheet for similar models.
 - add dai-common.yaml to cover for '#sound-dai-cells',
   'sound-name-prefix'
 - updated not yet implemented:
     cirrus,weak-fet-delay -> cirrus,classh-wk-fet-delay-ms
       (in both definition and example)
     cirrus,weak-fet-thld -> cirrus,weak-fet-thld-millivolt
       (only in the example)
 - added two required properties:
     cirrus,boost-ctl-millivolt
     cirrus,boost-peak-milliamp

Assisted-by: OpenAI:gpt-4
Reviewed-by: David Rhodes <David.Rhodes@cirrus.com>
Co-developed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20260624-dt-cirrus-cs35l36-v3-1-ec451d5a2908@ixit.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-30 19:45:07 +01:00
Rosen Penev
ae2e2f1ff1
ASoC: mediatek: mt2701: add COMPILE_TEST
Enable COMPILE_TEST for mt2701 to get extra build coverage as done with
other mediatek platforms.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260630013024.1500623-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-30 19:36:47 +01:00
Narasimharao Vadlamudi
3848617c64
ASoC: renesas: fsi: Propagate platform_get_irq() errors
platform_get_irq() returns a positive IRQ number on success and a
negative error code on failure. It no longer returns zero. The driver
currently stores the return value in an unsigned int and returns -ENODEV
for all failures, which loses useful errors such as -EPROBE_DEFER.

Store the IRQ in an int and return the error from platform_get_irq()
directly.

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Narasimharao Vadlamudi <ahmisaranrao@gmail.com>
Link: https://patch.msgid.link/20260630171333.36396-1-ahmisaranrao@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-30 19:36:04 +01:00
Julian Braha
2f82d58a87
ASoC: codecs: cleanup kconfig indentations
Cleanup various bad indentations in the kconfig:
1. spaces instead of tabs (this file mostly uses tabs)
2. too much indentation
3. not enough indentation

Signed-off-by: Julian Braha <julianbraha@gmail.com>
Link: https://patch.msgid.link/20260630085249.380365-1-julianbraha@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-30 19:17:53 +01:00
Mark Brown
ec34e1acaf
ASoC: sdw_utils: tidyup functions
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> says:

I will post DAI/Component/Card capsuling patch, but
current code makes old style / new style conversion difficult.
To make future conversions easier to understand, this patch clean up the
code a little. but no functional change.

Link: https://patch.msgid.link/87ldc1etyp.wl-kuninori.morimoto.gx@renesas.com
2026-06-30 14:23:04 +01:00
Kuninori Morimoto
a1332be2a0
ASoC: sdw_utils: tidyup asoc_sdw_parse_sdw_endpoints()
We can avoid to use *card. Tidyup it.

Current code makes old style / new style conversion difficult.
To make future conversions easier to understand, this patch clean up the
code a little. but no functional change.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/87ik75etxw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-30 14:23:03 +01:00
Kuninori Morimoto
c97f0bf5f7
ASoC: sdw_utils: tidyup .count_sidecar
count_sidecar() is not using *card. Tidyup it.

Current code makes old style / new style conversion difficult.
To make future conversions easier to understand, this patch clean up the
code a little. but no functional change.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/87jyrlety1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-30 14:23:02 +01:00
Kuninori Morimoto
b2133ca33e
ASoC: au1x: psc-ac97: remove unused chans
chans is not used in au1xpsc_ac97_hw_params(). Remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87y0g2ds7c.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-30 12:25:05 +01:00
Mark Brown
c7852d2dcf
ASoC: meson: aiu: align I2S design to the AXG one
Valerio Setti <vsetti@baylibre.com> says:

The goal of this series is to reshape Amlogic GX's AIU implementation for
I2S to let it follow the same design as in AXG's TDM. Keeping the same
design allows for unifying the two platform implementations in the future
and it also allows for an easy addition of I2S input.

The first commit introduces gx-formatter as the basic block which takes
care of properly formatting audio data. Formatters are DAPM widgets
(c.f. axg-tdm-formatter in AXG) which are dynamically attached/detached
to the streams when the latters starts/stop, respectively.
aiu-formatter-i2s is introduced as formatter implementation for the i2s
output.

By the end aiu-encoder-i2s will only need to handle interface clocks and
enforce interface wide rate symmetry (c.f axg-tdm-interface on the AXG
platform). Right now rate symmetry is not relevant because only i2s output
is supported, but it will become useful when following patch series will
introduce the i2s input part.

This series was tested on an OdroidC2 board (Amlogic S905 SOC) both with
HDMI output and with NXP SGTL5000 codec connected to the I2S pins.
This series was also verified using "pcm-test" test tool and all tests
are passing.

[1]: https://sashiko.dev/#/patchset/20260515-reshape-aiu-as-axg-v1-0-53b457784ff3%40baylibre.com

Link: https://patch.msgid.link/20260610-reshape-aiu-as-axg-v2-0-cac3663a8b51@baylibre.com
2026-06-29 19:43:31 +01:00
Valerio Setti
83b83024cd
ASoC: meson: aiu: use aiu-formatter-i2s to format I2S output data
Create a new DAPM widget for "I2S formatter" and place it on the path
between FIFO and output DAI interface. Remove I2S output formatting code
from aiu-encoder-i2s since it's now implemented from aiu-formatter-i2s.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20260610-reshape-aiu-as-axg-v2-4-cac3663a8b51@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:43:29 +01:00
Valerio Setti
2cbb32d8dc
ASoC: meson: aiu: introduce I2S output formatter
Introduce aiu-formatter-i2s, a gx_formatter implementation for the AIU I2S
playback path. This is going to replace data formatting tasks that are
currently being implemented in aiu-encoder-i2s.

This should ideally follow the same design pattern used on the AXG
platform (see axg-tdmout), where basically the widget/formatter corresponds
to a single audio component. This is not possible in the GX platform though
because all the features are currently implemented in the AIU audio
component and changing that would require backward incompatible
device-tree changes.

Therefore aiu-formatter-i2s is kept very simple and
it only implements the bare minimum functionalities to provide I2S
playback formatting. It's not a standalone component though because this
is still belongs to AIU.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20260610-reshape-aiu-as-axg-v2-3-cac3663a8b51@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:43:28 +01:00
Valerio Setti
9335117a22
ASoC: meson: aiu-encoder-i2s: prepare for multiple streams
aiu-encoder-i2s is going to be the interface that handles both playback
and capture, so this commit does all the required changes to prepare
for that since so far it only handled playback:
- probe/remove functions are added to allocate/free per stream data,
  respectively.
- 'struc gx_iface' and 'struct gx_stream' are used to store interface or
  stream associated data, respecively.
- interface wide rate symmetry is enforced.
- quirks on bclk are also enforced if/when necessary.

Clock-wise instead of bulk enabling all the clocks on startup and disabling
them on shutdown, only the peripheral's internal ones are enabled/disabled
in those functions, whereas MCLK and I2S clock divider are handled in
prepare/hw_free.

Finally a trigger() callback is also added to start/stop the associated
I2S data formatter.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20260610-reshape-aiu-as-axg-v2-2-cac3663a8b51@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:43:27 +01:00
Valerio Setti
a295be8d62
ASoC: meson: gx: add gx-formatter and gx-interface
These files are the basic block which allow to shape I2S in GX devices
the same as the AXG ones: the DAI backend only controls the interface
(i.e. clocks and pins) whereas a formatter takes care of properly
formatting the data.

gx-formatter and gx-interface are strongly inspired to axg-tdm-formatter
and axg-tdm, respectively. The long term plan is to join the two platforms
to use the same formatter solution.

There is only a minor addition here compared to what has been done for
AXG and it's "gx_formatter_create()" which is required in order to let
already existing AIU code to make use of this formatter without making any
devicetree change.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20260610-reshape-aiu-as-axg-v2-1-cac3663a8b51@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:43:26 +01:00
Mark Brown
28f4d2a9d1
ASoC: rt5677: add GPIO get_direction and enable standalone compilation
Diogo Ivo <diogo.ivo@bootlin.com> says:

This small series fixes two issues in the RT5677 ASoC codec driver:

- Patch 1 adds the missing GPIO .get_direction() callback, allowing
  the direction of GPIO pins to be queried.

- Patch 2 makes the Kconfig option user-visible so the driver can be
  built standalone for example when using generic audio-graph-card
  bindings, which do not pull in specific codec drivers via select/imply.

Link: https://patch.msgid.link/20260620-smaug-audio-v1-0-e318acdf5abd@bootlin.com
2026-06-29 19:41:10 +01:00
Diogo Ivo
a5edc45d9c
ASoC: rt5677: Enable standalone compilation for generic card use
Add a prompt string to make the RT5677 driver user-selectable, allowing
it to be built independently for use with generic sound card bindings.

Signed-off-by: Diogo Ivo <diogo.ivo@bootlin.com>
Link: https://patch.msgid.link/20260620-smaug-audio-v1-2-e318acdf5abd@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:41:08 +01:00
Diogo Ivo
99e361b2a5
ASoC: rt5677: Add GPIO .get_direction() callback
Implement the get_direction callback for the GPIO controller to allow
consumers to query the direction of GPIO pins.

Signed-off-by: Diogo Ivo <diogo.ivo@bootlin.com>
Link: https://patch.msgid.link/20260620-smaug-audio-v1-1-e318acdf5abd@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:41:07 +01:00
Shuming Fan
d79828f380
ASoC: rt1321: add support for rt1321 VA1/VA2
This patch adds support for the RT1321 VA1 and VA2 amplifier.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20260622091149.2183334-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:36:05 +01:00
Shuming Fan
84eb7c8e59
ASoC: rt1321: move DSP status checking into a helper function
This patch creates the rt1320_dspfw_status helper function to check DSP status.
The new function can be reused by other functions and supports checking the DSP status
across different amplifiers.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20260622091139.2183297-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:36:04 +01:00
Mark Brown
3d8afb7b93
ASoC: Intel: Convert locking to guard()/scoped_guard()
bui duc phuc <phucduc.bui@gmail.com> says:

This series converts mutex and spinlock handling in Intel ASoC drivers
to use guard()/scoped_guard() helpers.

Most changes are straightforward conversions intended to simplify lock
handling and cleanup paths, with no intended functional changes.

The series has been compile-tested only.

Link: https://patch.msgid.link/20260626082904.32344-1-phucduc.bui@gmail.com
2026-06-29 19:22:03 +01:00
bui duc phuc
08d2d5e683
ASoC: Intel: atom: Use scoped_guard() for scoped locking
Clean up the code using scoped_guard() for mutex locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260626082904.32344-6-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:22:01 +01:00
bui duc phuc
71c0f725d3
ASoC: Intel: atom: Use guard() for locking
Clean up the code using guard() for spin & mutex locks.
Merely code refactoring, and no behavior change.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260626082904.32344-5-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:21:53 +01:00
bui duc phuc
4889a8a73f
ASoC: intel: atom: Use __free(kfree) for stream pointer
Declare 'stream' with __free(kfree) so it is automatically freed when
leaving scope. This allows direct returns from error paths and removes
the explicit kfree(stream) call.
Set 'stream' to NULL after ownership has been transferred to
runtime->private_data to prevent it from being freed on the success path.

This cleanup is a preparation step for upcoming locking changes.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260626082904.32344-4-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:21:51 +01:00
bui duc phuc
6aaac9f6ba
ASoC: Intel: avs: Use scoped_guard() for scoped locking
Clean up the code using scoped_guard() for mutex & spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260626082904.32344-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:21:50 +01:00
bui duc phuc
f16513ffa9
ASoC: Intel: avs: Use guard() for locking
Clean up the code using guard() for spin & mutex locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260626082904.32344-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:21:49 +01:00
Mark Brown
9cdb8f53be
ASoC: fsl: Use guard() for mutex & spin locks
bui duc phuc <phucduc.bui@gmail.com> says:

This series converts mutex and spinlock handling in the FSL sound drivers
to use guard() helpers.
The changes are code cleanup only and should have no functional impact.

Compile tested only.

Link: https://patch.msgid.link/20260615093824.115751-1-phucduc.bui@gmail.com
2026-06-29 19:19:04 +01:00
bui duc phuc
8a2d7e4631
ASoC: fsl: mpc5200_psc_ac97: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260615093824.115751-12-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:19:01 +01:00
bui duc phuc
caed9fb2e4
ASoC: fsl: mpc5200_dma: Use guard() for spin locks
Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260615093824.115751-11-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:18:55 +01:00
bui duc phuc
11ce4dd4e7
ASoC: fsl_rpmsg: Use guard() for mutex & spin locks
Clean up the code using guard() for mutex & spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260615093824.115751-10-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:18:53 +01:00
bui duc phuc
929d412fdb
ASoC: imx-audio-rpmsg: Use guard() for spin locks
Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260615093824.115751-9-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:18:52 +01:00
bui duc phuc
94b0cb1dd6
ASoC: fsl_xcvr: Use guard() for spin locks
Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260615093824.115751-8-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:18:50 +01:00
bui duc phuc
4d748e7082
ASoC: fsl_ssi: Use guard() for mutex locks
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260615093824.115751-7-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:18:49 +01:00
bui duc phuc
a1b865cff2
ASoC: fsl_spdif: Use guard() for spin locks
Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260615093824.115751-6-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:18:48 +01:00
bui duc phuc
cb87bdabd3
ASoC: fsl_esai: Use guard() for spin locks
Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260615093824.115751-5-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:18:47 +01:00
bui duc phuc
48d84310be
ASoC: fsl_easrc: Use guard() for spin locks
Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260615093824.115751-4-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:18:46 +01:00
bui duc phuc
58712476de
ASoC: fsl_audmix: Use guard() for spin locks
Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260615093824.115751-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:18:45 +01:00
bui duc phuc
d7e261b7ad
ASoC: fsl_asrc: Use guard() for spin locks
Clean up the code using guard() for spin locks.
Merely code refactoring, and no behavior change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260615093824.115751-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 19:18:44 +01:00
Shengjiu Wang
3359ba93d0
ASoC: fsl_audmix: rework runtime PM handling in probe
After pm_runtime_enable() the AUDMIX block is powered off and stays
suspended until the first runtime resume. Register writes issued between
probe() and the first resume (e.g. from DAPM or ALSA control paths)
target unpowered hardware and cause a system hang.

Fix this by calling pm_runtime_resume_and_get() immediately after
pm_runtime_enable() to power the hardware up and enable its clocks.
Release the reference afterwards with pm_runtime_put() to allow the
runtime PM framework to suspend the device and switch the regmap to
cache-only mode when idle.

When CONFIG_PM is disabled or runtime PM is not enabled, pm_runtime_*
calls are stubs that do not power up the hardware. Handle this case
explicitly by calling fsl_audmix_runtime_resume() directly so the
hardware is always initialised and its clocks are enabled, ensuring
register accesses succeed regardless of PM configuration.

Fixes: be1df61cf0 ("ASoC: fsl: Add Audio Mixer CPU DAI driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20260618023818.31618-1-shengjiu.wang@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:56:20 +01:00
Haoxiang Li
785903b777
ASoC: hdac_hdmi: Fix resource cleanup on probe failure
hdac_hdmi_dev_probe() gets the HDA link before allocating and
initializing the HDMI codec private data. Several later error
paths return directly without dropping the link reference,
leaving the hlink refcount unbalanced.

Release the link reference on probe failures. Also turn display
power off if the failure happens after it has been enabled.

This issue was dicussed in:
https://lore.kernel.org/all/s5h1s0esk8o.wl-tiwai@suse.de/
I think the paths fixed here are probe failure paths: the device
has not been fully initialized or bound, and runtime PM suspend
cannot be relied on to balance the reference taken during probe.

Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Link: https://patch.msgid.link/20260622151127.1198196-1-haoxiang_li2024@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:53:34 +01:00
Kuninori Morimoto
2e5bf7f48b
ASoC: codecs: max98090: add missing describe "data" for max98090_set_jack()
"data" is missing. Add it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87zf0ids7p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:52:43 +01:00
Haoxiang Li
6ad4892c4f
ASoC: hdac_hda: Fix hlink refcount leak on component registration failure
hdac_hda_dev_probe() gets the HDA link with snd_hdac_ext_bus_link_get()
before registering the ASoC component. If component registration fails,
the function returns without dropping the link reference.

Always call snd_hdac_ext_bus_link_put() after the registration attempt so
the reference taken during probe is balanced on both success and failure.

Fixes: 6bae5ea949 ("ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Link: https://patch.msgid.link/20260622145645.1184986-1-haoxiang_li2024@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:51:28 +01:00
Haoxiang Li
016f29997e
AsoC: intel: sst: fix PCI device reference leak on probe failure
intel_sst_probe() takes a reference to the PCI device with pci_dev_get().
If sst_platform_get_resources() fails afterwards, the probe error path
cleans up the driver context but does not drop the PCI device reference.

Add a pci_dev_put() error path for failures after pci_dev_get().

Fixes: f533a035e4 ("ASoC: Intel: mrfld - create separate module for pci part")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Link: https://patch.msgid.link/20260622091620.897478-1-haoxiang_li2024@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:49:37 +01:00
Haoxiang Li
3a89ddcf0c
ASoC: fsl: mpc5200-i2s: Free DMA resources on probe failure
mpc5200_audio_dma_create() creates the DMA resources before registering
the component. If snd_soc_register_component() fails, the function
returns directly and leaves the DMA resources allocated.

Call mpc5200_audio_dma_destroy() before returning from this error path.

Fixes: f515b67381 ("ASoC: fsl: mpc5200 combine psc_dma platform data")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Link: https://patch.msgid.link/20260622094822.926166-1-haoxiang_li2024@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:48:09 +01:00
Runyu Xiao
612ccf42ac
ASoC: rt700-sdw: always drain jack work on remove
rt700_sdw_remove() drains jack_detect_work and jack_btn_check_work only
when rt700->hw_init is true. That state bit is cleared by
rt700_update_status() when the SoundWire slave becomes UNATTACHED, but a
jack work item can already have been queued by rt700_interrupt_callback()
or rt700_jack_init() while the device was initialized.

Do not use hw_init as the remove-time guard for draining these work
objects. The delayed works are initialized during rt700_init(), so remove
can cancel them unconditionally and pair the object lifetime with the
codec-private data lifetime instead of a mutable hardware state bit.

This issue was found by our static analysis tool and then confirmed by
manual review of the SoundWire status, interrupt and remove paths. The
remove path should drain work based on whether the work object exists, not
on a runtime hardware state bit that can change after the work was queued.

A QEMU PoC queued jack_detect_work, simulated SDW_SLAVE_UNATTACHED, and
then entered remove. DEBUG_OBJECTS reported an active timer/work object
associated with the rt700 jack work path after remove skipped the cancel.

This is sent as an RFC because the practical trigger depends on SoundWire
core remove ordering after an UNATTACHED status update. If remove cannot
run after hw_init has been cleared while jack work is still pending, this
is a defensive lifecycle cleanup rather than a reachable race on current
systems.

Fixes: 737ee8bdf6 ("ASoC: rt700-sdw: use cancel_work_sync() in .remove as well as .suspend")
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Link: https://patch.msgid.link/20260619122325.2504287-1-runyu.xiao@seu.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:45:54 +01:00
Markus Elfring
a33e6fa400
ASoC: SOF: topology: Use more common error handling code in sof_link_load()
Use an additional label so that a bit of exception handling can be better
reused at the end of this function implementation.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Link: https://patch.msgid.link/40b93192-68d2-4de1-845b-9c9ba994a75b@web.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:35:11 +01:00
Luca Leonardo Scorcia
012dfa0c45
ASoC: dt-bindings: mtk-btcvsd-snd: Convert to DT Schema
Convert the mtk-btcvsd-snd.txt DT binding to DT Schema format.

Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260615185810.11804-1-l.scorcia@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:31:34 +01:00
Bard Liao
e9f08e7799
ASoC: SOF: add Intel UAOL sof_ipc_dai_type
The type will be used for Intel USB Audio Offload Link (UAOL) DAI.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260615134439.1044872-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:30:33 +01:00
Pengpeng Hou
ae375f8d06
ASoC: tlv320aic26: remove keyclick sysfs file
aic26_probe() creates the keyclick sysfs file on the component device.
The file callback uses the ASoC component pointer stored in the driver
private data.

There is no matching remove callback, so the sysfs file can remain after
the component is removed while its backing component state is gone.

Add a component remove callback that removes the keyclick file.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260615064549.34110-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:29:39 +01:00
Pengpeng Hou
ce3733792d
ASoC: sma1303: remove fault-check sysfs group on remove
sma1303_i2c_probe() creates a sysfs group that exposes the fault-check
controls. The check_fault_status store callback can queue
check_fault_work.

sma1303_i2c_remove() only cancels the delayed work. It does not remove
the sysfs group, so the controls can remain published after remove while
their callbacks still use the driver data and can queue the work again.

Remove the sysfs group before cancelling the delayed work.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260615064456.28615-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:28:47 +01:00
bui duc phuc
6ed013a581
ASoC: meson: Use dev_err_probe() for device reset failures
device_reset() may return -EPROBE_DEFER. Switch to dev_err_probe() so
probe failures are reported consistently and deferred probing is handled
properly.
This matches the existing pattern used in aiu_probe().
No functional change intended.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260612020113.9557-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-06-29 18:21:09 +01:00