mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa-pcm: enable interrupts after alsa recovery
Interrupts are disabled in alsa_irq_wakeup_event -> playback_ready method to not produce another wakeups when waiting for a new data. Interrupts are enabled again when a new data arrives in a method spa_alsa_write. In rare cases, when there is multiple streams providing data and one of them is disconnected, a new data fails to be delivered and the spa_alsa_write is not called. Not providing data produces underrun and alsa-pcm invokes recovery process. Recovery process starts a new playback, but without interrupts enabled is graph not triggered and new data are not delivered (to enable interrupts). Recovery process keeps running in loop. Now the interrupts are enabled again after the recovery and the starvation should not occur. Signed-off-by: Martin Geier <martin.geier@streamunlimited.com>
This commit is contained in:
parent
c2e539b780
commit
9afa0cd270
1 changed files with 3 additions and 0 deletions
|
|
@ -2601,6 +2601,7 @@ static inline int do_start(struct state *state)
|
|||
}
|
||||
|
||||
static inline int check_position_config(struct state *state, bool starting);
|
||||
static void update_sources(struct state *state, bool active);
|
||||
|
||||
static int alsa_recover(struct state *state)
|
||||
{
|
||||
|
|
@ -2680,6 +2681,8 @@ recover:
|
|||
if (follower != driver && follower->linked)
|
||||
do_start(follower);
|
||||
}
|
||||
|
||||
update_sources(state, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue