Hi,
I'm currently working on a device that has two Analog's ADAU7002 connected to an I2S/TDM Controller (sound/soc/sunxi/sun4i-i2s.c, with some modifications), over the slots 1/2 and 3/4.
The capture itself is working fine, however I'm not quite sure about the way to expose those streams to the userspace.
Since I have two codecs, I have two links (described through simple-card) and thus two subdevices. However, the microphones connected are really separate streams, so ideally (I guess?) we should have 1 subdevice per microphone.
An alternative would be that we capture the whole 4 channels and use dsnoop to demux them, but trying to use the device directly (using arecord -D hw:0) results in the ioctl to change the number of channels being rejected, I'm assuming because each codec only has 2 channels?
So I'm a bit lost at this point about how I should go and expose this. I couldn't really find any similar setup either in the kernel. Any preferred way of doing this?
Thanks! Maxime
-- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com