You are not logged in.

#1 2008-01-16 22:01:36

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

[SOLVED] Help with MPD to use proper output

I am trying to set up mpd, so far it works a-ok in seeing my music, playing, etc. I am using the ncmpc client, really like it.

However it does not upmix my 2-channel stereo mp3 music to 5 channels, as Amarok does just fine. 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
}
#------------------------end of working file

and here is the relevant audio output portion from my /etc/mpd.conf:

########################## AUDIO OUTPUT ########################
#
# MPD supports many audio output types, as well as playing
# through multiple audio outputs at the same time.  You can
# specify one or more here.  If you don't specify any, MPD will
# automatically scan for a usable audio output.
#
# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs>
# for examples of other audio outputs.
#
# An example of an ALSA output:
#
audio_output {
        type                    "alsa"
        name                    [b]"???"[/b]
        device                  [b]"???"[/b]
#        format                  "44100:16:2" # optional
}
#

The part above for "name" and "device" that I bolded with question marks, well I have tried almost everything. For device I have put: dmix6, plug:dmix6, ch51dup, plug:ch51dup, pcm.default, etc. from my .asoundrc that I could think of. Currently "default" works just fine but like I said, will only play back through 2 channels, it does not upmix.

And to be clear, I don't need to set volume levels at all, just upmix 2 channel sound to all 5 speakers. And currently all other apps like Xine, VLC, amarok, Firefox w/flash, etc. upmix stereo sound to all 5 speakers just fine.

TIA for any help guys, I really want to switch to mpd and give it a fair shot smile

Last edited by colbert (2008-01-16 23:45:51)

Offline

#2 2008-01-16 23:44:18

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

Re: [SOLVED] Help with MPD to use proper output

SOLVED! The genius "wishie" in #alsa on freenode helped me.

The key is to have /etc/asound.conf, which I did not. All I did was copy my ~/.asoundrc to /etc/asound.conf and viola, mpd daemon now has a system-wide asound that it can see, where previously it wasn't aware an upmixing device existed. Hope this helps anyone in the future with a similar situation.

Offline

Board footer

Powered by FluxBB