Re: HDMI audio to support extcon

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

 



>-----Original Message-----
>From: Daniel Vetter [mailto:daniel.vetter@xxxxxxxx] On Behalf Of Daniel Vetter
>Sent: Monday, May 15, 2017 9:49 PM
>To: Yang, Libin <libin.yang@xxxxxxxxx>
>Cc: Vetter, Daniel <daniel.vetter@xxxxxxxxx>; Bossart, Pierre-louis <pierre-
>louis.bossart@xxxxxxxxx>; jani.nikula@xxxxxxxxxxxxxxx; intel-
>gfx@xxxxxxxxxxxxxxxxxxxxx; Girdwood, Liam R <liam.r.girdwood@xxxxxxxxx>;
>DRI Development <dri-devel@xxxxxxxxxxxxxxxxxxxxx>
>Subject: Re:  HDMI audio to support extcon
>
>Adding dri-devel.
>
>On Mon, May 15, 2017 at 08:16:44AM +0000, Yang, Libin wrote:
>> 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.
>
>Why does it depend upon the DDI port and stuff like that? Do we need to
>make sure that the extcon id somehow lines up with the port on the sound
>side, or is just having a link between the drm connector and sound port
>enough?

Each DDI port should have an interface to the userspace if it has audio
capability. This means we need check the DDI port firstly. And then
we will export the extcon interface to the userspace. This should be
hardware dependent? What's more, to make extcon more powerful,
I'm planning to extend the extcon function with acomp, so we can 
notify the userspace which PCM will be impacted on the hotplug events.

Regards,
Libin

>
>Not sure where exactly the problem is here, but I also wasn't involved in the
>extcon discussions. Please explain.
>-Daniel
>--
>Daniel Vetter
>Software Engineer, Intel Corporation
>http://blog.ffwll.ch
_______________________________________________
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