<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/sound/compress_driver.h, branch v6.18.22</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-09-08T07:33:24+00:00</updated>
<entry>
<title>ALSA: compress_offload: Add 64-bit safe timestamp infrastructure</title>
<updated>2025-09-08T07:33:24+00:00</updated>
<author>
<name>Joris Verhaegen</name>
<email>verhaegen@google.com</email>
</author>
<published>2025-09-05T09:12:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c92e2fbe9e22cefdae87d8a0d654691ee4c1957'/>
<id>urn:sha1:2c92e2fbe9e22cefdae87d8a0d654691ee4c1957</id>
<content type='text'>
The copied_total field in struct snd_compr_tstamp is a 32-bit
value that can overflow on long-running high-bitrate streams,
leading to incorrect calculations for buffer availablility.

This patch adds a 64-bit safe timestamping mechanism.
A new UAPI struct, snd_compr_tstamp64, is added which uses 64-bit
types for byte counters. The relevant ops structures across the
ASoC and core compress code are updated to use this new struct.
ASoC drivers are updated to use u64 counters.

Internal timestamps being u64 now, a compatibility function is added
to convert the 64-bit timestamp back to the 32-bit format for legacy
ioctl callers.

Reviewed-by: Miller Liang &lt;millerliang@google.com&gt;
Tested-by: Joris Verhaegen &lt;verhaegen@google.com&gt;
Signed-off-by: Joris Verhaegen &lt;verhaegen@google.com&gt;
Reviewed-by: Srinivas Kandagatla &lt;srinivas.kandagatla@oss.qualcomm.com&gt;
Reviewed-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Acked-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20250905091301.2711705-2-verhaegen@google.com
</content>
</entry>
<entry>
<title>ALSA: compress_offload: Add missing descriptions in structs</title>
<updated>2024-11-13T12:54:27+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-11-13T07:23:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b773c086ed58c7e9111a4d4f251a98db3d4165d8'/>
<id>urn:sha1:b773c086ed58c7e9111a4d4f251a98db3d4165d8</id>
<content type='text'>
Add the missing descriptions for snd_compr_ops, snd_compr_task and
snd_compr_task_status fields, in order to shut up the build warnings.

Fixes: 04177158cf98 ("ALSA: compress_offload: introduce accel operation mode")
Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Closes: https://lore.kernel.org/20241028193731.4b0c3788@canb.auug.org.au
Link: https://patch.msgid.link/20241113072304.4447-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: compress_offload: introduce accel operation mode</title>
<updated>2024-10-25T08:53:20+00:00</updated>
<author>
<name>Jaroslav Kysela</name>
<email>perex@perex.cz</email>
</author>
<published>2024-10-02T09:39:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=04177158cf98a79744937893b100020d77e6f9ac'/>
<id>urn:sha1:04177158cf98a79744937893b100020d77e6f9ac</id>
<content type='text'>
There is a requirement to expose the audio hardware that accelerates various
tasks for user space such as sample rate converters, compressed
stream decoders, etc.

This is description for the API extension for the compress ALSA API which
is able to handle "tasks" that are not bound to real-time operations
and allows for the serialization of operations.

For details, refer to "compress-accel.rst" document.

Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: Shengjiu Wang &lt;shengjiu.wang@gmail.com&gt;
Cc: Nicolas Dufresne &lt;nicolas@ndufresne.ca&gt;
Cc: Amadeusz Sławiński &lt;amadeuszx.slawinski@linux.intel.com&gt;
Cc: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.dev&gt;
Cc: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Reviewed-by: Amadeusz Sławiński &lt;amadeuszx.slawinski@linux.intel.com&gt;
Tested-by: Shengjiu Wang &lt;shengjiu.wang@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20241002093904.1809799-1-perex@perex.cz
</content>
</entry>
<entry>
<title>ALSA: compress: Don't embed device</title>
<updated>2023-08-17T07:24:15+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2023-08-16T16:02:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b53a41ee9c7281d961a29a3524bcaacfc9020dd5'/>
<id>urn:sha1:b53a41ee9c7281d961a29a3524bcaacfc9020dd5</id>
<content type='text'>
Embedding the struct device to snd_compr object may result in UAF when
the delayed kobj release is used.  Like other devices, let's detach
the struct device from the snd_compr by allocating dynamically via
snd_device_alloc().

Reviewed-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Signed-off-by: Curtis Malainey &lt;cujomalainey@chromium.org&gt;
Tested-by: Curtis Malainey &lt;cujomalainey@chromium.org&gt;
Link: https://lore.kernel.org/r/20230816160252.23396-7-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: compress: Drop unused functions</title>
<updated>2021-07-15T08:22:30+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-07-14T16:24:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc93c96fe34e10b873fef73e80cee52503f3a679'/>
<id>urn:sha1:fc93c96fe34e10b873fef73e80cee52503f3a679</id>
<content type='text'>
snd_compress_register() and snd_compress_deregister() API functions
have been never used by in-tree drivers.
Let's clean up the dead code.

