Linking ALSA playback devices and DRM connectors

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Jun 7 17:02:04 UTC 2019


On Thu, Jun 06, 2019 at 09:13:51AM +0000, Ser, Simon wrote:
> On Tue, 2019-06-04 at 17:15 +0200, Christian König wrote:
> > Am 04.06.19 um 17:05 schrieb Ser, Simon:
> > > Hi,
> > > 
> > > I'm trying to link ALSA playback devices and DRM connectors. In other
> > > words, I'd like to be able to know which ALSA device I should open to
> > > play audio on a given connector.
> > > 
> > > Unfortunately, I haven't found a way to extract this information. I
> > > know /proc/asound/cardN/eld* expose the EDID-like data. However by
> > > looking at the ALSA API (also: aplay -l and -L) I can't find a way to
> > > figure out which PCM device maps to the ELD.
> > > 
> > > Am I missing something?
> > 
> > Is that actually fixed on all hardware? Or do we maybe have some 
> > hardware with only one audio codec and multiple connectors?
> > 
> > > If not, what would be the best way to expose this?
> > > 
> > > - A symlink to the ALSA audio PCM device in
> > >    /sys/class/drm/cardN-CONNECTOR?
> > > - A symlink to the DRM connector in /sys/class/sound/pcm*?
> > 
> > If it's fixed than those two options sound sane to me.
> > 
> > > - A DRM connector property?
> > 
> > If it's configurable than that sounds like a good option to me.
> 
> I'm still not sure whether this is fixed on all hardware or not.
> 
> Ville, on this old Intel hw, is the single connector that gets the
> audio configurable?

The force-audio property can be used for that. That is, you can force
audio off for all the connector where you don't want audio and then
it should get automagically routed to the remaining connector.

-- 
Ville Syrjälä
Intel


More information about the dri-devel mailing list