]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Added POLLNVAL to poll->events
authorJaroslav Kysela <perex@perex.cz>
Sat, 30 Nov 2002 09:47:20 +0000 (09:47 +0000)
committerJaroslav Kysela <perex@perex.cz>
Sat, 30 Nov 2002 09:47:20 +0000 (09:47 +0000)
src/control/control.c
src/hwdep/hwdep.c
src/mixer/mixer.c
src/pcm/pcm.c
src/rawmidi/rawmidi.c
src/seq/seq.c
src/timer/timer.c

index 5f0f1bc327cb618fba79f20bd2154448ad0ddf20..29c81434f7337346c03a84aa89f12dbbd791e52e 100644 (file)
@@ -178,7 +178,7 @@ int snd_ctl_poll_descriptors(snd_ctl_t *ctl, struct pollfd *pfds, unsigned int s
        assert(ctl && pfds);
        if (space > 0) {
                pfds->fd = ctl->poll_fd;
-               pfds->events = POLLIN|POLLERR;
+               pfds->events = POLLIN|POLLERR|POLLNVAL;
                return 1;
        }
        return 0;
index 994e74b773232d7b01c2355adddc11b1adeb9da4..c828592669a250e016f3349ba4dd557db4a4d4c6 100644 (file)
@@ -265,13 +265,13 @@ int snd_hwdep_poll_descriptors(snd_hwdep_t *hwdep, struct pollfd *pfds, unsigned
                pfds->fd = hwdep->poll_fd;
                switch (hwdep->mode & O_ACCMODE) {
                case O_WRONLY:
-                       pfds->events = POLLOUT|POLLERR;
+                       pfds->events = POLLOUT|POLLERR|POLLNVAL;
                        break;
                case O_RDONLY:
-                       pfds->events = POLLIN|POLLERR;
+                       pfds->events = POLLIN|POLLERR|POLLNVAL;
                        break;
                case O_RDWR:
-                       pfds->events = POLLOUT|POLLIN|POLLERR;
+                       pfds->events = POLLOUT|POLLIN|POLLERR|POLLNVAL;
                        break;
                default:
                        return -EIO;
index 469d137dd6fa0012fe751d1b79e0c1a92c4caa54..8723a38eb18f3eb637ad94a50a7434fa5a07b7f1 100644 (file)
@@ -616,7 +616,7 @@ int snd_mixer_poll_descriptors_revents(snd_mixer_t *mixer, struct pollfd *pfds,
                return -EINVAL;
        res = 0;
        for (idx = 0; idx < nfds; idx++)
-               res |= pfds->revents & (POLLIN|POLLERR);
+               res |= pfds->revents & (POLLIN|POLLERR|POLLNVAL);
        *revents = res;
        return 0;
 }
index d6ef9078450c79acd83ea361b38f7b2bf3351123..6fb8a1965330718e21bc101ed108b9762183c414 100644 (file)
@@ -1178,7 +1178,7 @@ int snd_pcm_poll_descriptors(snd_pcm_t *pcm, struct pollfd *pfds, unsigned int s
        assert(pcm && pfds);
        if (space >= 1 && pfds) {
                pfds->fd = pcm->poll_fd;
-               pfds->events = pcm->stream == SND_PCM_STREAM_PLAYBACK ? (POLLOUT|POLLERR) : (POLLIN|POLLERR);
+               pfds->events = pcm->stream == SND_PCM_STREAM_PLAYBACK ? (POLLOUT|POLLERR|POLLNVAL) : (POLLIN|POLLERR|POLLNVAL);
        } else
                return 0;
        return 1;
index a942435d507868c780d10001b74f924b8055b5df..2a2726ed28944f11a6a1515dff729278da92751a 100644 (file)
@@ -411,7 +411,7 @@ int snd_rawmidi_poll_descriptors(snd_rawmidi_t *rawmidi, struct pollfd *pfds, un
        assert(rawmidi);
        if (space >= 1) {
                pfds->fd = rawmidi->poll_fd;
-               pfds->events = rawmidi->stream == SND_RAWMIDI_STREAM_OUTPUT ? (POLLOUT|POLLERR) : (POLLIN|POLLERR);
+               pfds->events = rawmidi->stream == SND_RAWMIDI_STREAM_OUTPUT ? (POLLOUT|POLLERR|POLLNVAL) : (POLLIN|POLLERR|POLLNVAL);
                return 1;
        }
        return 0;
index 76885009d68869337cca61daf5a8492522195783..9c5f24dc7c083438273f8a2a9a763b5d127de526 100644 (file)
@@ -315,11 +315,11 @@ int snd_seq_poll_descriptors(snd_seq_t *seq, struct pollfd *pfds, unsigned int s
        assert(seq);
        if ((events & POLLIN) && space >= 1) {
                assert(seq->streams & SND_SEQ_OPEN_INPUT);
-               revents |= POLLIN|POLLERR;
+               revents |= POLLIN|POLLERR|POLLNVAL;
        }
        if ((events & POLLOUT) && space >= 1) {
                assert(seq->streams & SND_SEQ_OPEN_OUTPUT);
-               revents |= POLLOUT|POLLERR;
+               revents |= POLLOUT|POLLERR|POLLNVAL;
        }
        if (!revents)
                return 0;
index 1996b5b37a6dfff2b4416d29dc9e2695bd07d1ca..2fc05bc8c28498bb3cd178f0ea523a1327861be0 100644 (file)
@@ -297,13 +297,13 @@ int snd_timer_poll_descriptors(snd_timer_t *timer, struct pollfd *pfds, unsigned
                pfds->fd = timer->poll_fd;
                switch (timer->mode & O_ACCMODE) {
                case O_WRONLY:
-                       pfds->events = POLLOUT|POLLERR;
+                       pfds->events = POLLOUT|POLLERR|POLLNVAL;
                        break;
                case O_RDONLY:
-                       pfds->events = POLLIN|POLLERR;
+                       pfds->events = POLLIN|POLLERR|POLLNVAL;
                        break;
                case O_RDWR:
-                       pfds->events = POLLOUT|POLLIN|POLLERR;
+                       pfds->events = POLLOUT|POLLIN|POLLERR|POLLNVAL;
                        break;
                default:
                        return -EIO;