Audio (mp3) problems
#1
Hi

I'm using an Acer Aspire Revo and i've managed to set it up pretty well with XBMC Live (Linux), thanks to the fantastic tips and support from this forum.

Only a few problems remain, and one of them seems to be related to HDMI audio when playing mp3 files etc. My initial settings was hdmi for both audio output device and audio throughput device. With this setting my MP3 files etc was playing back with what seemed to be roughtly a 10% speed increase..quite annoying. I then changed the audio output device to read plug:'hw:0,3 and that fixed the speed increase annoyance.

However the problem now is that play an MP3 file it never starts right at the beginning, but rather starts playing 1-2 seconds into the song. Crossfading between songs doesn't work either, and it reports "no audio device" or something similar when it tries to crossfade between songs.

Anyone have any ideas or solutions to this problem?


Hardware: Acer Aspire Revo
Architecture: i686
XBMC SVN: 9.04.1 r20654
Install Method: Installed to HDD via XBMC Live USB Flash utility
DEBUG section:
-----------------
15:07:21 T:3048265616 M:1433812992 DEBUG: CFileSMB::Open - opened Music/Soundtracks/2046 - Original Soundtrack/02 Siboney (Instrumental).mp3, fd=10001
15:07:21 T:3048265616 M:1433812992 DEBUG: CFileSMB::Close closing fd 10001
15:07:21 T:3048265616 M:1433812992 DEBUG: CFileSMB::Open - opened Music/Soundtracks/2046 - Original Soundtrack/02 Siboney (Instrumental).mp3, fd=10001
15:07:21 T:3048265616 M:1433812992 INFO: Creating album thumb from memory: special://masterprofile/Thumbnails/Music/8/87381524.tbn
15:07:21 T:3048265616 M:1433255936 DEBUG: CFileSMB::Close closing fd 10001
15:07:21 T:3048265616 M:1433255936 DEBUG: CFileSMB::Open - opened Music/Soundtracks/2046 - Original Soundtrack/02 Siboney (Instrumental).mp3, fd=10001
15:07:21 T:3048265616 M:1433255936 DEBUG: CFileSMB::Close closing fd 10001
15:07:21 T:3048265616 M:1418076160 DEBUG: CFileCache::Open - opening <3/89/1139.mp3> using cache
15:07:21 T:3048265616 M:1418076160 DEBUG: CFileSMB::Open - opened Music/Soundtracks/2046 - Original Soundtrack/02 Siboney (Instrumental).mp3, fd=10001
15:07:21 T:2835336080 M:1418076160 DEBUG: Running thread 2835336080
15:07:21 T:2835336080 M:1418076160 DEBUG: thread start, auto delete: 0
15:07:21 T:3048265616 M:1418076160 INFO: PAPlayer: Queuing next file musicdb://3/89/1139.mp3
15:07:21 T:3048265616 M:1418076160 DEBUG: PulseAudio: Opening Channels: 2 - SampleRate: 44100 - SampleBit: 16 - Resample false - Codec - IsMusic true - IsPassthrough false - audioHost: default - audioDevice: plug:'hw:0,3'
15:07:21 T:3048265616 M:1417723904 DEBUG: PulseAudio: Context failed
15:07:21 T:3048265616 M:1417723904 ERROR: PulseAudio: Waited for the Context but it failed
15:07:21 T:3011505040 M:1417748480 INFO: AudioDecoder: File is queued
15:07:21 T:3048265616 M:1417822208 DEBUG: CALSADirectSound::CALSADirectSound - Channels: 2 - SampleRate: 44100 - SampleBit: 16 - Resample false - Codec - IsMusic true - IsPassthrough false - audioDevice: plug:'hw:0,3'
15:07:21 T:3048265616 M:1417822208 DEBUG: Initialize - using alsa device plug:'hw:0,3'
15:07:21 T:3048265616 M:1417822208 ERROR: Initialize - device plug:'hw:0,3' busy retrying...
15:07:22 T:3048265616 M:1417900032 ERROR: Initialize - pcm_open_lconf, alsa error: -16 - Device or resource busy
15:07:22 T:3048265616 M:1417867264 ERROR: Creating a Null Audio Renderer, Check your audio settings as this should not happen
15:07:22 T:2835336080 M:1417867264 INFO: CFileCache:Tonguerocess - Hit eof.
-----------

Thanks in advance.
Reply
#2
Please read the sticky about reporting a problem in a useful manner. A debug logfile while reproducing the issue could be helpful.
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
#3
I'm sorry about that. I've edited my initial post.
Thank you.
Reply
#4
sorry, but this
Code:
plug:'hw:0,3'
is bullshit Big Grin

make it read "plughw:0,3" and try again
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
#5
Hi

I tried that now, but there was sadly no change. The audio starts playing at about 2 seconds into the song, and crossfading gives the audio device error as usual.
Reply
#6
Could you please paste a NEW entire debug logfile (with the new settings) onto http://pastebin.com and come back with the url?
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
#7
http://pastebin.com/m7af3ec3d

Hope that helps.
Reply
#8
I have something for you to try out. Store these lines as ~/.asoundrc
Code:
pcm.!default {
  type plug
  slave {
    pcm "hdmi-mix"
  }
}

pcm.hdmi-mix {
  type dmix
  slave {
    pcm "hdmi"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 48000
  }
}

What this does is basically create a new "virtual" soundcard under the name "hdmi-mix" which in turn maps to your hdmi output port. The trick is that you now should be able to use software mixing with this new device, hence fixing the unavailable audio device when paplayer tries to blend over to the new file. Your default audiodevice gets remapped to this new "hdmi-mix" device, so make sure you set xbmc's default device back to "default" (you can leave passthrough at "hdmi"). You might have to restart xbmc to see an effect - not sure about this.
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
#9
Seems like i forgot something - try this one:
Code:
pcm.hdmi {
  type hw
  card 0
  device 3
}

ctl.hdmi {
  type hw
  card 0
}

pcm.!default {
  type plug
  slave {
    pcm "hdmi-mix"
  }
}

pcm.hdmi-mix {
  type dmix
  slave {
    pcm "hdmi"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 48000
  }
}
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
#10
Hi again

I tried putting the .asoundrc in /home/xbmc. Rebooted, changed the default audio device to "default".

When i tried to play mp3 etc now XBMC just restarts.
Here is the logfile: http://pastebin.com/mebf3499

I really appreciate your help.
Reply
#11
Hmm. then it didn't work apparently Big Grin Unfortunately i'm somewhat stuck. I got a confirmation from a dev about the crossfade issue - but the delay at the beginning of your file could not be reproduced. Maybe it's your avr that needs some time to sync with the pcm stream?! Normally i don't recommend people using pulseaudio but that might be a last idea for your problem.
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
#12
Ha! Just when i grabbed google for some totally different term i stumbled upon this: http://blog.barfoo.org/2009/06/09/xbmc-o...acer-revo/
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
#13
Thats looks interesting i will look into that asap for my project.

Meanwhile,
Haggy, I do not understand this like you so maybe it is useless information but I got the mp3 to play correct speed by switching from hdmi => plug:hdmi (ION 330)

//J
Reply
#14
Sure, that's the common workaround around this problem - unfortunately that's not the threadstarter's problem Big Grin Using the plug interface makes ALSA resample incompatible samplerates (hdmi does only handle 48KHz on most machines)
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
#15
I'm gonna try out the solution from that blog and see if i get lucky. Thanks for all the effort.
Reply

Logout Mark Read Team Forum Stats Members Help
Audio (mp3) problems0