Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci fix a problem to set sample rate of AC97 codec.



details:   https://anonhg.NetBSD.org/src/rev/0746fcdada6f
branches:  trunk
changeset: 326484:0746fcdada6f
user:      ryo <ryo%NetBSD.org@localhost>
date:      Fri Jan 31 08:38:13 2014 +0000

description:
fix a problem to set sample rate of AC97 codec.

diffstat:

 sys/dev/pci/gcscaudio.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r c816f28342ac -r 0746fcdada6f sys/dev/pci/gcscaudio.c
--- a/sys/dev/pci/gcscaudio.c   Fri Jan 31 08:18:03 2014 +0000
+++ b/sys/dev/pci/gcscaudio.c   Fri Jan 31 08:38:13 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gcscaudio.c,v 1.12 2012/03/02 11:41:36 nonaka Exp $    */
+/*     $NetBSD: gcscaudio.c,v 1.13 2014/01/31 08:38:13 ryo Exp $       */
 
 /*-
  * Copyright (c) 2008 SHIMIZU Ryo <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gcscaudio.c,v 1.12 2012/03/02 11:41:36 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gcscaudio.c,v 1.13 2014/01/31 08:38:13 ryo Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -530,9 +530,9 @@
 
        if (mode == AUMODE_PLAY) {
                if (!AC97_IS_FIXED_RATE(sc->codec_if)) {
-                       /* setup rate of DAC/ADC */
+                       /* setup rate of DAC */
                        if ((error = sc->codec_if->vtbl->set_rate(sc->codec_if,
-                           AC97_REG_PCM_LR_ADC_RATE, &p->sample_rate)) != 0)
+                           AC97_REG_PCM_FRONT_DAC_RATE, &p->sample_rate)) != 0)
                                return error;
 
                        /* additional rate of DAC for Surround */
@@ -551,9 +551,9 @@
 
        if (mode == AUMODE_RECORD) {
                if (!AC97_IS_FIXED_RATE(sc->codec_if)) {
-                       /* setup rate of DAC/ADC */
+                       /* setup rate of ADC */
                        if ((error = sc->codec_if->vtbl->set_rate(sc->codec_if,
-                           AC97_REG_PCM_FRONT_DAC_RATE, &p->sample_rate)) != 0)
+                           AC97_REG_PCM_LR_ADC_RATE, &p->sample_rate)) != 0)
                                return error;
                }
        }



Home | Main Index | Thread Index | Old Index