<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/sound/usb, branch v6.9</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.9</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.9'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-04-02T13:01:27+00:00</updated>
<entry>
<title>ALSA: line6: Zero-initialize message buffers</title>
<updated>2024-04-02T13:01:27+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-04-02T06:36:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c4e51e424e2c772ce1836912a8b0b87cd61bc9d5'/>
<id>urn:sha1:c4e51e424e2c772ce1836912a8b0b87cd61bc9d5</id>
<content type='text'>
For shutting up spurious KMSAN uninit-value warnings, just replace
kmalloc() calls with kzalloc() for the buffers used for
communications.  There should be no real issue with the original code,
but it's still better to cover.

Reported-by: syzbot+7fb05ccf7b3d2f9617b3@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/00000000000084b18706150bcca5@google.com
Message-ID: &lt;20240402063628.26609-1-tiwai@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Revert "ALSA: usb-audio: Name feature ctl using output if input is PCM"</title>
<updated>2024-03-17T08:32:49+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-03-16T08:37:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c53898eb60ed8fa314c6903805a42e234881e4df'/>
<id>urn:sha1:c53898eb60ed8fa314c6903805a42e234881e4df</id>
<content type='text'>
This reverts commit 1601cd53c7e3197181277326dbfc131d20a74e46.

This fix is applied globally to all devices, and it may change the
existing control names.  When the devices are managed with the fixed
configuration like UCM, such control name mismatch may lead to
significant regressions.

For avoiding that kind of regression, we would need to apply such
changes conditionally, but it'd take time to settle down.
While the original fix is a good thing in general, in order to address
the regression, let's revert the change for now.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=218605
Reported-and-tested-by: Niklāvs Koļesņikovs &lt;pinkflames.linux@gmail.com&gt;
Message-ID: &lt;20240316083744.28126-1-tiwai@suse.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Stop parsing channels bits when all channels are found.</title>
<updated>2024-03-13T13:29:22+00:00</updated>
<author>
<name>Johan Carlsson</name>
<email>johan.carlsson@teenage.engineering</email>
</author>
<published>2024-03-13T08:15:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a39d51ff1f52cd0b6fe7d379ac93bd8b4237d1b7'/>
<id>urn:sha1:a39d51ff1f52cd0b6fe7d379ac93bd8b4237d1b7</id>
<content type='text'>
If a usb audio device sets more bits than the amount of channels
it could write outside of the map array.

Signed-off-by: Johan Carlsson &lt;johan.carlsson@teenage.engineering&gt;
Fixes: 04324ccc75f9 ("ALSA: usb-audio: add channel map support")
Message-ID: &lt;20240313081509.9801-1-johan.carlsson@teenage.engineering&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: scarlett2: Fix Scarlett 4th Gen input gain range again</title>
<updated>2024-03-11T12:37:39+00:00</updated>
<author>
<name>Geoffrey D. Bennett</name>
<email>g@b4.vu</email>
</author>
<published>2024-03-11T09:26:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6719cd5e45111449f4021e08f2e488f17a9b292b'/>
<id>urn:sha1:6719cd5e45111449f4021e08f2e488f17a9b292b</id>
<content type='text'>
The 4th Gen input preamp gain range is 0dB to +69dB, although the
control values range from 0 to 70. Replace SCARLETT2_MAX_GAIN with
SCARLETT2_MAX_GAIN_VALUE and SCARLETT2_MAX_GAIN_DB, and update the TLV
again.

Signed-off-by: Geoffrey D. Bennett &lt;g@b4.vu&gt;
Fixes: a45cf0a08347 ("ALSA: scarlett2: Fix Scarlett 4th Gen input gain range")
Message-ID: &lt;Ze7OMA8ntG7KteGa@m.b4.vu&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: scarlett2: Fix Scarlett 4th Gen input gain range</title>
<updated>2024-03-11T08:15:34+00:00</updated>
<author>
<name>Geoffrey D. Bennett</name>
<email>g@b4.vu</email>
</author>
<published>2024-03-10T10:34:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a45cf0a0834779c741ac204c0320469e9aaef006'/>
<id>urn:sha1:a45cf0a0834779c741ac204c0320469e9aaef006</id>
<content type='text'>
The input gain range TLV was declared as -70dB to 0dB, but the preamp
gain range is actually 0dB to +70dB. Rename SCARLETT2_GAIN_BIAS to
SCARLETT2_MAX_GAIN and update the TLV to fix.

Signed-off-by: Geoffrey D. Bennett &lt;g@b4.vu&gt;
Fixes: 0a995e38dc44 ("ALSA: scarlett2: Add support for software-controllable input gain")
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Message-ID: &lt;9168317b5ac5335943d3f14dbcd1cc2d9b2299d0.1710047969.git.g@b4.vu&gt;
</content>
</entry>
<entry>
<title>ALSA: scarlett2: Fix Scarlett 4th Gen autogain status values</title>
<updated>2024-03-11T08:15:34+00:00</updated>
<author>
<name>Geoffrey D. Bennett</name>
<email>g@b4.vu</email>
</author>
<published>2024-03-10T10:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be157c4683a91857d3fdf319117c9b9dc6e8a849'/>
<id>urn:sha1:be157c4683a91857d3fdf319117c9b9dc6e8a849</id>
<content type='text'>
The meanings of the raw_auto_gain_status values were originally
guessed through experimentation, but the official names have now been
discovered. Update the autogain status control strings accordingly.

