All of lore.kernel.org
 help / color / mirror / Atom feed
* i915, HDMI/DP audio with multiple monitors
@ 2018-09-11 13:50 Bruno Prémont
  2018-09-12 17:46 ` Ville Syrjälä
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Bruno Prémont @ 2018-09-11 13:50 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

Hi,

I have a system with multiple monitors and would like to send
notification sounds to the monitor on which corresponding
window is visible.

For a workstation and a tiny computer things look different:
- workstation (Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz):
 00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
 00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
 00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 04)

 Here alsa show me two cards:
 - HDA Intel PCH (Realtek ALC671)
 - HDA Intel HDMI (Intel Generic)

 **** List of PLAYBACK Hardware Devices ****
 card 0: HDMI [HDA Intel HDMI], device 3: Generic Digital [Generic Digital]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
 card 1: PCH [HDA Intel PCH], device 0: ALC671 Analog [ALC671 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0


- tiny computer (Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz):
 00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:1912] (rev 06)
 00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-H HD Audio [8086:a170] (rev 31)

 Here alsa shows a single card:
 - HDA Intel PCH (Realtek ALC671)

 **** List of PLAYBACK Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: ALC671 Analog [ALC671 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
 card 0: PCH [HDA Intel PCH], device 3: Generic Digital [Generic Digital]
   Subdevices: 1/1
   Subdevice #0: subdevice #0


How can I determine/set to which monitor the sound should go, and preferably send
different sounds to both monitors at same time?


Cheers,
Bruno
_______________________________________________
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: i915, HDMI/DP audio with multiple monitors
  2018-09-11 13:50 i915, HDMI/DP audio with multiple monitors Bruno Prémont
@ 2018-09-12 17:46 ` Ville Syrjälä
  2018-09-12 18:06   ` Takashi Iwai
  2018-09-13  1:48   ` Yang, Libin
  2018-09-12 20:02 ` Alex Deucher
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 9+ messages in thread
From: Ville Syrjälä @ 2018-09-12 17:46 UTC (permalink / raw)
  To: Bruno Prémont; +Cc: Libin Yang, intel-gfx, alsa-devel, dri-devel

On Tue, Sep 11, 2018 at 03:50:13PM +0200, Bruno Prémont wrote:
> Hi,
> 
> I have a system with multiple monitors and would like to send
> notification sounds to the monitor on which corresponding
> window is visible.
> 
> For a workstation and a tiny computer things look different:
> - workstation (Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz):
>  00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
>  00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
>  00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 04)
> 
>  Here alsa show me two cards:
>  - HDA Intel PCH (Realtek ALC671)
>  - HDA Intel HDMI (Intel Generic)
> 
>  **** List of PLAYBACK Hardware Devices ****
>  card 0: HDMI [HDA Intel HDMI], device 3: Generic Digital [Generic Digital]
>    Subdevices: 1/1
>    Subdevice #0: subdevice #0

There should normally be multiple HDMI devices (one for each HDMI/DP
connector more or less). Eg. my hsw shows:

card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Looking at the hda_codec.c we see:
 static int audio_idx[HDA_PCM_NTYPES][5] = {
...
        [HDA_PCM_TYPE_HDMI]  = { 3, 7, 8, 9, -1 },

So you always get those device numbers, but I don't see an immediate
relationship between those and the pin numbers (which do have some
kind of relationship with the HDMI/DP port). I guess if they always
get registered in order of the pin numbers then those would translate
to 3 == port B, 7 == port C, etc. And after that the problem is figuring
out which port is related to which connector, for which we have nothing
at the moment.

I suppose the ideal solution might be to have a sysfs symlink (or
something) to connect the two together.

But then there's MST where I think the pcm device correlates with the
crtc rather than the connector. Maybe. I can't remember anymore, and
I'm not sure it even works (I've recently heard people saying it
doesn't).

>  card 1: PCH [HDA Intel PCH], device 0: ALC671 Analog [ALC671 Analog]
>    Subdevices: 1/1
>    Subdevice #0: subdevice #0
> 
> 
> - tiny computer (Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz):
>  00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:1912] (rev 06)
>  00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-H HD Audio [8086:a170] (rev 31)
> 
>  Here alsa shows a single card:
>  - HDA Intel PCH (Realtek ALC671)
> 
>  **** List of PLAYBACK Hardware Devices ****
>  card 0: PCH [HDA Intel PCH], device 0: ALC671 Analog [ALC671 Analog]
>    Subdevices: 1/1
>    Subdevice #0: subdevice #0
>  card 0: PCH [HDA Intel PCH], device 3: Generic Digital [Generic Digital]
>    Subdevices: 1/1
>    Subdevice #0: subdevice #0
> 
> 
> How can I determine/set to which monitor the sound should go, and preferably send
> different sounds to both monitors at same time?
> 
> 
> Cheers,
> Bruno
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
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: i915, HDMI/DP audio with multiple monitors
  2018-09-12 17:46 ` Ville Syrjälä
@ 2018-09-12 18:06   ` Takashi Iwai
  2018-09-13  7:25     ` Bruno Prémont
  2018-09-13  1:48   ` Yang, Libin
  1 sibling, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2018-09-12 18:06 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Bruno Prémont, Libin Yang, intel-gfx, alsa-devel, dri-devel

On Wed, 12 Sep 2018 19:46:58 +0200,
Ville Syrjälä wrote:
> 
> On Tue, Sep 11, 2018 at 03:50:13PM +0200, Bruno Prémont wrote:
> > Hi,
> > 
> > I have a system with multiple monitors and would like to send
> > notification sounds to the monitor on which corresponding
> > window is visible.
> > 
> > For a workstation and a tiny computer things look different:
> > - workstation (Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz):
> >  00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
> >  00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
> >  00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 04)
> > 
> >  Here alsa show me two cards:
> >  - HDA Intel PCH (Realtek ALC671)
> >  - HDA Intel HDMI (Intel Generic)
> > 
> >  **** List of PLAYBACK Hardware Devices ****
> >  card 0: HDMI [HDA Intel HDMI], device 3: Generic Digital [Generic Digital]
> >    Subdevices: 1/1
> >    Subdevice #0: subdevice #0

Is a proper kernel config (CONFIG_SND_HDA_CODEC_HDMI) enabled?
The device name looks strange as if it's not properly bound with the
HDMI codec driver.


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

* Re: i915, HDMI/DP audio with multiple monitors
  2018-09-11 13:50 i915, HDMI/DP audio with multiple monitors Bruno Prémont
  2018-09-12 17:46 ` Ville Syrjälä
@ 2018-09-12 20:02 ` Alex Deucher
  2018-09-13 16:18 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2018-09-13 16:39 ` ✗ Fi.CI.BAT: failure " Patchwork
  3 siblings, 0 replies; 9+ messages in thread
From: Alex Deucher @ 2018-09-12 20:02 UTC (permalink / raw)
  To: bonbons; +Cc: Intel Graphics Development, Maling list - DRI developers

On Wed, Sep 12, 2018 at 3:05 AM Bruno Prémont <bonbons@sysophe.eu> wrote:
>
> Hi,
>
> I have a system with multiple monitors and would like to send
> notification sounds to the monitor on which corresponding
> window is visible.
>
> For a workstation and a tiny computer things look different:
> - workstation (Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz):
>  00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
>  00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
>  00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 04)
>
>  Here alsa show me two cards:
>  - HDA Intel PCH (Realtek ALC671)
>  - HDA Intel HDMI (Intel Generic)
>
>  **** List of PLAYBACK Hardware Devices ****
>  card 0: HDMI [HDA Intel HDMI], device 3: Generic Digital [Generic Digital]
>    Subdevices: 1/1
>    Subdevice #0: subdevice #0
>  card 1: PCH [HDA Intel PCH], device 0: ALC671 Analog [ALC671 Analog]
>    Subdevices: 1/1
>    Subdevice #0: subdevice #0
>
>
> - tiny computer (Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz):
>  00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:1912] (rev 06)
>  00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-H HD Audio [8086:a170] (rev 31)
>
>  Here alsa shows a single card:
>  - HDA Intel PCH (Realtek ALC671)
>
>  **** List of PLAYBACK Hardware Devices ****
>  card 0: PCH [HDA Intel PCH], device 0: ALC671 Analog [ALC671 Analog]
>    Subdevices: 1/1
>    Subdevice #0: subdevice #0
>  card 0: PCH [HDA Intel PCH], device 3: Generic Digital [Generic Digital]
>    Subdevices: 1/1
>    Subdevice #0: subdevice #0
>
>
> How can I determine/set to which monitor the sound should go, and preferably send
> different sounds to both monitors at same time?

