<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/sound/core, branch v6.6</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-09-16T06:08:05+00:00</updated>
<entry>
<title>ALSA: rawmidi: Fix NULL dereference at proc read</title>
<updated>2023-09-16T06:08:05+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2023-09-16T06:07:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b2ce0027d7b2905495021c5208f92043eb493146'/>
<id>urn:sha1:b2ce0027d7b2905495021c5208f92043eb493146</id>
<content type='text'>
At the implementation of the optional proc fs in rawmidi, I forgot
that rmidi-&gt;ops itself is optional and can be NULL.
Add the proper NULL check for avoiding the Oops.

Fixes: fa030f666d24 ("ALSA: ump: Additional proc output")
Reported-and-tested-by: Mark Hills &lt;mark@xwax.org&gt;
Closes: https://lore.kernel.org/r/ef9118c3-a2eb-d0ff-1efa-cc5fb6416bde@xwax.org
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20230916060725.11726-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: seq: midi: Fix -Wformat-truncation warning</title>
<updated>2023-09-15T11:21:30+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2023-09-15T08:27:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9830c3851fd6f7ca977691632b786ba11a44be77'/>
<id>urn:sha1:9830c3851fd6f7ca977691632b786ba11a44be77</id>
<content type='text'>
The compile warnings with -Wformat-truncation appearing at
snd_seq_midisynth_probe() in seq_midi.c are false-positive; those must
fit within the given string size.

For suppressing the warning, replace snprintf() with scnprintf().
As stated in the above, truncation doesn't matter.

Link: https://lore.kernel.org/r/20230915082802.28684-3-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: seq: ump: Fix -Wformat-truncation warning</title>
<updated>2023-09-15T11:21:29+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2023-09-15T08:27:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0d42260867f9ff3e3a5bcfa8750fa06a658e0b1c'/>
<id>urn:sha1:0d42260867f9ff3e3a5bcfa8750fa06a658e0b1c</id>
<content type='text'>
The filling of a port name string got a warning with W=1 due to the
potentially too long group name.  Add the string precision to limit
the size.

Fixes: 81fd444aa371 ("ALSA: seq: Bind UMP device")
Link: https://lore.kernel.org/r/20230915082802.28684-2-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: core: Use dev_name of card_dev as debugfs directory name</title>
<updated>2023-09-12T13:30:37+00:00</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@linux.intel.com</email>
</author>
<published>2023-09-12T11:01:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=091c2848b0f7643eeb44abc1e7ba8f9ef5eb366f'/>
<id>urn:sha1:091c2848b0f7643eeb44abc1e7ba8f9ef5eb366f</id>
<content type='text'>
There is no need to use temporary string for the debugfs directory name as
we can use the device name of the card.

This change will also fixes the following compiler warning/error (W=1):

sound/core/init.c: In function ‘snd_card_init’:
sound/core/init.c:367:28: error: ‘%d’ directive writing between 1 and 10 bytes into a region of size 4 [-Werror=format-overflow=]
  367 |         sprintf(name, "card%d", idx);
      |                            ^~
sound/core/init.c:367:23: note: directive argument in the range [0, 2147483646]
  367 |         sprintf(name, "card%d", idx);
      |                       ^~~~~~~~
sound/core/init.c:367:9: note: ‘sprintf’ output between 6 and 15 bytes into a destination of size 8
  367 |         sprintf(name, "card%d", idx);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

The idx is guarantied to be less than SNDRV_CARDS (max 256 or 8) by the
code in snd_card_init(), however the compiler does not see that.

The warnings got brought to light by a recent patch upstream:
commit 6d4ab2e97dcf ("extrawarn: enable format and stringop overflow warnings in W=1")

Suggested-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Suggested-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230912110113.3166-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: seq: Avoid delivery of events for disabled UMP groups</title>
<updated>2023-09-12T08:52:28+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2023-09-12T08:51:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=22eefaeab03fe968ab7786fb3d5c5abd203a8bab'/>
<id>urn:sha1:22eefaeab03fe968ab7786fb3d5c5abd203a8bab</id>
<content type='text'>
ALSA sequencer core still delivers events to the disabled UMP Group,
leaving this handling to the device.  But it's rather risky and it's
easy to imagine that such an unexpected event may screw up the device
firmware.

This patch avoids the superfluous event deliveries by setting the
group_filter of the UMP client as default, and evaluate the
group_filter properly at delivery from non-UMP clients.

The grouop_filter is updated upon the dynamic UMP Function Block
updates, so that it follows the change of the disabled UMP Groups,
too.

