1

Note: I rewrote this question because the signal-to-noise ratio was approaching 0.

Just installed pulseaudio-dnla on my Ubuntu 14.04.2 system to create pulse sinks for my ROCKIs so I can stream audio to any of my ROCKIs, hopefully choosing which of the ROCKIs to stream to from within mpd.

Pulseaudio-dlna is working great my ROCKIs and VLC - I can select any of my 3 ROCKIs as the VLC Audio Device by name, and pulsaudio-dlna sends the audio to that ROCKI. Couldn't be easier.

But I'm having trouble making it work mpd. I got past the user-space/system-wide pulseaudio/mpd issue by running mpd in user-space. I can get it to send audio to one device using padevchooser (as Massimo suggested below). But when I try to make an output for each ROCKI using the same sink names that work for VLC:

audio_output {
    type        "pulse"
    name        "rockigreen"
}

audio_output {
    type        "pulse"
    name        "rockigarage"
}

...no sound comes out of my ROCKIs.

2
  • AFAIK the ROKI device should be supported. Some issues were fixed in the development branch but are not yet available through the PPA, nevertheless worth to try out. In case the issues persist it may be worth contacting the developer @Massimo through the project's bug tracking - to my experience he is very helpful. You can also try with different codecs that may work better on some devices.
    – Takkat
    May 27, 2015 at 13:03
  • I just rewrote the question with a lot more detail. Been talking to Massimo, but I don't think the fault is with pulseaudio-dlna, I think it's in the info mpd supplies to the output when it opens it. Or something. :-/ May 30, 2015 at 20:43

2 Answers 2

1

The solution is the "sink" field in the audio_output section of.mpdconf. I mistakenly thought mpd used the "name" field to select which pulseaudio sink to use, so I set "name" to the pulseaudio name (i.e. "rockigreen"). In actuality, mpd's "name" field is just the label used for the output. However if you put the pulseaudio "name" in the .mpdconf "sink" field, mpd sends audio to the sink of that name.

(You could also use the pulse audio sink index (0 or 1 or 2, etc..), but the sink index can change with reboots and device disconnects/reconnects, so the pulse audio "name" is a better choice.)

The following section of my .mpdconfig file allows me to select, via any mpd client software, any or all of the 3 pulse sinks, by whatever label I choose:

audio_output {
    type        "pulse"
    name        "My A/V Receiver (via pulse)"
    sink        "alsa_output.pci-0000_01_00.1.hdmi-surround-extra2"
}

audio_output {
    type        "pulse"
    name        "The Rocki In My Bedroom"
    sink        "rockigreen"
}

audio_output {
    type        "pulse"
    name        "The Rocki In My Garage"
    sink        "rockigarage"
}

I'm running pulse, pulseaudio-dlna, and mpd as the current user (me). As Massimo notes in his comment, this may not work or may require fancy user/group permission changes if you're not doing the same.

1
  • And this works with pulseaudio-dlna? I did some experiments myself and you should mention, that you need have to run mpd as your current user, not as mpd or root. Since pulseaudio runs also as your current user this is necessary, otherwise mpd won't be able to access those sinks.
    – Massimo
    Jun 3, 2015 at 19:49
0
+100

I tested the following again and it works on another computer without any issues. Perhaps you did not restart mpd after you inserted the TCP module into pulseaudio. Or perhaps you did not enable the 2nd output.

Change your 2nd output in your mpd.conf to:

audio_output {
    type            "pulse"
    name            "MPD Pulse Output"
    server          "localhost"
}

Insert the TCP module to pulseaudio:

pactl load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1

Restart mpd:

sudo service mpd restart

Install mpc to check the outputs:

sudo apt-get install mpc
mpc outputs

Make sure the correct output is enabled:

mpc enable <number-of-your-output>

Play a song, pulseaudio should now be aware of the mpd stream, so you can switch it via pavucontrol or the ubuntu sound settings to play on your device.

9
  • That does not work for me. My system may have a problem with localhost - when I was setting up mythtv I had to replace localhost with the fixed IP of my machine in several places to get it to work. When I do exactly what you say, mpc shows two outputs ("My ALSA Device" [which works] and "MPD Pulse Output" [which doesn't]). I don't understand how mpd is to differentiate between multiple ROCKIs with this technique, unless I'm supposed to replace "MPD Pulse Output" with each ROCKI name discovered by pulseaudio-dlna (tried that, too - didn't work). Something is hosed in my pa/mpd install. Jun 1, 2015 at 2:02
  • Of course I've tried uninstalling and reinstalling pa and mpd but that didn't change anything... And I reboot often after I make a change just in case something is still running (though I don't think there is). Jun 1, 2015 at 2:03
  • Could you paste your /etc/hosts somewhere? Whats about changing your 2nd host to server "127.0.0.1"?
    – Massimo
    Jun 1, 2015 at 6:16
  • Pasted /etc/hosts to bottom of message. Honestly not sure what 'changing your 2nd host to server "127.0.0.1"' means/entails. Jun 1, 2015 at 20:52
  • Looking at the pulseaudio-dlna log files for VLC and mpd, they both start with "new_playback_stream", but mpd never gets to the "device_updated" state. What could mpd not be doing that causes it to start opening the sink but then not take the next step? Jun 1, 2015 at 21:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .