All of lore.kernel.org
 help / color / mirror / Atom feed
* Linking ALSA playback devices and DRM connectors
@ 2019-06-04 15:05 Ser, Simon
  2019-06-04 15:15 ` Christian König
  0 siblings, 1 reply; 9+ messages in thread
From: Ser, Simon @ 2019-06-04 15:05 UTC (permalink / raw)
  To: dri-devel, alsa-devel

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?

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*?
- A DRM connector property?
- 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Linking ALSA playback devices and DRM connectors
  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-06  9:13   ` Ser, Simon
  0 siblings, 2 replies; 9+ messages in thread
From: Christian König @ 2019-06-04 15:15 UTC (permalink / raw)
  To: Ser, Simon, dri-devel, alsa-devel, Kazlauskas, Nicholas,
	Wentland, Harry, Leo (Sunpeng) Li

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.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Linking ALSA playback devices and DRM connectors
  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-06  9:17     ` Ser, Simon
  2019-06-06  9:13   ` Ser, Simon
  1 sibling, 2 replies; 9+ messages in thread
From: Daniel Vetter @ 2019-06-04 15:24 UTC (permalink / raw)
  To: Christian König
  Cc: alsa-devel, Leo (Sunpeng) Li, dri-devel, Ser, Simon, Kazlauskas,
	Nicholas

On Tue, Jun 4, 2019 at 5:15 PM Christian König
<ckoenig.leichtzumerken@gmail.com> 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.
>
> 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?

I think on our MST hw you get a combination of CRTCs x CONNECTORs on
the alsa side. I.e. for every pair of connector and crtc you get a
separate alsa pin. This is because with mst, you could have up to
num_crtcs streams on a single connector. Not sure how to model that.

Bigger question: How do you want to make the cooperation happen?
There's been some ideas floating about making the hdmi connection
between drm and alsa somehow represented in the code, but nothing ever
really happened. there's drm_audio_component.h, but that's just the
interface, it doesn't really solve how to make the connection. Also
only used by i915/hda.
-Daniel



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



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Linking ALSA playback devices and DRM connectors
  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
  1 sibling, 1 reply; 9+ messages in thread
From: Ville Syrjälä @ 2019-06-04 16:25 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: alsa-devel, Leo (Sunpeng) Li, dri-devel, Kazlauskas, Nicholas,
	Ser, Simon, Christian König

On Tue, Jun 04, 2019 at 05:24:35PM +0200, Daniel Vetter wrote:
> On Tue, Jun 4, 2019 at 5:15 PM Christian König
> <ckoenig.leichtzumerken@gmail.com> 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?

Certain old i915 hardware is like that. You can drive
multiple HDMI connectors at once but only one of them 
can get the audio. If you try to output audio to multiple
ports at once you get no audio whatsoever. ATM we don't
really handle that case properly.

> >
> > >
> > > 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.
> >
> > 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?
> 
> I think on our MST hw you get a combination of CRTCs x CONNECTORs on
> the alsa side. I.e. for every pair of connector and crtc you get a
> separate alsa pin. This is because with mst, you could have up to
> num_crtcs streams on a single connector. Not sure how to model that.

IIRC the current i915 vs. alsa model is that for SST/HDMI you have
a 1:1 relationship between the port and the pcm device, but with MST
you nave a 1:1 relationship between the pipe and the pcm device.

I think the only way to have any kind of static connector<->pcm
relationship with MST would involve dynamically adding/removing
pcm devices when the correcponding drm connector is added/removed.
If we don't want to/can't add such pcm devices then we'd need to
dynamically change the symlinks/whatever whenever an MST stream
is started/stopped. And probably we should do the same for SST/HDMI
as well, if for no other reason than to make sure userspace is
prepared for it even if they didn't test with MST.

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Linking ALSA playback devices and DRM connectors
  2019-06-04 15:15 ` Christian König
  2019-06-04 15:24   ` Daniel Vetter
@ 2019-06-06  9:13   ` Ser, Simon
  2019-06-06  9:20     ` Koenig, Christian
  2019-06-07 17:02     ` Ville Syrjälä
  1 sibling, 2 replies; 9+ messages in thread
From: Ser, Simon @ 2019-06-06  9:13 UTC (permalink / raw)
  To: dri-devel, christian.koenig, sunpeng.li, Nicholas.Kazlauskas,
	alsa-devel, Harry.Wentland

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Linking ALSA playback devices and DRM connectors
  2019-06-04 15:24   ` Daniel Vetter
  2019-06-04 16:25     ` Ville Syrjälä
@ 2019-06-06  9:17     ` Ser, Simon
  1 sibling, 0 replies; 9+ messages in thread
From: Ser, Simon @ 2019-06-06  9:17 UTC (permalink / raw)
  To: daniel, christian.koenig
  Cc: sunpeng.li, alsa-devel, Nicholas.Kazlauskas, dri-devel

