Hi,
I have a Dell Inspiron 15R laptop. It has two sound cards: one for the internal speakers and headphone jack, and one for the HDMI audio. Originally, the default was the HDMI, but I fixed that with the help of this thread:
https://www.linuxquestions.org/quest...er-4175506142/
The configuration that set the internal speaker card as default:
/etc/asound.conf
Code:
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
~/.asoundrc
Code:
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dsp0 {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm hw:1
}
}
While that worked, I'd like to be able to use HDMI audio as well, if I connect my laptop to something over HDMI.
Using this guide (
http://slack4dummies.blogspot.com/20...ple-sound.html) I came up with this /etc/asound.conf, and no ~/.asoundrc
Code:
# Have output to both normal sound card and HDMI audio
# Based very heavily on this article:
# http://slack4dummies.blogspot.com/2012/02/alsa-multiple-output-multiple-sound.html
pcm.onboard {
type hw
card PCH
}
ctl.onboard {
type hw
card PCH
}
pcm.hdmi {
type hw
card HDMI
}
ctl.hdmi {
type hw
card HDMI
}
pcm.internalDmix {
type dmix
ipc_key 1024
slave {
pcm "internal"
channels 2
}
bindings {
0 0
1 1
}
}
pcm.hdmiDmix {
type dmix
ipc_key 2048
slave {
pcm "hdmi"
channels 2
}
bindings {
0 0
1 1
}
}
pcm.both {
type route
slave.pcm {
slaves.a.pcm "internalDmix"
slaves.b.pcm "hdmiDmix"
slaves.a.channels 2
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.0.slave b
bindings.0.channel 0
bindings.1.slave b
bindings.1.channel 1
}
ttable.0.0 1
ttable.1.1 1
}
pcm.!default {
type plug
slave {
pcm both
}
}
ctl.!default {
type hw
card PCH
}
However, that isn't working. Not only does HDMI audio not work, but the internal speakers aren't doing anything either. When I try to open alsamixer, I get this error:
Code:
[anthony@newerLaptop ~]$ alsamixer
ALSA lib conf.c:1231:(parse_def) hdmi is not a compound
ALSA lib conf.c:1697:(snd_config_load1) _toplevel_:14:10:Invalid argument
ALSA lib conf.c:3417:(config_file_open) /etc/asound.conf may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:3339:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:3788:(snd_config_update_r) hooks failed, removing configuration
cannot open mixer: Invalid argument
I had to move my asound.conf out of the way and reboot in order to get this output, but I know that you'd ask for it anyway
Code:
[anthony@newerLaptop ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
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
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC3223 Analog [ALC3223 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
When I open alsamixer and go to the HDMI sound card, there are no "slider" bars. Instead, there are three "S/PDIF" options that only have the option to mute/unmute. Could that have anything to do with why it failed?
I apologize if there's some ridiculously stupid mistake in there. I'm still having trouble wrapping my head around the syntax of these files.