Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Bruno Prémont" <bonbons@sysophe.eu>
Cc: Libin Yang <libin.yang@intel.com>,
	intel-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org,
	dri-devel@lists.freedesktop.org
Subject: Re: i915, HDMI/DP audio with multiple monitors
Date: Wed, 12 Sep 2018 20:46:58 +0300	[thread overview]
Message-ID: <20180912174658.GF5565@intel.com> (raw)
In-Reply-To: <20180911153320.6a4e3789@pluto.restena.lu>

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

  reply	other threads:[~2018-09-12 17:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 13:50 i915, HDMI/DP audio with multiple monitors Bruno Prémont
2018-09-12 17:46 ` Ville Syrjälä [this message]
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

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=20180912174658.GF5565@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bonbons@sysophe.eu \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=libin.yang@intel.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