<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/sound/soc/sof/compress.c, 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>ASoC: SOF: Use no_reply calls for TX</title>
<updated>2023-04-20T11:51:45+00:00</updated>
<author>
<name>Curtis Malainey</name>
<email>cujomalainey@chromium.org</email>
</author>
<published>2023-04-19T19:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=367fd6ffa294ca3346902aa0814fac31bb5a6059'/>
<id>urn:sha1:367fd6ffa294ca3346902aa0814fac31bb5a6059</id>
<content type='text'>
Convert all existing calls that pass "NULL, 0" for reply data to the new
no_reply calls. Also convert any calls that pass in data but don't
actually parse the result.

Signed-off-by: Curtis Malainey &lt;cujomalainey@chromium.org&gt;
Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Reviewed-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Reviewed-by: Péter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Reviewed-by: Ranjani Sridharan &lt;ranjani.sridharan@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230419194057.42205-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: compress: Set compress data offset</title>
<updated>2023-01-17T13:37:54+00:00</updated>
<author>
<name>Daniel Baluta</name>
<email>daniel.baluta@nxp.com</email>
</author>
<published>2023-01-17T12:25:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a9737808b3e4e2313cc2aab2e807836a06576277'/>
<id>urn:sha1:a9737808b3e4e2313cc2aab2e807836a06576277</id>
<content type='text'>
Because now snd_sof_set_stream_data_offset has compress
support we use it to set posn_offset for compress stream.

Reviewed-by: Paul Olaru &lt;paul.olaru@nxp.com&gt;
Reviewed-by: Iuliana Prodan &lt;iuliana.prodan@nxp.com&gt;
Reviewed-by: Ranjani Sridharan &lt;ranjani.sridharan@linux.intel.com&gt;
Reviewed-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Signed-off-by: Daniel Baluta &lt;daniel.baluta@nxp.com&gt;
Link: https://lore.kernel.org/r/20230117122533.201708-5-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: compress: Add copy function for capture case</title>
<updated>2022-08-31T11:12:59+00:00</updated>
<author>
<name>Laurentiu Mihalcea</name>
<email>laurentiu.mihalcea@nxp.com</email>
</author>
<published>2022-08-22T10:15:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a01e19278022cd2f7daa7a065ed47c5022dbad9'/>
<id>urn:sha1:1a01e19278022cd2f7daa7a065ed47c5022dbad9</id>
<content type='text'>
Added a new copy function used to copy data to user buffer
in the case of compress capture.

Reviewed-by: Paul Olaru &lt;paul.olaru@nxp.com&gt;
Reviewed-by: Daniel Baluta &lt;daniel.baluta@nxp.com&gt;
Signed-off-by: Laurentiu Mihalcea &lt;laurentiu.mihalcea@nxp.com&gt;
Link: https://lore.kernel.org/r/20220822101502.17644-3-laurentiu.mihalcea@nxp.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: compress: Move sof_compr_copy functionality</title>
<updated>2022-08-31T11:12:58+00:00</updated>
<author>
<name>Laurentiu Mihalcea</name>
<email>laurentiu.mihalcea@nxp.com</email>
</author>
<published>2022-08-22T10:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=272ff8828f35658aace17e3227624fbbd68a6bcf'/>
<id>urn:sha1:272ff8828f35658aace17e3227624fbbd68a6bcf</id>
<content type='text'>
Since we're preparing to add support for compress capture,
we need to move the content of sof_compr_copy into a
separate function which handles the playback direction just
like the initial sof_compr_copy.

Reviewed-by: Paul Olaru &lt;paul.olaru@nxp.com&gt;
Reviewed-by: Daniel Baluta &lt;daniel.baluta@nxp.com&gt;
Signed-off-by: Laurentiu Mihalcea &lt;laurentiu.mihalcea@nxp.com&gt;
Link: https://lore.kernel.org/r/20220822101502.17644-2-laurentiu.mihalcea@nxp.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: compress: Remove dai_posn variable</title>
<updated>2022-08-23T12:04:52+00:00</updated>
<author>
<name>Daniel Baluta</name>
<email>daniel.baluta@nxp.com</email>
</author>
<published>2022-08-22T17:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d45f552a1e44e2885c4b7551564241959d8138be'/>
<id>urn:sha1:d45f552a1e44e2885c4b7551564241959d8138be</id>
<content type='text'>
dai_posn is set but never used. Initial intention was
to use dai_posn to shorthen one code line but it looks fine
without it too.

