Module Name: src
Committed By: snj
Date: Fri Jun 30 06:32:21 UTC 2017
Modified Files:
src/sys/dev/ic [netbsd-8]: am7930.c
Log Message:
Pull up following revision(s) (requested by nat in ticket #68):
sys/dev/ic/am7930.c: revision 1.54
sys/dev/ic/am7930.c: revision 1.55
rfill and pfill mixed up.
--
Set hw parameters for linear to ulaw filters.
Tested by flxd@.
To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.53.8.1 src/sys/dev/ic/am7930.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/ic/am7930.c
diff -u src/sys/dev/ic/am7930.c:1.53 src/sys/dev/ic/am7930.c:1.53.8.1
--- src/sys/dev/ic/am7930.c:1.53 Wed Dec 28 10:04:53 2016
+++ src/sys/dev/ic/am7930.c Fri Jun 30 06:32:21 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: am7930.c,v 1.53 2016/12/28 10:04:53 nat Exp $ */
+/* $NetBSD: am7930.c,v 1.53.8.1 2017/06/30 06:32:21 snj Exp $ */
/*
* Copyright (c) 1995 Rolf Grossmann
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: am7930.c,v 1.53 2016/12/28 10:04:53 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: am7930.c,v 1.53.8.1 2017/06/30 06:32:21 snj Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -242,6 +242,12 @@ am7930_set_params(void *addr, int setmod
hw.precision *= sc->sc_glue->factor;
pfil->append(pfil, sc->sc_glue->output_conv, &hw);
}
+ if (p->encoding == AUDIO_ENCODING_SLINEAR) {
+ hw = *p;
+ hw.encoding = AUDIO_ENCODING_ULAW;
+ pfil->append(pfil, linear8_to_mulaw, &hw);
+ }
+
}
if ((usemode & AUMODE_RECORD) == AUMODE_RECORD) {
if (r->sample_rate < 7500 || r->sample_rate > 8500 ||
@@ -257,14 +263,11 @@ am7930_set_params(void *addr, int setmod
hw.precision *= sc->sc_glue->factor;
pfil->append(rfil, sc->sc_glue->input_conv, &hw);
}
- }
-
- if (p->encoding == AUDIO_ENCODING_SLINEAR ||
- r->encoding == AUDIO_ENCODING_SLINEAR) {
- hw.encoding = AUDIO_ENCODING_ULAW;
- pfil->req_size = rfil->req_size = 0;
- pfil->append(rfil, mulaw_to_linear8, &hw);
- rfil->append(pfil, linear8_to_mulaw, &hw);
+ if (r->encoding == AUDIO_ENCODING_SLINEAR) {
+ hw = *r;
+ hw.encoding = AUDIO_ENCODING_ULAW;
+ rfil->append(rfil, mulaw_to_linear8, &hw);
+ }
}
return 0;