I have XBMCbuntu installed on a HTPC running Ubuntu 14.04 and Kodi 14.1. I have been trying to install and run Steam so that I can stream games from my gaming PC. I followed the steps from this guide using ALSA only since PulseAudio would give me no sound at all and the pre- and post- scripts weren't working in switching between ALSA and PA.
The audio in Kodi works fine when my ~/.asoundrc looks like this:
pcm.dsp {
type plug
slave.pcm "dmixer"
}
pcm.dsp0 {
type plug
slave.pcm "dmixer"
}
pcm.!default {
type plug
slave.pcm "dmixer"
}
ctl.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 101
slave {
pcm "hw:0,3"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
bindings {
0 0
1 1
}
}
But when Steam is launched from the menu, the audio is distorted and crackling and generally broken, but there is sound and is recognizable. A little experimenting and trial error and I was able to pinpoint that using
ctl.!default {
type hw
card 0
}
would give me the same broken sound in Kodi. And that
ctl.!default {
type plug
slave.pcm "hdmi:CARD=HDMI,DEV=0"
}
gives me proper sound. I tried to use the "plug" device in the dmix device but it would give me no sound at all and further research confirmed that it does not work. Since I cannot use "plug" devices in a dmix device, I need a solution that would let me use the same "plug" device in the dmix OR somehow fix the "hw" device. Below you will find my aplay -l and aplay -L Also, I am somewhat confused as to where "hdmi:CARD=HDMI,DEV=0" comes from since there is no device 0 for card 0 listed in aplay -l. I see it in aplay -L but all of the other PCMs come from the devices in aplay -l. Additionally, I am connected to my TV and receiver using HDMI and using the ALC1150 device works with neither the system options in Kodi nor in ~/.asoundrc.
$aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC1150 Analog [ALC1150 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC1150 Digital [ALC1150 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
$aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
dsp
dsp0
default
dmixer
hdmi:CARD=HDMI,DEV=0
HDA ATI HDMI, HDMI 0
HDMI Audio Output
dmix:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct sample mixing device
dsnoop:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct sample snooping device
hw:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct hardware device without any conversions
plughw:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Hardware device with all software conversions
sysdefault:CARD=Generic
HD-Audio Generic, ALC1150 Analog
Default Audio Device
front:CARD=Generic,DEV=0
HD-Audio Generic, ALC1150 Analog
Front speakers
surround40:CARD=Generic,DEV=0
HD-Audio Generic, ALC1150 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
HD-Audio Generic, ALC1150 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
HD-Audio Generic, ALC1150 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
HD-Audio Generic, ALC1150 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
HD-Audio Generic, ALC1150 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Generic,DEV=0
HD-Audio Generic, ALC1150 Digital
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Generic,DEV=0
HD-Audio Generic, ALC1150 Analog
Direct sample mixing device
dmix:CARD=Generic,DEV=1
HD-Audio Generic, ALC1150 Digital
Direct sample mixing device
dsnoop:CARD=Generic,DEV=0
HD-Audio Generic, ALC1150 Analog
Direct sample snooping device
dsnoop:CARD=Generic,DEV=1
HD-Audio Generic, ALC1150 Digital
Direct sample snooping device
hw:CARD=Generic,DEV=0
HD-Audio Generic, ALC1150 Analog
Direct hardware device without any conversions
hw:CARD=Generic,DEV=1
HD-Audio Generic, ALC1150 Digital
Direct hardware device without any conversions
plughw:CARD=Generic,DEV=0
HD-Audio Generic, ALC1150 Analog
Hardware device with all software conversions
plughw:CARD=Generic,DEV=1
HD-Audio Generic, ALC1150 Digital
Hardware device with all software conversions