<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/sound/core/pcm_lib.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-08-10T08:40:58Z</updated>
<entry>
<title>ALSA: pcm: Add xrun counter for snd_pcm_substream</title>
<updated>2024-08-10T08:40:58Z</updated>
<author>
<name>Norman Bintang</name>
</author>
<published>2024-08-09T14:06:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=72c0f57dbe8bf625108dc67e34f3472f28501776'/>
<id>urn:sha1:72c0f57dbe8bf625108dc67e34f3472f28501776</id>
<content type='text'>
This patch adds an xrun counter to snd_pcm_substream as an alternative
to using logs from XRUN_DEBUG_BASIC. The counter provides a way to track
the number of xrun occurences, accessible through the /proc interface.

The counter is enabled when CONFIG_SND_PCM_XRUN_DEBUG is set.

Example output:

$ cat /proc/asound/card0/pcm9p/sub0/status

owner_pid   : 1425
trigger_time: 235.248957291
tstamp      : 0.000000000
delay       : 1912
avail       : 480
avail_max   : 1920
-----
hw_ptr      : 672000
appl_ptr    : 673440
xrun_counter: 3  # (new row)

Signed-off-by: Norman Bintang &lt;normanbt@chromium.org&gt;
Reviewed-by: Chih-Yang Hsia &lt;paulhsia@chromium.org&gt;
Tested-by: Chih-Yang Hsia &lt;paulhsia@chromium.org&gt;
Reviewed-by: David Riley &lt;davidriley@chromium.org&gt;
Link: https://patch.msgid.link/20240809140648.3414349-1-normanbt@chromium.org
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Fix id copying in snd_pcm_set_sync_per_card()</title>
<updated>2024-07-05T08:02:07Z</updated>
<author>
<name>Jaroslav Kysela</name>
</author>
<published>2024-07-05T07:58:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a892b700e63bcb3679ebed1a0c3160e7b9225138'/>
<id>urn:sha1:a892b700e63bcb3679ebed1a0c3160e7b9225138</id>
<content type='text'>
Avoid to use strncpy and do proper length limiting (12 bytes)
to avoid out of array access.

Fixes: d712c58c55d9 ("ALSA: pcm: optimize and clarify stream synchronization ID API")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202407050501.o5Z3bibi-lkp@intel.com/
Signed-off-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Link: https://patch.msgid.link/20240705075828.19746-1-perex@perex.cz
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Fix missing export of snd_pcm_set_sync_per-card()</title>
<updated>2024-07-05T07:47:40Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2024-07-05T06:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bc7540b794df29f6ec0b24996381d6e68779d02f'/>
<id>urn:sha1:bc7540b794df29f6ec0b24996381d6e68779d02f</id>
<content type='text'>
The recent change for the PCM sync API forgot to export a new API
function that is currently used in emu10k1 driver.

This patch adds the missing export.

Fixes: d712c58c55d9 ("ALSA: pcm: optimize and clarify stream synchronization ID API")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202407051343.1Sz8AKFt-lkp@intel.com/
Reviewed-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Link: https://patch.msgid.link/20240705063555.17220-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: optimize and clarify stream synchronization ID API</title>
<updated>2024-07-02T07:53:21Z</updated>
<author>
<name>Jaroslav Kysela</name>
</author>
<published>2024-06-25T17:25:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d712c58c55d9a4b4cc88ec2e1f8cd2e3b82359b5'/>
<id>urn:sha1:d712c58c55d9a4b4cc88ec2e1f8cd2e3b82359b5</id>
<content type='text'>
Optimize the memory usage in struct snd_pcm_runtime - use boolean
value for the standard sync ID scheme.

Introduce snd_pcm_set_sync_per_card function to build synchronization
IDs.

