You are not logged in.

#1 2023-12-19 13:04:51

EugeneS
Member
Registered: 2023-12-19
Posts: 10

[SOLVED] Unable to direct audio output to HDMI

I'm pretty new to arch, since installing I was unable to direct sound output to HDMI output from via intel card.

This is aplay -lL output:

null
    Discard all samples (playback) or generate zero samples (capture)
pipewire
    PipeWire Sound Server
sysdefault:CARD=PCH
    HDA Intel PCH, ALC3204 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3204 Analog
    Front output / input
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3204 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3204 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3204 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3204 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3204 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC3204 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, PHL 345E2
    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
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3204 Analog [ALC3204 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [PHL 345E2]
  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

And this is my ~/.asoundrc

cat ~/.asoundrc                         
pcm.!default {
	type hw
	card 0
	device 3
}

I have tested it with following commands:

aplay -D plughw:0,3 ~/sample.wav
aplay -D plughw:0,0 ~/sample.wav

For first row, no sound, for second one, I heard the output.

sudo dmesg | grep -E 'i915|snd':

[    3.141377] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[    3.141602] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[    3.466424] i915 0000:00:02.0: [drm] VT-d active for gfx access
[    3.514026] i915 0000:00:02.0: vgaarb: deactivate vga console
[    3.514097] i915 0000:00:02.0: [drm] Using Transparent Hugepages
[    3.514484] i915 0000:00:02.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    3.515118] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
[    3.516860] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/adlp_dmc.bin (v2.20)
[    3.761238] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/adlp_guc_70.bin version 70.13.1
[    3.761244] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc.bin version 7.9.3
[    3.779693] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads
[    3.779989] i915 0000:00:02.0: [drm] GT0: GUC: submission enabled
[    3.779991] i915 0000:00:02.0: [drm] GT0: GUC: SLPC enabled
[    3.780371] i915 0000:00:02.0: [drm] GT0: GUC: RC enabled
[    3.781283] mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:00:02.0 (ops i915_pxp_tee_component_ops [i915])
[    3.781425] i915 0000:00:02.0: [drm] Protected Xe Path (PXP) protected content support initialized
[    3.906650] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 1
[    3.973542] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    4.108643] fbcon: i915drmfb (fb0) is primary device
[    4.649299] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[    4.753697] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC3204: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[    4.753702] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    4.753704] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    4.753705] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[    4.753706] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[    4.753707] snd_hda_codec_realtek hdaudioC0D0:      Headset Mic=0x19
[    4.753708] snd_hda_codec_realtek hdaudioC0D0:      Headphone Mic=0x1a
[    4.753709] snd_hda_codec_realtek hdaudioC0D0:      Internal Mic=0x12
[    5.594319] usbcore: registered new interface driver snd-usb-audio

