alsa-plugin: unblock alsa poll when there is pw error

When there is a core error, update_active method is called from
on_core_error. update_active is supposed to unblock alsa thread,
in case the alsa is waiting for more some room for data.

Checking for active state is not sufficient and spa_system_eventfd_write
needs to be called also in case of error.

Signed-off-by: Martin Geier <martin.geier@streamunlimited.com>
This commit is contained in:
Martin Geier 2022-10-25 08:34:09 +02:00 committed by Wim Taymans
parent 422c2ad726
commit 1a4c2ce624

View file

@ -166,7 +166,7 @@ static int update_active(snd_pcm_ioplug_t *io)
pw->active = check_active(io);
uint64_t val;
if (pw->active)
if (pw->active || pw->error < 0)
spa_system_eventfd_write(pw->system, io->poll_fd, 1);
else
spa_system_eventfd_read(pw->system, io->poll_fd, &val);