]> git.alsa-project.org Git - alsa-lib.git/commitdiff
dsnoop: Another bug where the empty, not full, part of the ringbuffer was observed
authorMark Hills <mark@xwax.org>
Mon, 22 Jun 2020 13:15:13 +0000 (14:15 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 23 Jun 2020 10:59:51 +0000 (12:59 +0200)
This looks like a simple mistake dating back to 2003 (commit 7470a5b9)
where code originated from dmix.

Signed-off-by: Mark Hills <mark@xwax.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_dsnoop.c

index 790d944c3526416cab4f9350e9cc8b6c472c3bbd..3588eb91c4bc313a8d0187c98d7c5044066e7df0 100644 (file)
@@ -241,7 +241,7 @@ static int snd_pcm_dsnoop_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
                /* Fall through */
        case SNDRV_PCM_STATE_PREPARED:
        case SNDRV_PCM_STATE_SUSPENDED:
-               *delayp = snd_pcm_mmap_capture_hw_avail(pcm);
+               *delayp = snd_pcm_mmap_capture_avail(pcm);
                return 0;
        case SNDRV_PCM_STATE_XRUN:
                return -EPIPE;