Posts: 13,474
Threads: 305
Joined: Mar 2018
Reputation:
545
use the cmd string from your log in post #5
Posts: 13,474
Threads: 305
Joined: Mar 2018
Reputation:
545
Are you configured for Hardware volume in MPD?
Posts: 13,474
Threads: 305
Joined: Mar 2018
Reputation:
545
In moOde the Airplay receiver automatically picks up the Volume config from MPD unless you force Airplay to use "Software" volume in Airplay config screen. If your DAC works with MPD set to Hardware but Airplay does not, which is what the error "failed to attach to mixer" suggests, then you can try setting Airplay to "Software" volume in Airplay config screen.
Posts: 10
Threads: 1
Joined: Jun 2018
Reputation:
0
Update on the Airplay issue: a few days ago I hooked up a Xiang Sheng DAC 01A to the RPi3B+ and Airplay functioned. It's unfortunate that with the first 3 USB DACs I tried - Topping D30, AQ Dragonfly Black and XtremPro X1 - Airplay disappears.
Posts: 13,474
Threads: 305
Joined: Mar 2018
Reputation:
545
Hi Thorsten,
It works perfectly on my end but there is always the possibility of breakage or bugs that surface only in other environments or configs. Try the mods below (in Bold) to enable the launch string for verbose logging to a file.
1. Edit /var/www/inc/playerlib.php, function startSps()
1. Add -vv to the base cmd string to enable verbose logging
2. Replace 3 occurrences of /dev/null with /home/pi/sps.log to redirect the log output to a file
3. Save the edits
4. Reboot
5. tail -f /home/pi/sps.log -OR- cat /home/pi/sps.log
/var/www/inc/playerlib.php
// start shairport-sync
function startSps() {
// get device num and hardware mixer name
$array = sdbquery('select value_player from cfg_mpd where param="device"', cfgdb_connect());
$device = $array[0]['value_player'];
$mixername = $_SESSION['amixname'];
// format base cmd string
$cmd = '/usr/local/bin/shairport-sync -vv -a "' . $_SESSION['airplayname'] . '" -S soxr -w -B /var/local/www/commandw/spspre.sh -E /var/local/www/commandw/spspost.sh ' . '-- -d hw:' . $device;
// add volume config
if ($_SESSION['airplayvol'] == 'auto') {
$cmd .= $_SESSION['alsavolume'] == 'none' ? ' > /home/pi/sps.log 2>&1 &' : ' -c ' . '"' . $mixername . '"' . ' > /home/pi/sps.log 2>&1 &';
}
else {
cmd .= ' > /home/pi/sps.log 2>&1 &';
}
// start shairport-sync
debugLog('worker: (' . $cmd . ')');
sysCmd($cmd);
}
-Tim