]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Fix poll of dsnoop plugin
authorTakashi Iwai <tiwai@suse.de>
Mon, 23 May 2005 08:58:04 +0000 (08:58 +0000)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 May 2005 08:58:04 +0000 (08:58 +0000)
Fixed the poll behavior of dsnoop plugin after commit.

src/pcm/pcm_dsnoop.c

index 02c71091feea60b99375fddc4017f5edbfd6b12e..6005bbae41ae3e450bf9d00749c55cd7af057684 100644 (file)
@@ -396,6 +396,9 @@ static snd_pcm_sframes_t snd_pcm_dsnoop_mmap_commit(snd_pcm_t *pcm,
                        return err;
        }
        snd_pcm_mmap_appl_forward(pcm, size);
+       /* clear timer queue to avoid a bogus return from poll */
+       if (snd_pcm_mmap_capture_avail(pcm) < pcm->avail_min)
+               snd_pcm_direct_clear_timer_queue(dsnoop);
        return size;
 }