[alsa-devel] Need general idea how to architect driver for multi-codec board
caleb at crome.org
Wed May 11 19:31:15 CEST 2011
I'm building a board with multiple TLV320AIC33 codecs on board, and I
don't know how I should architect the interface.
The board is set up to use TDM (16 channels on 1 TDM PORT), it has 16 input
and 16 output channels, all bonded together -- the hardware does not allow
different codecs to run at different speeds.
The board also includes several other widgets, like an I2C mux (to address
all 8 stereo codecs), a couple of power amplifiers, and a limited number of
ways the audio can be routed in or out.
My question is this: I'm not sure how to architect the driver:
1) Simply instantiate multiple TLV320IAC33 codec drivers, as the AIC33
driver is already written.
This seems like it won't work because I'd end up with multiple
user-space 'cards', yet I want the card to appear as a single 16-channel
sound card. Also, when you start one PCM interface for one codec, they
would all start automatically, which I imagine the linux system wouldn't
get. Also, the PCM interface needs to be configured differently for each
codec (the TDM offset must be 0, 16, 32, 48, etc. bits).
2) rewrite the AIC33 driver to include all 8 codecs, including all the mixer
controls for each codec. This is going to get REALLY big and ugly in the
user space mixer control -- there will be a zillion controls, most of which
are not really useful for this board.
3) rewrite the AIC33 driver to include all 8 codecs, but pare down the mixer
controls to just the ones that I care about. If the card changes later, add
in the changes to the driver.
I don't have any huge desire to get the driver into the mainstream kernel
(though I would not be upset if it was popular enough to warrant that), it's
just not a priority.
Any thoughts would be most welcome.
More information about the Alsa-devel