NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/52459: audio_fill_silence() stops playback.
>Number: 52459
>Category: kern
>Synopsis: audio_fill_silence() stops playback.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 03 04:05:00 +0000 2017
>Originator: Tetsuya Isaki
>Release: NetBSD-current
>Organization:
NetBSD
>Environment:
NetBSD 8.99.1 x68k
>Description:
If the audio play chain enters audio_fill_silence() in
audio_pint() even once, playback stops.
The audio play chain is:
- audiostartp() calls mix_write().
- mix_write() calls hw_if->start_output().
- start_output() calls audio_pint() if DMA transfer is done.
and then current audio_pint() does:
:
if (available datasize < blksize) {
audio_fill_silence()
} else {
mix_write()
}
:
So if the available data is not enough even once,
mix_write() is not called anymore and audio playback stops.
I think that it should call mix_write() even if it calls
audio_fill_silence().
Index: sys/dev/audio.c
===================================================================
RCS file: /cvsroot/src/sys/dev/audio.c,v
retrieving revision 1.384
diff -u -r1.384 audio.c
--- sys/dev/audio.c 30 Jul 2017 02:41:58 -0000 1.384
+++ sys/dev/audio.c 3 Aug 2017 03:32:41 -0000
@@ -3691,12 +3691,10 @@
vc->sc_mpr.s.inp, cc);
used -= cc;
}
- goto wake_mix;
}
mix_write(sc);
-wake_mix:
cv_broadcast(&sc->sc_condvar);
}
>How-To-Repeat:
I don't know how to repeat on your environment.
>Fix:
See above patch.
Home |
Main Index |
Thread Index |
Old Index