]> git.alsa-project.org Git - alsa-plugins.git/commitdiff
Incorrect revents in polypaudio plugin
authorPierre Ossman <ossman@cendio.se>
Wed, 8 Mar 2006 12:18:30 +0000 (12:18 +0000)
committerTakashi Iwai <tiwai@suse.de>
Wed, 8 Mar 2006 12:18:30 +0000 (12:18 +0000)
The revent flags POLLIN/POLLOUT got switched in the Polypaudio plugin.
Most applications check both so it went unnoticed until now.

Signed-off-by: Pierre Ossman <ossman@cendio.se>
polyp/pcm_polyp.c

index 96f0baf3f7550cc8f8747b8e0acfec073c6fbdc1..80c943b78d779e26a3a57beddfa9846e1c835899 100644 (file)
@@ -314,9 +314,9 @@ static int polyp_pcm_poll_revents(snd_pcm_ioplug_t *io, struct pollfd *pfd, unsi
      */
     if (pcm->last_size >= pcm->buffer_attr.minreq) {
         if (io->stream == SND_PCM_STREAM_PLAYBACK)
-            *revents |= POLLIN;
-        else
             *revents |= POLLOUT;
+        else
+            *revents |= POLLIN;
     }
 
     return 0;