Categories
Tech

XBMC Revo Audio Crossfade Fix

After installing the latest version of XBMC (9.11 repack), I noticed a lot of the small issues I was having with previous builds were fixed in this version. Pretty much everything could be handled via the configuration interface, but I found that I couldn’t keep the crossfade option enabled, otherwise I would get a ‘failed to initialize audio device’ when trying to stream the audio via HDMI and moving from track to track.

I quickly googled the issue and found a recommended solution on an XBMC.org thread, but the blog post they linked to was having a database connection error. I found a google-cached version of the website and figured I would post a copy on my blog as well in case other people are looking for the solution.

**Note: If you are looking for the blog post on using the Revo with XBMC as a cheap HTPC check out this post which includes the backhistory on why I chose the Revo as well as installation instructions.

The solution is fairly simple:

  1. Download the asoundrc.txt file (contents shown below)
  2. pcm.!default {
    type plug
    slave.pcm "dmixer"
    }
    pcm.dsp0 {
    type plug
    slave.pcm "dmixer"
    }
    pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
    pcm "hw:0,3"
    period_time 0
    period_size 1024
    buffer_size 8192
    #periods 128
    rate 44100
    }
    bindings {
    0 0
    1 1
    }
    }
    ctl.mixer0 {
    type hw
    card 0
    }
  3. Copy the file to the /home/xbmc directory
  4. Rename the file from asoundrc.txt to .asoundrc
  5. Change the audio output device to default (under System > Settings > System > Audio Output)
  6. Restart XBMC and crossfading should now be working.

1 reply on “XBMC Revo Audio Crossfade Fix”

Would we lose multichannel PCM from working correctly with this? It would drastically change my .asoundrc which is setup to allow simultaneous output over hdmi and optical out. This is what’s in my .asoundrc now:

pcm.both {
type route
slave {
pcm multi
channels 6
}
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0
ttable.0.4 1.0
ttable.1.5 1.0
}

pcm.multi {
type multi
slaves.a {
pcm “hdmi_hw”
channels 6
}
slaves.b {
pcm “digital_hw”
channels 6
}
slaves.c {
pcm “analog_hw”
channels 2
}
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
bindings.4.slave c
bindings.4.channel 0
bindings.5.slave c
bindings.5.channel 1
}

pcm.hdmi_hw {
type hw
card 0
device 3
channels 6
}

pcm.hdmi_formatted {
type plug
slave {
pcm hdmi_hw
rate 48000
channels 6
}
}

pcm.hdmi_complete {
type softvol
slave.pcm hdmi_formatted
control.name hdmi_volume
control.card 0
}

pcm.digital_hw {
type hw
card 0
device 1
channels 6
}

pcm.analog_hw {
type hw
card 0
device 0
channels 2
}

Leave a Reply

Your email address will not be published. Required fields are marked *