Re: Need your advice: Add a new communication inteface between HD-Audio and Gfx drivers for hotplug notification/ELD update

Ville Syrjälä
2014-02-18T14:22:32Z

On Tue, Feb 18, 2014 at 01:58:22PM +0000, Lin, Mengdong wrote:
> Sorry to pick up this thread after a long time.
>
> > -----Original Message-----
> > From: daniel.vetter@ffwll.ch [mailto:daniel.vetter@ffwll.ch] On Behalf Of
> > Daniel Vetter
> > Sent: Thursday, January 23, 2014 4:27 PM
> > To: Takashi Iwai
>
> > On Thu, Jan 23, 2014 at 8:57 AM, Takashi Iwai <tiwai@suse.de> wrote:
> > >> Thanks for clarification!
> > >> Maybe we can add output info (eg. display port number) to the eld entries
> > under /proc/asound/cardx. Is it okay?
> > >
> > > It's possible, but the proc file is just a help. It can't be the API.
> > > For accessing the information, we'll need some new API, or let inform
> > > via sysfs of the new device.
> >
> > Links in sysfs sound like the best approach. drm already has nodes for each
> > connector, so on the gfx side there's a natural endpoint already.
> > sysfs links also avoids any naming issues from the start, e.g. the above DP
> > connector id might lead to clashes with multiple cards.
>
> Hi Daniel,
>
> Is there a 1:1 mapping between these connector nodes and ports of Gfx display engine?
> Eg. For Haswell Ultrabook, under /sys/devices/pci0000:00/0000:00:02.0/drm/card0/
> There are four connector nodes,
> card0-DP-1 -> DDI port B
> card0-eDP-1/ -> DDI port A
> card0-HDMI-A-1/ -> DDI Port C
> card0-HDMI-A-2/ -> Which DDI port ? Haswell-ULT does not support port D, and I think port E is for VGA.

There's no fixed mapping with the port and the connector name. The
number in the connector name is basically just a running number per
connector type. However I do believe we do register the connectors
in the order of the ports more or less always, so you can
*sometimes* deduce the port name from the connector.

I suppose in this example HDMI-A-1 is port B, HDMI-A-2 is port C, and
DP-1 can be either port B or port C. DP++ is the reason why we have
overlapping DP and HDMI connectors for the same port.

>
> Hi Takashi,
>
> To make user space figure out which audio output is connected to which screen (connector), maybe we can define a new ALSA control for each HDMI/DP PCM device:
> e.g. numid=x,iface=PCM,name='Screen',device=3
> Reading the control will return the name of the DRM connector nodes like ' card0-DP-1'. The audio driver can get the connector name from the gfx driver.
>
> For DP1.2 Multi-stream transport, it's not supported by i915 and HD-A driver now. But probably there will be sub-nodes for the DP connector node in the future and an index in their name can be used distinguish monitors connected to the same DP port, like card0-DP-1.1, card0-DP-1.2, card0-DP-1.3 ... These names can be used by the above ALSA PCM 'Screen' control, so we can still know which audio output is to which monitor.
>
> Thanks
> Mengdong
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Ville Syrjälä
Intel OTC