Closed cmoulliard closed 4 years ago
Thanks for the post. There are a few things you could check. I’m taking the Pi’s built-in DAC as an example.
First, it does not appear that you are asking Shairport Sync to use the hardware mixer to control the volume – you do not give an mixer_control_name
setting. The Pi's built-in output DAC has a mixer called "PCM". You can use use alsamixer
to examine and change its mute and volume settings.
If the volume is turned down too far or if it's muted (and it could be), then you won't hear anything. The solution is to:
alsamixer
,mixer_control_name
equal to its name. To accomplish this, you should put the following:
mixer_control_name = "PCM";
in the alsa
section of the configuration file and restart.
Second, and probably less importantly, you have specified the output device to be an ALSA pseudo-device, not a real hardware device. Shairport Sync is intended to use a real hardware device directly.
From the command line, if you enter:
$ shairport-sync -h
you will get a list of ALSA hardware devices at the end like this:
$ shairport-sync -h
Usage: shairport-sync [options...]
or: shairport-sync [options...] -- [audio output-specific options]
...
...
Settings and options for the audio backend "alsa":
...
hardware output devices:
"hw:ALSA"
...
...
Use the appropriate name to specify the device you wish to use. On the Raspberry Pi, the built-in DAC is "hw:ALSA"
, so you should put the following:
output_device = "hw:ALSA";
in the alsa
section of the configuration file and restart.
If you want to use a different DAC (e.g. the Hallo Boss DAC), then if it shows up in the list of hardware output devices, select it as the output device. You'll need to use something like alsamixer
to see if it has a volume control mixer and what name the mixer has.
If the DAC does not appear in the list of hardware output devices, you need to investigate why – perhaps it needs a driver.
- Ensure the mixer is unmuted using
alsamixer
,
How can I do that ?
2. equal to its name
I dont see a name but instead text separated by :
?
- Ensure the mixer is unmuted using
alsamixer
,How can I do that ?
This is really a question about alsamixer
, but if a mixer is muted, the small box with 00
will be replaced by MM
. Select the item using left/right arrows and type m
to toggle the mute state.
- equal to its name
I dont see a name but instead text separated by
:
?
It's better to use the shairport-sync -h
method, but the name is related to the name as shown on the top left after Card:
, that is BossDAC
, thus hw:BossDAC
. The relationship between the name given here and the actual name used by ALSA is not exact though.
By the way, this looks very like the IQaudIO device. If so, the mixer_contol_name
to use is "Digital".
This is really a question about
alsamixer
, but if a mixer is muted, the small box with00
will be replaced byMM
. Select the item using left/right arrows and typem
to toggle the mute state.
As the picture shows top of Auto Mute
and Auto Mute Mono boxes values
00`, then that means that the mixer is not at all muted - correct ?
2. by setting the
mixer_control_name
equal to its name
How do you know that the name to be used is PCM
then for mixer_control_name
?
I did the changes suggested but still no sound
A warning message is reported 0.021493105 "audio_alsa.c:309" *warning: failed to find mixer control "PCM".
volumio@volumio:~/git-projects/shairport-sync$ ./shairport-sync -vvu -c /etc/shairport-sync.conf
0.000173072 "shairport.c:435" Looking for configuration file at full path "/etc/shairport-sync.conf"
0.000617965 "shairport.c:1626" Started!
0.000077291 "shairport.c:1638" software version: "3.3.5-OpenSSL-Avahi-ALSA-soxr-metadata-sysconfdir:/usr/local/etc"
0.000061042 "shairport.c:1644" log verbosity is 2.
0.000070624 "audio_alsa.c:1001" alsa: init() -- alsa_backend_state => abm_disconnected.
0.000037292 "audio_alsa.c:1018" alsa: alsa_maximum_stall_time of 0.200000 sec.
0.000067864 "audio_alsa.c:1303" alsa: disable_standby_mode is "never".
0.000034375 "audio_alsa.c:1305" alsa: disable_standby_mode_silence_threshold is 0.040000 seconds.
0.000035416 "audio_alsa.c:1307" alsa: disable_standby_mode_silence_scan_interval is 0.004000 seconds.
0.000060885 "audio_alsa.c:1346" alsa: output device name is "hw:BossDAC".
0.000160833 "shairport.c:1659" The processor is running little-endian.
0.000008593 "shairport.c:1692" disable resend requests is off.
0.000030729 "audio_alsa.c:1940" keep_dac_busy is now "no"
0.000042083 "shairport.c:1695" diagnostic_drop_packet_fraction is 0.000000. A value of 0.0 means no packets will be dropped deliberately.
0.000059792 "shairport.c:1696" statistics_requester status is 0.
0.000033697 "shairport.c:1701" rtsp listening port is 5000.
0.000032761 "shairport.c:1702" udp base port is 6001.
0.000032656 "shairport.c:1703" udp port range is 10.
0.000032552 "shairport.c:1704" player name is "pi-volumio".
0.000033072 "shairport.c:1705" backend is "(null)".
0.000032917 "shairport.c:1706" run_this_before_play_begins action is "(null)".
0.000032864 "shairport.c:1707" run_this_after_play_ends action is "(null)".
0.000033177 "shairport.c:1708" wait-cmd status is 0.
0.000032604 "shairport.c:1709" run_this_before_play_begins may return output is 0.
0.000034792 "shairport.c:1710" run_this_if_an_unfixable_error_is_detected action is "(null)".
0.000063541 "shairport.c:1711" run_this_before_entering_active_state action is "(null)".
0.000033125 "shairport.c:1712" run_this_after_exiting_active_state action is "(null)".
0.000047083 "shairport.c:1713" active_state_timeout is 10.000000 seconds.
0.000037343 "shairport.c:1714" mdns backend "(null)".
0.000032344 "shairport.c:1715" userSuppliedLatency is 0.
0.000032656 "shairport.c:1718" interpolation setting is "auto".
0.000032343 "shairport.c:1719" interpolation soxr_delay_threshold is 30.
0.000033021 "shairport.c:1720" resync time is 0.050000 seconds.
0.000034427 "shairport.c:1721" allow a session to be interrupted: 0.
0.000042031 "shairport.c:1722" busy timeout time is 120.
0.000038541 "shairport.c:1723" drift tolerance is 0.001995 seconds.
0.000034688 "shairport.c:1724" password is "(null)".
0.000042916 "shairport.c:1725" ignore_volume_control is 0.
0.000033281 "shairport.c:1729" volume_max_db is not set
0.000032292 "shairport.c:1731" volume range in dB (zero means use the range specified by the mixer): 0.
0.000033906 "shairport.c:1734" volume_range_combined_hardware_priority (1 means hardware mixer attenuation is used first) is 0.
0.000034218 "shairport.c:1736" playback_mode is 0 (0-stereo, 1-mono, 1-reverse_stereo, 2-both_left, 3-both_right).
0.000034010 "shairport.c:1737" disable_synchronization is 0.
0.000031927 "shairport.c:1738" use_mmap_if_available is 1.
0.000032292 "shairport.c:1740" output_format automatic selection is enabled.
0.000032916 "shairport.c:1744" output_rate automatic selection is enabled.
0.000032917 "shairport.c:1748" audio backend desired buffer length is 0.200000 seconds.
0.000034323 "shairport.c:1750" audio_backend_buffer_interpolation_threshold_in_seconds is 0.120000 seconds.
0.000038281 "shairport.c:1751" audio backend latency offset is 0.000000 seconds.
0.000034479 "shairport.c:1753" audio backend silence lead-in time is -1.000000 seconds. A value -1.0 means use the default.
0.000035260 "shairport.c:1754" zeroconf regtype is "_raop._tcp".
0.000032708 "shairport.c:1755" decoders_supported field is 1.
0.000032500 "shairport.c:1756" use_apple_decoder is 0.
0.000033385 "shairport.c:1757" alsa_use_hardware_mute is 0.
0.000032552 "shairport.c:1761" no special mdns service interface was requested.
0.000081041 "shairport.c:1765" configuration file name "/etc/shairport-sync.conf" resolves to "/etc/shairport-sync.conf".
0.000039323 "shairport.c:1771" metadata enabled is 1.
0.000034843 "shairport.c:1772" metadata pipename is "/tmp/shairport-sync-metadata".
0.000034271 "shairport.c:1774" metadata socket address is "127.0.0.1" port 5555.
0.000033750 "shairport.c:1775" metadata socket packet size is "500".
0.000032708 "shairport.c:1776" get-coverart is 0.
0.000032500 "shairport.c:1794" loudness is 0.
0.000032187 "shairport.c:1795" loudness reference level is -20.000000
0.007327614 "mdns_avahi.c:205" avahi: service '320D28011358@pi-volumio' group is not yet committed.
0.001635720 "mdns_avahi.c:240" avahi: request to add "_raop._tcp" service with metadata
0.000983067 "mdns_avahi.c:371" avahi_dacp_monitor_start Avahi DACP monitor successfully started
0.000496247 "mdns_avahi.c:209" avahi: service '320D28011358@pi-volumio' group is registering.
0.943404503 "mdns_avahi.c:176" avahi: service '320D28011358@pi-volumio' successfully added.
0.558745317 "shairport.c:192" soxr_delay_index: 12.
0.000183176 "shairport.c:199" "soxr" interpolation has been chosen.
5.374102731 "rtsp.c:2683" Connection 1: new connection from 192.168.1.6:63052 to self at 192.168.1.100:5000.
0.102197066 "rtsp.c:2366" Connection 1: Received an RTSP Packet of type "ANNOUNCE":
0.000069531 "rtsp.c:463" Type: "Content-Length", content: "653"
0.000310780 "rtsp.c:463" Type: "Content-Type", content: "application/sdp"
0.000209947 "rtsp.c:463" Type: "CSeq", content: "3"
0.000202863 "rtsp.c:463" Type: "DACP-ID", content: "5AC147DB4B393BE0"
0.000202238 "rtsp.c:463" Type: "Active-Remote", content: "2119182443"
0.000191145 "rtsp.c:463" Type: "User-Agent", content: "AirPlay/415.3"
0.026129953 "rtsp.c:1934" Play connection from user agent "AirPlay/415.3" on RTSP conversation thread 1.
0.000335259 "rtsp.c:1943" AirPlay version 415 detected.
0.000454112 "rtsp.c:2409" Connection 1: RTSP Response:
0.000243384 "rtsp.c:463" Type: "CSeq", content: "3"
0.000202603 "rtsp.c:463" Type: "Server", content: "AirTunes/105.1"
0.012744041 "rtsp.c:2366" Connection 1: Received an RTSP Packet of type "SETUP":
0.000223957 "rtsp.c:463" Type: "Transport", content: "RTP/AVP/UDP;unicast;mode=record;timing_port=59720;control_port=53364"
0.000215780 "rtsp.c:463" Type: "CSeq", content: "4"
0.000190363 "rtsp.c:463" Type: "DACP-ID", content: "5AC147DB4B393BE0"
0.000216718 "rtsp.c:463" Type: "Active-Remote", content: "2119182443"
0.000203020 "rtsp.c:463" Type: "User-Agent", content: "AirPlay/415.3"
0.000213905 "rtsp.c:920" Connection 1: SETUP -- Active-Remote string seen: "2119182443".
0.000422705 "rtsp.c:935" Connection 1: SETUP -- DACP-ID string seen: "5AC147DB4B393BE0".
0.000343280 "rtp.c:981" Connection 1: SETUP -- Connection from 192.168.1.6 to self at 192.168.1.100.
0.000465674 "rtsp.c:1000" Connection 1: SETUP DACP-ID "5AC147DB4B393BE0" from 192.168.1.6 to 192.168.1.100 with UDP ports Control: 6001, Timing: 6002 and Audio: 6003.
0.000203384 "rtsp.c:2409" Connection 1: RTSP Response:
0.000127656 "rtsp.c:463" Type: "CSeq", content: "4"
0.000123541 "rtsp.c:463" Type: "Server", content: "AirTunes/105.1"
0.000125728 "rtsp.c:463" Type: "Transport", content: "RTP/AVP/UDP;unicast;interleaved=0-1;mode=record;control_port=6001;timing_port=6002;server_port=6003"
0.000126302 "rtsp.c:463" Type: "Session", content: "1"
0.004643775 "rtsp.c:2366" Connection 1: Received an RTSP Packet of type "RECORD":
0.000241613 "rtsp.c:463" Type: "CSeq", content: "5"
0.000203905 "rtsp.c:463" Type: "DACP-ID", content: "5AC147DB4B393BE0"
0.000203176 "rtsp.c:463" Type: "Active-Remote", content: "2119182443"
0.000239061 "rtsp.c:463" Type: "User-Agent", content: "AirPlay/415.3"
0.000207603 "rtsp.c:805" Connection 1: RECORD
0.000229634 "activity_monitor.c:64" abeg
0.000365936 "audio_alsa.c:877" alsa: hardware mixer prepare
0.021493105 "audio_alsa.c:309" *warning: failed to find mixer control "PCM".
0.002562902 "audio_alsa.c:530" alsa: output format chosen is "S32".
0.000441039 "audio_alsa.c:570" alsa: output speed chosen is 44100.
0.016326468 "audio_alsa.c:1494" alsa: update timestamps available
0.000050677 "audio_alsa.c:229" alsa: precision delay timing is available.
0.000218644 "audio_alsa.c:721" alsa: precision timing selected for "auto" mode
0.000120937 "audio_alsa.c:738" PCM handle name = 'hw:BossDAC'
0.000106718 "audio_alsa.c:752" alsa device parameters:
0.000203072 "audio_alsa.c:755" access type = MMAP_INTERLEAVED
0.000117760 "audio_alsa.c:759" format = 'S32_LE' (Signed 32 bit Little Endian)
0.000116249 "audio_alsa.c:763" subformat = 'STD' (Standard)
0.000021563 "audio_alsa.c:766" number of channels = 2
0.000112238 "audio_alsa.c:769" number of significant bits = 32
0.000290988 "audio_alsa.c:777" rate = 44100 frames per second (precisely).
0.000023594 "audio_alsa.c:786" precise (rational) rate = 0.000 frames per second (i.e. 0/1088784512).
0.000117239 "audio_alsa.c:799" period_time = 5804 us (>).
0.000110833 "audio_alsa.c:809" period_size = 256 frames (precisely).
0.000109270 "audio_alsa.c:825" buffer_time = 1486077 us (>).
0.000107395 "audio_alsa.c:838" buffer_size = 65536 frames (>).
0.000108697 "audio_alsa.c:848" periods_per_buffer = 256 (precisely).
0.000110468 "audio_alsa.c:1813" alsa: prepare() -- opened output device
0.000125677 "audio_alsa.c:1962" alsa: alsa_buffer_monitor_thread_code() -- closing the output device
0.000342758 "player.c:3042" pbeg
0.000373019 "rtsp.c:2409" Connection 1: RTSP Response:
0.000052968 "rtsp.c:463" Type: "CSeq", content: "5"
0.000224478 "rtsp.c:463" Type: "Server", content: "AirTunes/105.1"
0.000136301 "rtsp.c:463" Type: "Audio-Latency", content: "11025"
0.003045816 "audio_alsa.c:1751" alsa: do_close() -- closing alsa handle
0.000779735 "player.c:1951" Set initial volume to -18.000000.
0.000138020 "loudness.c:47" Volume: -37.6 dB - Loudness gain @10Hz: 8.8 dB
0.000038125 "audio_alsa.c:1965" alsa: alsa_buffer_monitor_thread_code() -- alsa_backend_state => abm_disconnected
0.000011927 "player.c:2958" player_volume_without_notification: volume mode is 0, airplay volume is -18.000000, software_attenuation: -3755.700000, hardware_attenuation: 0.000000, muting is disabled.
0.000025625 "player.c:1954" Play begin
0.001818844 "rtsp.c:2366" Connection 1: Received an RTSP Packet of type "SET_PARAMETER":
0.000240884 "rtsp.c:463" Type: "Content-Length", content: "20"
0.000183801 "rtsp.c:463" Type: "Content-Type", content: "text/parameters"
0.000126926 "rtsp.c:463" Type: "CSeq", content: "6"
0.000124010 "rtsp.c:463" Type: "DACP-ID", content: "5AC147DB4B393BE0"
0.000317238 "rtsp.c:463" Type: "Active-Remote", content: "2119182443"
0.000219477 "rtsp.c:463" Type: "User-Agent", content: "AirPlay/415.3"
0.000254686 "loudness.c:47" Volume: -43.3 dB - Loudness gain @10Hz: 11.7 dB
0.000291561 "player.c:2958" player_volume_without_notification: volume mode is 0, airplay volume is -20.000000, software_attenuation: -4333.500000, hardware_attenuation: 0.000000, muting is disabled.
0.000149166 "rtsp.c:2409" Connection 1: RTSP Response:
0.000125624 "rtsp.c:463" Type: "CSeq", content: "6"
0.000122500 "rtsp.c:463" Type: "Server", content: "AirTunes/105.1"
0.033413869 "rtsp.c:2366" Connection 1: Received an RTSP Packet of type "FLUSH":
0.000298019 "rtsp.c:463" Type: "RTP-Info", content: "seq=64064;rtptime=2207353703"
0.000210624 "rtsp.c:463" Type: "CSeq", content: "7"
0.000202499 "rtsp.c:463" Type: "DACP-ID", content: "5AC147DB4B393BE0"
0.000211457 "rtsp.c:463" Type: "Active-Remote", content: "2119182443"
0.000201666 "rtsp.c:463" Type: "User-Agent", content: "AirPlay/415.3"
0.000252602 "rtsp.c:2409" Connection 1: RTSP Response:
0.000222707 "rtsp.c:463" Type: "CSeq", content: "7"
0.000194218 "rtsp.c:463" Type: "Server", content: "AirTunes/105.1"
0.038376810 "player.c:264" Hammerton Decoder used on encrypted audio.
0.000160832 "player.c:1016" pffr
0.034757925 "audio_alsa.c:721" alsa: precision timing selected for "auto" mode
0.000073332 "audio_alsa.c:1777" alsa: play() -- opened output device
0.000019375 "audio_alsa.c:1782" alsa: play() -- alsa_backend_state => abm_playing
1.413272937 "player.c:1278" prsm
18.499711548 "rtp.c:142" Packet reception interval stats: mean, standard deviation and max for the last 2,500 packets in microseconds: 7978.7, 12795.6, 40552.0.
19.949195616 "rtp.c:142" Packet reception interval stats: mean, standard deviation and max for the last 2,500 packets in microseconds: 7978.9, 12678.6, 37849.0.
7.075705087 "rtsp.c:2366" Connection 1: Received an RTSP Packet of type "TEARDOWN":
0.000387342 "rtsp.c:463" Type: "CSeq", content: "31"
0.000229374 "rtsp.c:463" Type: "DACP-ID", content: "5AC147DB4B393BE0"
0.000217446 "rtsp.c:463" Type: "Active-Remote", content: "2119182443"
0.000277395 "rtsp.c:463" Type: "User-Agent", content: "AirPlay/415.3"
0.000210519 "rtsp.c:860" Connection 1: TEARDOWN
0.000262394 "audio_alsa.c:1833" alsa: flush() -- closing the output device
0.003794093 "audio_alsa.c:1751" alsa: do_close() -- closing alsa handle
0.000851766 "audio_alsa.c:1835" alsa: flush() -- alsa_backend_state => abm_disconnected.
0.001105254 "player.c:3068" pend
0.000420154 "rtsp.c:2409" Connection 1: RTSP Response:
0.000211770 "rtsp.c:463" Type: "CSeq", content: "31"
0.000224998 "rtsp.c:463" Type: "Server", content: "AirTunes/105.1"
0.000206249 "rtsp.c:463" Type: "Connection", content: "close"
0.006447359 "rtsp.c:2301" Connection 1: terminated.
1.105901375 "mdns_avahi.c:147" (Browser) REMOVE: service 'iTunes_Ctrl_5AC147DB4B393BE0' of type '_dacp._tcp' in domain 'local'.
8.887296657 "activity_monitor.c:91" aend
How do you know that the name to be used is
PCM
then formixer_control_name
?
The name PCM
is the name of the mixer on the built-in DAC:
As I mentioned in my previous post, the name of the mixer for the BossDAC is probably "Digital":
So, the warning is simply that there is no mixer with the name PCM
on the BossDAC. Try changing the name to Digital
.
Otherwise, the log looks okay.
Try changing the name to
Digital
.
Done. Will re-test soon
cat /etc/shairport-sync.conf
general =
{
name = "pi-volumio";
};
diagnostics =
{
log_verbosity = 1;
};
alsa =
{
output_device = "hw:BossDAC";
mixer_control_name = "Digital";
};
Many thanks for your help. that works :-) I will check with volumio team how we could configure their nodejs plugin
Issue
When shairport is started on Pi, sound redirected from my macbook to the shairport server running on Pi, we cannot hear sound using Hallo Boss DAC
Version
Log
Config
aplay -L