Fixes: d2b706077792 ("ALSA: seq: Add UMP group filter")
Link: https://lore.kernel.org/r/20230912085144.32534-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: seq: Fix snd_seq_expand_var_event() call to user-space</title>
<updated>2023-09-05T08:13:46+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2023-09-05T08:12:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=86496fd4a2fabb7c978fdaca2d4b718207a96d36'/>
<id>urn:sha1:86496fd4a2fabb7c978fdaca2d4b718207a96d36</id>
<content type='text'>
The recent fix to clear the padding bytes at
snd_seq_expand_var_event() broke the read to user-space with
in_kernel=0 parameter.  For user-space address, it has to use
clear_user() instead of memset().

Fixes: f80e6d60d677 ("ALSA: seq: Clear padded bytes at expanding events")
Reported-and-tested-by: Ash Holland &lt;ash@sorrel.sh&gt;
Closes: https://lore.kernel.org/r/8a555319-9f31-4ea2-878f-adc338bc40d4@sorrel.sh
Link: https://lore.kernel.org/r/20230905052631.18240-1-tiwai@suse.de
Link: https://lore.kernel.org/r/20230905081210.6731-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Fix error checks of default read/write copy ops</title>
<updated>2023-09-02T06:11:48+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2023-09-02T06:10:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e14ebde5df2ade7164b3adc3b8644d531a78a785'/>
<id>urn:sha1:e14ebde5df2ade7164b3adc3b8644d531a78a785</id>
<content type='text'>
copy_from/to_iter() returns the actually copied bytes, and the more
correct check should be to compare with the given bytes, instead of
zero-check.

Fixes: cf393babb37a ("ALSA: pcm: Add copy ops with iov_iter")
Reported-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Closes: https://lore.kernel.org/r/20230902053044.GJ3390869@ZenIV
Link: https://lore.kernel.org/r/20230902061044.19366-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl</title>
<updated>2023-08-29T14:03:11+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2023-08-29T13:43:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=358040e3807754944dbddf948a23c6d914297ed7'/>
<id>urn:sha1:358040e3807754944dbddf948a23c6d914297ed7</id>
<content type='text'>
The update of rate_num/den and msbits were factored out to
fixup_unreferenced_params() function to be called explicitly after the
hw_refine or hw_params procedure.  It's called from
snd_pcm_hw_refine_user(), but it's forgotten in the PCM compat ioctl.
This ended up with the incomplete rate_num/den and msbits parameters
when 32bit compat ioctl is used.

This patch adds the missing call in snd_pcm_ioctl_hw_params_compat().

Reported-by: Meng_Cai@novatek.com.cn
Fixes: f9a076bff053 ("ALSA: pcm: calculate non-mask/non-interval parameters always when possible")
Reviewed-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Reviewed-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20230829134344.31588-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: ump: Fix -Wformat-truncation warnings</title>
<updated>2023-08-26T07:22:18+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2023-08-26T07:21:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4aa69d64e43edb51a4ecff7d301e9f881eb2d3f5'/>
<id>urn:sha1:4aa69d64e43edb51a4ecff7d301e9f881eb2d3f5</id>
<content type='text'>
Filling the rawmidi name and substream name can be truncated, and this
leads to spurious compiler warnings due to -Wformat-truncation.
Although the truncation is the expected behavior, it'd be better to
truncate the string within "(...)"

This patch puts the precision specifies to each %s for fitting the
words within the size-limited strings.

Fixes: 5f11dd938fe7 ("ALSA: usb-audio: Attach legacy rawmidi after probing all UMP EPs")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202308251844.1FuQYsql-lkp@intel.com/
Link: https://lore.kernel.org/r/20230826072151.23408-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: ump: Don't create unused substreams for static blocks</title>
<updated>2023-08-24T08:03:17+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2023-08-24T07:51:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b2bcbd031d34d1ba1f491b9152474cf9f6d4d51b'/>
<id>urn:sha1:b2bcbd031d34d1ba1f491b9152474cf9f6d4d51b</id>
<content type='text'>
When the UMP Endpoint is declared as "static", that is, no dynamic
reassignment of UMP Groups, it makes little sense to expose always all
16 groups with 16 substreams.  Many of those substreams are disabled
groups, hence they are useless, but applications don't know it and try
to open / access all those substreams unnecessarily.

This patch limits the number of UMP legacy rawmidi substreams only to
the active groups.  The behavior is changed only for the static
endpoint (i.e. devices without UMP v1.1 feature implemented or with
the static block flag is set).

Fixes: 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support")
Link: https://lore.kernel.org/r/20230824075108.29958-4-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
