openvortex-dev
[Top][All Lists]
Advanced

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

Re: [Openvortex-dev] ac97 codec read-write cleanup in cvs


From: Ryan Underwood
Subject: Re: [Openvortex-dev] ac97 codec read-write cleanup in cvs
Date: Tue, 17 Jun 2003 05:36:04 -0500
User-agent: Mutt/1.5.4i

Hi Manuel,

On Mon, Jun 16, 2003 at 05:45:41PM -0400, Manuel Jander wrote:
> 
> THe AC97 part semes to be necesary for some other switches that go to
> oblivion for some reason... Ryan may explain that better than me.

Perhaps, perhaps not. :) Basically, the alsa ac97 code "tests" for
features that may or may not be available in all revisions of a
particular ac97 codec by writing a value to some register, and then
reading the value back to see if the change "took".  If it reads back
the value it wrote, it assumes that feature to be available on the
user's codec and enabled it.

The vortex binary driver ( and the alsa au88x0 driver up to this point)
had a problem in which the alsa driver's tests would fail and thus
lots of nice features would be unavailable.  The test would call
codec_write and then immediately call codec_read.  However, the
codec_read was returning the value that was previously in the card at
that time, and only after a next read or two would the new value
actually be returned on a read.  I am assuming this is due to PCI posted
writes, read prefetching, and/or a combination of both.  In any case,
issuing two codec reads of the same memory in the codec_write function
itself seems to have cleared up that problem.  (There was also a wrong
conditional in the codec_read function that would never be true as far
as I could tell.)  This was problem with the old ReadCodec function too,
as I spent many hours trying to get my own driver hacks to work and
wondering why wrong data was being read back from the card, which made
me give up. :)

> this is a shortcomming of the ALSA code, how about sending them a patch 
> (on the ALSA list) ? THey are very busy with some sort of "hdsp" card
> right now, but they usually merge them in very quickly if the patch is
> reasonable.

Well, the changes to the alsa ac97 code were just for some feature
additions.  The fixes were in the vortex driver itself.  I will send
them patches, but we should also figure out whether or not the external
amplifier should be enabled or disabled by default.

> I'll help coding once i get out of my final exam nightmare :)

:) I took a night off a *huge* project i'm working on to hack on the
driver.  Sad that I couldn't do anything about the confused-streams
problem, but at least I got a little done.

> > The newest cvs has an adaptation of Ryan's ac97 codec
> > read-write cleanup. But it doesn't have the hunks for
> > /sound/pci/ac97/ac97_codec.c . Isn't that necessary
> > for this new adaptation?

Those are feature additions, at least one is necessary for the 4-speaker
stereo output.  We can merge them here and have headaches later, or we
can do without the features for now, try to get them merged upstream,
and wait for the trickle down.  The other features like 3d stereo
enhancement, amp power, were already present in the ac97 alsa support
but were not being enabled due to buggy vortex driver ;)

-- 
Ryan Underwood, <nemesis at icequake.net>, icq=10317253




reply via email to

[Prev in Thread] Current Thread [Next in Thread]