You are not logged in.

#1 2008-09-01 21:07:21

colbert
Member
Registered: 2007-12-16
Posts: 809

Cannot get MPD to share sound (and now it doesn't play at all)

I am having problems getting MPD to work properly with respect to sharing sound and now, to even play at all.

Here is my .asoundrc:

# 6 channel dmix:
pcm.dmix6 {
     type dmix
        ipc_key 1024
        ipc_key_add_uid false
        ipc_perm 0660
        slave {
                pcm "hw:0,0"
                rate 48000
                format "S32_LE"
        channels 6
                period_time 0
                period_size 1024
                buffer_time 0
                buffer_size 8192
        }
     }

# upmixing: 
pcm.ch51dup {
        type route
        slave.pcm dmix6
        slave.channels 6
        ttable.0.0 1
        ttable.1.1 1
        ttable.0.2 0.6
        ttable.1.3 0.6
        ttable.0.4 0.5
        ttable.1.4 0.5
        ttable.0.5 0.5
        ttable.1.5 0.5
   }

pcm.duplex {
     type asym
     playback.pcm "ch51dup" # upmix first
     capture.pcm "hw:0"
}

# change default device:
pcm.!default {
     type plug 
     slave {
    pcm "duplex"
    }
}

# for aoss
pcm.dsp "duplex"

pcm.dsp1 "duplex"

pcm.10to20 {
    type route
    slave.pcm default
    slave.channels 2
    ttable.0.0 1
    ttable.0.1 1
}

pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}


#------------------------end of working file
~ #

My /etc/mpd.conf changes are only the path of music library (works) and output device is "default" using alsa.

The basic problem is MPD only plays when nothing else is using sound and vice versa, whereas all other apps that use sound on my system are fully able to play simultaneously. I have tried removing the ~/.asoundrc and just copying it over to /etc/asound.conf and letting MPD read from there, but this hasn't worked. And now MPD will not start playing as it is giving this error everytime I try to play a song, this is from /var/log/mpd/mpd.error: http://pastebin.ca/1190824

I was informed by someone in #alsa on Freenode that it might be a shared mem issue, and was told to run "ipcs -a" but the individual was unable to diagnose and I'm certainly not knowledgeable enough to, hehe. Here is the current output of ipcs -a on my machine:

~ # ipcs -a

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status     
0x50494f4e 0          nobody    666        2016       1                      
0x00000000 32769      root      777        139264     1                      
0x00000000 262146     bobby     600        393216     2          dest        
0x00000000 294915     bobby     600        393216     2          dest        
0x00000000 491524     bobby     600        393216     2          dest        
0x00000000 524293     bobby     600        393216     2          dest        
0x00000000 557062     bobby     600        393216     2          dest        
0x00000000 819207     bobby     600        393216     2          dest        
0x00000000 851976     bobby     600        393216     2          dest        
0xcbc384f8 884745     bobby     600        64528      1                      
0x000004d2 917514     bobby     660        488        1                      
0x000004d3 950283     bobby     660        196608     1                      

------ Semaphore Arrays --------
key        semid      owner      perms      nsems    
0xcbc384f8 163840     bobby     600        1        
0x000004d2 196609     bobby     660        1        

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages   

~ #

Thx for any help!

Offline

#2 2008-09-03 01:30:16

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: Cannot get MPD to share sound (and now it doesn't play at all)

Changed ipc_perm to 0666 in /etc/asound.conf and it works now smile

Offline

Board footer

Powered by FluxBB