diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2019-03-31 17:55:10 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2019-03-31 17:55:10 +0000 |
commit | e8e5f698ad640a95032c9be30f273163cbc28498 (patch) | |
tree | 521bcf03d5beb887e5d5096569baf35e1e906b93 | |
parent | e51677c8aa5f6e218bddd795fe1d320b25c0e81c (diff) |
Don't try to recover when DMA pointers wrap if the driver is
using bounce buffers. In this case, hardware underruns are managed
by the driver on the bounce buffers, not the audio ring buffer.
-rw-r--r-- | sys/dev/audio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c index 8e8be366ec8..dcce535ed7e 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.176 2019/03/12 08:16:29 ratchov Exp $ */ +/* $OpenBSD: audio.c,v 1.177 2019/03/31 17:55:09 ratchov Exp $ */ /* * Copyright (c) 2015 Alexandre Ratchov <alex@caoua.org> * @@ -387,7 +387,7 @@ audio_pintr(void *addr) * check if record pointer wrapped, see explanation * in audio_rintr() */ - if (sc->mode & AUMODE_RECORD) { + if ((sc->mode & AUMODE_RECORD) && sc->ops->underrun == NULL) { sc->offs--; nblk = sc->rec.len / sc->rec.blksz; todo = -sc->offs; @@ -470,7 +470,7 @@ audio_rintr(void *addr) * We fix this by advancing play position by an integer count of * full buffers, so it reaches the record position. */ - if (sc->mode & AUMODE_PLAY) { + if ((sc->mode & AUMODE_PLAY) && sc->ops->underrun == NULL) { sc->offs++; nblk = sc->play.len / sc->play.blksz; todo = sc->offs; |