Skip to content

Commit 8d6a41c

Browse files
Yanteng Siacmel
authored andcommitted
tools include UAPI: Sync the sound/asound.h copy with the kernel sources
Picking the changes from: 102882b ("ALSA: document that struct __snd_pcm_mmap_control64 is messed up") 9f65670 ("ALSA: pcm: rewrite snd_pcm_playback_silence()") Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/sound/asound.h' differs from latest version at 'include/uapi/sound/asound.h' diff -u tools/include/uapi/sound/asound.h include/uapi/sound/asound.h Signed-off-by: Yanteng Si <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/5606e7989bbb029c400117f2e455ab995208266f.1683712945.git.siyanteng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 92b8e61 commit 8d6a41c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tools/include/uapi/sound/asound.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,14 @@ struct snd_pcm_sw_params {
429429
snd_pcm_uframes_t avail_min; /* min avail frames for wakeup */
430430
snd_pcm_uframes_t xfer_align; /* obsolete: xfer size need to be a multiple */
431431
snd_pcm_uframes_t start_threshold; /* min hw_avail frames for automatic start */
432-
snd_pcm_uframes_t stop_threshold; /* min avail frames for automatic stop */
433-
snd_pcm_uframes_t silence_threshold; /* min distance from noise for silence filling */
434-
snd_pcm_uframes_t silence_size; /* silence block size */
432+
/*
433+
* The following two thresholds alleviate playback buffer underruns; when
434+
* hw_avail drops below the threshold, the respective action is triggered:
435+
*/
436+
snd_pcm_uframes_t stop_threshold; /* - stop playback */
437+
snd_pcm_uframes_t silence_threshold; /* - pre-fill buffer with silence */
438+
snd_pcm_uframes_t silence_size; /* max size of silence pre-fill; when >= boundary,
439+
* fill played area with silence immediately */
435440
snd_pcm_uframes_t boundary; /* pointers wrap point */
436441
unsigned int proto; /* protocol version */
437442
unsigned int tstamp_type; /* timestamp type (req. proto >= 2.0.12) */
@@ -570,7 +575,8 @@ struct __snd_pcm_mmap_status64 {
570575
struct __snd_pcm_mmap_control64 {
571576
__pad_before_uframe __pad1;
572577
snd_pcm_uframes_t appl_ptr; /* RW: appl ptr (0...boundary-1) */
573-
__pad_before_uframe __pad2;
578+
__pad_before_uframe __pad2; // This should be __pad_after_uframe, but binary
579+
// backwards compatibility constraints prevent a fix.
574580

575581
__pad_before_uframe __pad3;
576582
snd_pcm_uframes_t avail_min; /* RW: min available frames for wakeup */

0 commit comments

Comments
 (0)