<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/sound/core, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ALSA: memalloc: Fix DMA allocation retry cleanup</title>
<updated>2026-11-19T12:33:56+00:00</updated>
<author>
<name>Sreeraj S Kurup</name>
<email>sreekuttan2156239@gmail.com</email>
</author>
<published>2026-11-19T10:48:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9a4a81718b057eb8768ea87aceacafdfaf3a8b38'/>
<id>9a4a81718b057eb8768ea87aceacafdfaf3a8b38</id>
<content type='text'>
do_alloc_pages() retries allocation with lower DMA zones when the
allocated address exceeds the device's coherent DMA mask.

However, the previous allocation is not freed before retrying,
leaking the allocated pages.

Also, if no suitable DMA zone is available, the function can return
an allocation outside the device's DMA mask.

Avoid retrying GFP_DMA32 after GFP_DMA has been selected, and skip
the DMA mask check when the coherent DMA mask is unset.

Free the allocated pages before retrying and return NULL when no
suitable allocation can be obtained.

Fixes: dd164fbfdc20 ("ALSA: memalloc: Drop special handling of GFP for CONTINUOUS allocation")
Signed-off-by: Sreeraj S Kurup &lt;sreekuttan2156239@gmail.com&gt;
Link: https://patch.msgid.link/20261119104859.2807-1-sreekuttan2156239@gmail.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
do_alloc_pages() retries allocation with lower DMA zones when the
allocated address exceeds the device's coherent DMA mask.

However, the previous allocation is not freed before retrying,
leaking the allocated pages.

Also, if no suitable DMA zone is available, the function can return
an allocation outside the device's DMA mask.

Avoid retrying GFP_DMA32 after GFP_DMA has been selected, and skip
the DMA mask check when the coherent DMA mask is unset.

Free the allocated pages before retrying and return NULL when no
suitable allocation can be obtained.

Fixes: dd164fbfdc20 ("ALSA: memalloc: Drop special handling of GFP for CONTINUOUS allocation")
Signed-off-by: Sreeraj S Kurup &lt;sreekuttan2156239@gmail.com&gt;
Link: https://patch.msgid.link/20261119104859.2807-1-sreekuttan2156239@gmail.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: pcm: oss: Clear params flag only after successful setup</title>
<updated>2026-11-16T15:31:28+00:00</updated>
<author>
<name>Ye Weihua</name>
<email>yeweihua4@huawei.com</email>
</author>
<published>2026-11-16T06:48:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9cda4ab0a5a7f19cd4611214905e08d5ed35421d'/>
<id>9cda4ab0a5a7f19cd4611214905e08d5ed35421d</id>
<content type='text'>
runtime-&gt;oss.params is cleared before the initial silence setup has
completed, so the flag claims a complete configuration while the
buffer setup is still in progress.  The error path now restores the
flag, so this is not fatal, but clear it only after the whole
reconfiguration has succeeded.

Move the assignment after snd_pcm_runtime_buffer_set_silence().

Signed-off-by: Ye Weihua &lt;yeweihua4@huawei.com&gt;
Link: https://patch.msgid.link/20261116064850.3540576-2-yeweihua4@huawei.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
runtime-&gt;oss.params is cleared before the initial silence setup has
completed, so the flag claims a complete configuration while the
buffer setup is still in progress.  The error path now restores the
flag, so this is not fatal, but clear it only after the whole
reconfiguration has succeeded.

Move the assignment after snd_pcm_runtime_buffer_set_silence().

Signed-off-by: Ye Weihua &lt;yeweihua4@huawei.com&gt;
Link: https://patch.msgid.link/20261116064850.3540576-2-yeweihua4@huawei.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: pcm: oss: Restore params flag after failed reconfiguration</title>
<updated>2026-11-16T15:31:16+00:00</updated>
<author>
<name>Ye Weihua</name>
<email>yeweihua4@huawei.com</email>
</author>
<published>2026-11-16T06:48:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bc3d6817c5325e76578cdd75e9c08bdadc5f73c4'/>
<id>bc3d6817c5325e76578cdd75e9c08bdadc5f73c4</id>
<content type='text'>
snd_pcm_runtime_buffer_set_silence() may fail with -EBUSY when a
concurrent PCM transfer is accessing the buffer.  The error path
releases runtime-&gt;oss.buffer and clears the plugins, but leaves
runtime-&gt;oss.params cleared as well.  A subsequent small read/write
then skips the reconfiguration and dereferences the released buffer:

  Unable to handle kernel NULL pointer dereference at virtual address
  0000000000000000
  pc : __arch_copy_from_user+0x78/0x23c
  lr : snd_pcm_oss_write+0x10c/0x340 [snd_pcm_oss]

