]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
6 weeks agoALSA: usb-audio: improve module param quirk_flags
Cryolitia PukNgae [Sun, 28 Sep 2025 03:08:00 +0000 (11:08 +0800)]
ALSA: usb-audio: improve module param quirk_flags

It accepts strings like `VID:PID:quirk_flag_name1|quirk_flag_name2;...`
from now on, so that we can use it to debug USB audio devices more
intuitive and flexible. The compatibility of previous form is kept.

Co-developed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 weeks agoALSA: usb-audio: add two-way convert between name and bit for QUIRK_FLAG_*
Cryolitia PukNgae [Sun, 28 Sep 2025 03:07:59 +0000 (11:07 +0800)]
ALSA: usb-audio: add two-way convert between name and bit for QUIRK_FLAG_*

Define quirk flags enum and its name.

Add helper for converting between quirk flags' name and bit.
  - snd_usb_quirk_flag_find_name()
  - snd_usb_quirk_flags_from_name()

Add helper for printing debug: log snd_usb_apply_flag_dbg()

Co-developed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 weeks agoMerge branch 'for-linus' into for-next
Takashi Iwai [Sun, 28 Sep 2025 06:34:58 +0000 (08:34 +0200)]
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>
6 weeks agoALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free
Jeongjun Park [Sat, 27 Sep 2025 17:39:24 +0000 (02:39 +0900)]
ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free

