Kodi Community Forum

Full Version: Analog audio randomly disappearing - upgraded from Frodo 12.0 to 12.1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As mentioned in this thread, I had severe audio issues in Frodo 12.0. In summary, I would have sound in the menus, but when playing a video it would stutter and audio would not work. After pressing stop sound would also be gone in the menus. As you can see from the thread I linked, I managed to get audio working by creating an /etc/asound.conf file. This solution worked pretty well, but from time to time - especially when attempting to stream some HD content - audio would cut out as before. But this happened completely randomly, and rarely.

After upgrading to 12.0 from 12.1 I again experience audio issues. Now, most of the time audio crashes as before when playing a video, even though audio worked in the menus until pressing play. Strangely, some videos do play from time to time, as you can see from the below-mentioned debug log file. However, audio may then just as well crash on playing another video (as evidenced by the same debug log file).

This happens both with the mentioned /etc/asound.conf file present, and with all /etc/asound.conf files and .asoundrc files removed. Pulseaudio is not installed (i am using XBMCbuntu as my underlying distro). Sound hardware in XBMC is set to analog audio, Intel HDA.

I am really puzzled by this, especially since the changelog for 12.1 reads as follows:
Quote:XBMC no longer hogs audio for Linux and on resume audio will continue to work in Linux
I interpreted this as if the audio bugs/issues I struggled with previously were finally fixed. However, that does not seem to be the case...

Thanks in advance for any help and/or suggestions!

Full XBMC debug log: http://xbmclogs.com/show.php?id=5770
- Line 365-> Plays first video file normally
- Line 557-> Chokes on 2nd video file...

Output of aplay -l
Code:
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Output of aplay -L
Code:
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default:CARD=Intel
    HDA Intel, ALC892 Analog
    Default Audio Device
sysdefault:CARD=Intel
    HDA Intel, ALC892 Analog
    Default Audio Device
front:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    Front speakers
surround40:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Intel,DEV=0
    HDA Intel, ALC892 Digital
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    Direct sample mixing device
dmix:CARD=Intel,DEV=1
    HDA Intel, ALC892 Digital
    Direct sample mixing device
dsnoop:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    Direct sample snooping device
dsnoop:CARD=Intel,DEV=1
    HDA Intel, ALC892 Digital
    Direct sample snooping device
hw:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    Direct hardware device without any conversions
hw:CARD=Intel,DEV=1
    HDA Intel, ALC892 Digital
    Direct hardware device without any conversions
plughw:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    Hardware device with all software conversions
plughw:CARD=Intel,DEV=1
    HDA Intel, ALC892 Digital
    Hardware device with all software conversions
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
dmix:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    Direct sample mixing device
dsnoop:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    Direct sample snooping device
hw:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    Direct hardware device without any conversions
plughw:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    Hardware device with all software conversions
Quote:18:28:29 T:2940623680 INFO: CAESinkALSA::Initialize - Attempting to open device "@"
18:28:29 T:2940623680 INFO: CAESinkALSA - ALSA: pcm_hw.c:1293Sadsnd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed (-16): Device or resource busy
18:28:29 T:2940623680 INFO: CAESinkALSA - Unable to open device "front" for playback
18:28:29 T:2940623680 INFO: CAESinkALSA - ALSA: pcm_hw.c:1293Sadsnd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed (-16): Device or resource busy
18:28:29 T:2940623680 INFO: CAESinkALSA - ALSA: pcm_dmix.c:1018Sadsnd_pcm_dmix_open) unable to open slave
18:28:29 T:2940623680 INFO: CAESinkALSA - Unable to open device "sysdefault" for playback
18:28:29 T:2940623680 INFO: CAESinkALSA - ALSA: pcm_hw.c:1293Sadsnd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed (-16): Device or resource busy
18:28:29 T:2940623680 INFO: CAESinkALSA - ALSA: pcm_dmix.c:1018Sadsnd_pcm_dmix_open) unable to open slave
18:28:29 T:2940623680 INFO: CAESinkALSA - Unable to open device "default" for playback
18:28:29 T:2940623680 ERROR: CAESinkALSA::Initialize - failed to initialize device "@"

You clearly see in the xbmc.log that it comes up _before_ your pulseaudio server is up - after shortly not using the audio device, pulse grabs it over and keeps it - no idea what I should do about it?

Quote:pulse
PulseAudio Sound Server

sudo apt-get remove --purge pulseaudio libasound2-plugins
sudo reboot

And crashlog would be nice :-)
Hmm, pulseaudio is not installed, but I ran your command anyhow. The output was as follows:
Code:
sudo apt-get remove --purge pulseaudio libasound2-plugins
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package pulseaudio is not installed, so not removed
The following packages will be REMOVED:
  libasound2-plugins*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 256 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 259022 files and directories currently installed.)
Removing libasound2-plugins ...
I then rebooted.

However, this did not solve my issue. As you can see from this new log, the problem persists: http://xbmclogs.com/show.php?id=6963 Also: I have no crashlog, as XBMC itself does not crash. Only the audio disappears. Sorry for using a bit imprecise language in this relation in my first post...

Does anyone have further suggestions as for what I may try?
Jep - it cannot initialize the sink, can you try the following one: m_displayNameExtra: ALC892 Analog instead of the default?
I attempted setting "ACL892 (Analog)" as the default audio device and rebooted. However, this did not make any difference.

Here is the latest log: http://xbmclogs.com/show.php?id=7207

Quote:18:54:12 T:3005356864 ERROR: CAESinkALSA::Initialize - failed to initialize device "@:CARD=Intel,DEV=0"
Does one of the following help:
Code:
<audio>
  <resample>48000</resample>
  <streamsilence>1</streamsilence>
</audio>

I think it is the samplerate, that your device is extremely pick of - the code part where it fails is this one:
Code:
if (!OpenPCMDevice(device, AESParams, m_channelLayout.Count(), &m_pcm, config, format.m_sampleRate == (unsigned int) dmixRate && !m_passthrough))

I really wonder why this happens - could you make screenshot of your audio settings?
This:
Code:
<audio>
  <resample>48000</resample>
</audio>

Seems to have done the trick! At least it has worked for a few minutes now. Thanks so much for the prompt responses and insightful comments. I think I'll make a donation to the XBMC project as a way of paying back. Afterall, I've been using XBMC for free for years already ;-)


Btw, the screenshot of my audiosettings (in norwegian, but I hope it is okay) is available here, if you are still interested: http://bildr.no/view/1424370
Thanks. Have fun using xbmc :-)