mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
alsa: Use the minimum period size as headroom for SOF cards
Configure the headroom to be equal of the minimum allowed period size for the configuration. This is desirable when the ALSA driver's hw_ptr is 'jumpy' due to underplaying hardware architecture, like SOF. In case of SOF the DSP firmware will burst read at stream start to fill it's host facing buffer and later settles to a constant pace. The minimal period size is constrained by the driver to cover the initial burst and settling time of the hw_ptr. Guard this mode of working with a new boolean flag, which is only enabled for SOF cards, kept it disabled for other cards to avoid any unforeseen side effects. Even if the use-period-size-min-as-headroom is set to true, the manual headroom configuration will take precedence to allow experimentation. Link: https://github.com/thesofproject/linux/issues/5284 Link: https://github.com/thesofproject/sof/issues/9695#issuecomment-2569033847 Link: https://github.com/thesofproject/sof/issues/10172 Link: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4489 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
This commit is contained in:
parent
78937ee0ec
commit
ba7790123c
2 changed files with 24 additions and 4 deletions
|
|
@ -203,6 +203,7 @@ struct state {
|
|||
int n_fds;
|
||||
uint32_t threshold;
|
||||
uint32_t last_threshold;
|
||||
snd_pcm_uframes_t period_size_min;
|
||||
uint32_t headroom;
|
||||
uint32_t start_delay;
|
||||
uint32_t min_delay;
|
||||
|
|
@ -233,6 +234,7 @@ struct state {
|
|||
unsigned int linked:1;
|
||||
unsigned int is_batch:1;
|
||||
unsigned int force_rate:1;
|
||||
unsigned int use_period_size_min_as_headroom:1;
|
||||
|
||||
uint64_t iec958_codecs;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue