All of lore.kernel.org
 help / color / mirror / Atom feed
* ALSA SoC + Hotplug ?
@ 2017-05-30  6:42 Kuninori Morimoto
  2017-05-30 13:29 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 4+ messages in thread
From: Kuninori Morimoto @ 2017-05-30  6:42 UTC (permalink / raw)
  To: alsa-devel

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 ?

Thanks

Kuninori Morimoto

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ALSA SoC + Hotplug ?
  2017-05-30  6:42 ALSA SoC + Hotplug ? Kuninori Morimoto
@ 2017-05-30 13:29 ` Pierre-Louis Bossart
  2017-05-30 13:48   ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre-Louis Bossart @ 2017-05-30 13:29 UTC (permalink / raw)
  To: Kuninori Morimoto, alsa-devel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ALSA SoC + Hotplug ?
  2017-05-30 13:29 ` Pierre-Louis Bossart
@ 2017-05-30 13:48   ` Takashi Iwai
  2017-06-05  0:11     ` Kuninori Morimoto
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2017-05-30 13:48 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: alsa-devel, Kuninori Morimoto

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ALSA SoC + Hotplug ?
  2017-05-30 13:48   ` Takashi Iwai
@ 2017-06-05  0:11     ` Kuninori Morimoto
  0 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2017-06-05  0:11 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Pierre-Louis Bossart


Hi

Sorry for my late response, I was in OSS Japan.

> > 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.

Thank you for your feedback.
I understand that ALSA (SoC) doesn't have formal Hotplug support yet.

I and V4L2 guy had talked about this topics in this OSS Japan and previous ELC{E}.
Our missing feature for HDMI sound now is maybe...

	1) Hotplug
		We need to collaborate to V4L2 guys ? and user side application guys ?
		During plug-out, can we keep playback ?? or stop it ??
		V4L2/ALSA should use same way, but who control it ? application ?
	2) V4L2/ALSA connection
		Before, application guy said that "it is difficult to find
		which HDMI video and sound are connected", for example
		video0 and sound1 were same HDMI, etc.
		It seems "media controller" which is used in V4L2 side can help it ?

I think we want to ALSA SoC framework cleanup first...

Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-05  0:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-30  6:42 ALSA SoC + Hotplug ? Kuninori Morimoto
2017-05-30 13:29 ` Pierre-Louis Bossart
2017-05-30 13:48   ` Takashi Iwai
2017-06-05  0:11     ` Kuninori Morimoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.