All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yang, Libin" <libin.yang@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	"Girdwood, Liam R" <liam.r.girdwood@intel.com>,
	"Vetter, Daniel" <daniel.vetter@intel.com>,
	"Bossart, Pierre-louis" <pierre-louis.bossart@intel.com>
Subject: Re: HDMI audio to support extcon
Date: Tue, 16 May 2017 01:35:49 +0000	[thread overview]
Message-ID: <96A12704CE18D347B625EE2D4A099D19524A82C8@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20170515134918.mmescmqyxbcoctfd@phenom.ffwll.local>


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

      reply	other threads:[~2017-05-16  1:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=96A12704CE18D347B625EE2D4A099D19524A82C8@SHSMSX103.ccr.corp.intel.com \
    --to=libin.yang@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=liam.r.girdwood@intel.com \
    --cc=pierre-louis.bossart@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.