Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/ic Pull up following revision(s) (requested by na...



details:   https://anonhg.NetBSD.org/src/rev/3c549d8685d1
branches:  netbsd-8
changeset: 434041:3c549d8685d1
user:      snj <snj%NetBSD.org@localhost>
date:      Fri Jun 30 06:32:21 2017 +0000

description:
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@.

diffstat:

 sys/dev/ic/am7930.c |  23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diffs (51 lines):

diff -r 49941cfe8915 -r 3c549d8685d1 sys/dev/ic/am7930.c
--- a/sys/dev/ic/am7930.c       Fri Jun 30 06:28:54 2017 +0000
+++ b/sys/dev/ic/am7930.c       Fri Jun 30 06:32:21 2017 +0000
@@ -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 @@
                        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 @@
                        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;



Home | Main Index | Thread Index | Old Index