alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Ser, Simon" <simon.ser@intel.com>
To: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"christian.koenig@amd.com" <christian.koenig@amd.com>,
	"sunpeng.li@amd.com" <sunpeng.li@amd.com>,
	"Nicholas.Kazlauskas@amd.com" <Nicholas.Kazlauskas@amd.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"Harry.Wentland@amd.com" <Harry.Wentland@amd.com>
Subject: Re: Linking ALSA playback devices and DRM connectors
Date: Thu, 6 Jun 2019 09:13:51 +0000	[thread overview]
Message-ID: <ccd5d702b4c15cb14e3ec44758cce8880e28b74c.camel@intel.com> (raw)
In-Reply-To: <157c9015-32c8-2c1d-236f-48da16f43399@gmail.com>

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?

Additional thought: since I need this for the IGT test suite I don't
really care how this info is exposed as long as it's exposed, but other
userspace programs (DEs) are probably interested in this information
too. This would allow users to actually have the name of the monitor in
the audio output selection UI. Having something that doesn't depend on
sysfs would be better for this.

Would there be a way to expose some info about the monitor in the ALSA
API?

> Anyway added our DC team, stuff like that is their construction site.
> 
> Regards,
> Christian.
> 
> > - Somehow expose the connector name via the ALSA API?
> > - Expose the connector EDID via ALSA?
> > - Other ideas?
> > 
> > Thanks!
> > 
> > Simon Ser
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-06-06  9:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 15:05 Linking ALSA playback devices and DRM connectors Ser, Simon
2019-06-04 15:15 ` Christian König
2019-06-04 15:24   ` Daniel Vetter
2019-06-04 16:25     ` Ville Syrjälä
2019-06-11 10:01       ` [alsa-devel] " Takashi Iwai
2019-06-06  9:17     ` Ser, Simon
2019-06-06  9:13   ` Ser, Simon [this message]
2019-06-06  9:20     ` Koenig, Christian
2019-06-07 17:02     ` Ville Syrjälä

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=ccd5d702b4c15cb14e3ec44758cce8880e28b74c.camel@intel.com \
    --to=simon.ser@intel.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Nicholas.Kazlauskas@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sunpeng.li@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).