Subject: Re: AC97 auich and i82801BA
To: Lennart Augustsson <lennart@augustsson.net>
From: Mark Davies <mark@mcs.vuw.ac.nz>
List: port-i386
Date: 02/06/2002 01:39:02
From: Lennart Augustsson <lennart@augustsson.net>
Date: Tue, 05 Feb 2002 10:56:20 +0100
> Maybe checking for variable rate doesn't really work with some codecs?
> You could try testing for variable rate by setting some different rates in
> the codec and then read back what you get.
Did that (see last paragraph below) but presumably if the AC97_ENAB_VRA isn't
sticking that might effect how it behaves.
> BTW, does your codec support variable rate?
According to http://developer.intel.com/design/chipsets/datashts/290687.htm
The ICH2 AC '97 Controller features include:
* Independent PCI functions for audio and modem.
* Independent bus master logic for Mic input, PCM Audio input
(2-channel stereo), PCM audio output (2, 4 or 6-channel stereo,
Modem input and Modem output.
* 16 bit sample resolution
==> * Multiple sample rates up to 48 KHz <===
* 16 GPIOs
* Single modem line
* Dual codec configuration with two SDIN pins
cheers
mark
> Mark Davies wrote:
>
> > We are still unsuccessfully trying to get reasonable audio out of this chipset.
> > As far as we can see it should support variable sample rates, the
> > documentation claims to but even with the recently added support for variable
> > sample rates in the auich driver it still insists on sticking at 48000.
> >
> > Adding debugging to auich_attach() as below:
> >
> > [...]
> > auich_read_codec(sc, AC97_REG_EXTENDED_ID, &ext_id);
> > printf("auich ext_id is %x\n", ext_id);
> > if ((ext_id & (AC97_CODEC_DOES_VRA | AC97_CODEC_DOES_MICVRA)) != 0) {
> > auich_read_codec(sc, AC97_REG_EXTENDED_STATUS, &ext_status);
> > printf("auich ext_status is %x\n", ext_status);
> > if ((ext_id & AC97_CODEC_DOES_VRA) !=0)
> > ext_status |= AC97_ENAB_VRA;
> > if ((ext_id & AC97_CODEC_DOES_MICVRA) !=0)
> > ext_status |= AC97_ENAB_MICVRA;
> > auich_write_codec(sc, AC97_REG_EXTENDED_STATUS, ext_status);
> > printf("auich ext_status is %x\n", ext_status);
> > auich_read_codec(sc, AC97_REG_EXTENDED_STATUS, &ext_status);
> > printf("auich ext_status is %x\n", ext_status);
> > sc->sc_fixed_rate = 0;
> > } else {
> > sc->sc_fixed_rate = 48000;
> > }
> > [...]
> >
> > gives
> >
> > auich ext_id is 1
> > auich ext_status is 0
> > auich ext_status is 1
> > auich ext_status is 0
> >
> > The fact that AC97_ENAB_VRA isn't set in that last reading of ext_status looks
> > wrong to me.
> >
> > And then in auich_set_params() whatever sample rate gets set to the codec when
> > you read it back its always 48000.
> >
> > Can anybody suggest whats happening here and how to fix?
> >
> > cheers
> > mark
>