diff mbox series

[7/9] dsnoop: Another bug where the empty, not full, part of the ringbuffer was observed

Message ID 20200622131515.23385-7-mark@xwax.org (mailing list archive)
State New, archived
Headers show
Series [1/9] control: Fix typos in the namehint example | expand

Commit Message

Mark Hills June 22, 2020, 1:15 p.m. UTC
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>
---
 src/pcm/pcm_dsnoop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai June 23, 2020, 11 a.m. UTC | #1
On Mon, 22 Jun 2020 15:15:13 +0200,
Mark Hills wrote:
> 
> 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>

Thanks, applied.


Takashi
diff mbox series

Patch

diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c
index 790d944c..3588eb91 100644
--- a/src/pcm/pcm_dsnoop.c
+++ b/src/pcm/pcm_dsnoop.c
@@ -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;