On AMD systems, there are vendor verbs to do the channel mappings for
various configs.
http://developer.amd.com/wordpress/media/2013/10/AMD_HDA_verbs_v2.pdf
Intel may have something similar.

Alex

>
>
> Cheers,
> Bruno
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* RE: i915, HDMI/DP audio with multiple monitors
  2018-09-12 17:46 ` Ville Syrjälä
  2018-09-12 18:06   ` Takashi Iwai
@ 2018-09-13  1:48   ` Yang, Libin
  1 sibling, 0 replies; 9+ messages in thread
From: Yang, Libin @ 2018-09-13  1:48 UTC (permalink / raw)
  To: Ville Syrjälä, Bruno Prémont
  Cc: Lin, Mengdong, intel-gfx, alsa-devel, dri-devel


>-----Original Message-----
>From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com]
>Sent: Thursday, September 13, 2018 1:47 AM
>To: Bruno Prémont <bonbons@sysophe.eu>
>Cc: intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; Takashi
>Iwai <tiwai@suse.de>; alsa-devel@alsa-project.org; Yang, Libin
><libin.yang@intel.com>
>Subject: Re: i915, HDMI/DP audio with multiple monitors
>
>On Tue, Sep 11, 2018 at 03:50:13PM +0200, Bruno Prémont wrote:
>> Hi,
>>
>> I have a system with multiple monitors and would like to send
>> notification sounds to the monitor on which corresponding window is
>> visible.

This requirement is reasonable :)

>>
>> For a workstation and a tiny computer things look different:
>> - workstation (Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz):
>>  00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon
>> E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller
>> [8086:0412] (rev 06)
>>  00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th
>> Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
>>  00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series
>> Chipset High Definition Audio Controller [8086:8c20] (rev 04)
>>
>>  Here alsa show me two cards:
>>  - HDA Intel PCH (Realtek ALC671)
>>  - HDA Intel HDMI (Intel Generic)
>>
>>  **** List of PLAYBACK Hardware Devices ****  card 0: HDMI [HDA Intel
>> HDMI], device 3: Generic Digital [Generic Digital]
>>    Subdevices: 1/1
>>    Subdevice #0: subdevice #0
>
>There should normally be multiple HDMI devices (one for each HDMI/DP
>connector more or less). Eg. my hsw shows:
>
>card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
>  Subdevices: 1/1
>  Subdevice #0: subdevice #0
>card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
>  Subdevices: 1/1
>  Subdevice #0: subdevice #0
>
>Looking at the hda_codec.c we see:
> static int audio_idx[HDA_PCM_NTYPES][5] = { ...
>        [HDA_PCM_TYPE_HDMI]  = { 3, 7, 8, 9, -1 },
>
>So you always get those device numbers, but I don't see an immediate
>relationship between those and the pin numbers (which do have some kind of
>relationship with the HDMI/DP port). I guess if they always get registered in
>order of the pin numbers then those would translate to 3 == port B, 7 == port
>C, etc. And after that the problem is figuring out which port is related to which
>connector, for which we have nothing at the moment.
>
>I suppose the ideal solution might be to have a sysfs symlink (or
>something) to connect the two together.
>
>But then there's MST where I think the pcm device correlates with the crtc
>rather than the connector. Maybe. I can't remember anymore, and I'm not
>sure it even works (I've recently heard people saying it doesn't).

Ville is right. For NON-MST (PCM static assignment), the PCM & PORT 
mapping is simple and static.

For DP-MST (PCM dynamic assignment), it is a little complicated. In HDMI
audio driver, the per_pin saves all the information. 
1. PORT info: per_pin->pin_nid is related to the PORT information. 
The mapping information is showed in hdmi audio driver function 
intel_pin_eld_notify(). 
2. PCM info: we can get the PCM with per_pin->pcm_idx.

With these information, we can tell which PCM is mapped to which PORT.

The audio driver can export such information to user space (No sure 
if such information is already exported.). And user space, such as 
pulseaudio and so on, can use such information automatically choose 
which PCM to playback corresponding to the monitor 
which active window is in. 

Regards,
Libin

>
>>  card 1: PCH [HDA Intel PCH], device 0: ALC671 Analog [ALC671 Analog]
>>    Subdevices: 1/1
>>    Subdevice #0: subdevice #0
>>
>>
>> - tiny computer (Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz):
>>  00:02.0 VGA compatible controller [0300]: Intel Corporation HD
>> Graphics 530 [8086:1912] (rev 06)
>>  00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-H HD
>> Audio [8086:a170] (rev 31)
>>
>>  Here alsa shows a single card:
>>  - HDA Intel PCH (Realtek ALC671)
>>
>>  **** List of PLAYBACK Hardware Devices ****  card 0: PCH [HDA Intel
>> PCH], device 0: ALC671 Analog [ALC671 Analog]
>>    Subdevices: 1/1
>>    Subdevice #0: subdevice #0
>>  card 0: PCH [HDA Intel PCH], device 3: Generic Digital [Generic Digital]
>>    Subdevices: 1/1
>>    Subdevice #0: subdevice #0
>>
>>
>> How can I determine/set to which monitor the sound should go, and
>> preferably send different sounds to both monitors at same time?
>>
>>
>> Cheers,
>> Bruno
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>--
>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: i915, HDMI/DP audio with multiple monitors
  2018-09-12 18:06   ` Takashi Iwai
@ 2018-09-13  7:25     ` Bruno Prémont
  2018-09-13 16:07       ` 
  0 siblings, 1 reply; 9+ messages in thread
From: Bruno Prémont @ 2018-09-13  7:25 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Libin Yang, intel-gfx, alsa-devel, dri-devel, Ville Syrjälä

On Wed, 12 Sep 2018 20:06:43 +0200 Takashi Iwai wrote:
> On Wed, 12 Sep 2018 19:46:58 +0200,
> Ville Syrjälä wrote:
> > 
> > On Tue, Sep 11, 2018 at 03:50:13PM +0200, Bruno Prémont wrote:  
> > > Hi,
> > > 
> > > I have a system with multiple monitors and would like to send
> > > notification sounds to the monitor on which corresponding
> > > window is visible.
> > > 
> > > For a workstation and a tiny computer things look different:
> > > - workstation (Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz):
> > >  00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
> > >  00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
> > >  00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 04)
> > > 
> > >  Here alsa show me two cards:
> > >  - HDA Intel PCH (Realtek ALC671)
> > >  - HDA Intel HDMI (Intel Generic)
> > > 
> > >  **** List of PLAYBACK Hardware Devices ****
> > >  card 0: HDMI [HDA Intel HDMI], device 3: Generic Digital [Generic Digital]
> > >    Subdevices: 1/1
> > >    Subdevice #0: subdevice #0  
> 
> Is a proper kernel config (CONFIG_SND_HDA_CODEC_HDMI) enabled?

It was missing and adding it helps a lot.
Would there be a way to auto-select it when corresponding DRM driver is
selected?

Kind of
  select SND_HDA_CODEC_HDMI if SND_HDA
or at least mention it in description, maybe as conditional comment is
done for HDA codecs.

> The device name looks strange as if it's not properly bound with the
> HDMI codec driver.