Signed-off-by: Geoffrey D. Bennett &lt;g@b4.vu&gt;
Fixes: 0a995e38dc44 ("ALSA: scarlett2: Add support for software-controllable input gain")
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Message-ID: &lt;8bd12a5e7dc714801dd9887c4bc5cb35c384e27c.1710047969.git.g@b4.vu&gt;
</content>
</entry>
<entry>
<title>ALSA: scarlett2: Fix Scarlett 4th Gen 4i4 low-voltage detection</title>
<updated>2024-03-11T08:15:34+00:00</updated>
<author>
<name>Geoffrey D. Bennett</name>
<email>g@b4.vu</email>
</author>
<published>2024-03-10T10:34:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ef1f08b53fdb6f5f00f17f85a60b3247d77fa54'/>
<id>urn:sha1:6ef1f08b53fdb6f5f00f17f85a60b3247d77fa54</id>
<content type='text'>
The value currently being read to determine the low-voltage state is
actually the front panel state. Fix the code to use the correct offset
for the low-voltage state.

Signed-off-by: Geoffrey D. Bennett &lt;g@b4.vu&gt;
Fixes: d7cfa2fdfc8a ("ALSA: scarlett2: Add power status control")
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Message-ID: &lt;d97b7d87f43b0e54f37e1552394be2f3ae182704.1710047969.git.g@b4.vu&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Name feature ctl using output if input is PCM</title>
<updated>2024-03-04T08:13:44+00:00</updated>
<author>
<name>Kenny Levinsen</name>
<email>kl@kl.wtf</email>
</author>
<published>2024-03-01T23:11:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1601cd53c7e3197181277326dbfc131d20a74e46'/>
<id>urn:sha1:1601cd53c7e3197181277326dbfc131d20a74e46</id>
<content type='text'>
When building feature controls from a unit without a name, we try to
derive a name first from the feature unit's input, then fall back to the
output terminal.

If a feature unit connects directly to a "USB Streaming" input terminal
rather than a mixer or other virtual type, the control receives the
somewhat meaningless name "PCM", even if the output had a descriptive
type such as "Headset" or "Speaker".

Here is an example of such AudioControl descriptor from a USB headset
which ends up named "PCM Playback" and is therefore not recognized as
headphones by userspace:

      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             4
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          5
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             5
        wTerminalType      0x0402 Headset
        bAssocTerminal          4
        bSourceID               6
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 6
        bSourceID               4
        bControlSize            2
        bmaControls(0)     0x0002
          Volume Control
        bmaControls(1)     0x0000
        bmaControls(2)     0x0000
        iFeature                0

Other headsets and DACs I tried that used their output terminal for
naming only did so due to their input being an unnamed sidetone mixer.

Instead of always starting with the input terminal, check the type of it
first. If it seems uninteresting, invert the order and use the output
terminal first for naming.

This makes userspace recognize headsets with simple controls as
headphones, and leads to more consistent naming of playback devices
based on their outputs irrespective of sidetone mixers.

Signed-off-by: Kenny Levinsen &lt;kl@kl.wtf&gt;
Link: https://lore.kernel.org/r/20240301231107.42679-1-kl@kl.wtf
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: More relaxed check of MIDI jack names</title>
<updated>2024-02-15T15:56:05+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-02-15T15:31:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=41c25e193b2befc22462aa41591d397fab174ca1'/>
<id>urn:sha1:41c25e193b2befc22462aa41591d397fab174ca1</id>
<content type='text'>
The USB audio driver tries to retrieve MIDI jack name strings that can
be used for rawmidi substream names and sequencer port names, but its
checking is too strict: often the firmware provides the jack info for
unexpected directions, and then we miss the info although it's
present.

In this patch, the code to extract the jack info is changed to allow
both in and out directions in a single loop.  That is, the former two
functions to obtain the descriptor pointers for jack in and out are
changed to a single function that returns iJack of the corresponding
jack ID, no matter which direction is used.  It's a code
simplification at the same time as well as the fix.

Fixes: eb596e0fd13c ("ALSA: usb-audio: generate midi streaming substream names from jack names")
Link: https://lore.kernel.org/r/20240215153144.26047-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Ignore clock selector errors for single connection</title>
<updated>2024-02-01T14:29:40+00:00</updated>
<author>
<name>Alexander Tsoy</name>
<email>alexander@tsoy.me</email>
</author>
<published>2024-02-01T11:53:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eaa1b01fe709d6a236a9cec74813e0400601fd23'/>
<id>urn:sha1:eaa1b01fe709d6a236a9cec74813e0400601fd23</id>
<content type='text'>
For devices with multiple clock sources connected to a selector, we need
to check what a clock selector control request has returned. This is
needed to ensure that a requested clock source is indeed selected and for
autoclock feature to work.

For devices with single clock source connected, if we get an error there
is nothing else we can do about it. We can't skip clock selector setup as
it is required by some devices. So lets just ignore error in this case.

This should fix various buggy Mackie devices:

[  649.109785] usb 1-1.3: parse_audio_format_rates_v2v3(): unable to find clock source (clock -32)
[  649.111946] usb 1-1.3: parse_audio_format_rates_v2v3(): unable to find clock source (clock -32)
[  649.113822] usb 1-1.3: parse_audio_format_rates_v2v3(): unable to find clock source (clock -32)

There is also interesting info from the Windows documentation [1] (this
is probably why manufacturers dont't even test this feature):

"The USB Audio 2.0 driver doesn't support clock selection. The driver
uses the Clock Source Entity, which is selected by default and never
issues a Clock Selector Control SET CUR request."

Link: https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/usb-2-0-audio-drivers [1]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217314
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218175
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218342
Signed-off-by: Alexander Tsoy &lt;alexander@tsoy.me&gt;
Link: https://lore.kernel.org/r/20240201115308.17838-1-alexander@tsoy.me
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