The previous commit 0718a78f6a9f ("ALSA: usb-audio: Kill timer properly at
removal") patched a UAF issue caused by the error timer.

However, because the error timer kill added in this patch occurs after the
endpoint delete, a race condition to UAF still occurs, albeit rarely.

Additionally, since kill-cleanup for urb is also missing, freed memory can
be accessed in interrupt context related to urb, which can cause UAF.

Therefore, to prevent this, error timer and urb must be killed before
freeing the heap memory.

Cc: <stable@vger.kernel.org>
Reported-by: syzbot+f02665daa2abeef4a947@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=f02665daa2abeef4a947
Fixes: 0718a78f6a9f ("ALSA: usb-audio: Kill timer properly at removal")
Signed-off-by: Jeongjun Park <aha310510@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 weeks agoALSA: usb-audio: add mono main switch to Presonus S1824c
Roy Vegard Ovesen [Sat, 27 Sep 2025 15:27:30 +0000 (17:27 +0200)]
ALSA: usb-audio: add mono main switch to Presonus S1824c

The 1824c does not have the A/B switch that the 1810c has,
but instead it has a mono main switch that sums the two
main output channels to mono.

Signed-off-by: Roy Vegard Ovesen <roy.vegard.ovesen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 weeks agoALSA: compress: document 'chan_map' member in snd_dec_opus
Kriish Sharma [Sat, 27 Sep 2025 14:27:08 +0000 (14:27 +0000)]
ALSA: compress: document 'chan_map' member in snd_dec_opus

When building kernel docs, the following warning appeared:

  WARNING: ./include/uapi/sound/compress_params.h:364
  struct member 'chan_map' not described in 'snd_dec_opus'

The inline struct 'snd_dec_opus_ch_map' inside 'snd_dec_opus' was not
properly documented. This patch documents the 'chan_map' member and its
fields (stream_count, coupled_count, channel_map), resolving the warning.

Fixes: 5d36370f3431 ("ALSA: compress: add raw opus codec define and opus decoder structs")
Suggested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Kriish Sharma <kriish.sharma2006@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 weeks agoASoC: cs35l56: Add support for CS35L56 B2 silicon
Richard Fitzgerald [Tue, 23 Sep 2025 13:03:26 +0000 (14:03 +0100)]
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>
6 weeks agoASoC: cs35l56: Set fw_regs table after getting REVID
Richard Fitzgerald [Tue, 23 Sep 2025 13:03:25 +0000 (14:03 +0100)]
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>
6 weeks agoALSA: hda/realtek: Add quirk for HP Spectre 14t-ea100
Takashi Iwai [Sat, 27 Sep 2025 09:47:23 +0000 (11:47 +0200)]
ALSA: hda/realtek: Add quirk for HP Spectre 14t-ea100

HP-Spectre 14t-ea100 model has no speaker output unless booting
previously from Windows on dual boot, a reboot while on Linux will
stop the speakers working.  Applying the existing quirk for HP Spectre
X360 EU0xxx seems fixing this speaker problem.

Reported-by: Kaden Berger <kadenb816@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/aMxdGAmfOQ6VPNU8@archlinux
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 weeks agoALSA: usb-audio: don't apply interface quirk to Presonus S1824c
Roy Vegard Ovesen [Mon, 22 Sep 2025 18:54:10 +0000 (20:54 +0200)]
ALSA: usb-audio: don't apply interface quirk to Presonus S1824c

Testing with a Presonus STUDIO 1824c together with
a Behringer ultragain digital ADAT device shows that
using all 3 altno settings works fine.

When selecting sample rate, the driver sets the interface
to the correct altno setting and the correct number of
channels is set.

Selecting the correct altno setting via Ardour, Reaper or
whatever other way to set the sample rate is more convenient
than re-loading the driver module with device_setup to
set altno.

Signed-off-by: Roy Vegard Ovesen <roy.vegard.ovesen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoASoC: tas2781: Correct the wrong description and register address on tas2781
Baojun Xu [Sat, 20 Sep 2025 06:20:44 +0000 (14:20 +0800)]
ASoC: tas2781: Correct the wrong description and register address on tas2781

Correct the wrong description for TAS257X. Combined TAS5825 with TAS2563,
as they use the same register address and number.
Correct the register address and number for TAS5827.

Fixes: 7095d688de38 ("ASoC: tas2781: Add tas2118, tas2x20, tas5825 support")
Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoMerge tag 'asoc-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Sat, 20 Sep 2025 06:38:17 +0000 (08:38 +0200)]
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.

7 weeks agoASoC: fsl: fsl_qmc_audio: Reduce amount of
Mark Brown [Fri, 19 Sep 2025 20:23:48 +0000 (21:23 +0100)]
ASoC: fsl: fsl_qmc_audio: Reduce amount of

Merge series from Christophe Leroy <christophe.leroy@csgroup.eu>:

This is a RESEND of v3 sent one month ago, see:
https://lore.kernel.org/all/cover.1754993232.git.christophe.leroy@csgroup.eu/

This series reduces significantly the amount of interrupts on
fsl_qmc_audio device.

Patches 1 and 2 are preparatory patches.
Patch 3 is the main change
Patch 4 is a cleanup which is enabled by previous patch

7 weeks agoASoC: codecs: wcd93xxx: remove code duplication
Mark Brown [Fri, 19 Sep 2025 13:27:28 +0000 (14:27 +0100)]
ASoC: codecs: wcd93xxx: remove code duplication

Merge series from Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>:

All the Qualcomm WCD codecs and WCD based codecs have lots of code in
common, resulting in lot of duplicate code.
This series is an attempt to clean some of this by moving the common
code to wcd-common library or to soundwire helper functions.

Currently I have done cleanups for 4 codecs wcd934x, wcd937x, wcd938x
and wcd939x, however any new Qualcomm codecs can avoid this duplication
by using the wcd-common library.

I have also added two helpers of_sdw_find_device_by_node() and
sdw_slave_get_current_bank() in soundwire layer for the codecs to use them,
this series was already acked by Soundwire maintainer Vinod.

As original cleanup series was depending on the new soundwire interfaces
I have combined both the series as they are cleaning up code
duplications.

As am touching the same codec drivers, 2 bug fixes are also added at the
start of the series.

There is still lot of code that is duplicate, but this is just a
starting point for such cleanups.

I have tested this on T14s, any testing is appreciated.

7 weeks agoASoC: qcom: qdsp6/audioreach: add support for offloading raw opus playback
Alexey Klimov [Wed, 17 Sep 2025 07:32:52 +0000 (08:32 +0100)]
ASoC: qcom: qdsp6/audioreach: add support for offloading raw opus playback

Add support for OPUS module, OPUS format ID, media format payload struct
and make it all recognizable by audioreach compress playback path.

At this moment this only supports raw or plain OPUS packets not
encapsulated in container (for instance OGG container). For this usecase
each OPUS packet needs to be prepended with 4-bytes long length field
which is expected to be done by userspace applications. This is
Qualcomm DSP specific requirement.

Cc: Annemarie Porter <annemari@quicinc.com>
Cc: Vinod Koul <vkoul@kernel.org>
Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoALSA: compress_offload: increase SNDRV_COMPRESS_VERSION minor version by 1
Alexey Klimov [Wed, 17 Sep 2025 07:32:51 +0000 (08:32 +0100)]
ALSA: compress_offload: increase SNDRV_COMPRESS_VERSION minor version by 1

Since addition of raw opus codec support we need to update
compress API minor version by one.
Bump the SNDRV_COMPRESS_VERSION to 0.4.1.

Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoALSA: compress: add raw opus codec define and opus decoder structs
Alexey Klimov [Wed, 17 Sep 2025 07:32:50 +0000 (08:32 +0100)]
ALSA: compress: add raw opus codec define and opus decoder structs

Adds a raw opus codec define and raw opus decoder structs.
This is for raw OPUS packets not packed in any type of container
(for instance OGG container). The decoder struct fields are
taken from corresponding RFC document: RFC 7845 Section 5.

Cc: Srinivas Kandagatla <srini@kernel.org>
Cc: Vinod Koul <vkoul@kernel.org>
Co-developed-by: Annemarie Porter <annemari@quicinc.com>
Signed-off-by: Annemarie Porter <annemari@quicinc.com>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoASoC: soc-dapm: prepare for hiding struct
Mark Brown [Fri, 19 Sep 2025 12:54:28 +0000 (13:54 +0100)]
ASoC: soc-dapm: prepare for hiding struct

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

We would like to hide struct snd_soc_dapm_context from driver. So we need
cleanup code  first. These are preparation for it.

7 weeks agoASoC: fsl: fsl_qmc_audio: Drop struct qmc_dai_chan
Christophe Leroy [Thu, 18 Sep 2025 15:34:11 +0000 (17:34 +0200)]
ASoC: fsl: fsl_qmc_audio: Drop struct qmc_dai_chan

prtd_tx and prtd_rx members are not used anymore and only qmc_chan
member remains so struct qmc_dai_chan has become pointless.

Use qmc_chan directly and drop struct qmc_dai_chan.

Acked-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://patch.msgid.link/9c729bbd9f1b61120a09a87fb76176ef344c5153.1758209158.git.christophe.leroy@csgroup.eu
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: fsl: fsl_qmc_audio: Only request completion on last channel
Christophe Leroy [Thu, 18 Sep 2025 15:34:10 +0000 (17:34 +0200)]
ASoC: fsl: fsl_qmc_audio: Only request completion on last channel

In non-interleaved mode, several QMC channels are used in sync.
More details can be found in commit 188d9cae5438 ("ASoC: fsl:
fsl_qmc_audio: Add support for non-interleaved mode.")
At the time being, an interrupt is requested on each channel to
perform capture/playback completion, allthough the completion is
really performed only once all channels have completed their work.

This leads to a lot more interrupts than really needed. Looking at
/proc/interrupts shows ~3800 interrupts per second when using
4 capture and 4 playback devices with 5ms periods while
only 1600 (200 x 4 + 200 x 4) periods are processed during one second.

The QMC channels work in sync, the one started first is the one
finishing first and the one started last is the one finishing last,
so when the last one finishes it is guaranteed that the other ones are
finished as well. Therefore only request completion processing on the
last QMC channel.

On my board with the above exemple, on a kernel started with
'threadirqs' option, the QMC irq thread uses 16% CPU time with this
patch while it uses 26% CPU time without this patch.

Acked-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://patch.msgid.link/bbd5167d190bbb45c3a4cd6ef2dece8817e0cc1e.1758209158.git.christophe.leroy@csgroup.eu
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: fsl: fsl_qmc_audio: Ensure audio channels are ordered in TDM bus
Christophe Leroy [Thu, 18 Sep 2025 15:34:09 +0000 (17:34 +0200)]
ASoC: fsl: fsl_qmc_audio: Ensure audio channels are ordered in TDM bus

To reduce complexity of interrupt handling in following patch, ensure
audio channels are configured in the same order as timeslots on the
TDM bus. If we need a given ordering of audio sources in the audio
frame, it is possible to re-order codecs on the TDM bus, no need to
mix up timeslots in channels.

Acked-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://patch.msgid.link/4ff40afdf3d032b05dd4af6c0f777d4d4b445a76.1758209158.git.christophe.leroy@csgroup.eu
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agosoc: fsl: qmc: Only set completion interrupt when needed
Christophe Leroy [Thu, 18 Sep 2025 15:34:08 +0000 (17:34 +0200)]
soc: fsl: qmc: Only set completion interrupt when needed

When no post-completion processing is expected, don't waste time
handling useless interrupts.

Only set QMC_BD_[R/T]X_I when a completion function is passed in,
and perform seamless completion on submit for interruptless buffers.

Acked-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://patch.msgid.link/40b41b53a26e77a50b3a5f68fcecc6f9a40a84b4.1758209158.git.christophe.leroy@csgroup.eu
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: da7213: Convert to DEFINE_RUNTIME_DEV_PM_OPS()
Geert Uytterhoeven [Thu, 4 Sep 2025 15:31:42 +0000 (17:31 +0200)]
ASoC: da7213: Convert to DEFINE_RUNTIME_DEV_PM_OPS()

Convert the Dialog DA7213 CODEC driver from an open-coded dev_pm_ops
structure to DEFINE_RUNTIME_DEV_PM_OPS(), to simplify the code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/0c001e0f7658c2d5f33faea963d6ca64f60ccea8.1756999876.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: qcom: sc8280xp: explicitly set S16LE format in sc8280xp_be_hw_params_fixup()
Alexey Klimov [Thu, 11 Sep 2025 15:43:40 +0000 (16:43 +0100)]
ASoC: qcom: sc8280xp: explicitly set S16LE format in sc8280xp_be_hw_params_fixup()

Setting format to s16le is required for compressed playback on compatible
soundcards.

Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Link: https://patch.msgid.link/20250911154340.2798304-1-alexey.klimov@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: SOF: ipc3-dtrace: fix potential integer overflow in allocation
Samasth Norway Ananda [Tue, 9 Sep 2025 22:51:11 +0000 (15:51 -0700)]
ASoC: SOF: ipc3-dtrace: fix potential integer overflow in allocation

Fix a potential integer overflow vulnerability in trace_filter_parse()
where the allocation size calculation could overflow.

The issue occurs when:
1. capacity is calculated by adding TRACE_FILTER_ELEMENTS_PER_ENTRY in a
   loop for each entry found in the input string.
2. capacity * sizeof(**out) multiplication could overflow if many
   entries are present in the input.
3. This results in a smaller allocation than expected, leading to
   potential buffer overflow.

Replace kmalloc() with kmalloc_array() which provides built-in overflow
checking and will safely fail the allocation if overflow would occur,
preventing memory corruption.

Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Link: https://patch.msgid.link/20250909225111.3740029-1-samasth.norway.ananda@oracle.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: wcd937x: get regmap directly
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:54 +0000 (13:19 +0100)]
ASoC: codecs: wcd937x: get regmap directly

Remove usage of dev_get_regmap, as this its more efficient to directly
reference the pointer.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250909121954.225833-14-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: wcd938x: get regmap directly
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:53 +0000 (13:19 +0100)]
ASoC: codecs: wcd938x: get regmap directly

