PDA

View Full Version : .asoundrc


babazoid
2007-08-01, 05:13
Hey folks,

I thought I ask you all about your .asound rc files. I'm using VIA 8233 on-board sound S/PDIF out on an Abit AV8 motherboard. It was a complete pain in the ass to get working.

While it works now, albeit a little strangely (IEC 958 playback channel seems to change its volume depending on what program I'm using, which messes things up)... it could use a bit of tweaking. Some programs can't adjust output volume while others can, I'm a bit confused. Programs like Songbird, Exaile!, and Rythmbox can control the volume to S/PDIF... but for some reason mplayer and XBMC and a bunch of others aren't working. If you have any advice for me I'd appreciate it.

Here's my .asoundrc file:

pcm.via82xx {
type hw
card 0
}

ctl.via82xx {
type hw
card 0
}

pcm.!default {
type plug
slave.pcm "spdif"
slave.rate 48000
}

Should I be doing anything special for XBMC?

PS. Since I'm not going to be much help coding this project, I don't mind taking care of Linux Wiki documents if help is needed!

babazoid
2007-08-01, 06:29
I keep on replying to my own threads, yes, but I've figured it all out and I thought I would post this for others:

I used the Alsa Wiki, specifically pages on dmix (http://alsa.opensrc.org/index.php/Dmix) and softvol (http://alsa.opensrc.org/index.php/How_to_use_softvol_to_control_the_master_volume).

Basically my audio is directed to the softvol plugin which does it's volume magic, and then that directs it to the dmix plugin which mixes sounds together so I can play several samples at one time, and then it's directed to my SPDIF (hw:0,1). If you're smarter than me let me know if I did this wrong :)

Seems to be working great with the latest XBMC SVN.


pcm.via82xx {
type hw
card 0
}

ctl.via82xx {
type hw
card 0
}

pcm.!default {
type plug
slave.pcm "softvol"
slave.rate 48000
}

pcm.swmix {
type dmix
ipc_key 313
slave {
pcm "hw:0,1"
period_time 0
period_size 1024
buffer_size 8192
}
}

pcm.softvol {
type softvol
slave {
pcm "swmix"
}
control {
name "SoftMaster"
card 0
}
}