[alsa-devel] Need general idea how to architect driver for multi-codec board
Caleb Crome
caleb at crome.org
Thu Jun 2 00:17:10 CEST 2011
Hi Again,
Sorry to keep on this, but I'm really wedged. I can't tell if I'm trying
to break new ground, or if I just don't know what I'm doing :-) Or both
perhaps.
I've got my multi-codec card instantiating (only 4 codecs here for
simplicity -- there are really 8 total)
# insmod tlv320aic3x_se.ko # <--- my custom version of aic3x driver.
# insmod puppy_machine.ko # <-- my custom machinne interface with all my
dai-links and all.
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: tlv320aic33se [tlv320aic33-se], device 0: tlv320aic33-se
tlv320aic3x-se-hifi-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: tlv320aic33se [tlv320aic33-se], device 1: tlv320aic33-se
tlv320aic3x-se-hifi-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: tlv320aic33se [tlv320aic33-se], device 2: tlv320aic33-se
tlv320aic3x-se-hifi-2 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: tlv320aic33se [tlv320aic33-se], device 3: tlv320aic33-se
tlv320aic3x-se-hifi-3 []
Subdevices: 1/1
Subdevice #0: subdevice #0
I can run jack on the first subdevice and it actually streams data both ways
on codec 0.
# jackd -d alsa -d hw:0,0
creating alsa driver ...
hw:0,0|hw:0,0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
...
However, I can't seem to get access to any of the other codecs on the TDM
bus. Remember, there is only a single CPU DAI here (a single McBSP port),
but multiple codec DAIs (one for each codec, in TDM mode).
# jackd -d alsa -d hw:0,0 -i4 -o4 # <--- Does not work. hw:0,0 is just a
single stereo codec, so it doesn't start up the other DAIs
How do I get jackd (or anything else for that matter), to start all the DAIs
at the same time?
If I try:
# aplay -D hw:0,0 -f S16_LE test.wav # <--- success
and in another shell:
# aplay -D hw:0,1 -f S16_LE test1.wav # <--- failure
the second invocation on hw:0,1 fails because hw:0 is already open.
I also tried modifying my asoundrc to something similar to
http://quicktoots.linuxaudio.org/toots/el-cheapo, but that didn't work
either.
I can attach my code and even schematic if that would help.
Thanks again,
-Caleb
More information about the Alsa-devel
mailing list