Fixes: c1a731c71359 ("ASoC: SOF: compress: Add support for computing timestamps")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Daniel Baluta &lt;daniel.baluta@nxp.com&gt;
Link: https://lore.kernel.org/r/20220822174937.254873-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: compress: Add support for computing timestamps</title>
<updated>2022-08-17T12:00:24+00:00</updated>
<author>
<name>Laurentiu Mihalcea</name>
<email>laurentiu.mihalcea@nxp.com</email>
</author>
<published>2022-08-17T08:05:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c1a731c71359407eae4fd0a5fd675ef25a582764'/>
<id>urn:sha1:c1a731c71359407eae4fd0a5fd675ef25a582764</id>
<content type='text'>
We compute the number of pcm_io_frames by dividing the
dai position to size of a frame (channels * sample size).

Reviewed-by: Paul Olaru &lt;paul.olaru@oss.nxp.com&gt;
Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Laurentiu Mihalcea &lt;laurentiu.mihalcea@nxp.com&gt;
Signed-off-by: Daniel Baluta &lt;daniel.baluta@nxp.com&gt;
Link: https://lore.kernel.org/r/20220817080529.10864-5-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: compress: Save channel count and sample bytes</title>
<updated>2022-08-17T12:00:23+00:00</updated>
<author>
<name>Laurentiu Mihalcea</name>
<email>laurentiu.mihalcea@nxp.com</email>
</author>
<published>2022-08-17T08:05:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3ccbe6887747679d15e5c9524b23754281a24d9e'/>
<id>urn:sha1:3ccbe6887747679d15e5c9524b23754281a24d9e</id>
<content type='text'>
The purpose of this change is to enable the saving of the
channel count and sample container bytes format parameters for later use
to compute the timestamps.

This is done when setting the compress stream parameters
(in sof_compr_set_params).

Reviewed-by: Paul Olaru &lt;paul.olaru@oss.nxp.com&gt;
Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Laurentiu Mihalcea &lt;laurentiu.mihalcea@nxp.com&gt;
Signed-off-by: Daniel Baluta &lt;daniel.baluta@nxp.com&gt;
Link: https://lore.kernel.org/r/20220817080529.10864-4-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: compress: Introduce sof_compr_stream</title>
<updated>2022-08-17T12:00:22+00:00</updated>
<author>
<name>Daniel Baluta</name>
<email>daniel.baluta@nxp.com</email>
</author>
<published>2022-08-17T08:05:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e3091f0a3f563ad1c9b60c290752e1190b67ea97'/>
<id>urn:sha1:e3091f0a3f563ad1c9b60c290752e1190b67ea97</id>
<content type='text'>
This will keep SOF compress stream private data. So far
we used snd_compr_tstamp to hold the private data but this
is no longer enough as we need to hold other info like
number of channels or sample bytes.

Reviewed-by: Paul Olaru &lt;paul.olaru@oss.nxp.com&gt;
Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Daniel Baluta &lt;daniel.baluta@nxp.com&gt;
Link: https://lore.kernel.org/r/20220817080529.10864-3-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: compress: Remove byte offset computation</title>
<updated>2022-08-17T12:00:21+00:00</updated>
<author>
<name>Daniel Baluta</name>
<email>daniel.baluta@nxp.com</email>
</author>
<published>2022-08-17T08:05:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bab10ec9fd9dc1537b705d0dd3862dd5982b921f'/>
<id>urn:sha1:bab10ec9fd9dc1537b705d0dd3862dd5982b921f</id>
<content type='text'>
Byte offset is the offset in the ring buffer to the DSP
while posn_offset is an offset inside the stream_box where
we keep position information.

Reviewed-by: Paul Olaru &lt;paul.olaru@oss.nxp.com&gt;
Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Daniel Baluta &lt;daniel.baluta@nxp.com&gt;
Link: https://lore.kernel.org/r/20220817080529.10864-2-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
