[alsa-devel] Jack event API - decision needed

Stephen Warren swarren at nvidia.com
Thu Jun 23 17:32:57 CEST 2011

Lennart Poettering wrote at Thursday, June 23, 2011 3:49 AM:
> On Thu, 23.06.11 02:10, Mark Brown (broonie at opensource.wolfsonmicro.com) wrote:
> I can give you a thousand of real-life usecases for wanting to match up
> PCM devices with controls, but the one for wanting to match up HDMI
> audio with HDMI video is much weaker, since machines usually have
> multiple PCM streams, but not multiple HDMI ports.

As an example, all NVIDIA GPUs, and some chipsets, built within the last
perhaps 2 or 3 years contain an HD-audio controller with 4 PCM devices.
Any/all of these could be routed out to actual connectors on the board.
For audio purposes, HDMI, DVI (connected to an HDMI sink), and DisplayPort
connectors all can carry audio and end up being exposed identically by
ALSA. In practice, it's very common to have at least 2 such digital
connectors on a GPU.

I believe both Intel and AMD/ATI chipsets and GPUs that support audio
are in exactly the same boat, although perhaps only supporting up to
2 or 3 PCMs total?

> I am not saying that such a match-up shouldn't be possible, but I'd say
> it could be relatively easy to implement. One option would be to go by
> names. i.e. simply say that if an alsa control device is called "HDMI1
> Jack Sensing", and an X11 XRANDR port is called "HDMI1", then they
> should be the same, and apps should comapre the first words of these
> names, and that both can be traced to the same udev originating device.

It'll be challenging to implement this based on device name alone. The
X driver probably has enough information to know the difference between
DVI, HDMI, and DP ports and hence could name ports appropriately.
However, the generic HD-audio HDMI driver has basically zero knowledge
of which HDA pin complexes are routed to connectors at all, or for those
that are, whether they're routed to DVI, HDMI, or DP ports, and equally
no idea what port number X might choose if there are say 2 DVI ports.

(well, HDMI vs. DP is pin complex property, but HDMI vs. DVI certainly
isn't, and numbering order when there are n HDMI pins isn't defined, and
only very recent NVIDIA GPUs mark unconnected pin complexes)

This is what I attempted to start talking about in my somewhat recent
email titled " EDID-like data for audio: Port correlation between	ALSA
and X"; see:


The basic idea: This X vs. ALSA correlation is probably going to be
through ELD data, at least internally to the kernel.


More information about the Alsa-devel mailing list