Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic If the codec is fixed-rate, ac97_set_rate() retur...
details: https://anonhg.NetBSD.org/src/rev/7a6007b4bb8c
branches: trunk
changeset: 537915:7a6007b4bb8c
user: kent <kent%NetBSD.org@localhost>
date: Tue Oct 08 12:33:34 2002 +0000
description:
If the codec is fixed-rate, ac97_set_rate() returns 48kHz.
diffstat:
sys/dev/ic/ac97.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r d63e085eba6b -r 7a6007b4bb8c sys/dev/ic/ac97.c
--- a/sys/dev/ic/ac97.c Tue Oct 08 12:31:45 2002 +0000
+++ b/sys/dev/ic/ac97.c Tue Oct 08 12:33:34 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ac97.c,v 1.28 2002/10/08 09:19:44 kent Exp $ */
+/* $NetBSD: ac97.c,v 1.29 2002/10/08 12:33:34 kent Exp $ */
/* $OpenBSD: ac97.c,v 1.8 2000/07/19 09:01:35 csapuntz Exp $ */
/*
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ac97.c,v 1.28 2002/10/08 09:19:44 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ac97.c,v 1.29 2002/10/08 12:33:34 kent Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -968,6 +968,17 @@
u_int16_t power_bit;
as = (struct ac97_softc *)codec_if;
+ if (target == AC97_REG_PCM_MIC_ADC_RATE) {
+ if (!(as->ext_id & AC97_EXT_AUDIO_VRM)) {
+ *rate = AC97_SINGLE_RATE;
+ return 0;
+ }
+ } else {
+ if (!(as->ext_id & AC97_EXT_AUDIO_VRA)) {
+ *rate = AC97_SINGLE_RATE;
+ return 0;
+ }
+ }
value = *rate * AC97_STANDARD_CLOCK / as->ac97_clock;
ext_stat = 0;
/*
Home |
Main Index |
Thread Index |
Old Index