Remove usage of dev_get_regmap, as this its more efficient to directly
reference the pointer.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250909121954.225833-13-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: wcd-common: move status_update callback to common
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:52 +0000 (13:19 +0100)]
ASoC: codecs: wcd-common: move status_update callback to common

Soundwire update_status, bus_config and interrupt callbacks for wcd937x,
wcd938x, wcd939x soundwire codecs are exactly identlical, move them to
common driver to remove this duplicate code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250909121954.225833-12-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: wcd939x: get regmap directly
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:51 +0000 (13:19 +0100)]
ASoC: codecs: wcd939x: get regmap directly

for some reason we ended up with a boiler plate for dev_get_regmap in
wcd939x codec and started exporting a symbol for this. Remove this
redundant wrapper and direclty get regmap.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250909121954.225833-11-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: wcd-common: move component ops to common
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:50 +0000 (13:19 +0100)]
ASoC: codecs: wcd-common: move component ops to common

component_ops for wcd97x, wcd938x, wcd939x soundwire codecs are exactly
identlical, move them to common driver to remove this duplicate code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250909121954.225833-10-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: wcd-common: move WCD_SDW_CH to common
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:49 +0000 (13:19 +0100)]
ASoC: codecs: wcd-common: move WCD_SDW_CH to common

sdw_ch_info and WCD_SDW_CH macro is duplicated across wcd937x, wcd938x,
wcd939x soundwire codec drivers. Move this to wcd common driver to
remove this code duplication.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250909121954.225833-9-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: wcd: add common helper for wcd codecs
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:48 +0000 (13:19 +0100)]
ASoC: codecs: wcd: add common helper for wcd codecs

All the Qualcomm WCD codecs have most of its code duplicated across all
these 3/4 drivers. This is an attempt to remove those duplicate
parts by adding a common helper library for these codecs.

To start with move all the micbias parsing and voltage settings these
are identical in WCD934x, WCD937x, WCD938x and WCD939x codec driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250909121954.225833-8-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: wcdxxxx: use sdw_slave_get_current_bank helper
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:47 +0000 (13:19 +0100)]
ASoC: codecs: wcdxxxx: use sdw_slave_get_current_bank helper

use sdw_slave_get_current_bank() helper function, rather than duplicating
this function in every codec driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://patch.msgid.link/20250909121954.225833-7-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: wcdxxxx: use of_sdw_find_device_by_node helper
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:46 +0000 (13:19 +0100)]
ASoC: codecs: wcdxxxx: use of_sdw_find_device_by_node helper

use of_sdw_find_device_by_node helper function, rather than duplicating
this function in every codec driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250909121954.225833-6-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agosoundwire: bus: add sdw_slave_get_current_bank helper
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:45 +0000 (13:19 +0100)]
soundwire: bus: add sdw_slave_get_current_bank helper

There has been 2 instances of this helper in codec drivers,
it does not make sense to keep duplicating this part of code.

Lets add a helper sdw_get_current_bank() for codec drivers to use it.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250909121954.225833-5-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agosoundwire: bus: add of_sdw_find_device_by_node helper
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:44 +0000 (13:19 +0100)]
soundwire: bus: add of_sdw_find_device_by_node helper

There has been more than 3 instances of this helper in multiple codec
drivers, it does not make sense to keep duplicating this part of code.

Lets add a helper of_sdw_find_device_by_node for codec drivers to use it.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://patch.msgid.link/20250909121954.225833-4-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: wcd937x: make stub functions inline
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:43 +0000 (13:19 +0100)]
ASoC: codecs: wcd937x: make stub functions inline

For some reason we ended up with stub functions that are not inline,
this can result in build error if its included multiple places, as we will
be redefining the same function

Fixes: c99a515ff153 ("ASoC: codecs: wcd937x-sdw: add SoundWire driver")
Cc: Stable@vger.kernel.org
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250909121954.225833-3-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: wcd937x: set the comp soundwire port correctly
Srinivas Kandagatla [Tue, 9 Sep 2025 12:19:42 +0000 (13:19 +0100)]
ASoC: codecs: wcd937x: set the comp soundwire port correctly

For some reason we endup with setting soundwire port for
HPHL_COMP and HPHR_COMP as zero, this can potentially result
in a memory corruption due to accessing and setting -1 th element of
port_map array.

Fixes: 82be8c62a38c ("ASoC: codecs: wcd937x: add basic controls")
Cc: Stable@vger.kernel.org
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Alexey Klimov <alexey.klimov@linaro.org>
Link: https://patch.msgid.link/20250909121954.225833-2-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: soc-dapm: add snd_soc_dapm_set_idle_bias()
Kuninori Morimoto [Thu, 4 Sep 2025 05:21:45 +0000 (05:21 +0000)]
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>
7 weeks agoASoC: soc-dapm: add snd_soc_dapm_get_bias_level()
Kuninori Morimoto [Thu, 4 Sep 2025 05:21:41 +0000 (05:21 +0000)]
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>
7 weeks agoASoC: soc-dapm: tidyup idle_bias handling - step2
Kuninori Morimoto [Thu, 4 Sep 2025 05:21:37 +0000 (05:21 +0000)]
ASoC: soc-dapm: tidyup idle_bias handling - step2

Current dapm_get_idle_bias() is unnecessarily complicated/confusable.
Tidyup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/873492x066.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: soc-dapm: tidyup idle_bias handling - step1
Kuninori Morimoto [Thu, 4 Sep 2025 05:21:33 +0000 (05:21 +0000)]
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>
7 weeks agoASoC: soc-dapm: remove suspend_bias_off from snd_soc_dapm_context
Kuninori Morimoto [Thu, 4 Sep 2025 05:21:29 +0000 (05:21 +0000)]
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>
7 weeks agoASoC: soc-card: add snd_soc_card_to_dapm()
Kuninori Morimoto [Thu, 4 Sep 2025 05:21:25 +0000 (05:21 +0000)]
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>
7 weeks agoASoC: soc-component: add snd_soc_component_to_dapm()
Kuninori Morimoto [Thu, 4 Sep 2025 05:21:21 +0000 (05:21 +0000)]
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>
7 weeks agoASoC: soc-dapm: use dapm->component instead of container_of()
Kuninori Morimoto [Thu, 4 Sep 2025 05:21:17 +0000 (05:21 +0000)]
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>
7 weeks agoASoC: soc-dapm: add snd_soc_dapm_to_card()
Kuninori Morimoto [Thu, 4 Sep 2025 05:21:13 +0000 (05:21 +0000)]
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>
7 weeks agoASoC: soc-dapm: add snd_soc_dapm_to_dev()
Kuninori Morimoto [Thu, 4 Sep 2025 05:21:08 +0000 (05:21 +0000)]
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>
7 weeks agoALSA: hda/realtek: Fix mute led for HP Laptop 15-dw4xx
Praful Adiga [Thu, 18 Sep 2025 16:40:18 +0000 (12:40 -0400)]
ALSA: hda/realtek: Fix mute led for HP Laptop 15-dw4xx

