[alsa-devel] Conexant CX2051 on HP Spartan

Takashi Iwai tiwai at suse.de
Mon Jan 7 14:41:20 CET 2008


At Fri, 21 Dec 2007 16:42:15 -0200,
Claudio Matsuoka wrote:
> 
> Hi,
> 
> I'm working with Herton Krzesinski on a HP Spartan laptop which has a
> Conexant CX2051 configured with internal and external microphones
> connected to two different ADC nodes (0x14 and 0x15 in
> http://helllabs.org/tmp/hp-spartan-ng.png). We were able to get input
> from one or other ADC, but we weren't able to switch from one capture
> source to another (switching between  0x17 and 0x1d would be simple,
> but HP chose to route the external and internal mics to two different
> ADCs). What is the recommended way to handle this kind of setup?

I'm not sure whether it really works, but it might be possible that
the routing can be changed dynamically even during the PCM stream is
running by calling snd_hda_codec_setup_stream().

In this case, you'd need a special hda_pcm_ops.  In the prepare
callback, remember stream_tag and format values.  Then assign the
active mic input and reset the other.  In the unsol event handler,
check whether this PCM is running and re-program the stream tag and
format appropriately.


Takashi


More information about the Alsa-devel mailing list