dsnoop: Another bug where the empty, not full, part of the ringbuffer was observed

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>
This commit is contained in:
Mark Hills 2020-06-22 14:15:13 +01:00 committed by Takashi Iwai
parent 19c7de16fd
commit ad0684089e

View file

@ -241,7 +241,7 @@ static int snd_pcm_dsnoop_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
/* Fall through */ /* Fall through */
case SNDRV_PCM_STATE_PREPARED: case SNDRV_PCM_STATE_PREPARED:
case SNDRV_PCM_STATE_SUSPENDED: case SNDRV_PCM_STATE_SUSPENDED:
*delayp = snd_pcm_mmap_capture_hw_avail(pcm); *delayp = snd_pcm_mmap_capture_avail(pcm);
return 0; return 0;
case SNDRV_PCM_STATE_XRUN: case SNDRV_PCM_STATE_XRUN:
return -EPIPE; return -EPIPE;