Android and config file (mpd.conf)

General Discussion about MPD – anything that doesn't fit in the other MPD forums.
Post Reply
mnemonic
Posts: 2
Joined: September 11th, 2018, 5:52 pm

Android and config file (mpd.conf)

Post by mnemonic » September 11th, 2018, 6:16 pm

Hi

I'm trying to make MPD installed on rooted Android device (Samsung S7580) to adjust sound volume while playing network streams. Client M.A.L.P. is installed on another Android device. Changing tracks, playing, pausing, displaying track info works OK.
But adjusting volume - no luck so far

1. Is volume control implemented at all in Android version of MPD?

2. Is Android version of MPD parsing mpd.conf file during initialization?

(no such file found after apk installation in whole filesystem
of Samsung S7580 device;
manually placing the mpd.conf file in /data folder
or any of /data/data/org.musicpd folders or subfolders
didn't change anything;
I changed impd.conf permissions to rw-rw-rw-)


My mpd.conf file looks like this:

-------------------
auto_update "no"

audio_output {
type "alsa"
name "alsa sound card"
device "hw:0,0"
# mixer_type "software"
mixer_type "hardware"
mixer_control "PCM"
# mixer_control "master"
}
-------------------

Any hints or answers, please?

max
Forum team
Posts: 781
Joined: January 15th, 2013, 3:43 pm

Re: Android and config file (mpd.conf)

Post by max » September 11th, 2018, 6:45 pm

There is no native mixer plugin for Android yet, but you can use software volume until that is implemented.

See https://www.musicpd.org/doc/html/user.h ... on-android for where to place mpd.conf - the "data" directory is wrong, this one is just for internal app data, not to be accessed directly by users. The MPD app should however reveal the expected location, to make this easier to configure. The Android app is truly bad in its current state. It hasn't received a lot of love, but the next release (0.20.22) will have some goodies.

The problem with your configuration is the plugin - "alsa" is not possible on Android. Android is Linux, but it doesn't use ALSA; for Android, MPD has the "sles" output plugin (https://www.musicpd.org/doc/html/user.html#sles-output).

mnemonic
Posts: 2
Joined: September 11th, 2018, 5:52 pm

Re: Android and config file (mpd.conf)

Post by mnemonic » September 11th, 2018, 9:38 pm

Thank you! :)

Placing mpd.conf in /storage/sdcard0 and changing settings to:

----------------
audio_output {
type "sles"
mixer_type "software"
}
----------------

worked like a charm.

System is up and running. Problem solved!

Post Reply