You are not logged in.

#1 2017-07-15 16:23:15

ur6lad
Member
From: Kharkiv, Ukraine
Registered: 2009-06-23
Posts: 34
Website

Route sound to DisplayPort

Maybe it something trivial but I cannot found that I should change sad

I can play sound on DisplayPort when set card and device parameters, e. g. for aplay

aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav

But default device is analog output. So I can hear sound only with headphones.

Wiki article "Advanced Linux Sound Architecture, Select the default PCM via environment variable" says to set ALSA_CARD. But all my devices have the same name PCH.

aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD 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

I've tried another tip, with .asoundrc

.asoundrc

pcm.!default {
  type hw
  card 0
  device 3
}

and it works partially: now sound plays on DisplayPort but headphones don't work anymore.

As far as I understand I need to configure auto-switch DisplayPort <-> analog when headphones are (dis)connected. How can I do it?

Update
I guess it the same question as [SOLVED] Automute speakers on plugging in headphones? But I don't install PulseAudio and auto-switch doesn't work.

Last edited by ur6lad (2017-07-15 17:22:32)


tg:ur6lad
Run Arch on MSI Cubi 2, wayland+sway

Offline

#2 2017-07-15 16:33:57

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Route sound to DisplayPort

Mod note: Moving thread to Multimedia and Games.

Offline

#3 2017-07-15 19:08:54

ur6lad
Member
From: Kharkiv, Ukraine
Registered: 2009-06-23
Posts: 34
Website

Re: Route sound to DisplayPort

I think that someone should detect that headphones' jack is (dis)connected.

I've watched with dmesg --follow and journalctl --follow - no any messages when I connect or disconnect it. sad

And looks like Cubi doesn't support the detection of headphones jack.

Simple mixer control 'Master',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 44 [69%] [-20.00dB] [on]
  Front Right: Playback 44 [69%] [-20.00dB] [on]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',3
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',4
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 28 [61%] [12.00dB] [on]
  Front Right: Capture 28 [61%] [12.00dB] [on]
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'

Last edited by ur6lad (2017-07-15 19:54:47)


tg:ur6lad
Run Arch on MSI Cubi 2, wayland+sway

Offline

#4 2017-07-16 06:20:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,723

Re: Route sound to DisplayPort

As far as I know, on a device setup like this, analog and digital outs are mutually exclusive, you can only use one at a time, this is a driver/hardware limitation

Offline

Board footer

Powered by FluxBB