With this commit auto reconnection per default will only be done for ATV4s and
HomePods. Reconnection is not always desirable, for instance if the device cuts
the connection because it is busy with something else, ref. issue #934.
The commit also adds an option to override auto reconnection, thus either
enabling it for other devices or disabling it for affected devices.
ffmpeg/libav has been capable of this since approx 2016, so the fallback
functions can be dropped now.
Also means we don't add automatically add Icy-MetaData: 1 to request
headers any more.
Include ALSA's device name in the ALSA modules 'info' logging to help
identify sound devices as seen by the system for assisting config setup
Many configs use ALSA's hw ids to refer to device but ALSA can also use
device names:
laudio: Available ALSA playback mixer(s) on hw:0 CARD=Intel (HDA Intel): 'Master' 'Headphone' 'Speaker' 'PCM' 'Mic' 'Beep'
laudio: Available ALSA playback mixer(s) on hw:1 CARD=E30 (E30): 'E30 '
From the example above can use these ALSA names interchangably:
'hw:0' and 'hw:Intel'
'hw:1' and 'hw:E30'
outputs_master_volume, output_device_list and output_buffer were defined in
outputs.h, but should only have been declared with extern.
Solve it by making output_buffer static/non-global (wasn't used anyway), and
the two others are now returned by functions.
* Make sure that vol_adjust() bases adjustments on the same speakers that the
user sees as active
* If a speaker fails during activation we unselect it, so that we don't keep
trying to start it, so we find a new master volume if required, and so it is
possible for the user to reselect it.
Before, if a user never verified the device, we would have a device->session
even though the device was not streaming and was in a failed state.
This solution should be more clean and in line with the overall principle that
we only have a session when communicating with the device.
Also includes a bit of code refactoring.
outputs_authorize() has two issues, one that the caller can't specify device
(problem if there are two devices waiting for verification), the other that it
didn't offer a standard callback, so difficult to catch failure/success.
An empty string will mean that m3u tags won't get used (unless m3u_override is
configured), but they should be used, since they are probably better than an
empty string.
Before, we were ignoring progress metadata, and we were also updating clients
and db too early with input metadata (right when read from the input, instead of
waiting until playback (speakers) were at that position.
This change adds a complicated async chain of events from when the update is
received.