Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/0b739415349b
branches:  netbsd-8
changeset: 850766:0b739415349b
user:      snj <snj%NetBSD.org@localhost>
date:      Fri Jun 30 06:34:20 2017 +0000

description:
Pull up following revision(s) (requested by nat in ticket #69):
        sys/dev/aurateconv.c: revision 1.20
Rate conversion works at 8 bits, so enable it.
Ok christos@.

diffstat:

 sys/dev/aurateconv.c |  15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diffs (57 lines):

diff -r a0773b67bf92 -r 0b739415349b sys/dev/aurateconv.c
--- a/sys/dev/aurateconv.c      Fri Jun 30 06:32:21 2017 +0000
+++ b/sys/dev/aurateconv.c      Fri Jun 30 06:34:20 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aurateconv.c,v 1.19 2011/11/23 23:07:31 jmcneill Exp $ */
+/*     $NetBSD: aurateconv.c,v 1.19.42.1 2017/06/30 06:34:20 snj Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aurateconv.c,v 1.19 2011/11/23 23:07:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aurateconv.c,v 1.19.42.1 2017/06/30 06:34:20 snj Exp $");
 
 #include <sys/systm.h>
 #include <sys/types.h>
@@ -68,6 +68,8 @@
 static int aurateconv_fetch_to(struct audio_softc *, stream_fetcher_t *,
                               audio_stream_t *, int);
 static void aurateconv_dtor(stream_filter_t *);
+static int aurateconv_slinear8_LE(aurateconv_t *, audio_stream_t *,
+                                  int, int, int);
 static int aurateconv_slinear16_LE(aurateconv_t *, audio_stream_t *,
                                   int, int, int);
 static int aurateconv_slinear24_LE(aurateconv_t *, audio_stream_t *,
@@ -118,8 +120,9 @@
        }
        if ((from->encoding != AUDIO_ENCODING_SLINEAR_LE
             && from->encoding != AUDIO_ENCODING_SLINEAR_BE)
-           || (from->precision != 16 && from->precision != 24 && from->precision != 32)) {
-               printf("%s: encoding/precision must be SLINEAR_LE 16/24/32bit, "
+           || (from->precision != 8 && from->precision != 16 &&
+                        from->precision != 24 && from->precision != 32)) {
+               printf("%s: encoding/precision must be SLINEAR_LE 8/16/24/32bit, "
                       "or SLINEAR_BE 16/24/32bit", __func__);
                return NULL;
        }
@@ -189,6 +192,9 @@
        switch (this->from.encoding) {
        case AUDIO_ENCODING_SLINEAR_LE:
                switch (this->from.precision) {
+               case 8:
+                       return aurateconv_slinear8_LE(this, dst, m,
+                                                      frame_src, frame_dst);
                case 16:
                        return aurateconv_slinear16_LE(this, dst, m,
                                                       frame_src, frame_dst);
@@ -458,6 +464,7 @@
        return 0; \
 }
 
+AURATECONV_SLINEAR(8, LE)
 AURATECONV_SLINEAR(16, LE)
 AURATECONV_SLINEAR(24, LE)
 AURATECONV_SLINEAR32(LE)



Home | Main Index | Thread Index | Old Index