With SND_HDA_CODEC_HDMI enabled I get better results on the tiny
computer (not checked on workstation yet):

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC671 Analog [ALC671 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


Shown by aplay -L as:
...
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
hdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    HDMI Audio Output
hdmi:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 3
    HDMI Audio Output
hdmi:CARD=PCH,DEV=4
    HDA Intel PCH, HDMI 4
    HDMI Audio Output

Alsamixer shows me 5 S/PDIFs (S/PDIF, S/PDIF 1, ..., S/PDIF 4) which is
not that helpful. Why don't alsamixer and aplay -L at least use the same
naming scheme? If the naming there would match output naming as show by
xrandr (or /sys/class/drm/... it would be even better!

xrandr:
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 1439mm x 809mm
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-3 connected 3840x2160+3840+0 (normal left inverted right x axis y axis) 1872mm x 1053mm
DP-3 disconnected (normal left inverted right x axis y axis)

/sys/class/drm/:
 card0-DP-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1
 card0-DP-2 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-2
 card0-DP-3 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-3
 card0-HDMI-A-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-1
 card0-HDMI-A-2 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-2
 card0-HDMI-A-3 -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-3


Testing each output with aplay I could determine that hw:0,7 (currently) matches
DP-1 (as reported by xrandr) and hw:0,8 matches HDMI-3 (as reported by
xrandr).

Though while testing often the first sound played never reaches the
monitor's speakers, only a second run shortly after the first reaches
speakers.
(played sound is rather short:
   aplay -D hw:0,7 /usr/share/sounds/purple/receive.wav
 same with slightly longer login.wav)

Cheers,
Bruno
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: i915, HDMI/DP audio with multiple monitors
  2018-09-13  7:25     ` Bruno Prémont
@ 2018-09-13 16:07       ` 
  0 siblings, 0 replies; 9+ messages in thread
From:  @ 2018-09-13 16:07 UTC (permalink / raw)
  To: Bruno Prémont; +Cc: Libin Yang, intel-gfx, alsa-devel, dri-devel

On Thu, 13 Sep 2018 09:25:37 +0200,
Bruno Prémont wrote:
> 
> On Wed, 12 Sep 2018 20:06:43 +0200 Takashi Iwai wrote:
> > On Wed, 12 Sep 2018 19:46:58 +0200,
> > Ville Syrjälä wrote:
> > > 
> > > On Tue, Sep 11, 2018 at 03:50:13PM +0200, Bruno Prémont wrote:  
> > > > Hi,
> > > > 
> > > > I have a system with multiple monitors and would like to send
> > > > notification sounds to the monitor on which corresponding
> > > > window is visible.
> > > > 
> > > > For a workstation and a tiny computer things look different:
> > > > - workstation (Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz):
> > > >  00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
> > > >  00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
> > > >  00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 04)
> > > > 
> > > >  Here alsa show me two cards:
> > > >  - HDA Intel PCH (Realtek ALC671)
> > > >  - HDA Intel HDMI (Intel Generic)
> > > > 
> > > >  **** List of PLAYBACK Hardware Devices ****
> > > >  card 0: HDMI [HDA Intel HDMI], device 3: Generic Digital [Generic Digital]
> > > >    Subdevices: 1/1
> > > >    Subdevice #0: subdevice #0  
> > 
> > Is a proper kernel config (CONFIG_SND_HDA_CODEC_HDMI) enabled?
> 
> It was missing and adding it helps a lot.
> Would there be a way to auto-select it when corresponding DRM driver is
> selected?
> 
> Kind of
>   select SND_HDA_CODEC_HDMI if SND_HDA
> or at least mention it in description, maybe as conditional comment is
> done for HDA codecs.

Yeah, a patch like below should work.

--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -23,6 +23,7 @@ config DRM_I915
 	select SYNC_FILE
 	select IOSF_MBI
 	select CRC32
+	select SND_HDA_CODEC_HDMI if SND_HDA_INTEL
 	select SND_HDA_I915 if SND_HDA_CORE
 	select CEC_CORE if CEC_NOTIFIER
 	help

But I'm not going to advocate it.  Feel free to cook up and submit a
proper patch if you really need it.


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

* ✗ Fi.CI.CHECKPATCH: warning for i915, HDMI/DP audio with multiple monitors
  2018-09-11 13:50 i915, HDMI/DP audio with multiple monitors Bruno Prémont
  2018-09-12 17:46 ` Ville Syrjälä
  2018-09-12 20:02 ` Alex Deucher
@ 2018-09-13 16:18 ` Patchwork
  2018-09-13 16:39 ` ✗ Fi.CI.BAT: failure " Patchwork
  3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-09-13 16:18 UTC (permalink / raw)
  To: >Takashi Iwai; +Cc: intel-gfx

== Series Details ==

Series: i915, HDMI/DP audio with multiple monitors
URL   : https://patchwork.freedesktop.org/series/49647/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
a3ce8c6aec87 i915, HDMI/DP audio with multiple monitors
-:25: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#25: 
> > > >  00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)

