Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k/dev - Finally MI audio supports 4bit precision...
details: https://anonhg.NetBSD.org/src/rev/998939d5d1a5
branches: trunk
changeset: 356117:998939d5d1a5
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Sep 02 15:40:31 2017 +0000
description:
- Finally MI audio supports 4bit precision format without null_filter hack!
- Fix reusing play/rec argument as local variables. It is in/out parameter.
diffstat:
sys/arch/x68k/dev/vs.c | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 deletions(-)
diffs (64 lines):
diff -r 7fa76110fe0c -r 998939d5d1a5 sys/arch/x68k/dev/vs.c
--- a/sys/arch/x68k/dev/vs.c Sat Sep 02 15:26:43 2017 +0000
+++ b/sys/arch/x68k/dev/vs.c Sat Sep 02 15:40:31 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vs.c,v 1.47 2017/09/02 12:52:55 isaki Exp $ */
+/* $NetBSD: vs.c,v 1.48 2017/09/02 15:40:31 isaki Exp $ */
/*
* Copyright (c) 2001 Tetsuya Isaki. All rights reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vs.c,v 1.47 2017/09/02 12:52:55 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vs.c,v 1.48 2017/09/02 15:40:31 isaki Exp $");
#include "audio.h"
#include "vs.h"
@@ -160,8 +160,6 @@
#define NUM_RATE (sizeof(vs_l2r)/sizeof(vs_l2r[0]))
-extern stream_filter_factory_t null_filter;
-
static int
vs_match(device_t parent, cfdata_t cf, void *aux)
{
@@ -365,6 +363,7 @@
stream_filter_list_t *pfil, stream_filter_list_t *rfil)
{
struct vs_softc *sc;
+ audio_params_t hw;
stream_filter_factory_t *pconv;
stream_filter_factory_t *rconv;
int rate;
@@ -405,18 +404,18 @@
/* pfil and rfil are independent even if !AUDIO_PROP_INDEPENDENT */
if ((setmode & AUMODE_PLAY) != 0) {
- pfil->append(pfil, null_filter, play);
- play->encoding = AUDIO_ENCODING_ADPCM;
- play->validbits = 4;
- play->precision = 4;
- pfil->append(pfil, pconv, play);
+ hw = *play;
+ hw.encoding = AUDIO_ENCODING_ADPCM;
+ hw.precision = 4;
+ hw.validbits = 4;
+ pfil->prepend(pfil, pconv, &hw);
}
if ((setmode & AUMODE_RECORD) != 0) {
- rfil->append(rfil, null_filter, rec);
- rec->encoding = AUDIO_ENCODING_ADPCM;
- rec->validbits = 4;
- rec->precision = 4;
- rfil->append(rfil, rconv, rec);
+ hw = *rec;
+ hw.encoding = AUDIO_ENCODING_ADPCM;
+ hw.precision = 4;
+ hw.validbits = 4;
+ rfil->prepend(rfil, rconv, &hw);
}
DPRINTF(1, ("accepted\n"));
Home |
Main Index |
Thread Index |
Old Index