Module Name: src Committed By: nat Date: Tue Aug 8 22:21:35 UTC 2017
Modified Files: src/sys/dev: audio.c Log Message: If the harware ring is starved of data...Insert silence into the mix ring so mix_write can function properly. To generate a diff of this commit: cvs rdiff -u -r1.391 -r1.392 src/sys/dev/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/audio.c diff -u src/sys/dev/audio.c:1.391 src/sys/dev/audio.c:1.392 --- src/sys/dev/audio.c:1.391 Tue Aug 8 05:58:12 2017 +++ src/sys/dev/audio.c Tue Aug 8 22:21:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.391 2017/08/08 05:58:12 isaki Exp $ */ +/* $NetBSD: audio.c,v 1.392 2017/08/08 22:21:35 nat Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss <nathanialsl...@yahoo.com.au> @@ -148,7 +148,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.391 2017/08/08 05:58:12 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.392 2017/08/08 22:21:35 nat Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -3662,12 +3662,12 @@ audio_pint(void *v) DPRINTFN(3, ("HW RING - INSERT SILENCE\n")); used = blksize; while (used > 0) { - cc = vc->sc_mpr.s.end - vc->sc_mpr.s.inp; + cc = sc->sc_pr.s.end - sc->sc_pr.s.inp; if (cc > used) cc = used; - audio_fill_silence(&vc->sc_pparams, vc->sc_mpr.s.inp, cc); - vc->sc_mpr.s.inp = audio_stream_add_inp(&vc->sc_mpr.s, - vc->sc_mpr.s.inp, cc); + audio_fill_silence(&vc->sc_pustream->param, sc->sc_pr.s.inp, cc); + sc->sc_pr.s.inp = audio_stream_add_inp(&sc->sc_pr.s, + sc->sc_pr.s.inp, cc); used -= cc; } }