On Tue, 2019-06-04 at 17:24 +0200, Daniel Vetter wrote:
> On Tue, Jun 4, 2019 at 5:15 PM Christian König
> <ckoenig.leichtzumerken@gmail.com> 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.
> > 
> > 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?
> 
> I think on our MST hw you get a combination of CRTCs x CONNECTORs on
> the alsa side. I.e. for every pair of connector and crtc you get a
> separate alsa pin. This is because with mst, you could have up to
> num_crtcs streams on a single connector. Not sure how to model that.

I assume this means "up to num_crtcs streams an a physical connector".
With MST a physical connector can back more than one DRM connector.

> Bigger question: How do you want to make the cooperation happen?
> There's been some ideas floating about making the hdmi connection
> between drm and alsa somehow represented in the code, but nothing ever
> really happened. there's drm_audio_component.h, but that's just the
> interface, it doesn't really solve how to make the connection. Also
> only used by i915/hda.

To be completely honest I have no idea. That's why I sent this e-
mail. :P

Indeed, it seems that the interface isn't enough (get_eld and pin2port
are interesting though).

> > > 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
> 
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Linking ALSA playback devices and DRM connectors
  2019-06-06  9:13   ` Ser, Simon
@ 2019-06-06  9:20     ` Koenig, Christian
  2019-06-07 17:02     ` Ville Syrjälä
  1 sibling, 0 replies; 9+ messages in thread
From: Koenig, Christian @ 2019-06-06  9:20 UTC (permalink / raw)
  To: Ser, Simon, dri-devel, Li, Sun peng (Leo),
	Kazlauskas, Nicholas, alsa-devel, Wentland, Harry

Am 06.06.19 um 11:13 schrieb Ser, Simon:
> 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.

Well from reading up on the thread I think the answer is that this is 
NOT fixed.

At least from AMD hardware I know that the original R600 had only one 
audio codec which could be routed to multiple HDMI connectors at the 
same time.

And I understand the reply about MST so that you can even have multiple 
streams over the same codec routed to different connectors.

Christian.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Linking ALSA playback devices and DRM connectors
  2019-06-06  9:13   ` Ser, Simon
  2019-06-06  9:20     ` Koenig, Christian
@ 2019-06-07 17:02     ` Ville Syrjälä
  1 sibling, 0 replies; 9+ messages in thread
From: Ville Syrjälä @ 2019-06-07 17:02 UTC (permalink / raw)
  To: Ser, Simon
  Cc: alsa-devel, sunpeng.li, dri-devel, Nicholas.Kazlauskas, christian.koenig

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-devel] Linking ALSA playback devices and DRM connectors
  2019-06-04 16:25     ` Ville Syrjälä
@ 2019-06-11 10:01       ` Takashi Iwai
  0 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2019-06-11 10:01 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: alsa-devel, Leo (Sunpeng) Li, dri-devel, Christian König,
	Ser, Simon, Kazlauskas, Nicholas

On Tue, 04 Jun 2019 18:25:53 +0200,
Ville Syrjälä wrote:
> 
> On Tue, Jun 04, 2019 at 05:24:35PM +0200, Daniel Vetter wrote:
> > On Tue, Jun 4, 2019 at 5:15 PM Christian König
> > <ckoenig.leichtzumerken@gmail.com> 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?
> 
> Certain old i915 hardware is like that. You can drive
> multiple HDMI connectors at once but only one of them 
> can get the audio. If you try to output audio to multiple
> ports at once you get no audio whatsoever. ATM we don't
> really handle that case properly.
> 
> > >
> > > >
> > > > 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.
> > >
> > > 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?
> > 
> > I think on our MST hw you get a combination of CRTCs x CONNECTORs on
> > the alsa side. I.e. for every pair of connector and crtc you get a
> > separate alsa pin. This is because with mst, you could have up to
> > num_crtcs streams on a single connector. Not sure how to model that.
> 
> IIRC the current i915 vs. alsa model is that for SST/HDMI you have
> a 1:1 relationship between the port and the pcm device, but with MST
> you nave a 1:1 relationship between the pipe and the pcm device.
> 
> I think the only way to have any kind of static connector<->pcm
> relationship with MST would involve dynamically adding/removing
> pcm devices when the correcponding drm connector is added/removed.
> If we don't want to/can't add such pcm devices then we'd need to
> dynamically change the symlinks/whatever whenever an MST stream
> is started/stopped. And probably we should do the same for SST/HDMI
> as well, if for no other reason than to make sure userspace is
> prepared for it even if they didn't test with MST.

The idea with the dynamic PCM device creation pops up occasionally,
but it never flies.  The biggest reason so far is the support of
PulseAudio and others; although PA can deal with the hotplug *card*
device, the devices below the card level aren't managed dynamically,
hence the dynamic creation of PCM device doesn't work for them.

 From API POV, the cleanest way would be to provide some information
over ALSA control element for each PCM stream that indicates the
corresponding DRM connector.  But other methods shouldn't be too hard
to implement -- once when we have a certain way to obtain the DRM
connector / PCM relationship :)


thanks,

Takashi
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-06-11 10:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-06-06  9:20     ` Koenig, Christian
2019-06-07 17:02     ` Ville Syrjälä

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.