Signed-off-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20240625172836.589380-3-perex@perex.cz
</content>
</entry>
<entry>
<title>ALSA: pcm: reinvent the stream synchronization ID API</title>
<updated>2024-07-02T07:53:21Z</updated>
<author>
<name>Jaroslav Kysela</name>
</author>
<published>2024-06-25T17:25:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f05c1ffc274516ef101d2e0f860bcb9b08c6c622'/>
<id>urn:sha1:f05c1ffc274516ef101d2e0f860bcb9b08c6c622</id>
<content type='text'>
Until the commit e11f0f90a626 ("ALSA: pcm: remove SNDRV_PCM_IOCTL1_INFO
internal command"), there was a possibility to pass information
about the synchronized streams to the user space. The mentioned
commit removed blindly the appropriate code with an irrelevant comment.

The revert may be appropriate, but since this API was lost for several
years without any complains, it's time to improve it. The hardware
parameters may change the used stream clock source (e.g. USB hardware)
so move this synchronization ID to hw_params as read-only field.

It seems that pipewire can benefit from this API (disable adaptive
resampling for perfectly synchronized PCM streams) now.

Note that the contents of ID is not supposed to be used for direct
comparison with a specific byte sequence. The "empty" case is when
all bytes are zero (driver does not offer this information)
and all other cases must be only used for equal comparison among
PCM streams (including different sound cards) if they are using
identical hardware clock.

Cc: Takashi Sakamoto &lt;takaswie@kernel.org&gt;
Signed-off-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20240625172836.589380-2-perex@perex.cz
</content>
</entry>
<entry>
<title>ALSA: chmap: Mark Channel Map controls as volatile</title>
<updated>2024-06-18T10:00:19Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2024-06-16T07:34:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=210e6a844112bd7e28a04faedac677918e1f3040'/>
<id>urn:sha1:210e6a844112bd7e28a04faedac677918e1f3040</id>
<content type='text'>
The values returned from Playback Channel Map and Capture Channel Map
controls may vary dynamically depending on the corresponding PCM
stream.  Mark those as volatile to indicate the values are unstable
and not suitable for testing.

Note that we may change the driver to return -EINVAL, but this would
bring other side effects, such as "alsactl restore" would start
receiving unexpected errors.  So we still keep returning 0 for those
invalid inputs.

Reported-by: Paul Menzel &lt;pmenzel@molgen.mpg.de&gt;
Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09405@molgen.mpg.de
Reviewed-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://lore.kernel.org/20240616073454.16512-6-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: pcm: Use guard() for PCM stream locks</title>
<updated>2024-02-28T14:01:22Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2024-02-27T08:53:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=650224fe8d5f6dbe6cc5875d14bf80da60dd56f8'/>
<id>urn:sha1:650224fe8d5f6dbe6cc5875d14bf80da60dd56f8</id>
<content type='text'>
Define guard() usage for PCM stream locking and use it in appropriate
places.

The pair of snd_pcm_stream_lock() and snd_pcm_stream_unlock() can be
presented with guard(pcm_stream_lock) now.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://lore.kernel.org/r/20240227085306.9764-23-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: hda: Upgrade stream-format infrastructure</title>
<updated>2023-11-27T16:27:41Z</updated>
<author>
<name>Cezary Rojewski</name>
</author>
<published>2023-11-17T12:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d24f1a090d3f2a5c86a8782afeda71c2d2539966'/>
<id>urn:sha1:d24f1a090d3f2a5c86a8782afeda71c2d2539966</id>
<content type='text'>
Introduce a set of functions that ultimately facilite SDxFMT-related
calculations in atomic manner:

First, introduce snd_pcm_subformat_width() and snd_pcm_hw_params_bits()
helpers that separate the base functionality from the HDAudio-specific
one.

snd_hdac_format_normalize() - format converter. S20_LE, S24_LE and their
unsigned and BE friends are invalid from HDAudio perspective but still
can be specified as function argument due to compatibility reasons.

snd_hdac_stream_format_bits() - obtain just the bits-per-sample value.
Does not ignore subformat and msbits parameters.

snd_hdac_stream_format() and snd_hdac_spdif_stream_format() - obtain the
SDxFMT value given the audio format parameters. The former is stripped
away of spdif-related information. Useful for users that do not care
about them.

Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Cezary Rojewski &lt;cezary.rojewski@intel.com&gt;
Acked-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Link: https://lore.kernel.org/r/20231117120610.1755254-5-cezary.rojewski@intel.com
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:48Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2023-09-02T06:10:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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: Drop obsoleted PCM copy_user and copy_kernel ops</title>
<updated>2023-08-18T10:19:19Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2023-08-15T19:01:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c0217b11066b9bcd6d8f1f8bd11c0610e536e04'/>
<id>urn:sha1:6c0217b11066b9bcd6d8f1f8bd11c0610e536e04</id>
<content type='text'>
Finally all users have been converted to the new PCM copy ops, let's
drop the obsoleted copy_kernel and copy_user ops completely.

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