Onboard audio support and DBDMA API extensions.

Nathan Whitehorn nwhitehorn at freebsd.org
Fri Sep 26 18:40:25 UTC 2008


Marco Trillo wrote:
> Hi,
> 
> I'm working in a pcm(4) driver for the Apple onboard audio. The
> current status is that audio output works on my machine using a
> default volume, but volume changing is not supported yet.

Great!

> I also have preliminary support for the GPIO controls, which are used
> mainly to select the output port (built-in speakers or headphones).
> What I have yet to do is to support the mixer(4) interface (to support
> changing the output volume), which needs support for the Keywest I2C
> controller in order to talk to the codec. I have in fact ported a
> Keywest I2C driver from NetBSD, but I don't use it much yet.

I think we need to come up with a good way to handle the GPIO stuff and 
FCR setting. GPIO is also needed for PMU support (my current PMU driver 
has ugly hacks) and for SMU on G5 machines. Maybe some new interfaces to 
macio? This is complicated a little with SMU, though, as it isn't a 
macio child.

  > I would like to propose the following additions to the DBDMA API,
> which I'm using in the driver:
> 
> void dbdma_clear_cmd_status(dbdma_channel_t *, int slot);
> Clears the cmdStatus of DBDMA command at slot 'slot'. Used for keeping
> track of completed blocks.
> 
> void dbdma_control(dbdma_channel_t *, uint8_t mask, uint8_t in);
> General-purpose manipulation of the DBDMA channel control register.
> Used for setting/clearing general-purpose control bits such as S0.

Looks good to me. I'd suggest changing the name of dbdma_control() to 
dbdma_set_chan_status() to match dbdma_get_chan_status(), though.
-Nathan


More information about the freebsd-ppc mailing list