.asoundrc

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
babazoid Offline
Junior Member
Posts: 41
Joined: Oct 2003
Reputation: 0
Location: Toronto, Ontario
Post: #1
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:

Code:
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!
find quote
babazoid Offline
Junior Member
Posts: 41
Joined: Oct 2003
Reputation: 0
Location: Toronto, Ontario
Post: #2
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 and softvol.

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 Smile

Seems to be working great with the latest XBMC SVN.

Code:
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
        }
   }
find quote