Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Bruno Prémont" <bonbons@sysophe.eu>
To: Takashi Iwai <tiwai@suse.de>
Cc: "Libin Yang" <libin.yang@intel.com>,
	intel-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org,
	dri-devel@lists.freedesktop.org,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: i915, HDMI/DP audio with multiple monitors
Date: Thu, 13 Sep 2018 09:25:37 +0200	[thread overview]
Message-ID: <20180913092537.4c7b8042@pluto.restena.lu> (raw)
In-Reply-To: <s5h5zza6158.wl-tiwai@suse.de>

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

  reply	other threads:[~2018-09-13  7:25 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ä
2018-09-12 18:06   ` Takashi Iwai
2018-09-13  7:25     ` Bruno Prémont [this message]
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=20180913092537.4c7b8042@pluto.restena.lu \
    --to=bonbons@sysophe.eu \
    --cc=alsa-devel@alsa-project.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=libin.yang@intel.com \
    --cc=tiwai@suse.de \
    --cc=ville.syrjala@linux.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