amixer -c0

Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 77 [89%] [-7.50dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'Headphone Mic',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [off]
Simple mixer control 'Headphone 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 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
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 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 53 [84%] [22.50dB] [on]
  Front Right: Capture 53 [84%] [22.50dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Headset Mic',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [off]
Simple mixer control 'Headset 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 'Internal Mic',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [on]
Simple mixer control 'Internal 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]

I will really appreciate any help, as I was unable to resolve the issue from searching the web & arch forum

Last edited by EugeneS (2023-12-28 09:46:43)

Offline

#2 2023-12-19 14:54:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,232

Re: [SOLVED] Unable to direct audio output to HDMI

Do you actually knowingly and intentionally want to use plain ALSA instead of a sound server? Which tools did you test? Generally a config like that will break dmix and default device labeling (note how you don't have a default device in the aplay -L listing) the minimal way to do this properly in an .asoundrc is

defaults.pcm.device 3

Offline

#3 2023-12-19 19:15:56

EugeneS
Member
Registered: 2023-12-19
Posts: 10

Re: [SOLVED] Unable to direct audio output to HDMI

I do have pipewire installed, does it count as sound server? Basically, I would like to keep my system as minimal as possible and do not bloat it with applications that can be left out.  On the other hand, I'm lacking fundamental understanding of arch system, so maybe I just do not understand that I absolutely have to use sound server.
I have tried your settings, now I do not have sound at all, which is expected, as my test woth alsa for this card/device config hasn't outputed any sound.
But it is a  good addition, as this is what I eventually want my default output to be.

Offline

#4 2023-12-19 22:12:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,232

Re: [SOLVED] Unable to direct audio output to HDMI

You do not "absolutely have to use a sound server" but it vastly simplifies and takes a lot of potential complexity away from an user perspective that plain ALSA doesn't shield you from. The notion of "bloat" is incredibly arbitrary and inflated and fact of the matter is pipewire will generally lead to better results for the vast majority of cases unless you actually want full - and complex - control of the entire audio graph and there's a bunch of software that doesn't implement ALSA integration correctly (because it's not 100% well defined) and will have various quirks with it. That said don't let this stop you if you want to use plain ALSA and learn about it's workings, but avoiding bloat is not a good argument here IMO.

That said, if the plughws don't work then nothing works... Are you sure you actually have speakers in this monitor, if so, are they unmuted (on the monitor!)? Which actual model? Any messages in

amixer -c0
sudo dmesg | grep -E 'i915|snd'

Last edited by V1del (2023-12-19 22:17:24)

Offline

#5 2023-12-26 14:57:49

EugeneS
Member
Registered: 2023-12-19
Posts: 10

Re: [SOLVED] Unable to direct audio output to HDMI

Sorry for late reply, I had no acces to the worksgmtation for couple of days. amixer is not installed on my system (should I install it?) And I have added output to dmesg to the first post.
I have an audio output on my monitor, to which logitech 2.1 speakers are connected. And I know, that speakers are working, cause I can connect them directly to laptop output, and then volume is outputed via speakers.

This is result of sudo dmesg | grep -E 'i915|snd' when speakers are conected directly to the laptop:

[    3.141377] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[    3.141602] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[    3.466424] i915 0000:00:02.0: [drm] VT-d active for gfx access
[    3.514026] i915 0000:00:02.0: vgaarb: deactivate vga console
[    3.514097] i915 0000:00:02.0: [drm] Using Transparent Hugepages
[    3.514484] i915 0000:00:02.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    3.515118] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
[    3.516860] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/adlp_dmc.bin (v2.20)
[    3.761238] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/adlp_guc_70.bin version 70.13.1
[    3.761244] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc.bin version 7.9.3
[    3.779693] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads
[    3.779989] i915 0000:00:02.0: [drm] GT0: GUC: submission enabled
[    3.779991] i915 0000:00:02.0: [drm] GT0: GUC: SLPC enabled
[    3.780371] i915 0000:00:02.0: [drm] GT0: GUC: RC enabled
[    3.781283] mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:00:02.0 (ops i915_pxp_tee_component_ops [i915])
[    3.781425] i915 0000:00:02.0: [drm] Protected Xe Path (PXP) protected content support initialized
[    3.906650] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 1
[    3.973542] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    4.108643] fbcon: i915drmfb (fb0) is primary device
[    4.649299] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[    4.753697] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC3204: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[    4.753702] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    4.753704] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    4.753705] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[    4.753706] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[    4.753707] snd_hda_codec_realtek hdaudioC0D0:      Headset Mic=0x19
[    4.753708] snd_hda_codec_realtek hdaudioC0D0:      Headphone Mic=0x1a
[    4.753709] snd_hda_codec_realtek hdaudioC0D0:      Internal Mic=0x12
[    5.594319] usbcore: registered new interface driver snd-usb-audio

Last edited by EugeneS (2023-12-26 15:15:33)

Offline

#6 2023-12-26 15:13:37

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,232

Re: [SOLVED] Unable to direct audio output to HDMI

It's part of alsa-utils and generally a good toolset to have when trying to understand how your audio works. Which model is the monitor?

Offline

#7 2023-12-26 15:37:03

EugeneS
Member
Registered: 2023-12-19
Posts: 10

Re: [SOLVED] Unable to direct audio output to HDMI

Monitor model: Philips PHL 345E2
I have installed alsa-tools and added amixer output to the first post

Last edited by EugeneS (2023-12-26 15:37:17)

Offline

#8 2023-12-28 09:45:17

EugeneS
Member
Registered: 2023-12-19
Posts: 10

Re: [SOLVED] Unable to direct audio output to HDMI

The solution was to use proper audio profile.
To check what is active profile:

pactl list cards | grep "Active Profile"

To change profile to HDMI output:

pactl set-card-profile alsa_card.pci-0000_00_1f.3 output:hdmi-stereo+input:analog-stereo

Offline

Board footer

Powered by FluxBB