Re: ALSA SoC + Hotplug ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 30 May 2017 15:29:59 +0200,
Pierre-Louis Bossart wrote:
> 
> On 5/30/17 1:42 AM, Kuninori Morimoto wrote:
> > Hi ALSA ML
> >
> > Now, ALSA SoC can support HDMI, then, we want to support Hotplug for it.
> > In my quick grep, it seems ALSA SoC doesn't have such support now (?)
> > But, is it supported ?
> 
> We looked at it a couple of days ago and were indeed surprised that
> only Intel drivers seem to use snd_jack_report() [1]. It'd be good if
> there was a common way of signaling hot plug events to user space...
> 
> [1] http://elixir.free-electrons.com/linux/latest/ident/SND_JACK_AVOUT

AFAIK, most of ASoC jacks are triggered implicitly in soc-jack.c via
gpiolib or such.  But the HDMI stuff seems to be the lost child.


About the original question from Morimoto-san: the answer is
"depends".

If you want a card-level hotplug, it's just the normal the device
probe / remove.

If you want ASoC component-level hotplug, it's unimplemented, AFAIK.

If you want the dynamic PCM device creation / removal, it should be
doable, but it'd be tricky.

Currently, HD-audio (and HDMI LPE audio) don't do the hotplug-style
device management.  Instead, it creates the PCM streams statically
while it notifies to user-space via kctl / input jack about the
monitor connection state.  It's basically for PulseAudio which expects
the static stream assignment per card.

Note that the monitor connection state may change rapidly, as the
audio is also gone when the video is blanked or the modeset changed;
thus creating/deleting the device at each time might whip udev and
others too much.  It's one of the reasons we didn't go to that
direction.

But, I'm not entirely convinced that the current implementation is the
always best.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux