mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: add lock around sw_params
The stream and data is protected with the lock.
This commit is contained in:
parent
0b351aab99
commit
565c385228
1 changed files with 2 additions and 0 deletions
|
|
@ -726,6 +726,7 @@ static int snd_pcm_pipewire_sw_params(snd_pcm_ioplug_t * io,
|
|||
{
|
||||
snd_pcm_pipewire_t *pw = io->private_data;
|
||||
|
||||
pw_thread_loop_lock(pw->main_loop);
|
||||
if (pw->stream) {
|
||||
snd_pcm_uframes_t min_avail;
|
||||
snd_pcm_sw_params_get_avail_min( sw_params, &min_avail);
|
||||
|
|
@ -746,6 +747,7 @@ static int snd_pcm_pipewire_sw_params(snd_pcm_ioplug_t * io,
|
|||
} else {
|
||||
pw_log_debug("%p: sw_params pre-prepare noop", pw);
|
||||
}
|
||||
pw_thread_loop_unlock(pw->main_loop);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue