Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Make fixed rate codecs work. From Tsuyoshi Iguc...
details: https://anonhg.NetBSD.org/src/rev/f8909925146a
branches: trunk
changeset: 522253:f8909925146a
user: augustss <augustss%NetBSD.org@localhost>
date: Thu Feb 14 03:22:36 2002 +0000
description:
Make fixed rate codecs work. From Tsuyoshi Iguchi in kern/15606.
diffstat:
sys/dev/pci/auich.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r 2cd50c252010 -r f8909925146a sys/dev/pci/auich.c
--- a/sys/dev/pci/auich.c Thu Feb 14 03:21:07 2002 +0000
+++ b/sys/dev/pci/auich.c Thu Feb 14 03:22:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auich.c,v 1.9 2002/02/02 11:13:44 augustss Exp $ */
+/* $NetBSD: auich.c,v 1.10 2002/02/14 03:22:36 augustss Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.9 2002/02/02 11:13:44 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.10 2002/02/14 03:22:36 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -401,6 +401,7 @@
sc->sc_fixed_rate = 0;
} else {
sc->sc_fixed_rate = 48000;
+ printf("%s: warning, fixed rate codec\n", sc->sc_dev.dv_xname);
}
audio_attach_mi(&auich_hw_if, sc, &sc->sc_dev);
@@ -669,6 +670,15 @@
sc->sc_fixed_rate ? sc->sc_fixed_rate : p->sample_rate);
auich_read_codec(sc, AC97_REG_PCM_FRONT_DAC_RATE, &rate);
p->sample_rate = rate;
+ if (sc->sc_fixed_rate) {
+ p->sample_rate = sc->sc_fixed_rate;
+ } else {
+ auich_write_codec(sc, AC97_REG_PCM_FRONT_DAC_RATE,
+ p->sample_rate);
+ auich_read_codec(sc, AC97_REG_PCM_FRONT_DAC_RATE,
+ &rate);
+ p->sample_rate = rate;
+ }
auich_write_codec(sc, AC97_REG_POWER, val);
}
Home |
Main Index |
Thread Index |
Old Index