Mike Brady
cf29625d2c
Clang Format
2017-02-11 12:12:07 +00:00
Mike Brady
5f61e30510
Recognise and use deprecated settings and issue warnings.
2017-01-30 18:23:49 +00:00
Mike Brady
b5ee350b3c
Add *untested* support for S24_3LE and S24_3BE output format.
2016-09-28 11:47:44 +01:00
Mike Brady
c6fc233476
Merge remote-tracking branch 'upstream/development' into development
...
Merging 3.0d to 2.8.4.8
2016-09-26 16:42:33 +01:00
Mike Brady
622549c7df
If sync disabled on the alsa device, don't keep asking for buffer length. Also emit sender IP number as metadata.
2016-09-21 20:57:33 +01:00
Mike Brady
b76e9ba4be
Add client IP metadata item -- the IP of the client, i.e. the sender of audio, is output when a pley session is about to start, as a 'ssnc' 'clip' string. Also, stop asking for buffer size if sync is disabled.
2016-09-20 15:17:28 +01:00
Mike Brady
c80d59b3c4
Tidy up source with clang-format
2016-09-18 13:08:36 +01:00
Mike Brady
5a8241c71a
Change names of drift, resync, alsa buffer offset and alsa buffer length to distinguish them from the old 44100-based settings. Add warning messages.
2016-09-18 12:56:22 +01:00
Mike Brady
43788faa96
Fix error checking of alsa latency and buffer legth settings.
2016-09-13 12:19:28 +01:00
Mike Brady
0499743bd9
Make endian-independent. Allow users to specify only U8/S8/S16/S24/S32
2016-09-12 22:01:57 +01:00
Mike Brady
064bd293c5
Tidy up with a clang-format
2016-09-11 10:35:53 +01:00
Mike Brady
9ae88ee16c
Add initial support for U8 and S8 formats
2016-09-10 18:59:53 +01:00
Mike Brady
ae84366e8d
Change over to times as opposed to frames for setting timing options
2016-09-04 19:37:22 +01:00
Mike Brady
01e5128507
Add ability to set output format and output rate
2016-08-19 12:51:15 +01:00
Mike Brady
c1e07b98d1
add ability to not use mmap
2016-08-17 19:59:26 +01:00
Mike Brady
991aae0601
Add a signal to say which kind of output is being used.
2016-07-07 13:31:04 +01:00
Yihui Xiong
8e847aa4a4
use alsa mmap feature if supported
2016-07-07 15:28:32 +08:00
Mike Brady
02651562a4
Only try to set volume at play if there's a mixer.
2016-05-09 11:28:37 +00:00
Mike Brady
1b7fceb7d1
Merge pull request #293 from joerg-krause/alsa-softvol
...
Add support for ALSA softvol plugin
2016-05-07 10:52:05 +01:00
Mike Brady
ab979d5967
Fix warning about redefined function.
2016-05-07 08:01:05 +00:00
Jörg Krause
f3dcf8d69b
Add support for ALSA softvol plugin
...
The ALSA softvol plugin allows the user to add a new volume control and control
the sound volume by software. This is necessary if the sound card can't control
the volume by hardware.
An example configuration in the `~/.asoundrc` file might look like this:
```
pcm.softvol {
type softvol
slave {
pcm "hw:0"
}
control {
name "Master"
card 0
}
min_dB -57.2
max_dB -6.2
}
ctl.softvol {
type hw
card 0
}
```
The corresponding entries in the shairport-sync would be:
```
alsa =
{
output_device = "softvol";
mixer_control_name = "Master";
}
```
Please check the (ALSA documentation)[http://alsa.opensrc.org/Softvol ] and the
(ALSA PCM library reference)[http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html ]
If shairport-syncs alsa backend does not have success in getting the dB volume
information from the hardware device it tries to get these information from a
software volume control with the name mixer device name as for the hardware
mixer.
2016-05-06 22:23:16 +02:00
Mike Brady
6cfc9f9897
Demote some debug messages, add check for empty or null buffer argument to pcm_snd_writei
2016-05-06 16:28:40 +00:00
Mke Brady
dace5b0511
Cleaned up a few warnings detected by clang
2016-04-05 16:48:29 +01:00
Mike Brady
ca5526ce85
Brown bag commit -- not printing delay error messages properly.
2016-04-02 20:32:44 +00:00
Mike Brady
1f814c7c78
Tidy up alsa diagnostic messages and reinstate the nominal frame rate.
2016-04-02 15:09:29 +00:00
Mike Brady
0d06016cb8
Clean up alsa settings information output -- make more precise too.
2016-04-01 16:27:06 +01:00
Mike Brady
cbc4caa63a
Add the ability to set period size and buffer size. List characteristics of the alsa device afterwards.
2016-03-30 12:34:59 +00:00
Mike Brady
1e408d1b7c
Make the delay() procedurec return a frame value, positive or negative and a separate status value. Also, don't ever try to change the buffer size.
2016-03-29 16:06:26 +00:00
Mike Brady
beae604b70
Put debug message before attempt to recover from snd_pcm_delay negative result
2016-03-29 12:29:54 +00:00
Mike Brady
82a033e590
Use type long for delay as it corresp[onds with the alsa type used
2016-03-29 12:04:34 +00:00
Mike Brady
953ee31349
add option disable synchronization; delay() should return a signed integer, duh.
2016-03-26 21:35:49 +00:00
Mke Brady
24bd670842
Use snd_pcm_delay instead of snd_pcm_avail_delay, see if it fixes an incompatability with some DACs.
2016-03-24 09:26:02 +00:00
Mike Brady
fff33fe619
Quieten a few debug messages
2016-02-29 15:07:03 +00:00
Mike Brady
da50f19b1a
Quieten some more annoying debug messages
2016-02-22 14:42:13 +00:00
Mike Brady
e525bbe266
Turn off an annoying debug message
2016-02-22 14:18:31 +00:00
Mike Brady
0f14aad875
Unlock mutex when initialising a device without a hardware mixer. Add check for hardware mixer to uses of mixer handle
2016-02-20 13:46:27 +00:00
Mike Brady
7b94913c17
Add a few debug messages, a few more lock/unlocks and tidy up a bit.
2016-02-08 22:05:19 +00:00
Mike Brady
686082b34d
Take a little more care of access to the alsa system; wait 100 ms after finishing with it to release data strucutres
2016-02-02 14:43:37 +00:00
Mike Brady
d414c07ec3
Check for existence of a hardware mixer before messing with it.
2016-01-26 22:32:51 +00:00
Mike Brady
ae0c974512
Release and reacquire the hardware mixer in tandem with the output device. This ensures the mixer volume setting is correctly reset by the mixer on resumption after a pause, and not ignored as before.
2016-01-26 13:22:10 +00:00
Mke Brady
4e395ff3a5
Tiny changes
2015-12-26 15:14:01 +00:00
Mike Brady
53b289618d
Fix unintended deletion of two definitions
2015-12-21 13:44:59 +00:00
Mike Brady
d5881f636e
Add some extra diagnostics to setting the desired buffer length in ALSA
2015-12-21 13:12:31 +00:00
Mike Brady
9725830d9a
Use the correct tag name for desired alsa buffer length -- audio_backend_buffer_desired_length
2015-12-18 13:39:51 +00:00
Mike Brady
33e39b7eb7
Add some extra information to the notices placed in the logfile if there are prtoblems with alsa
2015-11-24 12:18:29 +00:00
Mike Brady
b0bfbdc04e
Add back in the code used to store the volume level set initially.
2015-11-09 13:29:04 +00:00
Mike Brady
b5e4b258f9
Hook up the mute function.
2015-11-07 19:07:37 +00:00
Mike Brady
4c70223f5a
Work in progress, doesn't compile
2015-11-05 18:03:58 +00:00
Mike Brady
c9601426a1
Check desired buffer length -- abort if not feasible
2015-10-31 13:27:15 +00:00
Mike Brady
22a8664d61
Add some extra error checking to alsa initialisation, add shairport-sync.exe to .gitignore
2015-10-31 12:42:42 +00:00