[alsa-devel] Different codecs for playback and capture?

Ricard Wanderlof ricard.wanderlof at axis.com
Thu Jun 4 10:06:08 CEST 2015


On Wed, 3 Jun 2015, Lars-Peter Clausen wrote:

> There has been support for multiple CODECs on the same DAI link for a while 
> now. Have a look at 
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=88bd870f02dff5c9445286e185f21873f25a977f.
> 
> Instead of setting the codec_name/codec_dai_name fields in the dai_link 
> create a snd_soc_link_component array with a entry for each of the CODECs 
> and assign that to the codecs field in the DAI link.
> 
> I'm not too sure how well it works if one CODEC is playback only and the 
> other is capture only and there might be some issues. But this is the way to 
> go and if there are problems fix them.

Ok, thanks.

Actually, in the case in question, there is no real codec for capture, 
it's a MEMS microphone with an I2S output. So patching the codec (which is 
playback only) driver to simply allow capture actually accomplishes the 
desired result, but that's not a viable solution of course, and is only 
proof-of-hardware.

I can't seem to find a simple driver for a MEMS microphone though, 
although since there is actually nothing really to configure on the device 
itself (it has no configuration port, just an I2S output), perhaps I 
should simply be using a dummy driver (snd-soc-dummy) that basically 
enables capture?

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30


More information about the Alsa-devel mailing list