Restore runtime-&gt;oss.params on the error path so that the next OSS
operation reconfigures and reallocates the buffer.

Fixes: 47c27c9c9c72 ("ALSA: pcm: Improve the fix for race of buffer access at PCM OSS layer")
Cc: stable@vger.kernel.org
Signed-off-by: Ye Weihua &lt;yeweihua4@huawei.com&gt;
Link: https://patch.msgid.link/20261116064850.3540576-1-yeweihua4@huawei.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
snd_pcm_runtime_buffer_set_silence() may fail with -EBUSY when a
concurrent PCM transfer is accessing the buffer.  The error path
releases runtime-&gt;oss.buffer and clears the plugins, but leaves
runtime-&gt;oss.params cleared as well.  A subsequent small read/write
then skips the reconfiguration and dereferences the released buffer:

  Unable to handle kernel NULL pointer dereference at virtual address
  0000000000000000
  pc : __arch_copy_from_user+0x78/0x23c
  lr : snd_pcm_oss_write+0x10c/0x340 [snd_pcm_oss]

Restore runtime-&gt;oss.params on the error path so that the next OSS
operation reconfigures and reallocates the buffer.

Fixes: 47c27c9c9c72 ("ALSA: pcm: Improve the fix for race of buffer access at PCM OSS layer")
Cc: stable@vger.kernel.org
Signed-off-by: Ye Weihua &lt;yeweihua4@huawei.com&gt;
Link: https://patch.msgid.link/20261116064850.3540576-1-yeweihua4@huawei.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: compress: Set metadata_set only after successful callback</title>
<updated>2026-11-16T11:29:25+00:00</updated>
<author>
<name>Sreeraj S Kurup</name>
<email>sreekuttan2156239@gmail.com</email>
</author>
<published>2026-11-13T09:25:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8794e2454799701bfe658de5bf16936275d68468'/>
<id>8794e2454799701bfe658de5bf16936275d68468</id>
<content type='text'>
Set the metadata_set flag only when the driver's set_metadata()
callback completes successfully.

Previously, the flag was set even when the callback returned an
error. This incorrectly indicated that metadata had been applied
successfully, potentially causing later operations to skip metadata
setup.

Update the flag only when the callback returns zero so that its
state accurately reflects successful metadata submission.

Fixes: 9727b490e543 ("ALSA: compress: add support for gapless playback")
Signed-off-by: Sreeraj S Kurup &lt;sreekuttan2156239@gmail.com&gt;
Link: https://patch.msgid.link/20261113092559.3283-1-sreekuttan2156239@gmail.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Set the metadata_set flag only when the driver's set_metadata()
callback completes successfully.

Previously, the flag was set even when the callback returned an
error. This incorrectly indicated that metadata had been applied
successfully, potentially causing later operations to skip metadata
setup.

Update the flag only when the callback returns zero so that its
state accurately reflects successful metadata submission.

Fixes: 9727b490e543 ("ALSA: compress: add support for gapless playback")
Signed-off-by: Sreeraj S Kurup &lt;sreekuttan2156239@gmail.com&gt;
Link: https://patch.msgid.link/20261113092559.3283-1-sreekuttan2156239@gmail.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'asoc-fix-v7.4-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus</title>
<updated>2026-11-13T07:49:23+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2026-11-13T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c58471d848a7a62c0651d85983743e9e6b2e6396'/>
<id>c58471d848a7a62c0651d85983743e9e6b2e6396</id>
<content type='text'>
ASoC: Fixes for v7.4

Another week, another pile of driver specific fixes and quirks.  We do
have one major fix which addresses a bug introduced by confusion with
the counted_by interfaces that was causing major disruption for a number
of platforms.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ASoC: Fixes for v7.4

Another week, another pile of driver specific fixes and quirks.  We do
have one major fix which addresses a bug introduced by confusion with
the counted_by interfaces that was causing major disruption for a number
of platforms.
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: pcm: update state after xrun</title>
<updated>2026-11-12T12:35:05+00:00</updated>
<author>
<name>Mikael Magnusson</name>
<email>mikachu@gmail.com</email>
</author>
<published>2026-11-12T09:46:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=81d17d6911a79acdb69d6cfb213c847e84df18cb'/>
<id>81d17d6911a79acdb69d6cfb213c847e84df18cb</id>
<content type='text'>
If the snd_pcm_update_hw_ptr call from snd_pcm_status is what triggers
the xrun state (eg, as opposed to an IRQ), the returned status-&gt;state
was stale and told userspace the device was still playing, so they could
get confused about device state and hang indefinitely.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=222201
Signed-off-by: Mikael Magnusson &lt;mikachu@gmail.com&gt;
Link: https://patch.msgid.link/20261112094636.13671-1-mikachu@gmail.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the snd_pcm_update_hw_ptr call from snd_pcm_status is what triggers
the xrun state (eg, as opposed to an IRQ), the returned status-&gt;state
was stale and told userspace the device was still playing, so they could
get confused about device state and hang indefinitely.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=222201
Signed-off-by: Mikael Magnusson &lt;mikachu@gmail.com&gt;
Link: https://patch.msgid.link/20261112094636.13671-1-mikachu@gmail.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux</title>
<updated>2026-11-08T22:55:54+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-11-08T22:55:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e0d8e8de8bcb1ef7b749033b5af5518ba8df7bec'/>
<id>e0d8e8de8bcb1ef7b749033b5af5518ba8df7bec</id>
<content type='text'>
Pull devm_kmalloc_obj conversion from Kees Cook:

 - treewide refresh of kmalloc_obj() conversions

 - devm_kmalloc_obj conversion rules added to Coccinelle scripting

 - treewide conversion of devm_kmalloc() family to devm_kmalloc_obj()

* tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family
  coccinelle: kmalloc_obj: Include devm_kmalloc_obj conversion rules
  treewide: refresh kmalloc_obj() conversions
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull devm_kmalloc_obj conversion from Kees Cook:

 - treewide refresh of kmalloc_obj() conversions

 - devm_kmalloc_obj conversion rules added to Coccinelle scripting

 - treewide conversion of devm_kmalloc() family to devm_kmalloc_obj()

* tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family
  coccinelle: kmalloc_obj: Include devm_kmalloc_obj conversion rules
  treewide: refresh kmalloc_obj() conversions
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: refresh kmalloc_obj() conversions</title>
<updated>2026-11-06T05:55:37+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees+treewide@kernel.org</email>
</author>
<published>2026-10-29T06:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0af298e62e5cff4ebf9bec47b8711177a7e2f115'/>
<id>0af298e62e5cff4ebf9bec47b8711177a7e2f115</id>
<content type='text'>
Refresh the tree with run of the existing Coccinelle rules in
scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert
arrays of multi-byte integers.

The conversions break down as:

	435	kzalloc_objs()
	169	kmalloc_objs()
	 52	kvzalloc_objs()
	 47	kzalloc_obj()
	 42	kvmalloc_objs()
	  8	kmalloc_obj()
	  2	kzalloc_flex()
	  2	kvmalloc_flex()

and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL.

Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together
with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64,
i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc,
xtensa, and openrisc with GCC 16.2.0 with no new warnings.

Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refresh the tree with run of the existing Coccinelle rules in
scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert
arrays of multi-byte integers.

The conversions break down as:

	435	kzalloc_objs()
	169	kmalloc_objs()
	 52	kvzalloc_objs()
	 47	kzalloc_obj()
	 42	kvmalloc_objs()
	  8	kmalloc_obj()
	  2	kzalloc_flex()
	  2	kvmalloc_flex()

and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL.

Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together
with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64,
i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc,
xtensa, and openrisc with GCC 16.2.0 with no new warnings.

Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'asoc-fix-v7.4-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus</title>
<updated>2026-11-05T15:56:23+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2026-11-05T15:56:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=22733b6e2e1ebf75228a1e15b9fb9760a86137cc'/>
<id>22733b6e2e1ebf75228a1e15b9fb9760a86137cc</id>
<content type='text'>
ASoC: Fixes for v7.4

More fixes that have come in since -rc1, a lot of this is quirks but
there's some bug fixes as well.  The bug fixes should mostly be those
that seem to be affecting actual users rather than just being pure
static analysis work.  I also took some fixes for missing Kconfig
dependencies which won't have any runtime impact.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ASoC: Fixes for v7.4

More fixes that have come in since -rc1, a lot of this is quirks but
there's some bug fixes as well.  The bug fixes should mostly be those
that seem to be affecting actual users rather than just being pure
static analysis work.  I also took some fixes for missing Kconfig
dependencies which won't have any runtime impact.
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: pcm: Allow HW_REFINE queries with mapped buffers</title>
<updated>2026-11-05T07:54:46+00:00</updated>
<author>
<name>Vincent Cloutier</name>
<email>vincent@cloutier.co</email>
</author>
<published>2026-11-04T00:40:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f14f5be3c9e1ca01dce882f43a6fd07afb39542c'/>
<id>f14f5be3c9e1ca01dce882f43a6fd07afb39542c</id>
<content type='text'>
PulseAudio 16.1 queries supported formats after configuring and mapping
a PCM buffer. Sharing HW_PARAMS' state checker with HW_REFINE causes
these queries to fail with -EBADFD because a non-OSS stream has active
buffer mappings. PulseAudio then fails to create its sinks and sources.

Make the mmap restriction optional in the shared state checker. Keep it
for HW_PARAMS, which can reconfigure the mapped buffer, but skip it for
HW_REFINE, which only refines the caller's constraint structure. Keep
the stream-state checks and buffer access locking for native, compat
and legacy refinement ioctls rather than bypassing their wrapper.
Leave the accepted stream states unchanged.

On Librem 5, both L5 and Modem cards reproduce the failure for playback
and capture: refinement succeeds before setup and after RW setup, but
fails after MMAP setup in PREPARED state. With this change, all eight
cases pass, PulseAudio starts normally and audible playback works.
The reproducer does not start streams or transfer audio data.

Fixes: ad28d2f607d1 ("ALSA: pcm: Serialize and check HW_REFINE ioctls")
Link: https://lore.kernel.org/linux-sound/41a2e39a-5637-8afa-f84f-f79e63b3b56e@xenosoft.de/
Link: https://lore.kernel.org/linux-sound/874idyx9n6.wl-tiwai@suse.de/
Assisted-by: OpenCode:GPT-6.1 Sol
Signed-off-by: Vincent Cloutier &lt;vincent@cloutier.co&gt;
Link: https://patch.msgid.link/20261104004113.546712-1-vincent.cloutier@icloud.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PulseAudio 16.1 queries supported formats after configuring and mapping
a PCM buffer. Sharing HW_PARAMS' state checker with HW_REFINE causes
these queries to fail with -EBADFD because a non-OSS stream has active
buffer mappings. PulseAudio then fails to create its sinks and sources.

Make the mmap restriction optional in the shared state checker. Keep it
for HW_PARAMS, which can reconfigure the mapped buffer, but skip it for
HW_REFINE, which only refines the caller's constraint structure. Keep
the stream-state checks and buffer access locking for native, compat
and legacy refinement ioctls rather than bypassing their wrapper.
Leave the accepted stream states unchanged.

On Librem 5, both L5 and Modem cards reproduce the failure for playback
and capture: refinement succeeds before setup and after RW setup, but
fails after MMAP setup in PREPARED state. With this change, all eight
cases pass, PulseAudio starts normally and audible playback works.
The reproducer does not start streams or transfer audio data.

Fixes: ad28d2f607d1 ("ALSA: pcm: Serialize and check HW_REFINE ioctls")
Link: https://lore.kernel.org/linux-sound/41a2e39a-5637-8afa-f84f-f79e63b3b56e@xenosoft.de/
Link: https://lore.kernel.org/linux-sound/874idyx9n6.wl-tiwai@suse.de/
Assisted-by: OpenCode:GPT-6.1 Sol
Signed-off-by: Vincent Cloutier &lt;vincent@cloutier.co&gt;
Link: https://patch.msgid.link/20261104004113.546712-1-vincent.cloutier@icloud.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