Acked-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Reviewed-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210714162424.4412-2-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: compress: allow pause and resume during draining</title>
<updated>2020-11-27T18:45:05+00:00</updated>
<author>
<name>Gyeongtaek Lee</name>
<email>gt82.lee@samsung.com</email>
</author>
<published>2020-11-26T12:34:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9be9f2d3d073ef42127475f4fb6a392ab133f629'/>
<id>urn:sha1:9be9f2d3d073ef42127475f4fb6a392ab133f629</id>
<content type='text'>
With a stream with low bitrate, user can't pause or resume the stream
near the end of the stream because current ALSA doesn't allow it.
If the stream has very low bitrate enough to store whole stream into
the buffer, user can't do anything except stop the stream and then
restart it from the first because most of applications call draining
after sending last frame to the kernel.
If pause, resume are allowed during draining, user experience can be
enhanced.
To prevent malfunction in HW drivers which don't support pause
during draining, pause during draining will only work if HW driver
enable this feature explicitly by calling
snd_compr_use_pause_in_draining().

Signed-off-by: Gyeongtaek Lee &lt;gt82.lee@samsung.com&gt;
Acked-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Link: https://lore.kernel.org/r/000101d6c3f0$89b312b0$9d193810$@samsung.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: compress: fix partial_drain completion state</title>
<updated>2020-07-07T09:52:18+00:00</updated>
<author>
<name>Vinod Koul</name>
<email>vkoul@kernel.org</email>
</author>
<published>2020-06-29T13:47:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f79a732a8325dfbd570d87f1435019d7e5501c6d'/>
<id>urn:sha1:f79a732a8325dfbd570d87f1435019d7e5501c6d</id>
<content type='text'>
On partial_drain completion we should be in SNDRV_PCM_STATE_RUNNING
state, so set that for partially draining streams in
snd_compr_drain_notify() and use a flag for partially draining streams

While at it, add locks for stream state change in
snd_compr_drain_notify() as well.

Fixes: f44f2a5417b2 ("ALSA: compress: fix drain calls blocking other compress functions (v6)")
Reviewed-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Tested-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Reviewed-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Tested-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Link: https://lore.kernel.org/r/20200629134737.105993-4-vkoul@kernel.org
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: core: Implement compress page allocation and free routines</title>
<updated>2020-02-18T21:52:05+00:00</updated>
<author>
<name>Cezary Rojewski</name>
<email>cezary.rojewski@intel.com</email>
</author>
<published>2020-02-18T14:39:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b9759ef2fd1acb0d3f3dce7991c44a4c5e9e68a3'/>
<id>urn:sha1:b9759ef2fd1acb0d3f3dce7991c44a4c5e9e68a3</id>
<content type='text'>
Add simple malloc and free methods for memory management for compress
streams. Based on snd_pcm_lib_malloc_pages and snd_pcm_lib_free_pages
implementation.

Signed-off-by: Divya Prakash &lt;divya1.prakash@intel.com&gt;
Signed-off-by: Cezary Rojewski &lt;cezary.rojewski@intel.com&gt;
Reviewed-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Acked-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Acked-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200218143924.10565-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ALSA: core: Expand DMA buffer information</title>
<updated>2020-02-18T21:52:04+00:00</updated>
<author>
<name>Cezary Rojewski</name>
<email>cezary.rojewski@intel.com</email>
</author>
<published>2020-02-18T14:39:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=386dd54b3a2eedb91aa6e465e7c3a57db04f3960'/>
<id>urn:sha1:386dd54b3a2eedb91aa6e465e7c3a57db04f3960</id>
<content type='text'>
Update DMA buffer definition for snd_compr_runtime so it is represented
similarly as in snd_pcm_runtime. While at it, modify
snd_compr_set_runtime_buffer to account for newly added members.

Signed-off-by: Cezary Rojewski &lt;cezary.rojewski@intel.com&gt;
Reviewed-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Acked-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Acked-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200218143924.10565-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ALSA: compress: Fix regression on compressed capture streams</title>
<updated>2019-07-23T10:07:22+00:00</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2019-07-22T09:24:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4475f8c4ab7b248991a60d9c02808dbb813d6be8'/>
<id>urn:sha1:4475f8c4ab7b248991a60d9c02808dbb813d6be8</id>
<content type='text'>
A previous fix to the stop handling on compressed capture streams causes
some knock on issues. The previous fix updated snd_compr_drain_notify to
set the state back to PREPARED for capture streams. This causes some
issues however as the handling for snd_compr_poll differs between the
two states and some user-space applications were relying on the poll
failing after the stream had been stopped.

To correct this regression whilst still fixing the original problem the
patch was addressing, update the capture handling to skip the PREPARED
state rather than skipping the SETUP state as it has done until now.

Fixes: 4f2ab5e1d13d ("ALSA: compress: Fix stop handling on compressed capture streams")
Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Acked-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
