Re: HDMI audio to support extcon

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

 



Hi Daniel,

>-----Original Message-----
>From: Vetter, Daniel
>Sent: Friday, May 12, 2017 2:06 AM
>To: Bossart, Pierre-louis <pierre-louis.bossart@xxxxxxxxx>; Yang, Libin
><libin.yang@xxxxxxxxx>; jani.nikula@xxxxxxxxxxxxxxx
>Cc: Girdwood, Liam R <liam.r.girdwood@xxxxxxxxx>; Lin, Mengdong
><mengdong.lin@xxxxxxxxx>
>Subject: Re: HDMI audio to support extcon
>
>On Thu, 2017-05-11 at 11:13 -0500, Pierre-louis Bossart wrote:
>> On 5/11/17 9:41 AM, Yang, Libin wrote:
>> > > -----Original Message-----
>> > > From: Jani Nikula [mailto:jani.nikula@xxxxxxxxxxxxxxx]
>> > > Sent: Thursday, May 11, 2017 4:29 PM
>> > > To: Yang, Libin <libin.yang@xxxxxxxxx>; Vetter, Daniel
>> > > <daniel.vetter@xxxxxxxxx>
>> > > Cc: Bossart, Pierre-louis <pierre-louis.bossart@xxxxxxxxx>; Lin,
>> > > Mengdong <mengdong.lin@xxxxxxxxx>; Girdwood, Liam R
>> > > <liam.r.girdwood@intel .com>
>> > > Subject: Re: HDMI audio to support extcon
>> > >
>> > > On Thu, 11 May 2017, "Yang, Libin" <libin.yang@xxxxxxxxx> wrote:
>> > > > Hi Daniel & Jani,
>> > > >
>> > > > Currently Pierre and I are trying to enabling extcon for HDMI
>> > > > audio, which
>> > >
>> > > will be used in Android for the hotplug event notification.
>> > >
>> > > What's "extcon"?
>> >
>> > Extcon is used by kernel to communicate with userspace. It tries to
>> > replace switch class (switch class is a legacy method to communicate
>> > with userspace in Android). The code is located in drivers/extcon/*
>>
>> Most Android kernels are ancient (3.10 to 3.18) and use an
>> Android-specific switch class implemented in the kernel, the uevents
>> are then used by AOSP to enable HDMI outputs. See
>>
>https://android.googlesource.com/platform/frameworks/base/+/0e2d281/s
>> ervices/java/com/android/server/WiredAccessoryManager.java#348
>>
>> For Android-IA we are using 4.9 and we'd like to move forward with the
>> extcon solution which part of the mainline kernel. The extcon api
>> relies on a registration and a state which set/unset when the external
>> device is hot-plugged/removed. The change in state generates the
>> uevents required by Android.When the CONFIG_ANDROID is defined, the
>> kernel creates a /sys/class/switch symlink which is backwards
>> compatible with what Android can parse.
>>
>> The question is where do we put the extcon registration 1. in the i915
>> code (e.g. in intel_codec_enable()/disable()) 2. in the HDaudio and
>> LPEaudio code (two locations to maintain)
>>
>> Ideally we'd like to add information on ports to userspace so that
>> multiple outputs can be enabled. Currently Android can only support
>> one output since it doesn't get additional information.
>>
>> Does this help frame the problem statement?
>
>Yay for reinventing wheels in Android I guess (we have hotplug notifications
>since forever in drm ofc), but so be it. I think the right way to do this is to wire
>this into the generic drm output probe helpers in drm_probe_helpers.c,
>perhaps filtered to only handle HDMI (or whatever it is Android wants).

The extcon implementation may be related to our hardware. For example,
it depends on the DDI port number and audio capability. I'm not sure
it is OK to implement it in drm level.

Regards,
Libin

>
>So now we'll have drm uevent -> extcon -> android switch class compat
>multilayer. Impressive bikeshed :-) -Daniel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux