Mike Brady
e513e5330c
Tidy up source using clang-format
2017-07-31 11:57:57 +02:00
Mike Brady
5663858c63
Tidy up and/or suppress some debug messages
2017-07-22 18:09:39 +02:00
Mike Brady
b7864b4ecf
Move common audio backend settings like buffer size and offsets to the "general" settings stanza. Improve the resync code a little.
2017-07-21 12:29:03 +02:00
Mike Brady
d428585715
Add code to read audio_backend_silent_lead_in_time settings.
2017-07-06 19:13:10 +01:00
Mike Brady and GitHub
c13ff31c82
Merge pull request #545 from ccutrer/dynamic_output_device
...
Read `stdout` from the on-start command to choose ALSA output device
Thanks for this. It looks well-implemented, but it also is very special-purpose. When a more general solution comes along that provides this functionality, I hope you won't mind if this code is removed...
2017-06-25 15:01:12 +01:00
Cody Cutrer
3e9e228564
read stdout from the on-start command to choose ALSA output device
...
refs GH-452
2017-06-24 19:46:03 -06:00
Mike Brady
f7077e7097
Some calls to the "die" function need to be preceded by unlocking the alsa mutex.
2017-06-24 18:22:55 +01:00
Mike Brady
b3ae05ea60
Initial very rough full-fat pulseaudio backend
2017-05-17 08:49:40 +01:00
Mike Brady
558a2ec767
Improve the logic of the interplay between the volume and mute controls, so that if muted due to volume levels, will not be unmuted
2017-05-04 16:30:12 +01:00
Mike Brady
721a624c53
Signal presence or absence of hardware volume and mute abilities properly. Fix software-only mute.
2017-05-04 14:06:24 +01:00
Mike Brady
eb1b7c3779
Open and close the hardware mixer when needed -- don't keep it open throughout the play session. This allows it to respond to external volume changes
2017-05-02 12:29:57 +01:00
Mike Brady
a0c8186b4d
Fix silly bug in volume adjust code
2017-05-01 08:35:56 +01:00
Mike Brady
2dea79fa41
Add alsa_use_playback_switch_for_mute to the configuration data structure, so visible for debug summary.
2017-04-30 18:56:56 +01:00
Mike Brady
fc492bea3a
Only set volume if it has been asked for externally. Clean up mute. Add ability do disable hardware mute
2017-04-30 15:29:22 +01:00
Mike Brady
a53b4c5c36
Fix some warnings from clang on FreeBSD. One was significant -- the randarray stuff didn't look right.
2017-04-16 16:52:43 +01:00
Mike Brady
b8700b3f1b
Fully release the hardware device on flush. Simplify flushing. Also improve some debug messages.
2017-04-07 18:31:47 +01:00
Mike Brady
9ebf247610
Don't die if you can't change the volume control -- just report it
2017-04-01 15:20:30 +01:00
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