<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/sound/usb/midi2.c, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-02-22T01:09:51Z</updated>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2026-02-22T00:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2026-02-21T07:49:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Replace manual mutex/spinlock with guard()</title>
<updated>2025-08-12T06:36:17Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2025-08-11T08:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=efea7a57370b956ef612dc603faa2df9126cc3ed'/>
<id>urn:sha1:efea7a57370b956ef612dc603faa2df9126cc3ed</id>
<content type='text'>
This is another code cleanup by replacing the manual mutex or spinlock
with guard() macros.  usb_audio_disconnect() is slightly refactored
(split to another function) to apply guard() cleanly, but the rest are
rather straightforward conversions.

No functional changes but only code refactoring.

Link: https://patch.msgid.link/20250811082019.31052-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Copy string more safely</title>
<updated>2025-07-11T07:53:36Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2025-07-10T10:07:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=53beb4d0ed8f9bf31ba30e65953abb473b191bd0'/>
<id>urn:sha1:53beb4d0ed8f9bf31ba30e65953abb473b191bd0</id>
<content type='text'>
Replace strcpy() and sprintf() usages in the USB audio drivers with
the safer versions (strscpy() and scnprintf()) with the proper max
size evaluation.  Only for safety, no actual behavior change.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20250710100727.22653-103-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Update UMP group attributes for GTB blocks, too</title>
<updated>2024-08-07T09:31:38Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2024-08-07T09:22:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebaa86c0bddd2c47c516bf2096b17c0bed71d914'/>
<id>urn:sha1:ebaa86c0bddd2c47c516bf2096b17c0bed71d914</id>
<content type='text'>
When a FB is created from a GTB instead of UMP FB Info inquiry, we
missed the update of the corresponding UMP Group attributes.
Export the call of updater and let it be called from the USB driver.

Fixes: 0642a3c5cacc ("ALSA: ump: Update substream name from assigned FB names")
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20240807092303.1935-5-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Set MIDI1 flag appropriately for GTB MIDI 1.0 entry</title>
<updated>2024-08-07T09:31:37Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2024-08-07T09:22:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac3a9185bd5f547cb16ef1388e8786ad5a6e8858'/>
<id>urn:sha1:ac3a9185bd5f547cb16ef1388e8786ad5a6e8858</id>
<content type='text'>
When a MIDI 1.0 protocol is specified in a GTB entry while others are
set in MIDI 2.0, it should be seen as a legacy MIDI 1.0 port.  Since
recently we allow drivers to set a flag SNDRV_UMP_BLOCK_IS_MIDI1 to a
FB for that purpose.  This patch tries to set that flag when the
device shows such a configuration.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20240807092303.1935-4-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Accept multiple protocols in GTBs</title>
<updated>2024-08-07T09:31:37Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2024-08-07T09:22:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b28654233f654cc16134b72751bf371c7bf0ce3a'/>
<id>urn:sha1:b28654233f654cc16134b72751bf371c7bf0ce3a</id>
<content type='text'>
It's valid to give different protocols via multiple GTBs; e.g. a MIDI
1.0 port is embedded in a MIDI 2.0 device that talks with MIDI 2.0
protocol.  However, the current driver implementation assumes only a
single protocol over the whole Endpoint, and it can't handle such a
scenario.

This patch changes the driver's behavior to parse GTBs to accept
multiple protocols.  Instead of switching to the last given protocol,
it adds the protocol capability bits now.  Meanwhile, the default
protocol is chosen by the first given protocol in GTBs.

Practically seen, this should be a minor issue, as new devices should
specify the protocols properly via UMP Endpoint Info messages, so this
is rather just covering a corner case.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20240807092303.1935-3-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: usb-audio: fix typo</title>
<updated>2024-01-24T13:40:47Z</updated>
<author>
<name>Jacob Siverskog</name>
</author>
<published>2024-01-24T10:18:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7c4298534ce3c4b85099aba53442ec82ef17578b'/>
<id>urn:sha1:7c4298534ce3c4b85099aba53442ec82ef17578b</id>
<content type='text'>
fix typo in midi fallback log.

Signed-off-by: Jacob Siverskog &lt;jacob@teenage.engineering&gt;
Fixes: ff49d1df79ae ("ALSA: usb-audio: USB MIDI 2.0 UMP support")
Link: https://lore.kernel.org/r/20240124101827.35433-1-jacob@teenage.engineering
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Fix potential memory leaks at error path for UMP open</title>
<updated>2023-09-05T08:10:48Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2023-09-05T05:45:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1757fa30ef14f254f4719bf6f7d54a4c8207216'/>
<id>urn:sha1:b1757fa30ef14f254f4719bf6f7d54a4c8207216</id>
<content type='text'>
The allocation and initialization errors at alloc_midi_urbs() that is
called at MIDI 2.0 / UMP device are supposed to be handled at the
caller side by invoking free_midi_urbs().  However, free_midi_urbs()
loops only for ep-&gt;num_urbs entries, and since ep-&gt;num_entries wasn't
updated yet at the allocation / init error in alloc_midi_urbs(), this
entry won't be released.

The intention of free_midi_urbs() is to release the whole elements, so
change the loop size to NUM_URBS to scan over all elements for fixing
the missed releases.

Also, the call of free_midi_urbs() is missing at
snd_usb_midi_v2_open().  Although it'll be released later at
reopen/close or disconnection, it's better to release immediately at
the error path.

Fixes: ff49d1df79ae ("ALSA: usb-audio: USB MIDI 2.0 UMP support")
Reported-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Closes: https://lore.kernel.org/r/fc275ed315b9157952dcf2744ee7bdb78defdb5f.1693746347.git.christophe.jaillet@wanadoo.fr
Link: https://lore.kernel.org/r/20230905054511.20502-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Attach legacy rawmidi after probing all UMP EPs</title>
<updated>2023-08-24T08:03:15Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2023-08-24T07:51:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f11dd938fe7657899ca79b2ffc4d708e43f4737'/>
<id>urn:sha1:5f11dd938fe7657899ca79b2ffc4d708e43f4737</id>
<content type='text'>
The legacy rawmidi devices are the shadows of the main UMP devices,
hence it's better to initialize them after all UMP Endpoints are
parsed.  Then, at the moment the legacy rawmidi is created, we already
know the static flag or the proper EP name string, and we can fill
those information at UMP core side instead of fiddling the attributes
at a later point.

Fixes: ec362b63c4b5 ("ALSA: usb-audio: Enable the legacy raw MIDI support")
Link: https://lore.kernel.org/r/20230824075108.29958-2-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
