All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: HDMI audio to support extcon
       [not found]       ` <1494525979.13351.2.camel@intel.com>
@ 2017-05-15  8:16         ` Yang, Libin
  2017-05-15 13:49           ` [Intel-gfx] " Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Yang, Libin @ 2017-05-15  8:16 UTC (permalink / raw)
  To: Vetter, Daniel, Bossart, Pierre-louis, jani.nikula
  Cc: intel-gfx, Girdwood, Liam R

Hi Daniel,

>-----Original Message-----
>From: Vetter, Daniel
>Sent: Friday, May 12, 2017 2:06 AM
>To: Bossart, Pierre-louis <pierre-louis.bossart@intel.com>; Yang, Libin
><libin.yang@intel.com>; jani.nikula@linux.intel.com
>Cc: Girdwood, Liam R <liam.r.girdwood@intel.com>; Lin, Mengdong
><mengdong.lin@intel.com>
>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@linux.intel.com]
>> > > Sent: Thursday, May 11, 2017 4:29 PM
>> > > To: Yang, Libin <libin.yang@intel.com>; Vetter, Daniel
>> > > <daniel.vetter@intel.com>
>> > > Cc: Bossart, Pierre-louis <pierre-louis.bossart@intel.com>; Lin,
>> > > Mengdong <mengdong.lin@intel.com>; Girdwood, Liam R
>> > > <liam.r.girdwood@intel .com>
>> > > Subject: Re: HDMI audio to support extcon
>> > >
>> > > On Thu, 11 May 2017, "Yang, Libin" <libin.yang@intel.com> 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] HDMI audio to support extcon
  2017-05-15  8:16         ` HDMI audio to support extcon Yang, Libin
@ 2017-05-15 13:49           ` Daniel Vetter
  2017-05-16  1:35             ` Yang, Libin
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2017-05-15 13:49 UTC (permalink / raw)
  To: Yang, Libin
  Cc: intel-gfx, DRI Development, Girdwood, Liam R, Vetter, Daniel,
	Bossart, Pierre-louis

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@intel.com>; Yang, Libin
> ><libin.yang@intel.com>; jani.nikula@linux.intel.com
> >Cc: Girdwood, Liam R <liam.r.girdwood@intel.com>; Lin, Mengdong
> ><mengdong.lin@intel.com>
> >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@linux.intel.com]
> >> > > Sent: Thursday, May 11, 2017 4:29 PM
> >> > > To: Yang, Libin <libin.yang@intel.com>; Vetter, Daniel
> >> > > <daniel.vetter@intel.com>
> >> > > Cc: Bossart, Pierre-louis <pierre-louis.bossart@intel.com>; Lin,
> >> > > Mengdong <mengdong.lin@intel.com>; Girdwood, Liam R
> >> > > <liam.r.girdwood@intel .com>
> >> > > Subject: Re: HDMI audio to support extcon
> >> > >
> >> > > On Thu, 11 May 2017, "Yang, Libin" <libin.yang@intel.com> 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?

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: HDMI audio to support extcon
  2017-05-15 13:49           ` [Intel-gfx] " Daniel Vetter
@ 2017-05-16  1:35             ` Yang, Libin
  0 siblings, 0 replies; 3+ messages in thread
From: Yang, Libin @ 2017-05-16  1:35 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: intel-gfx, DRI Development, Girdwood, Liam R, Vetter, Daniel,
	Bossart, Pierre-louis


>-----Original Message-----
>From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel Vetter
>Sent: Monday, May 15, 2017 9:49 PM
>To: Yang, Libin <libin.yang@intel.com>
>Cc: Vetter, Daniel <daniel.vetter@intel.com>; Bossart, Pierre-louis <pierre-
>louis.bossart@intel.com>; jani.nikula@linux.intel.com; intel-
>gfx@lists.freedesktop.org; Girdwood, Liam R <liam.r.girdwood@intel.com>;
>DRI Development <dri-devel@lists.freedesktop.org>
>Subject: Re: [Intel-gfx] 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@intel.com>; Yang,
>> >Libin <libin.yang@intel.com>; jani.nikula@linux.intel.com
>> >Cc: Girdwood, Liam R <liam.r.girdwood@intel.com>; Lin, Mengdong
>> ><mengdong.lin@intel.com>
>> >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@linux.intel.com]
>> >> > > Sent: Thursday, May 11, 2017 4:29 PM
>> >> > > To: Yang, Libin <libin.yang@intel.com>; Vetter, Daniel
>> >> > > <daniel.vetter@intel.com>
>> >> > > Cc: Bossart, Pierre-louis <pierre-louis.bossart@intel.com>;
>> >> > > Lin, Mengdong <mengdong.lin@intel.com>; Girdwood, Liam R
>> >> > > <liam.r.girdwood@intel .com>
>> >> > > Subject: Re: HDMI audio to support extcon
>> >> > >
>> >> > > On Thu, 11 May 2017, "Yang, Libin" <libin.yang@intel.com> 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-05-16  1:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <96A12704CE18D347B625EE2D4A099D19524A69EF@SHSMSX103.ccr.corp.intel.com>
     [not found] ` <87vap7n6eh.fsf@intel.com>
     [not found]   ` <96A12704CE18D347B625EE2D4A099D19524A6CE9@SHSMSX103.ccr.corp.intel.com>
     [not found]     ` <08926397-1013-0586-1db7-0473df464d74@intel.com>
     [not found]       ` <1494525979.13351.2.camel@intel.com>
2017-05-15  8:16         ` HDMI audio to support extcon Yang, Libin
2017-05-15 13:49           ` [Intel-gfx] " Daniel Vetter
2017-05-16  1:35             ` Yang, Libin

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.