-:67: ERROR:MISSING_SIGN_OFF: Missing Signed-off-by: line(s)

total: 1 errors, 1 warnings, 0 checks, 7 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.BAT: failure for i915, HDMI/DP audio with multiple monitors
  2018-09-11 13:50 i915, HDMI/DP audio with multiple monitors Bruno Prémont
                   ` (2 preceding siblings ...)
  2018-09-13 16:18 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-09-13 16:39 ` Patchwork
  3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-09-13 16:39 UTC (permalink / raw)
  To: >Takashi Iwai; +Cc: intel-gfx

== Series Details ==

Series: i915, HDMI/DP audio with multiple monitors
URL   : https://patchwork.freedesktop.org/series/49647/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4816 -> Patchwork_10171 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_10171 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10171, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/49647/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10171:

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_selftest@live_contexts:
      fi-bsw-n3050:       PASS -> DMESG-WARN

    igt@drv_selftest@mock_hugepages:
      fi-bwr-2160:        PASS -> DMESG-FAIL

    
== Known issues ==

  Here are the changes found in Patchwork_10171 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_mmap_gtt@basic-wc:
      fi-blb-e6850:       PASS -> FAIL (fdo#107307)

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       PASS -> DMESG-WARN (fdo#102614)

    igt@kms_psr@primary_mmap_gtt:
      {fi-cnl-u}:         NOTRUN -> FAIL (fdo#107383) +3

    igt@kms_psr@primary_page_flip:
      fi-kbl-r:           PASS -> FAIL (fdo#107336)

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         PASS -> FAIL (fdo#104008)

    
    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#107362) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-byt-clapper:     FAIL (fdo#107362, fdo#103191) -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#107307 https://bugs.freedesktop.org/show_bug.cgi?id=107307
  fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107383 https://bugs.freedesktop.org/show_bug.cgi?id=107383


== Participating hosts (49 -> 44) ==

  Additional (1): fi-cnl-u 
  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus 


== Build changes ==

    * Linux: CI_DRM_4816 -> Patchwork_10171

  CI_DRM_4816: 5bebc54ac552e3716bfe0f1f7eb0babfbda49f09 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4640: 9a8da36e708f9ed15b20689dfe305e41f9a19008 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10171: a3ce8c6aec87648d69e49d09fa91bbf3f7f36136 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

a3ce8c6aec87 i915, HDMI/DP audio with multiple monitors

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10171/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-09-13 16:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 13:50 i915, HDMI/DP audio with multiple monitors Bruno Prémont
2018-09-12 17:46 ` Ville Syrjälä
2018-09-12 18:06   ` Takashi Iwai
2018-09-13  7:25     ` Bruno Prémont
2018-09-13 16:07       ` 
2018-09-13  1:48   ` Yang, Libin
2018-09-12 20:02 ` Alex Deucher
2018-09-13 16:18 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-09-13 16:39 ` ✗ Fi.CI.BAT: failure " Patchwork

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.