mirror of
https://github.com/alsa-project/alsa-utils
synced 2025-01-05 11:26:42 +01:00
alsactl: daemon mode - remove disconnected cards
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
e05b903b1f
commit
9cb5e5bee7
1 changed files with 3 additions and 1 deletions
|
@ -431,7 +431,9 @@ int state_daemon(const char *file, const char *cardname, int period,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
j += cards[i]->pfds;
|
j += cards[i]->pfds;
|
||||||
if (revents & POLLIN) {
|
if (revents & (POLLERR|POLLNVAL)) {
|
||||||
|
card_free(&cards[i]);
|
||||||
|
} else if (revents & POLLIN) {
|
||||||
if (card_events(cards[i])) {
|
if (card_events(cards[i])) {
|
||||||
/* delay the write */
|
/* delay the write */
|
||||||
if (!changed)
|
if (!changed)
|
||||||
|
|
Loading…
Reference in a new issue