]> git.alsa-project.org Git - tinycompress.git/commit
utils: probes_demux: auto-close idle audio files and avoid overwrites
authorJyri Sarha <jyri.sarha@linux.intel.com>
Tue, 31 Mar 2026 15:05:52 +0000 (18:05 +0300)
committerJaroslav Kysela <perex@perex.cz>
Fri, 29 May 2026 12:04:53 +0000 (14:04 +0200)
commit55713ea212bc8055166741bbf4e62ed435445f1c
treee584185830396bcbca045916b51b4118882ac5fa
parentfab6dfb0d1daeb35a867ec1ad9a9ee30da8cc278
utils: probes_demux: auto-close idle audio files and avoid overwrites

Audio capture files (buffer_<id>.wav) are now automatically closed
after 200 ms of inactivity, so completed recordings can be accessed
while sofprobeclient is still running.

If the same probe point becomes active again, a new file is created
with an incrementing index (buffer_<id>-1.wav, buffer_<id>-2.wav, ...)
rather than overwriting the previous capture.  The index is chosen by
probing the filesystem, so existing files from earlier runs are never
clobbered either.

Buffer IDs in file names and log messages are printed in hexadecimal
(e.g. buffer_0x1a.wav) to match firmware conventions.

Closes: https://github.com/alsa-project/tinycompress/pull/35
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/utils/probes_demux.c
src/utils/probes_demux.h
src/utils/sofprobeclient.c