Skip to contentSkip to conversation

HDMI+SND_JACK_AVOUT

DISCUSSION Pierre-Louis Bossart 2 participants 2 messages May 15, 2017

lore
Share & tools
lore
#0 lore raw

Hi,
Does anyone know the reason why the Intel/HDaudio HDMI layers use SND_JACK_AVOUT as a jack type? This value is composite and ends up having the side effect of sending 2 independent input events to userspace (SW_LINEOUT_INSERT and SW_VIDEOOUT_INSERT) and confusing the Android logic which deals with wired accessories. Shouldn't we use just SND_JACK_VIDEOOUT instead? What is the reason or rationale behind the use of LINEOUT for HDMI/DP jack events? Thanks
-Pierre

http://elixir.free-electrons.com/linux/latest/ident/SND_JACK_AVOUT

#1 lore raw
Quoted 4 lines · Pierre-Louis Bossart

Hi,
Does anyone know the reason why the Intel/HDaudio HDMI layers use SND_JACK_AVOUT as a jack type?

Because it's really an audio output on the video jack?

Quoted 6 lines

This value is composite and ends up
having the side effect of sending 2 independent input events to userspace (SW_LINEOUT_INSERT and SW_VIDEOOUT_INSERT) and confusing the Android logic which deals with wired accessories. Shouldn't we use just SND_JACK_VIDEOOUT instead? What is the reason or rationale behind the use of LINEOUT for HDMI/DP jack events?

The LINEOUT combo is just an implementation detail, and user-space is supposed to interpret these two combo as a single AV detection. It's similar like the headset.

But I agree that it's a bit confusing as of now. Since there is only one user of SND_JACK_VIDEOOUT (omap/rx51) and the driver also assumes it being AV jack (the control is named as "AV Jack"), I guess we can merge these two into a single one.

Our jack interface is clearly for audio, so AV is equivalent with video, after all.

thanks,

Takashi