<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/sound/usb, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://git.kobert.dev/pm24.git/atom/sound/usb?h=master</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom/sound/usb?h=master'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2024-12-02T15:31:35Z</updated>
<entry>
<title>ALSA: usb-audio: Add extra PID for RME Digiface USB</title>
<updated>2024-12-02T15:31:35Z</updated>
<author>
<name>Asahi Lina</name>
<email>lina@asahilina.net</email>
</author>
<published>2024-12-02T13:17:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=f09f0397db641f99f6c3e109283d82e3584bfb50'/>
<id>urn:sha1:f09f0397db641f99f6c3e109283d82e3584bfb50</id>
<content type='text'>
It seems there is an alternate version of the hardware with a different
PID. User testing reveals this still works with the same interface as far
as the kernel is concerned, so just add the extra PID. Thanks to Heiko
Engemann for testing with this version.

Due to the way quirks-table.h is structured, that means we have to turn
the entire quirk struct into a macro to avoid duplicating it...

Cc: stable@vger.kernel.org
Signed-off-by: Asahi Lina &lt;lina@asahilina.net&gt;
Link: https://patch.msgid.link/20241202-rme-digiface-usb-id-v1-1-50f730d7a46e@asahilina.net
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Fix a DMA to stack memory bug</title>
<updated>2024-12-02T15:30:00Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2024-12-02T12:57:54Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=f7d306b47a24367302bd4fe846854e07752ffcd9'/>
<id>urn:sha1:f7d306b47a24367302bd4fe846854e07752ffcd9</id>
<content type='text'>
The usb_get_descriptor() function does DMA so we're not allowed
to use a stack buffer for that.  Doing DMA to the stack is not portable
all architectures.  Move the "new_device_descriptor" from being stored
on the stack and allocate it with kmalloc() instead.

Fixes: b909df18ce2a ("ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices")
Cc: stable@kernel.org
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Link: https://patch.msgid.link/60e3aa09-039d-46d2-934c-6f123026c2eb@stanley.mountain
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: add mixer mapping for Corsair HS80</title>
<updated>2024-12-01T08:49:49Z</updated>
<author>
<name>Marie Ramlow</name>
<email>me@nycode.dev</email>
</author>
<published>2024-11-30T16:52:40Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=a7de2b873f3dbcda02d504536f1ec6dc50e3f6c4'/>
<id>urn:sha1:a7de2b873f3dbcda02d504536f1ec6dc50e3f6c4</id>
<content type='text'>
The Corsair HS80 RGB Wireless is a USB headset with a mic and a sidetone
feature. It has the same quirk as the Virtuoso series.
This labels the mixers appropriately, so applications don't
move the sidetone volume when they actually intend to move the main
headset volume.

Signed-off-by: Marie Ramlow &lt;me@nycode.dev&gt;
cc: &lt;stable@vger.kernel.org&gt;
Link: https://patch.msgid.link/20241130165240.17838-1-me@nycode.dev
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Notify xrun for low-latency mode</title>
<updated>2024-11-29T13:59:41Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-11-28T08:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=4f9d674377d090e38d93360bd4df21b67534d622'/>
<id>urn:sha1:4f9d674377d090e38d93360bd4df21b67534d622</id>
<content type='text'>
The low-latency mode of USB-audio driver uses a similar approach like
the implicit feedback mode but it has an explicit queuing at the
trigger start time.  The difference is, however, that no packet will
be handled any longer after all queued packets are handled but no
enough data is fed.  In the case of implicit feedback mode, the
capture-side packet handling triggers the re-queuing, and this checks
the XRUN.  OTOH, in the low-latency mode, it just stops without XRUN
notification unless any new action is taken from user-space via ack
callback.  For example, when you stop the stream in aplay, no XRUN is
reported.

This patch adds the XRUN check at the packet complete callback in the
case all pending URBs are exhausted.  Strictly speaking, this state
doesn't match really with XRUN; in theory the application may queue
immediately after this happens.  But such behavior is only for
1-period configuration, which the USB-audio driver doesn't support.
So we may conclude that this situation leads certainly to XRUN.

A caveat is that the XRUN should be triggered only for the PCM RUNNING
state, and not during DRAINING.  This additional state check is put in
notify_xrun(), too.

Fixes: d5f871f89e21 ("ALSA: usb-audio: Improved lowlatency playback support")
Reported-by: Leonard Crestez &lt;cdleonard@gmail.com&gt;
Link: https://lore.kernel.org/25d5b0d8-4efd-4630-9d33-7a9e3fa9dc2b@gmail.com
Link: https://patch.msgid.link/20241128080446.1181-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Fix out of bounds reads when finding clock sources</title>
<updated>2024-11-25T14:48:22Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-11-25T14:46:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=a3dd4d63eeb452cfb064a13862fb376ab108f6a6'/>
<id>urn:sha1:a3dd4d63eeb452cfb064a13862fb376ab108f6a6</id>
<content type='text'>
The current USB-audio driver code doesn't check bLength of each
descriptor at traversing for clock descriptors.  That is, when a
device provides a bogus descriptor with a shorter bLength, the driver
might hit out-of-bounds reads.

