On Sun, Jun 28, 2009 at 07:35:07PM +0100, Edd Barrett wrote:
> Hi Jacob,
> 
> On Sun, Jun 28, 2009 at 04:50:41PM +0000, Jacob Meuser wrote:
> > the audio codec is the same.  the bus architecture differs.  cs4231(4)
> > uses sbus while ce4231(4) uses ebus.
> 
> I can't send a diff, as my disk died. Hopefully new one on the way soon.
> I can describe what I have gathered so far. Comments encouraged, as I am
> not very confident with kernel hacking yet:
> 
> a) The mixer controls need to be reversed. A lower mixer control is
> louder to the card (or something elsewhere is reversing the controls).

ah, yes.  for the DAC, each bit adds attenuation, not amplification.

> b) The range of volumes on the card is 0-64, where 0 is max. In the
> patch you sent you were multiplying by 4 (<< 2). I think it need to be
> divided by 4 (>> 2).

no.  you would do something like `252 - (bits << 2)'.  some of the other
registers act differently.  google for 'cs4231 datasheet' if you haven't
already.

> c) The set_port() function seems to write straight to the card, whereas
> the cs4231 (sparc/dev) driver only modifies the volumes struct here. It
> must be updating later. Didn't get a chance to look before the disk
> died. Which do you think is right?

the sparc driver uses mapiodev().  I guess this is not available on
sparc64.

> d) It seems the current ce4231 driver modifies the master volume control
> whereas the cs4231 code changes one of the aux ports. Again, did not get
> a chance to test. Any ideas which is correct? It did seem that the
> master volume was clashing with that you told the dac to be.

yes, it does clash.  I'm pretty sure the master volume control is using
the wrong register.  look at the end of sys/dev/ic/ad1848reg.h.
that corresponds to the indirect registers on page 22 of the cs4231
datasheet.

-- 
[email protected]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply via email to