<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/sound/core/pcm_misc.c, branch linux-7.1.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-02-18T07:52:08+00:00</updated>
<entry>
<title>ALSA: core: Add SPDX license id to files</title>
<updated>2026-02-18T07:52:08+00:00</updated>
<author>
<name>Tim Bird</name>
<email>tim.bird@sony.com</email>
</author>
<published>2026-02-12T18:31:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=65ff3a8d0b0ab127b2580fcf334a06f76ae4744d'/>
<id>urn:sha1:65ff3a8d0b0ab127b2580fcf334a06f76ae4744d</id>
<content type='text'>
Add an SPDX id of LGPL-2.0+ to files in the
sound core sub-system that are missing ids.  Remove
boilerplate text.

These files were originally submitted in a big commit
for the ALSA sound system for kernel version 2.5.4,
by Jaroslav Kysela, in Feb 2002.

Signed-off-by: Tim Bird &lt;tim.bird@sony.com&gt;
Link: https://patch.msgid.link/20260212183103.3720788-1-tim.bird@sony.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Remove unused snd_pcm_rate_range_to_bits</title>
<updated>2025-05-05T10:36:29+00:00</updated>
<author>
<name>Dr. David Alan Gilbert</name>
<email>linux@treblig.org</email>
</author>
<published>2025-05-02T23:52:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=15b39ced6247666f616e3b0b8eeb42cd4a8a11f2'/>
<id>urn:sha1:15b39ced6247666f616e3b0b8eeb42cd4a8a11f2</id>
<content type='text'>
The last use of snd_pcm_rate_range_to_bits() was removed in 2016 by
commit b6b6e4d670c9 ("ASoC: topology: Fix setting of stream rates, rate_min
and rate_max")

Remove it.

Signed-off-by: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20250502235219.1000429-2-linux@treblig.org
</content>
</entry>
<entry>
<title>ALSA: pcm: Drop superfluous NULL check in snd_pcm_format_set_silence()</title>
<updated>2025-02-27T11:25:54+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2025-02-27T09:51:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=604a0fe88db0ecef56ac38156a154945f4535ddf'/>
<id>urn:sha1:604a0fe88db0ecef56ac38156a154945f4535ddf</id>
<content type='text'>
We applied a fix for a KASAN issue for snd_pcm_format_set_silence(),
and it introduced a NULL check of pat.  But this turned out to be
utterly superfluous; it points to pcm_formats[].silence, and this is
an array, which can be never NULL.

The problem (supposedly) it tried to address at that time was likely
already fixed by another commit 8423f0b6d513 ("ALSA: pcm: oss: Fix
race at SNDCTL_DSP_SYNC") instead.

So let's drop the superfluous NULL check again.  While we're at it,
keep the whitespace fix and move the pat assignment after the width
check for a bit better code readability.

Fixes: 2f7a26abb824 ("ALSA: pcm: Test for "silence" field in struct "pcm_format_data"")
Link: https://patch.msgid.link/20250227095150.8187-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Fix breakage of PCM rates used for topology</title>
<updated>2024-09-11T14:17:44+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-09-11T13:57:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a26234423b87e111351eac0e95775e6ba14d752'/>
<id>urn:sha1:9a26234423b87e111351eac0e95775e6ba14d752</id>
<content type='text'>
It turned out that the topology ABI takes the standard PCM rate bits
as is, and it means that the recent change of the PCM rate bits would
lead to the inconsistent rate values used for topology.

This patch reverts the original PCM rate bit definitions while adding
the new rates to the extended bits instead.  This needed the change of
snd_pcm_known_rates, too.  And this also required to fix the handling
in snd_pcm_hw_limit_rates() that blindly assumed that the list is
sorted while it became unsorted now.

Fixes: 090624b7dc83 ("ALSA: pcm: add more sample rate definitions")
Reported-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Closes: https://lore.kernel.org/1ab3efaa-863c-4dd0-8f81-b50fd9775fad@linux.intel.com
Reviewed-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Tested-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Tested-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Link: https://patch.msgid.link/20240911135756.24434-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Test for "silence" field in struct "pcm_format_data"</title>
<updated>2022-04-11T07:27:56+00:00</updated>
<author>
<name>Fabio M. De Francesco</name>
<email>fmdefrancesco@gmail.com</email>
</author>
<published>2022-04-09T01:26:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f7a26abb8241a0208c68d22815aa247c5ddacab'/>
<id>urn:sha1:2f7a26abb8241a0208c68d22815aa247c5ddacab</id>
<content type='text'>
Syzbot reports "KASAN: null-ptr-deref Write in
snd_pcm_format_set_silence".[1]

It is due to missing validation of the "silence" field of struct
"pcm_format_data" in "pcm_formats" array.

Add a test for valid "pat" and, if it is not so, return -EINVAL.

[1] https://lore.kernel.org/lkml/000000000000d188ef05dc2c7279@google.com/

Reported-and-tested-by: syzbot+205eb15961852c2c5974@syzkaller.appspotmail.com
Signed-off-by: Fabio M. De Francesco &lt;fmdefrancesco@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20220409012655.9399-1-fmdefrancesco@gmail.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Fix assignment in if condition</title>
<updated>2021-06-09T15:30:24+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-06-08T14:05:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=137c171cf7ecf624e067d800dca6cbeffb8cc73d'/>
<id>urn:sha1:137c171cf7ecf624e067d800dca6cbeffb8cc73d</id>
<content type='text'>
There are a few places doing assignments in if condition in ALSA PCM
core code, which is a bad coding style that may confuse readers and
occasionally lead to bugs.

This patch is merely for coding-style fixes, no functional changes.

Link: https://lore.kernel.org/r/20210608140540.17885-55-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge tag 'asoc-v5.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus</title>
<updated>2020-03-30T11:43:00+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-03-30T11:43:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c22baeab40b2f8e75907cfd7aa69147d5343d2c'/>
<id>urn:sha1:3c22baeab40b2f8e75907cfd7aa69147d5343d2c</id>
<content type='text'>
ASoC: Updates for v5.7

This is a very big update for the core since Morimoto-san has been
rather busy continuing his refactorings to clean up a lot of the cruft
that we have accumilated over the years.  We've also gained several new
drivers, including initial (but still not complete) parts of the Intel
SoundWire support.

 - Lots of refactorings to modernize the code from Morimoto-san.
 - Conversion of SND_SOC_ALL_CODECS to use imply from Geert Uytterhoeven.
 - Continued refactoring and fixing of the Intel support.
 - Soundwire and more advanced clocking support for Realtek RT5682.
 - Support for amlogic GX, Meson 8, Meson 8B and T9015 DAC, Broadcom
   DSL/PON, Ingenic JZ4760 and JZ4770, Realtek RL6231, and TI TAS2563 and
   TLV320ADCX140.
</content>
</entry>
<entry>
<title>ALSA: pcm: Add a standalone version of snd_pcm_limit_hw_rates</title>
<updated>2020-03-06T14:24:09+00:00</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2020-03-05T05:11:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4769bfb9dada678b31a2ec275372624dbfeed9d1'/>
<id>urn:sha1:4769bfb9dada678b31a2ec275372624dbfeed9d1</id>
<content type='text'>
It can be useful to derive min/max rates of a snd_pcm_hardware without
having a snd_pcm_runtime, such as before constructing an ASoC DAI link.

Create a new helper that takes a pointer to a snd_pcm_hardware directly,
and refactor the original function as a wrapper around it, to avoid
needing to update any call sites.

Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://lore.kernel.org/r/20200305051143.60691-2-samuel@sholland.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Minor refactoring</title>
<updated>2020-02-10T07:28:12+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-02-06T16:39:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=49d9e43f36fd4b71a4c1888f86c09cf73be73d0b'/>
<id>urn:sha1:49d9e43f36fd4b71a4c1888f86c09cf73be73d0b</id>
<content type='text'>
Make a common helper for validating the format type.
This reduces the number of cast in the code that are needed for
suppressing sparse warnings.

No functional changes, just minor refactoring.

Link: https://lore.kernel.org/r/20200206163945.6797-9-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: More constifications</title>
<updated>2020-01-05T15:14:29+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-01-05T14:47:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d03af9b8ea7e8655869834f2eed1f1d583cc5672'/>
<id>urn:sha1:d03af9b8ea7e8655869834f2eed1f1d583cc5672</id>
<content type='text'>
Apply const prefix to more possible places: the string tables for PCM
format and co, the table for the PCM type helpers, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-6-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