This laptop uses the ALC236 codec with COEF 0x7 and idx 1 to
control the mute LED. Enable the existing quirk for this device.

Signed-off-by: Praful Adiga <praful.adiga@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoMerge tag 'asoc-fix-v6.17-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git...
Takashi Iwai [Thu, 18 Sep 2025 07:11:12 +0000 (09:11 +0200)]
Merge tag 'asoc-fix-v6.17-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.17

A pile of fixes that accumilated over the past few -rcs, this is all
driver specifics including a small pile of quirks for new systems.

7 weeks agoALSA: hda: intel-dsp-config: Prevent SEGFAULT if ACPI_HANDLE() is NULL
Richard Fitzgerald [Wed, 17 Sep 2025 16:06:09 +0000 (17:06 +0100)]
ALSA: hda: intel-dsp-config: Prevent SEGFAULT if ACPI_HANDLE() is NULL

Check in snd_intel_dsp_check_soundwire() that the pointer returned by
ACPI_HANDLE() is not NULL, before passing it on to other functions.

The original code assumed a non-NULL return, but if it was unexpectedly
NULL it would end up passed to acpi_walk_namespace() as the start
point, and would result in

[    3.219028] BUG: kernel NULL pointer dereference, address:
0000000000000018
[    3.219029] #PF: supervisor read access in kernel mode
[    3.219030] #PF: error_code(0x0000) - not-present page
[    3.219031] PGD 0 P4D 0
[    3.219032] Oops: Oops: 0000 [#1] SMP NOPTI
[    3.219035] CPU: 2 UID: 0 PID: 476 Comm: (udev-worker) Tainted: G S
AW   E       6.17.0-rc5-test #1 PREEMPT(voluntary)
[    3.219038] Tainted: [S]=CPU_OUT_OF_SPEC, [A]=OVERRIDDEN_ACPI_TABLE,
[W]=WARN, [E]=UNSIGNED_MODULE
[    3.219040] RIP: 0010:acpi_ns_walk_namespace+0xb5/0x480

This problem was triggered by a bugged DSDT that the kernel couldn't parse.
But it shouldn't be possible to SEGFAULT the kernel just because of some
bugs in ACPI.

Fixes: 0650857570d1 ("ALSA: hda: add autodetection for SoundWire")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoALSA: usb: qcom: Fix false-positive address space check
Takashi Iwai [Wed, 17 Sep 2025 13:09:01 +0000 (15:09 +0200)]
ALSA: usb: qcom: Fix false-positive address space check

The sanity check previously added to uaudio_transfer_buffer_setup()
assumed the allocated buffer being linear-mapped.  But the buffer
allocated via usb_alloc_coherent() isn't always so, rather to be used
with (SG-)DMA API.  This leaded to a false-positive warning and the
driver failed to work.

Actually uaudio_transfer_buffer_setup() deals only with the DMA-API
addresses for MEM_XFER_BUF type, while other callers of
uaudio_iommu_map() are with pages with physical addresses for
MEM_EVENT_RING and MEM_XFER_RING types.  So this patch splits the
mapping helper function to two different ones, uaudio_iommu_map() for
the DMA pages and uaudio_iommu_map_pa() for the latter, in order to
handle mapping differently for each type.  Along with it, the
unnecessary address check that caused probe error is dropped, too.

Fixes: 3335a1bbd624 ("ALSA: qc_audio_offload: try to reduce address space confusion")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reported-and-tested-by: Luca Weiss <luca.weiss@fairphone.com>
Closes: https://lore.kernel.org/DBR2363A95M1.L9XBNC003490@fairphone.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoALSA: seq: Fix KCSAN data-race warning at snd_seq_fifo_poll_wait()
Takashi Iwai [Wed, 17 Sep 2025 12:13:27 +0000 (14:13 +0200)]
ALSA: seq: Fix KCSAN data-race warning at snd_seq_fifo_poll_wait()

snd_seq_fifo_poll_wait() evaluates f->cells without locking after
poll_wait(), and KCSAN doesn't like it as it appears to be a
data-race.  Although this doesn't matter much in practice as the value
is volatile, it's still better to address it for the mind piece.

Wrap it with f->lock spinlock for avoiding the potential data race.

Reported-by: syzbot+c3dbc239259940ededba@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=c3dbc239259940ededba
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoALSA: spi/at73c213: Use guard() for spin locks
Takashi Iwai [Wed, 17 Sep 2025 11:12:49 +0000 (13:12 +0200)]
ALSA: spi/at73c213: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoASoC: rt5682s: Adjust SAR ADC button mode to fix noise issue
Jack Yu [Wed, 17 Sep 2025 08:11:43 +0000 (08:11 +0000)]
ASoC: rt5682s: Adjust SAR ADC button mode to fix noise issue

Adjust register settings for SAR adc button detection mode
to fix noise issue in headset.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://patch.msgid.link/766cd1d2dd7a403ba65bb4cc44845f71@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: cs35l56: Handle vendor-specific UEFI
Mark Brown [Tue, 16 Sep 2025 21:42:25 +0000 (22:42 +0100)]
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

7 weeks agoAdd PM4125 audio codec driver
Mark Brown [Tue, 16 Sep 2025 21:42:21 +0000 (22:42 +0100)]
Add PM4125 audio codec driver

Merge series from Alexey Klimov <alexey.klimov@linaro.org>:

PMICs like PM4125 have in-built audio codec IC. The series here
adds support for this codec driver: DT bindings and codec driver
itself that consists mainly of two parts: soundwire devices and
codec part itself.

This audio codec can be found on platforms like QCM2290 and
on Qualcomm QRB2210 RB1 board.

We are working on this together with Srini
(srinivas.kandagatla@oss.qualcomm.com or srini@kernel.org).

This driver also has a bit limited support for concurrent playback,
since line out path is connected to left input channel.

7 weeks agoASoC: codecs: pcm1754: add pcm1754 dac driver
Mark Brown [Tue, 16 Sep 2025 21:42:16 +0000 (22:42 +0100)]
ASoC: codecs: pcm1754: add pcm1754 dac driver

Merge series from Stefan Kerkmann <s.kerkmann@pengutronix.de>:

Add a CODEC driver for the TI PCM1754.

7 weeks agoASoC: dt-bindings: add bindings for pm4125 audio codec
Alexey Klimov [Mon, 15 Sep 2025 16:27:48 +0000 (17:27 +0100)]
ASoC: dt-bindings: add bindings for pm4125 audio codec

The audio codec IC is found on Qualcomm PM4125/PM2250 PMIC.
It has TX and RX soundwire slave devices hence two files are added.

Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250915-pm4125_audio_codec_v1-v4-1-b247b64eec52@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoMAINTAINERS: add Qualcomm PM4125 audio codec to drivers list
Alexey Klimov [Mon, 15 Sep 2025 16:27:51 +0000 (17:27 +0100)]
MAINTAINERS: add Qualcomm PM4125 audio codec to drivers list

Since new audio codec driver is added the get_maintainers script
should catch the new files.

Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250915-pm4125_audio_codec_v1-v4-4-b247b64eec52@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoASoC: codecs: add new pm4125 audio codec driver
Alexey Klimov [Mon, 15 Sep 2025 16:27:50 +0000 (17:27 +0100)]
ASoC: codecs: add new pm4125 audio codec driver

The audio codec is found in Qualcomm PM2250/PM4125 PMICs and is used on
platforms like Qualcomm QCM2290. It has soundwire interface and
corresponding RX and TX slave devices.

It has only two input channels: HPH left and right. The line output (LO)
is linked to HPHL so the hardware has some limitations regarding concurrent
playback via HPH and LO for instance.

The codec driver also uses WCD MBCH framework. The MBHC functionality is
implemented in a minimalistic way to enable IRQs and avoid different
issues with IRQs.

Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20250915-pm4125_audio_codec_v1-v4-3-b247b64eec52@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoFix lpaif_type and DAI configuration for I2S
Mark Brown [Tue, 16 Sep 2025 12:09:08 +0000 (13:09 +0100)]
Fix lpaif_type and DAI configuration for I2S

Merge series from Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>:

Fix the lpaif_type configuration for the I2S interface.
The proper lpaif interface type required to allow DSP to vote
appropriate clock setting for I2S interface and also Add support
for configuring the DAI format on MI2S interfaces to allow setting
the appropriate bit clock and frame clock polarity, ensuring correct
audio data transmissionover MI2S.

7 weeks agoASoC: dt-bindings: asahi-kasei,ak4458: Reference common DAI properties
Jonas Rebmann [Wed, 10 Sep 2025 12:35:22 +0000 (14:35 +0200)]
ASoC: dt-bindings: asahi-kasei,ak4458: Reference common DAI properties

Reference the dai-common.yaml schema to allow '#sound-dai-cells' and
"sound-name-prefix' to be used.

Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20250910-imx8mp-prt8ml-v1-2-fd04aed15670@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
7 weeks agoALSA: pcm: Disable bottom softirqs as part of spin_lock_irq() on PREEMPT_RT
Sebastian Andrzej Siewior [Mon, 15 Sep 2025 15:28:51 +0000 (17:28 +0200)]
ALSA: pcm: Disable bottom softirqs as part of spin_lock_irq() on PREEMPT_RT

snd_pcm_group_lock_irq() acquires a spinlock_t and disables interrupts
via spin_lock_irq(). This also implicitly disables the handling of
softirqs such as TIMER_SOFTIRQ.
On PREEMPT_RT softirqs are preemptible and spin_lock_irq() does not
disable them. That means a timer can be invoked during spin_lock_irq()
on the same CPU. Due to synchronisations reasons local_bh_disable() has
a per-CPU lock named softirq_ctrl.lock which synchronizes individual
softirq against each other.
syz-bot managed to trigger a lockdep report where softirq_ctrl.lock is
acquired in hrtimer_cancel() in addition to hrtimer_run_softirq(). This
is a possible deadlock.

The softirq_ctrl.lock can not be made part of spin_lock_irq() as this
would lead to too much synchronisation against individual threads on the
system. To avoid the possible deadlock, softirqs must be manually
disabled before the lock is acquired.

Disable softirqs before the lock is acquired on PREEMPT_RT.

Reported-by: syzbot+10b4363fb0f46527f3f3@syzkaller.appspotmail.com
Fixes: d2d6422f8bd1 ("x86: Allow to enable PREEMPT_RT.")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 weeks agoASoC: Intel: PTL: Add entry for HDMI-In capture support to non-I2S codec boards.
Balamurugan C [Mon, 15 Sep 2025 02:56:54 +0000 (10:56 +0800)]
ASoC: Intel: PTL: Add entry for HDMI-In capture support to non-I2S codec boards.

Adding HDMI-In capture support for the PTL products which doesn't have
onboard I2S codec. But need to support HDMI-In capture via I2S and
audio playback through HDMI/DP monitor.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250915025655.1154279-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
8 weeks agoASoC: amd: acp: Fix incorrect retrival of acp_chip_info
Venkata Prasad Potturu [Wed, 10 Sep 2025 17:13:59 +0000 (22:43 +0530)]
ASoC: amd: acp: Fix incorrect retrival of acp_chip_info

Use dev_get_drvdata(dev->parent) instead of dev_get_platdata(dev)
to correctly obtain acp_chip_info members in the acp I2S driver.
Previously, some members were not updated properly due to incorrect
data access, which could potentially lead to null pointer
dereferences.

This issue was missed in the earlier commit
("ASoC: amd: acp: Fix NULL pointer deref in acp_i2s_set_tdm_slot"),
which only addressed set_tdm_slot(). This change ensures that all
relevant functions correctly retrieve acp_chip_info, preventing
further null pointer dereference issues.

Fixes: e3933683b25e ("ASoC: amd: acp: Remove redundant acp_dev_data structure")
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250910171419.3682468-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
8 weeks agoASoC: Intel: sof_sdw: use PRODUCT_FAMILY for Fatcat series
Mac Chiang [Mon, 15 Sep 2025 02:54:56 +0000 (10:54 +0800)]
ASoC: Intel: sof_sdw: use PRODUCT_FAMILY for Fatcat series

PRODUCT_NAME is machine-specific. Use PRODUCT_FAMILY to ensure
the machine quirk is applied with consistent audio configurations
across Fatcat series products.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20250915025456.1154200-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
8 weeks agoASoC: qcom: sc8280xp: Fix sound card driver name match data for QCS8275
Mohammad Rafi Shaik [Sun, 14 Sep 2025 13:15:49 +0000 (18:45 +0530)]
ASoC: qcom: sc8280xp: Fix sound card driver name match data for QCS8275

The QCS8275 board is based on Qualcomm's QCS8300 SoC family, and all
supported firmware files are located in the qcs8300 directory. The
sound topology and ALSA UCM configuration files have also been migrated
from the qcs8275 directory to the actual SoC qcs8300 directory in
linux-firmware. With the current setup, the sound topology fails
to load, resulting in sound card registration failure.

This patch updates the driver match data to use the correct driver name
qcs8300 for the qcs8275-sndcard, ensuring that the sound card driver
correctly loads the sound topology and ALSA UCM configuration files
from the qcs8300 directory.

Fixes: 34d340d48e595 ("ASoC: qcom: sc8280xp: Add support for QCS8275")
Cc: stable@vger.kernel.org
Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250914131549.1198740-1-mohammad.rafi.shaik@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
8 weeks agoASoC: Intel: hda-sdw-bpt: set persistent_buffer false
Bard Liao [Mon, 15 Sep 2025 02:48:53 +0000 (10:48 +0800)]
ASoC: Intel: hda-sdw-bpt: set persistent_buffer false

The persistent_buffer agreement is false when hda_cl_prepare() is
called. We should use the same value when hda_cl_cleanup() is called.

Fixes: 5d5cb86fb46ea ("ASoC: SOF: Intel: hda-sdw-bpt: add helpers for SoundWire BPT DMA")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20250915024853.1153518-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
8 weeks agoALSA: serial-generic: remove shared static buffer
John Keeping [Mon, 15 Sep 2025 09:42:19 +0000 (10:42 +0100)]
ALSA: serial-generic: remove shared static buffer

If multiple instances of this driver are instantiated and try to send
concurrently then the single static buffer snd_serial_generic_tx_work()
will cause corruption in the data output.

Move the buffer into the per-instance driver data to avoid this.

Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 weeks agoALSA: asihpi: Simplify error handling in PCM substream setup
Jihed Chaibi [Sun, 14 Sep 2025 20:59:45 +0000 (22:59 +0200)]
ALSA: asihpi: Simplify error handling in PCM substream setup

Refactor error handling in the PCM substream setup to combine redundant
checks and improve code readability. Free the dpcm structure and return
appropriate error codes (-EBUSY for HPI_ERROR_OBJ_ALREADY_OPEN, -EIO
for other errors) in a single block.

Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 weeks agoALSA: hda/realtek: Fix volume control on Lenovo Thinkbook 13x Gen 4
Bou-Saan Che [Sun, 14 Sep 2025 19:17:50 +0000 (22:17 +0300)]
ALSA: hda/realtek: Fix volume control on Lenovo Thinkbook 13x Gen 4

The issue was caused by incorrect configuration in the driver,
which prevented proper volume control on certain systems.

Signed-off-by: Bou-Saan Che <yungmeat@inboxia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 weeks agoALSA: hda/realtek: Support Lenovo Thinkbook 13x Gen 5
Bou-Saan Che [Sun, 14 Sep 2025 19:17:38 +0000 (22:17 +0300)]
ALSA: hda/realtek: Support Lenovo Thinkbook 13x Gen 5

The laptop does not contain valid _DSD for these amps, so requires
entries into the CS35L41 configuration table to function correctly.

Signed-off-by: Bou-Saan Che <yungmeat@inboxia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 weeks agoALSA: hda: cs35l41: Support Lenovo Thinkbook 13x Gen 5
Bou-Saan Che [Sun, 14 Sep 2025 19:15:37 +0000 (22:15 +0300)]
ALSA: hda: cs35l41: Support Lenovo Thinkbook 13x Gen 5

This laptop does not contain _DSD so needs to be supported using the
configuration table.

Signed-off-by: Bou-Saan Che <yungmeat@inboxia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 weeks agoLinux 6.17-rc6
Linus Torvalds [Sun, 14 Sep 2025 21:21:14 +0000 (14:21 -0700)]
Linux 6.17-rc6

8 weeks agoMerge tag 'phy-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy
Linus Torvalds [Sun, 14 Sep 2025 20:17:30 +0000 (13:17 -0700)]
Merge tag 'phy-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy

Pull generic phy driver fixes from Vinod Koul:

 - Qualcomm repeater override properties, qmp pcie bindings fix for
   clocks and initialization sequence for firmware power down case

 - Marvell comphy bindings clock and child node constraints

 - Tegra xusb device reference leaks fix

 - TI omap usb device ref leak on unbind and RGMII IS settings fix

* tag 'phy-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
  phy: qcom: qmp-pcie: Fix PHY initialization when powered down by firmware
  phy: ti: gmii-sel: Always write the RGMII ID setting
  dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Update pcie phy bindings
  phy: ti-pipe3: fix device leak at unbind
  phy: ti: omap-usb2: fix device leak at unbind
  phy: tegra: xusb: fix device and OF node leak at probe
  dt-bindings: phy: marvell,comphy-cp110: Fix clock and child node constraints
  phy: qualcomm: phy-qcom-eusb2-repeater: fix override properties

8 weeks agoMerge tag 'dmaengine-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul...
Linus Torvalds [Sun, 14 Sep 2025 20:06:06 +0000 (13:06 -0700)]
Merge tag 'dmaengine-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine

Pull dmaengine fixes from Vinod Koul:

 - Intel idxd fixes for idxd_free() handling, refcount underflow on
   module unload, double free in idxd_setup_wqs()

 - Qualcomm bam dma missing properties and handing for channels with ees

 - dw device reference leak in rzn1_dmamux_route_allocate()

* tag 'dmaengine-fix-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
  dmaengine: dw: dmamux: Fix device reference leak in rzn1_dmamux_route_allocate
  dmaengine: ti: edma: Fix memory allocation size for queue_priority_map
  dmaengine: idxd: Fix double free in idxd_setup_wqs()
  dmaengine: idxd: Fix refcount underflow on module unload
  dmaengine: idxd: Remove improper idxd_free
  dmaengine: qcom: bam_dma: Fix DT error handling for num-channels/ees
  dt-bindings: dma: qcom: bam-dma: Add missing required properties

8 weeks agoMerge tag 'tty-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 14 Sep 2025 17:54:54 +0000 (10:54 -0700)]
Merge tag 'tty-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are some small tty and serial driver fixes for 6.17-rc6 that
  resolve some reported problems. Included in here are:

   - 8250 driver dt bindings fixes

   - broadcom serial driver binding fixes

   - hvc_console bugfix

   - xilinx serial driver bugfix

   - sc16is7xx serial driver bugfix

  All of these have been in linux-next for the past week with no
  reported issues"

* tag 'tty-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: xilinx_uartps: read reg size from DTS
  tty: hvc_console: Call hvc_kick in hvc_write unconditionally
  dt-bindings: serial: 8250: allow "main" and "uart" as clock names
  dt-bindings: serial: 8250: move a constraint
  dt-bindings: serial: brcm,bcm7271-uart: Constrain clocks
  serial: sc16is7xx: fix bug in flow control levels init

8 weeks agoMerge tag 'usb-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 14 Sep 2025 17:28:15 +0000 (10:28 -0700)]
Merge tag 'usb-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some small USB driver fixes and new device ids for 6.17-rc6.
  Included in here are:

   - new usb-serial driver device ids

   - dummy-hcd locking bugfix for rt-enabled systems (which is crazy,
     but people have odd testing requirements at times...)

   - xhci driver bugfixes for reported issues

   - typec driver bugfix

   - midi2 gadget driver bugfixes

   - usb core sysfs file regression fix from -rc1

  All of these, except for the last usb sysfs file fix, have been in
  linux-next with no reported issues. The sysfs fix was added to the
  tree on Friday, and is "obviously correct" and should not have any
  problems either, it just didn't have any time for linux-next to pick
  up (0-day had no problems with it)"

* tag 'usb-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: core: remove the move buf action
  usb: gadget: midi2: Fix MIDI2 IN EP max packet size
  usb: gadget: midi2: Fix missing UMP group attributes initialization
  usb: typec: tcpm: properly deliver cable vdms to altmode drivers
  USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels
  xhci: fix memory leak regression when freeing xhci vdev devices depth first
  xhci: dbc: Fix full DbC transfer ring after several reconnects
  xhci: dbc: decouple endpoint allocation from initialization
  USB: serial: option: add Telit Cinterion LE910C4-WWX new compositions
  USB: serial: option: add Telit Cinterion FN990A w/audio compositions

8 weeks agoMerge tag 'x86-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 14 Sep 2025 15:39:48 +0000 (08:39 -0700)]
Merge tag 'x86-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Fix a CPU topology parsing bug on AMD guests, and address
  a lockdep warning in the resctrl filesystem"

* tag 'x86-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  fs/resctrl: Eliminate false positive lockdep warning when reading SNC counters
  x86/cpu/topology: Always try cpu_parse_topology_ext() on AMD/Hygon

8 weeks agoMerge tag 'timers-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Sep 2025 15:38:05 +0000 (08:38 -0700)]
Merge tag 'timers-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Ingo Molnar:
 "Fix a lost-timeout CPU hotplug bug in the hrtimer code, which can
  trigger with certain hardware configs and regular HZ"

* tag 'timers-urgent-2025-09-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  hrtimers: Unconditionally update target CPU base after offline timer migration

8 weeks agoMerge tag 'input-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 14 Sep 2025 15:09:37 +0000 (08:09 -0700)]
Merge tag 'input-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - a quirk to i8042 for yet another TUXEDO laptop

 - a fix to mtk-pmic-keys driver to properly handle MT6359

 - a fix to iqs7222 driver to only enable proximity interrupt
   if it is mapped to a key or a switch event

 - an update to xpad controller driver to recognize Flydigi Apex 5
   controller

 - an update to maintainers file to drop bounding entry for Melfas
   touch controller

* tag 'input-for-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  MAINTAINERS: Input: Drop melfas-mip4 section
  Input: mtk-pmic-keys - MT6359 has a specific release irq
  Input: i8042 - add TUXEDO InfinityBook Pro Gen10 AMD to i8042 quirk table
  Input: iqs7222 - avoid enabling unused interrupts
  Input: xpad - add support for Flydigi Apex 5

8 weeks agoALSA: hda/realtek: Add ALC295 Dell TAS2781 I2C fixup
Donald Menig [Sun, 14 Sep 2025 07:43:33 +0000 (09:43 +0200)]
ALSA: hda/realtek: Add ALC295 Dell TAS2781 I2C fixup

This patch adds a new fixup for the ALC295 codec on some Dell
laptops that use the TAS2781 I2C amplifier.

The fixup correctly initializes the amplifier and pins, allowing
sound to work on all speakers of these devices.

The fixup chain is added to the relevant quirk entries for
Dell Polaris models.

[ adjusted for 6.17 kernel code by tiwai ]

Fixes: 1e9c708dc3ae ("ALSA: hda/tas2781: Add new quirk for Lenovo, ASUS, Dell projects")
Link: https://bugzilla.suse.com/show_bug.cgi?id=1249575
Signed-off-by: Donald Menig <djmenig@outlook.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 weeks agoMAINTAINERS: Input: Drop melfas-mip4 section
Krzysztof Kozlowski [Wed, 10 Sep 2025 14:25:27 +0000 (16:25 +0200)]
MAINTAINERS: Input: Drop melfas-mip4 section

Emails to the sole melfas-mip4 driver maintainer bounce:

  550 <jeesw@melfas.com> No such user here (connected from melfas.com)

so clearly this is not a supported driver anymore.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250910142526.105286-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 weeks agoMerge tag 'erofs-for-6.17-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Sep 2025 00:16:52 +0000 (17:16 -0700)]
Merge tag 'erofs-for-6.17-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs

Pull erofs fixes from Gao Xiang:

 - Fix invalid algorithm dereference in encoded extents

 - Add missing dax_break_layout_final(), since recent FSDAX fixes
   didn't cover EROFS

 - Arrange long xattr name prefixes more properly

* tag 'erofs-for-6.17-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
  erofs: fix long xattr name prefix placement
  erofs: fix runtime warning on truncate_folio_batch_exceptionals()
  erofs: fix invalid algorithm for encoded extents

8 weeks agoMerge tag 'ceph-for-6.17-rc6' of https://github.com/ceph/ceph-client
Linus Torvalds [Sat, 13 Sep 2025 17:45:11 +0000 (10:45 -0700)]
Merge tag 'ceph-for-6.17-rc6' of https://github.com/ceph/ceph-client

Pull ceph fixes from Ilya Dryomov:
 "A fix for a race condition around r_parent tracking that took a long
  time to track down from Alex and some fixes for potential crashes on
  accessing invalid memory from Max and myself.

  All marked for stable"

* tag 'ceph-for-6.17-rc6' of https://github.com/ceph/ceph-client:
  libceph: fix invalid accesses to ceph_connection_v1_info
  ceph: fix crash after fscrypt_encrypt_pagecache_blocks() error
  ceph: always call ceph_shift_unused_folios_left()
  ceph: fix race condition where r_parent becomes stale before sending message
  ceph: fix race condition validating r_parent before applying state

8 weeks agoMerge tag 'regulator-fix-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 13 Sep 2025 17:40:50 +0000 (10:40 -0700)]
Merge tag 'regulator-fix-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "One fix for sy7636a which got confused about which device to use to
  manage the lifecycle of the power good GPIO because it's looked up
  from the parent device due to the way DT bindings work"

* tag 'regulator-fix-v6.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: sy7636a: fix lifecycle of power good gpio

8 weeks agoMerge tag 'driver-core-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 13 Sep 2025 17:36:06 +0000 (10:36 -0700)]
Merge tag 'driver-core-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core fixes from Danilo Krummrich:

 - Fix UAF in cgroup pressure polling by using kernfs_get_active_of()
   to prevent operations on released file descriptors

 - Fix unresolved intra-doc link in the documentation of struct Device
   when CONFIG_DRM != y

 - Update the DMA Rust MAINTAINERS entry

* tag 'driver-core-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core:
  MAINTAINERS: Update the DMA Rust entry
  kernfs: Fix UAF in polling when open file is released
  rust: device: fix unresolved link to drm::Device

8 weeks agoMerge tag 'pci-v6.17-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Linus Torvalds [Fri, 12 Sep 2025 17:46:10 +0000 (10:46 -0700)]
Merge tag 'pci-v6.17-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci

Pull pci fix from Bjorn Helgaas:

 - Fix mvebu PCI enumeration regression caused by converting to
   for_each_of_range() iterator (Klaus Kudielka)

* tag 'pci-v6.17-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
  PCI: mvebu: Fix use of for_each_of_range() iterator

8 weeks agoMerge tag 'drm-fixes-2025-09-12' of https://gitlab.freedesktop.org/drm/kernel
Linus Torvalds [Fri, 12 Sep 2025 16:29:59 +0000 (09:29 -0700)]
Merge tag 'drm-fixes-2025-09-12' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Weekly pull fixes for drm, mostly amdgpu and xe, with a revert for
  nouveau and some maintainers updates, and misc bits, doesn't seem too
  out of the normal.

  MAINTAINERS:
   - add rust tree to MAINTAINERS
   - fix X entries for nova/nouveau

  nova:
   - depend on 64-bit

  i915:
   - Fix size for for_each_set_bit() in abox iteration

  xe:
   - Don't touch survivability_mode on fini
   - Fixes around eviction and suspend
   - Extend Wa_13011645652 to PTL-H, WCL

  amdgpu:
   - PSP 11.x fix
   - DPCD quirk handing fix
   - DCN 3.5 PG fix
   - Audio suspend fix
   - OEM i2c clean up fix
   - Module unload memory leak fix
   - DC delay fix
   - ISP firmware fix
   - VCN fixes

  amdkfd:
   - P2P topology fix
   - APU mem limit calculation fix

  mediatek:
   - fix potential OF node use-after-free

  panthor:
   - out-of-bounds check

  nouveau:
   - revert waitqueue removal for sched teardown

* tag 'drm-fixes-2025-09-12' of https://gitlab.freedesktop.org/drm/kernel: (25 commits)
  MAINTAINERS: drm-misc: fix X: entries for nova/nouveau
  drm/mediatek: clean up driver data initialisation
  drm/mediatek: fix potential OF node use-after-free
  drm/amdgpu/vcn: Allow limiting ctx to instance 0 for AV1 at any time
  drm/amdgpu/vcn4: Fix IB parsing with multiple engine info packages
  drm/amd/amdgpu: Declare isp firmware binary file
  drm/amd/display: use udelay rather than fsleep
  drm/amdgpu: fix a memory leak in fence cleanup when unloading
  drm/xe: Extend Wa_13011645652 to PTL-H, WCL
  drm/xe: Block exec and rebind worker while evicting for suspend / hibernate
  drm/xe: Allow the pm notifier to continue on failure
  drm/xe: Attempt to bring bos back to VRAM after eviction
  drm/xe/configfs: Don't touch survivability_mode on fini
  amd/amdkfd: correct mem limit calculation for small APUs
  drm/amdkfd: fix p2p links bug in topology
  drm/amd/display: remove oem i2c adapter on finish
  drm/amd/display: Drop dm_prepare_suspend() and dm_complete()
  drm/amd/display: Correct sequences and delays for DCN35 PG & RCG
  drm/amd/display: Disable DPCD Probe Quirk
  drm/i915/power: fix size for for_each_set_bit() in abox iteration
  ...

8 weeks agoMerge tag 'v6.17-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 12 Sep 2025 16:03:01 +0000 (09:03 -0700)]
Merge tag 'v6.17-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:
 "Two smb3 client fixes, both for stable:

   - Fix encryption problem with multiple compounded ops

   - Fix rename error cases that could lead to data corruption"

* tag 'v6.17-rc5-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: fix data loss due to broken rename(2)
  smb: client: fix compound alignment with encryption

8 weeks agoUSB: core: remove the move buf action
Edward Adam Davis [Wed, 10 Sep 2025 07:58:47 +0000 (15:58 +0800)]
USB: core: remove the move buf action

The buffer size of sysfs is fixed at PAGE_SIZE, and the page offset
of the buf parameter of sysfs_emit_at() must be 0, there is no need
to manually manage the buf pointer offset.

Fixes: 711d41ab4a0e ("usb: core: Use sysfs_emit_at() when showing dynamic IDs")
Reported-by: syzbot+b6445765657b5855e869@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=b6445765657b5855e869
Tested-by: syzbot+b6445765657b5855e869@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Link: https://lore.kernel.org/r/tencent_B32D6D8C9450EBFEEE5ACC2C7B0E6C402D0A@qq.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agoMerge tag 'usb-serial-6.17-rc6' of ssh://gitolite.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Fri, 12 Sep 2025 08:41:15 +0000 (10:41 +0200)]
Merge tag 'usb-serial-6.17-rc6' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus

Johan writes:

USB serial device ids for 6.17-rc6

Here are some new modem device ids.

Everything has been in linux-next with no reported issues.

* tag 'usb-serial-6.17-rc6' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
  USB: serial: option: add Telit Cinterion LE910C4-WWX new compositions
  USB: serial: option: add Telit Cinterion FN990A w/audio compositions

8 weeks agoALSA: aoa: Remove redundant size arguments from strscpy()
Thorsten Blum [Thu, 11 Sep 2025 21:43:22 +0000 (23:43 +0200)]
ALSA: aoa: Remove redundant size arguments from strscpy()

The size parameter of strscpy() is optional if the destination buffer
has a fixed length and strscpy() can automatically determine its size
using sizeof(). This makes many explicit size arguments redundant.

Remove them to shorten and simplify the code.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 weeks agoMerge tag 'drm-xe-fixes-2025-09-11' of https://gitlab.freedesktop.org/drm/xe/kernel...
Dave Airlie [Thu, 11 Sep 2025 23:39:06 +0000 (09:39 +1000)]
Merge tag 'drm-xe-fixes-2025-09-11' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes

- Don't touch survivability_mode on fini (Michal)
- Fixes around eviction and suspend (Thomas)
- Extend Wa_13011645652 to PTL-H, WCL (Julia)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/aMLq7QlaEPHGKXKX@intel.com
8 weeks agoMerge tag 'mtd/fixes-for-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 11 Sep 2025 23:35:06 +0000 (16:35 -0700)]
Merge tag 'mtd/fixes-for-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux

Pull mtd fixes from Miquel Raynal:
 "SPI NAND fix:
   - Wrong OOB layout for Winbond W25N01JW SPI NAND devices

  Raw NAND fixes:
   - Atmel raw NAND controller timings
   - Buffer handling in stm32_fmc2 driver
   - Error handling in Nuvoton's driver

  MTD devices fixes:
   - Wrong depends-on dependencies on the Intel DRM driver

* tag 'mtd/fixes-for-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  mtd: spinand: winbond: Fix oob_layout for W25N01JW
  mtd: nand: raw: atmel: Respect tAR, tCLR in read setup timing
  mtd: rawnand: stm32_fmc2: fix ECC overwrite
  mtd: rawnand: stm32_fmc2: avoid overlapping mappings on ECC buffer
  mtd: rawnand: nuvoton: Fix an error handling path in ma35_nand_chips_init()
  mtd: MTD_INTEL_DG should depend on DRM_I915 or DRM_XE

8 weeks agoMerge tag 'drm-misc-fixes-2025-09-11' of https://gitlab.freedesktop.org/drm/misc...
Dave Airlie [Thu, 11 Sep 2025 23:34:36 +0000 (09:34 +1000)]
Merge tag 'drm-misc-fixes-2025-09-11' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes

A maintainer update, an out-of-bound check for panthor and a revert for
nouveau to fix a race.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maxime Ripard <mripard@redhat.com>
Link: https://lore.kernel.org/r/20250911-glistening-uakari-of-serendipity-06ceb1@houat
8 weeks agoMerge tag 'mediatek-drm-fixes-20250910' of https://git.kernel.org/pub/scm/linux/kerne...
Dave Airlie [Thu, 11 Sep 2025 23:31:23 +0000 (09:31 +1000)]
Merge tag 'mediatek-drm-fixes-20250910' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-fixes

Mediatek DRM Fixes - 20250910

1. fix potential OF node use-after-free

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20250910231813.3526-1-chunkuang.hu@kernel.org
8 weeks agoMerge tag 'amd-drm-fixes-6.17-2025-09-10' of https://gitlab.freedesktop.org/agd5f...
Dave Airlie [Thu, 11 Sep 2025 23:24:50 +0000 (09:24 +1000)]
Merge tag 'amd-drm-fixes-6.17-2025-09-10' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

amd-drm-fixes-6.17-2025-09-10:

amdgpu:
- PSP 11.x fix
- DPCD quirk handing fix
- DCN 3.5 PG fix
- Audio suspend fix
- OEM i2c clean up fix
- Module unload memory leak fix
- DC delay fix
- ISP firmware fix
- VCN fixes

amdkfd:
- P2P topology fix
- APU mem limit calculation fix

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20250910162855.2507853-1-alexander.deucher@amd.com
8 weeks agoMerge tag 'drm-intel-fixes-2025-09-10' of https://gitlab.freedesktop.org/drm/i915...
Dave Airlie [Thu, 11 Sep 2025 23:21:19 +0000 (09:21 +1000)]
Merge tag 'drm-intel-fixes-2025-09-10' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes

- Fix size for for_each_set_bit() in abox iteration [display] (Jani Nikula)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Tvrtko Ursulin <tursulin@igalia.com>
Link: https://lore.kernel.org/r/aMFUtRdJ46qK-EXl@linux