linux/sound/soc/sof/amd
Joris Verhaegen 2c92e2fbe9 ALSA: compress_offload: Add 64-bit safe timestamp infrastructure
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 <millerliang@google.com>
Tested-by: Joris Verhaegen <verhaegen@google.com>
Signed-off-by: Joris Verhaegen <verhaegen@google.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250905091301.2711705-2-verhaegen@google.com
2025-09-08 09:33:24 +02:00
..
Kconfig ASoC: SOF: amd: add build support for soundwire 2025-05-03 08:16:45 +09:00
Makefile ASoC: SOF: amd: add support for acp7.0 based platform 2024-08-23 11:03:06 +01:00
acp-common.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
acp-dsp-offset.h ASoC: SOF: amd: add soundwire wake irq handling 2025-05-03 08:16:44 +09:00
acp-ipc.c ASoC: SOF: amd: Add branch prediction hint in ACP IRQ handler 2025-02-10 13:41:51 +00:00
acp-loader.c ASoC: SOF: amd: acp-loader: Use GFP_KERNEL for DMA allocations in resume context 2025-07-28 18:58:15 +01:00
acp-pcm.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
acp-probes.c ALSA: compress_offload: Add 64-bit safe timestamp infrastructure 2025-09-08 09:33:24 +02:00
acp-stream.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
acp-trace.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
acp.c ASoC: SOF: amd: Add sof audio support for acp7.2 platform 2025-08-01 14:36:04 +01:00
acp.h ASoC: SOF: amd: Add sof audio support for acp7.2 platform 2025-08-01 14:36:04 +01:00
acp63.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
acp70.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
pci-acp63.c ASoC: SOF: pci: Convert to EXPORT_NS_DEV_PM_OPS() 2025-03-17 10:14:56 +00:00
pci-acp70.c ASoC: SOF: amd: Add sof audio support for acp7.2 platform 2025-08-01 14:36:04 +01:00
pci-rmb.c ASoC: SOF: amd: Use AMD_NODE 2025-02-18 23:15:17 +00:00
pci-rn.c ASoC: SOF: pci: Convert to EXPORT_NS_DEV_PM_OPS() 2025-03-17 10:14:56 +00:00
pci-vangogh.c ASoC: SOF: pci: Convert to EXPORT_NS_DEV_PM_OPS() 2025-03-17 10:14:56 +00:00
rembrandt.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
renoir.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
vangogh.c ASoC: SOF: amd: Drop unused includes from Vangogh driver 2025-02-10 13:41:49 +00:00