I got it working in 2.041 albeit using different hardware by the following:
In /volumio/app/volumecontrol.js below the var amixer { … }; block, add the following so we can call mpc:
[code] var mpc = function (args, cb) {
var ret = '';
var err = null;
var p = spawn('mpc', args);
p.stdout.on('data', function (data) {
ret += data;
});
p.stderr.on('data', function (data) {
err = new Error('MPC Mixer Error: ' + data);
});
p.on('close', function () {
cb(err, ret.trim());
});
};
[/code]
Then also change the self.setVolume { … }; block to use mpc instead of amixer by changing to this:
self.setVolume = function (val, cb) {
// if (volumecurve === 'logarithmic') {
// amixer(['-M', 'set', '-c', device, mixer, val + '%'], function (err) {
// cb(err);
// });
// if (devicename == 'PianoDACPlus' || devicename == 'Allo Piano 2.1') {
// amixer(['-M', 'set', '-c', device, 'Subwoofer Digital', val + '%'], function (err) {
// cb(err);
// });
// }
// } else {
// amixer(['set', '-c', device, mixer, val + '%'], function (err) {
// cb(err);
// });
// if (devicename == 'PianoDACPlus' || devicename == 'Allo Piano 2.1') {
// amixer(['set', '-c', device, 'Subwoofer Digital', val + '%'], function (err) {
// cb(err);
// });
// }
// }
mpc(['volume', val], function (err) {
cb(err);
});
};
Then add the ‘mixer_type’ line to /etc/mpd.conf below the audio_output section so it looks like this:
# Audio Output ################################################################
audio_output {
...
...
}
mixer_type "software"