For addressing it, this patch adds sanity checks to the validator
functions for the clock descriptor traversal.  When the descriptor
length is shorter than expected, it's skipped in the loop.

For the clock source and clock multiplier descriptors, we can just
check bLength against the sizeof() of each descriptor type.
OTOH, the clock selector descriptor of UAC2 and UAC3 has an array
of bNrInPins elements and two more fields at its tail, hence those
have to be checked in addition to the sizeof() check.

Reported-by: Benoît Sevens &lt;bsevens@google.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/20241121140613.3651-1-bsevens@google.com
Link: https://patch.msgid.link/20241125144629.20757-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices</title>
<updated>2024-11-20T13:18:37Z</updated>
<author>
<name>Benoît Sevens</name>
<email>bsevens@google.com</email>
</author>
<published>2024-11-20T12:41:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b909df18ce2a998afef81d58bbd1a05dc0788c40'/>
<id>urn:sha1:b909df18ce2a998afef81d58bbd1a05dc0788c40</id>
<content type='text'>
A bogus device can provide a bNumConfigurations value that exceeds the
initial value used in usb_get_configuration for allocating dev-&gt;config.

This can lead to out-of-bounds accesses later, e.g. in
usb_destroy_configuration.

Signed-off-by: Benoît Sevens &lt;bsevens@google.com&gt;
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@kernel.org
Link: https://patch.msgid.link/20241120124144.3814457-1-bsevens@google.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' into for-next</title>
<updated>2024-11-18T13:39:29Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-11-18T13:39:29Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=40d6b7e0f42d15c7338824d15fa39bf926a39cf4'/>
<id>urn:sha1:40d6b7e0f42d15c7338824d15fa39bf926a39cf4</id>
<content type='text'>
Pull 6.12 devel branch for further HD-audio and USB-audio fixes.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: 6fire: Release resources at card release</title>
<updated>2024-11-13T12:33:47Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-11-13T11:10:39Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=a0810c3d6dd2d29a9b92604d682eacd2902ce947'/>
<id>urn:sha1:a0810c3d6dd2d29a9b92604d682eacd2902ce947</id>
<content type='text'>
The current 6fire code tries to release the resources right after the
call of usb6fire_chip_abort().  But at this moment, the card object
might be still in use (as we're calling snd_card_free_when_closed()).

For avoid potential UAFs, move the release of resources to the card's
private_free instead of the manual call of usb6fire_chip_destroy() at
the USB disconnect callback.

Fixes: c6d43ba816d1 ("ALSA: usb/6fire - Driver for TerraTec DMX 6Fire USB")
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20241113111042.15058-6-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: caiaq: Use snd_card_free_when_closed() at disconnection</title>
<updated>2024-11-13T12:33:47Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-11-13T11:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b04dcbb7f7b1908806b7dc22671cdbe78ff2b82c'/>
<id>urn:sha1:b04dcbb7f7b1908806b7dc22671cdbe78ff2b82c</id>
<content type='text'>
The USB disconnect callback is supposed to be short and not too-long
waiting.  OTOH, the current code uses snd_card_free() at
disconnection, but this waits for the close of all used fds, hence it
can take long.  It eventually blocks the upper layer USB ioctls, which
may trigger a soft lockup.

An easy workaround is to replace snd_card_free() with
snd_card_free_when_closed().  This variant returns immediately while
the release of resources is done asynchronously by the card device
release at the last close.

This patch also splits the code to the disconnect and the free phases;
the former is called immediately at the USB disconnect callback while
the latter is called from the card destructor.

Fixes: 523f1dce3743 ("[ALSA] Add Native Instrument usb audio device support")
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20241113111042.15058-5-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: us122l: Drop mmap_count field</title>
<updated>2024-11-13T12:33:47Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-11-13T11:10:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=f86af06306a7c36451b0174e3c64bc935d04f5e5'/>
<id>urn:sha1:f86af06306a7c36451b0174e3c64bc935d04f5e5</id>
<content type='text'>
us122l.mmap_count field was used for counting the hwdep mmap opens and
syncing at disconnection.  But such a manual sync isn't needed, as the
refcount check is done in the ALSA core side.  So let's drop it.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20241113111042.15058-4-tiwai@suse.de
</content>
</entry>
</feed>
