[alsa-devel] Connecting two Codecs to the same CPU DAI

Daniel Mack zonque at gmail.com
Tue Jul 16 19:07:33 CEST 2013


On 16.07.2013 18:57, Mark Brown wrote:
> On Tue, Jul 16, 2013 at 06:33:39PM +0200, Daniel Mack wrote:
>> On 16.07.2013 18:20, Mark Brown wrote:
> 
>>> No, no feature here.  Off the top of my head I'd suggest soc-pcm plus a
>>> virtual DAI for the second link.
> 
>> That would still require userspace to open and configure both
>> subdevices, right?
> 
> Shouldn't.

How so? As each link exposes its own PCM subdevice, how would codec of
link #1 get a hw_params call if an application just opens PCM subdevice
#0 for playback? This is the case I want to address.

>> Do you think it's a good idea to teach DAI links support for more than
>> one codec? At a glance, it seems quite possible: the modes and rates
>> would be limited down to the intersection of those of each codec, and
>> the PCM callbacks would be relayed to all codecs in the list.
> 
> In principal yet but we want better DAPM integration I think - having an
> unused device on the link probably ought not have any impact on other
> devices for example.

Well, if a link references two codecs, then both would be used in
parallel, and none of it is unused. But maybe I don't get your point :)

By naive approach atm would be to just add .codec_names,
.codec_dai_names and .codec_of_node to snd_soc_dai_link, and make their
use mutually exclusive to the existing ones. That way, we don't need to
touch any existing user.


Daniel




More information about the Alsa-devel mailing list