Failed to initialize audio device (HDMI, music & fading)
#1
Hi there,

I searched the forum for a while, but couldn't find anything directly related to this, so I'm posting a new thread here.
Basically, my music output stops as soon I hit "next" (song) on my remote and "fading" is enabled in the settings. This happens with FLAC & normal MP3 (first I thought it could be FLAC specific, but it's not). Switching off "fading" helps getting rid of this error message and everything is back to normal...

I'm running a plain LIVE Camelot (9.11) installed on disk, put Firefox on it (apt-get install firefox). Yeah, that's about it.

My system:

Zotac ION A
2 GB of Ram
Output via HDMI (digital)

A little addon from my xbmc.log:

Code:
00:28:43 T:3079088016 M:1421963264   DEBUG: PAPlayer: Creating new audio renderer
00:28:43 T:3079088016 M:1421963264   DEBUG: CALSADirectSound::CALSADirectSound - Channels: 2 - SampleRate: 44100 - SampleBit: 16 - Resample false - Codec  - IsMusic true - IsPassthrough false - audioDevice: plug:hdmi
00:28:43 T:3079088016 M:1421963264   DEBUG: RemoveActiveDevice - Removing device 2
00:28:43 T:3079088016 M:1421963264   DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
00:28:43 T:3079088016 M:1421963264   DEBUG: RemoveActiveDevice - Removing device 0
00:28:43 T:3079088016 M:1421963264   DEBUG: Initialize - using alsa device plug:hdmi
00:28:43 T:3079088016 M:1421963264   ERROR: Initialize - device plug:hdmi busy retrying...
00:28:43 T:89791344 M:1421963264    INFO: AudioDecoder: File is queued
00:28:44 T:3079088016 M:1421963264   ERROR: Initialize - pcm_open_lconf, alsa error: -16 - Device or resource busy
00:28:44 T:3079088016 M:1421963264   DEBUG: SetActiveDevice - SetActiveDevice from 2 to 1
00:28:44 T:3079088016 M:1421963264   DEBUG: RemoveActiveDevice - Removing device 2
00:28:44 T:3079088016 M:1421963264   ERROR: Creating a Null Audio Renderer, Check your audio settings as this should not happen
00:28:44 T:3079088016 M:1421963264   DEBUG: RemoveActiveDevice - Removing device 1
00:28:44 T:3079088016 M:1421963264   DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
00:28:44 T:3079088016 M:1421963264   DEBUG: RemoveActiveDevice - Removing device 0
00:28:44 T:3079088016 M:1421963264   DEBUG: OnInitialize() started
00:28:44 T:3079088016 M:1421963264   DEBUG: Visualisation::Start()
00:28:44 T:3079088016 M:1421963264   DEBUG: OnInitialize() done
00:28:44 T:3079088016 M:1421963264   DEBUG: OnPlayBackStarted - Playback has started
00:28:44 T:89791344 M:1421963264   DEBUG: Starting Crossfade - resuming stream 1
00:28:44 T:89791344 M:1421963264   DEBUG: OnPlayBackStarted - Playback has started
00:28:44 T:3079088016 M:1421963264   DEBUG: CGUIInfoManager::SetCurrentSong(smb://someuser:somepass@IP/data/Music/00PrettyLights-FillingUpTheCitySkies-Disc1/00PrettyLights-FillingUpTheCitySkies-Disc1/04ColdFeeling.mp3)
00:28:45 T:3079088016 M:1421967360   DEBUG: Loading additional tag info for file smb://someuser:somepass@IP/data/Music/00PrettyLights-FillingUpTheCitySkies-Disc1/00PrettyLights-FillingUpTheCitySkies-Disc1/04ColdFeeling.mp3
00:28:45 T:3079088016 M:1421967360   DEBUG: CFileSMB::Open - opened fresh/Music/00PrettyLights-FillingUpTheCitySkies-Disc1/00PrettyLights-FillingUpTheCitySkies-Disc1/04ColdFeeling.mp3, fd=10002
00:28:45 T:3079088016 M:1421967360   DEBUG: CFileSMB::Close closing fd 10002
00:28:45 T:3079088016 M:1421967360   DEBUG: CFileSMB::Open - opened fresh/Music/00PrettyLights-FillingUpTheCitySkies-Disc1/00PrettyLights-FillingUpTheCitySkies-Disc1/04ColdFeeling.mp3, fd=10002
00:28:45 T:3079088016 M:1421967360   DEBUG: CFileSMB::Close closing fd 10002
00:28:45 T:3079088016 M:1421967360   DEBUG: CGUIInfoManager::SetCurrentSong(smb://someuser:somepass@IP/data/Music/00PrettyLights-FillingUpTheCitySkies-Disc1/00PrettyLights-FillingUpTheCitySkies-Disc1/04ColdFeeling.mp3)
00:28:45 T:3079088016 M:1421967360   DEBUG: Loading additional tag info for file smb://someuser:somepass@IP/data/Music/00PrettyLights-FillingUpTheCitySkies-Disc1/00PrettyLights-FillingUpTheCitySkies-Disc1/04ColdFeeling.mp3
00:28:45 T:3079088016 M:1421967360   DEBUG: CFileSMB::Open - opened fresh/Music/00PrettyLights-FillingUpTheCitySkies-Disc1/00PrettyLights-FillingUpTheCitySkies-Disc1/04ColdFeeling.mp3, fd=10002
00:28:45 T:3079088016 M:1421967360   DEBUG: CFileSMB::Close closing fd 10002
00:28:45 T:3079088016 M:1421967360   DEBUG: CFileSMB::Open - opened fresh/Music/00PrettyLights-FillingUpTheCitySkies-Disc1/00PrettyLights-FillingUpTheCitySkies-Disc1/04ColdFeeling.mp3, fd=10002
00:28:45 T:3079088016 M:1421967360   DEBUG: CFileSMB::Close closing fd 10002
00:28:45 T:3079088016 M:1421967360   DEBUG: SaveFileState - Saving file state for audio item smb://someuser:somepass@IP/data/Music/00PrettyLights-FillingUpTheCitySkies-Disc1/00PrettyLights-FillingUpTheCitySkies-Disc1/01ChangeIsGonnaCome.mp3
00:28:45 T:3079088016 M:1421967360   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
00:28:45 T:3079088016 M:1421967360   DEBUG: Alloc resources: 0.00ms (0.00 ms skin load)
00:28:45 T:3079088016 M:1421967360   DEBUG: ------ Window Deinit (MusicOverlay.xml) ------
00:28:45 T:3079088016 M:1421459456   DEBUG: ------ Window Init (MusicOverlay.xml) ------
00:28:45 T:3079088016 M:1421459456    INFO: Loading skin file: MusicOverlay.xml
00:28:45 T:3079088016 M:1421459456   DEBUG: Load MusicOverlay.xml: 2.07ms
00:28:45 T:3079088016 M:1421459456   DEBUG: Alloc resources: 2.33ms (2.33 ms skin load)
00:28:45 T:2817727344 M:1421504512   DEBUG: Thread 2817727344 terminating (autodelete)
00:28:46 T:89791344 M:1421504512   DEBUG: Finished Crossfading
00:28:46 T:89791344 M:1421504512   DEBUG: SetActiveDevice - SetActiveDevice from 2 to 1
00:28:46 T:89791344 M:1421504512   DEBUG: RemoveActiveDevice - Removing device 2
00:28:46 T:2828217200 M:        0   DEBUG: Thread 2828217200 terminating
00:28:46 T:89791344 M:1422012416   DEBUG: CFileSMB::Close closing fd 10000
00:28:47 T:2854443888 M:1437487104   DEBUG: Thread 2854443888 terminating (autodelete)
00:28:47 T:2843954032 M:1437487104   DEBUG: Thread 2843954032 terminating (autodelete)
00:28:50 T:3079088016 M:1437511680   DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
00:29:12 T:3079088016 M:1437782016   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmc/system/ImageLib-i486-linux.so)
00:29:12 T:3079088016 M:1437782016   DEBUG: Unloading: ImageLib-i486-linux.so
00:29:14 T:3079088016 M:1437790208   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmc/system/players/paplayer/MACDll-i486-linux.so)
00:29:14 T:3079088016 M:1437790208   DEBUG: Unloading: MACDll-i486-linux.so
00:29:15 T:3079088016 M:1437822976   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmc/system/libid3tag-i486-linux.so)
00:29:15 T:3079088016 M:1437822976   DEBUG: Unloading: libid3tag-i486-linux.so

Thanks a ton for your help!
Reply
#2
full debug log please?
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply
#3
Hi,

this was a copy of the part where the error happened, but I will try to get a full log (from XBMC start, to XBMC shutdown) at the time I get home this evening.

Thanks!
Reply
#4
Sorry it took me so long, but here's the complete debug log...
Thanks a lot!

http://storage.nordinary.com/xbmc.log
Reply
#5
On HDMI mixing of two sound streams are not supported by default. On a full Ubuntu install you can get software mixing with Pulseaudio but in Live that is disabled. But this is the way you can get quality sound. In case you want to mix two streams you have to find a common sampling rate and resample the two streams to that rate. This means you suffer notable quality loss. Don't do it. Just disable software mixing totaly.
You can get sw mixing also with Alsa, but that is also the same (Lossy) method.

More info here:

http://forum.xbmc.org/showthread.php?tid=59877
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
Thanks a lot! This clears everything up a bit. I think I won't go the mixing way, since I want to stay HD in every way (using my Onkyo on HDMI). This is kind of sad since I really like the crossfade effect (a lot), but looking the other way: It's quality that matters again.

Any chance this might one day also work with HDMI (without downmixing) - or is this a matter of hardware, not software "fault"?

Thanks!
Reply
#7
moonwhaler Wrote:Thanks a lot! This clears everything up a bit. I think I won't go the mixing way, since I want to stay HD in every way (using my Onkyo on HDMI). This is kind of sad since I really like the crossfade effect (a lot), but looking the other way: It's quality that matters again.

Any chance this might one day also work with HDMI (without downmixing) - or is this a matter of hardware, not software "fault"?

Thanks!

It is a metter of physics. Just think: In the digital world you usually store music in lpcm format. It means you have two bytes (or four in case of 32 bit processing) in a certain frequency which describes the level of the music in that particular moment. This means you have a "grid" where you can put your level "bars". I case you have to mix two streams together you have to find a common grid size where you calculate an intermediate level of sound from the two streams. This would always make a certain quality drop. I think the only way you don't have quality drops is when you mix two streams with the same sampling rate. But this is not always the case with 48khz mp3s and 44.1khz flacs. One solution is tu upmix the streams to a lot higher sample rate to minimize quality loss. That is what they do in studios nowadays. They are working with extremely high over 300khz sampling rates so that at the end they have a good quality 192khz sound.

So what we could do is upsample everything to 192khz for mixing. This would mean we have a minimum quality loss. I tried this in Alsa once but had some serious problems with buffer sizes and all.

Stay tuned because xbmc team is developing their own sound handler called masteraudio, which might cure some of the missing things.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#8
That would be truly great! Thanks for your very detailed and interesting description. Something to show off again. Wink
Reply

Logout Mark Read Team Forum Stats Members Help
Failed to initialize audio device (HDMI, music & fading)0