Commit Graph

283 Commits

Author SHA1 Message Date
ejurgensen
b6dfb48100 [raop] Adjust keep alive interval 30s -> 25s
Testing with Homepod/ATV points at 25s working better, see:
https://github.com/ejurgensen/forked-daapd/issues/734#issuecomment-622959334
2020-05-03 23:15:44 +02:00
ejurgensen
57ff2e3124 [raop] Fix bug where we send start packets during teardown
The teardown send function was setting state to CONNECTED, which made
raop_write() believe that the device had just joined.
2020-05-03 00:00:26 +02:00
ejurgensen
661289990c [player] Migrate a lot of speaker handling to outputs.c
Moves speaker selection, volume handling and startup to outputs.c, plus adds
the ability to "resurrect" a speaker that disconnects.

The purpose of moving the code is to concentrate device handling in one place.

Also changes how we deal with speaker selection. The player will now generally
not alter a user selection, even if the device fails. The purpose of this is to
maintain selection both if the device briefly fails, and if the user switches
off the device (we stop playback) and later turns it on + starts new playback.
2020-05-03 00:00:18 +02:00
ejurgensen
7a9f66538a [raop] Extra comments + logging changes 2020-04-24 18:49:33 +02:00
ejurgensen
07972c28f7 [raop] Only send exact types of metadata requested by device
Airport Express announces md=2, meaning only progress metadata, so we shouldn't
send artwork and text metadata to it.
2020-04-24 18:46:17 +02:00
ejurgensen
e2205e2399 [raop] Fix calculation of metadata progress values 2020-04-24 18:49:03 +02:00
ejurgensen
8070c2f68c [outputs] Change rtp timespec arg to take value instead of pointer 2020-04-24 18:46:17 +02:00
ejurgensen
349b05bd4f [raop] Use progress metadata to keep ATV4/Homepod connection alive (issue #734)
Instead of using OPTIONS we use SET_PARAMETER with progress metadata to avoid
disconnects from Apple TVs, Homepods and possibly also Airport Expresses.
2020-04-24 18:46:17 +02:00
ejurgensen
01033c0662 [cast] Fix incorrect log level 2020-04-22 00:00:09 +02:00
ejurgensen
886557f946 [cast] Better logging of app not launching 2020-04-20 21:40:39 +02:00
ejurgensen
aa9a08aedb [alsa] Improvements to commit 0a08b93 2020-04-18 21:35:47 +02:00
whatdoineed2do/Ray
0a08b93c24 [alsa] list alsa devices/mixers suitable for playback 2020-04-18 11:36:41 +01:00
Justin Wong
938a19ff15 Update volume on device reconnect 2020-04-14 23:49:34 +08:00
Nigel Hannam
5f3103fae7 [raop] Move config into new airplay_shared block 2020-04-11 22:30:27 +01:00
Nigel Hannam
19d1d4f67b [raop] Allow configuration of raop control and timing ports 2020-04-08 21:16:00 +01:00
ejurgensen
b565df1d87 [raop] Add ATV 4k mdns announcement 2020-01-19 13:50:16 -08:00
whatdoineed2do/Ray
609cba5f04 [alsa] multi alsa cfg section SEGV with no nickname - use 'card' when not specified 2020-01-06 15:38:32 +00:00
whatdoineed2do/Ray
7ea8eeae05 [alsa] cfg section typo using 'mixer_device_name' 2020-01-03 19:37:07 +00:00
ejurgensen
4e1e5efedc [alsa] Changes to commit 0cb4e0b: multiple devices 2020-01-03 19:02:39 +01:00
whatdoineed2do/Ray
0cb4e0b862 [outputs/conf] New multiple 'alsa' sections split from 'audio' 2020-01-02 23:51:59 +01:00
ejurgensen
251080344e [alsa] Fix missing unsubscription when closing session (ref. #866) 2019-12-27 11:29:36 +01:00
ejurgensen
85ab7c3057 [alsa] Fix playback of 24 bit audio (issue #830)
The player will write 24 bit samples using 3 bytes, not 4, so the appropriate
sample format is SND_PCM_FORMAT_S24_3LE, not SND_PCM_FORMAT_S24_LE.

For extra protection we also use snd_pcm_bytes_to_frames() instead of BTOS(),
because that way we can be more certain that the buffer is not too short for
snd_pcm_writei().
2019-10-22 19:51:51 +02:00
whatdoineed2do/Ray
554799ebc3 [streaming/xcode] configurable MP3 streaming bitrate 2019-09-22 22:58:32 +02:00
ejurgensen
e654276262 [alsa] Fix incorrect use of abs() for float, use fabs() instead 2019-09-18 21:28:15 +02:00
ejurgensen
78373af201 [cast] Add a simple delay to stream to a have little bit of sync
Since it is unknown how to do real sync on Chromecast, this commit instead adds
a primitive delay to the stream, so that it is at least somewhat closer to
Airplay/local audio.

Also some cleanup of unused stuff.
2019-08-23 19:45:17 +02:00
ejurgensen
f9bfec180f [raop] Fix possible infinite loop + wrong packet resend (fixes issue #775)
Fixes bugs which were due to incorrect handling of unsigned integer wrap-around:

1. Calling packet_resend() with seqnum + len greater than UINT16_MAX => infinite loop
2. Calling rtp_packet_get() with session->seqnum - seqnum greater than pktbuf_next => wrong packet
2019-08-10 22:41:04 +02:00
ejurgensen
6578f28621 [raop] Logging change to find cause of issue #775 2019-08-09 23:58:45 +02:00
ejurgensen
cf173df805 [outputs] Fix issue where RTP packet is not available for retransmit
Check for sequence number did not account for wrap around, so e.g. a
request for seqnum 65335 when first was 65100 and last was 100 would
not work.
2019-07-20 20:37:22 +02:00
ejurgensen
bc8e6794ad [cast] Fix some compiler warnings 2019-07-02 20:42:31 +02:00
ejurgensen
51d85d0975 [alsa] Fix for ALSA issues when source quality changes (issue #722, issue #744 and issue #754)
* Fix "clicks" during playback, especially on low buffer size devices
  Bug had two causes: Trying to write to the prebuf ringbuffer when it was full
  and writing new audio to the device without first having drained the prebuf,
  thus writing out of order.

* Use snd_pcm_drain() so alsa doesn't report underrun on playback session end
  Removes SNDRV_PCM_IOCTL_SYNC_PTR errors

* Fix missing error check of the return value from snd_pcm_avail (now use snd_pcm_avail_delay)
2019-06-22 21:53:09 +02:00
Scott Shambarger
20f5118f75 [alsa] asoundlib.h should be alsa/asoundlib.h 2019-06-11 20:10:04 -07:00
ejurgensen
c8650a0450 [cast] Put back Chromecast exclude option
Was removed by mistake in commit f8b0147
2019-05-16 23:04:33 +02:00
ejurgensen
cd7bf45749
[alsa] Return ALSA the error code from buffer_write, not -1 2019-05-15 11:53:13 +02:00
ejurgensen
c36df4fb8e [raop] Bring back forgotten keep-alive for Apple TV's
The keep-alive was accidently disabled by the player refactor (after v26.5).
2019-05-12 00:11:07 +02:00
ejurgensen
c7b8b94163 [alsa] Set quality in device_open() (possible fix for issue #720) 2019-04-12 22:24:48 +02:00
ejurgensen
ce2be1a724 [-] A bit of cleaning up 2019-04-10 22:38:48 +02:00
ejurgensen
dc65cb5b76 [alsa] Make sync and sync evaluation period configurable 2019-04-09 21:45:16 +02:00
ejurgensen
40934e7162 [cast] Remove/disable some unused code
Leaving some of the MEDIA commands in, even though they are not used any more.
Might come in handy later.
2019-04-09 21:03:14 +02:00
ejurgensen
02cd65a992 [alsa] New resample-based sync correction 2019-04-08 00:50:20 +02:00
ejurgensen
781a3c16ed [cast] Remove use of PAUSE, doesn't work with the mirroring app 2019-04-05 23:06:05 +02:00
ejurgensen
2c778a4da0 [cast] Remove check for appid, the session id check should suffice 2019-04-04 21:20:39 +02:00
ejurgensen
53780a7ef3 [xcode] Make sample rate + channels variable
This change is preparation to use ffmpeg's resampling capabilities to keep local
audio in sync (by up/downsampling slightly). This requires that sample rates are
not fixed for a transcode profile.

Added benefit of this is that we don't need quite as many xcode profiles.
2019-04-02 22:47:11 +02:00
ejurgensen
413ce25ec6 [cast] Fixup print mask 2019-03-28 23:22:49 +01:00
ejurgensen
9773d9b840 [cast] Fallback if new mirroring app not present + metadata (not working) 2019-03-26 23:13:09 +01:00
ejurgensen
6930fdb28d [alsa] Fix memleak: Missing free 2019-03-26 22:08:15 +01:00
ejurgensen
7d0ae01e84 [raop] Fixup forgotten free of pktbuffer 2019-03-22 23:25:34 +01:00
ejurgensen
95deef9c06 A bit of scan-build fixup 2019-03-22 22:15:13 +01:00
ejurgensen
4fb45e84f2 [player/outputs] New metadata handling (wip) 2019-03-18 23:06:08 +01:00
ejurgensen
b8e0280567 [outputs] Add a 10 sec stop timer + drop playback_stop()
In the output implementations playback_stop() was somewhat redundant,
since device_stop() does the same.

The timer should make sure that we always close outputs (previously
they were in some cases kept open).

The commit also includes some renaming.
2019-03-18 23:06:08 +01:00
ejurgensen
01797662de [cast] Fix segfault from cast_master_session not being reset 2019-03-18 23:06:08 +01:00
ejurgensen
f8b0147b12 [cast] First draft of Chromecast based on RTP (instead of mp3)
Includes adaptions to modified outputs interface
2019-03-18 23:06:08 +01:00
ejurgensen
9b6a892984 [rtp] Extra commenting about the RTP header 2019-03-18 23:06:08 +01:00
ejurgensen
d762bd0a56 [raop] master_session_free should allow null as argument 2019-03-18 23:06:08 +01:00
ejurgensen
63a2e750c7 [pulse] Convert Pulseaudio to new interface, incl support for native quality
First draft, probably has a few bugs
2019-03-18 23:06:08 +01:00
ejurgensen
50c7d96bc4 [raop] Remove flush timer, the player now takes care of stopping
Player now stops 10 secs after stop command and 10 mins after pause. At
that time the outputs have probably cut the connection themselves, but
that might be ok (needs testing).
2019-03-18 23:06:08 +01:00
ejurgensen
fc20b55a9b [raop] Log sync packet times 2019-03-18 23:06:08 +01:00
ejurgensen
143708368c [alsa] Fix sync check
Sync correction still not implemented
2019-03-18 23:06:08 +01:00
ejurgensen
cfaceab9fe [outputs] Misc fixup 2019-03-18 23:06:08 +01:00
ejurgensen
9d5555152c [alsa] Implement new output interface + some refactoring
Sync still missing
2019-03-18 23:06:08 +01:00
ejurgensen
b811122566 [outputs] Rename output_buffer.frame to .data 2019-03-18 23:06:08 +01:00
ejurgensen
d008e241cf [outputs] Make outputs_device_flush (per device flushing)
Works better with the callback mechanism
2019-03-18 23:06:08 +01:00
ejurgensen
87ca6363ae [player/input] Refactor - WIP
* Open input sources earlier
* Gapless playback
* Remove fixed 44100/16 from player
* Complete restructure player internals
2019-03-18 23:06:08 +01:00
ejurgensen
936103f462 [outputs] Move device_add/rm to outputs and get rid of advertised flag 2019-03-18 23:06:08 +01:00
ejurgensen
a7e8476996 [outputs] Refactor outputs some more, eg change callback system 2019-03-18 23:06:08 +01:00
ejurgensen
e99f20992e [player/outputs] Implement changed output interfaces in most backends
Still missing cast, alsa and pulseaudio, but these can so far just be
disabled with configure.

Otherwise still mostly untested.
2019-03-18 23:06:08 +01:00
ejurgensen
0cb3881621 [player/outputs/raop] Get rid of outputs_playback_start() (still WIP)
outputs_playback_start() had the problem that was not consistently invoked: If
for instance local audio playback was running and a Airplay device was then
activated, the raop's playback_start would never be invoked (and vice versa,
of course).

Instead, the player now writes the presentation timestamp every time to the
output, so it doesn't need to keep track of it from the start.
2019-03-18 23:06:08 +01:00
ejurgensen
a924a8dd66 [raop] Reorganise code a little 2019-03-18 23:06:08 +01:00
ejurgensen
fcc91ecd86 [player/outputs] Handle multiple quality levels + use rtp_common (WIP!)
* Untie Airtunes stuff further from player and non-Airplay outputs
* Change raop.c to use rtp_common.c (step 1)
* Change heartbeat of player to 100 ticks/sec, since we have untied from
  Airtunes 352 samples per packet (which equals 126 ticks/sec at 44100)

Still a lot to be done in the player, since the rtptime's in it don't
are probably broken.
2019-03-18 23:06:08 +01:00
ejurgensen
7e48887adc [rtp] Add RTP utility module: rtp_common.c rtp_common.h
Expectation is to use this for both Airplay and Chromecast RTP streaming
2019-03-18 23:06:08 +01:00
ejurgensen
741825d086 [cast] Add option to exclude speakers (closes #659) 2019-01-09 20:26:31 +01:00
chme
788cb6f133 [pipe/raop] Check for NULL to avoid scan-build issues (in case of oom) 2018-12-29 16:34:56 +01:00
ejurgensen
a37fc0916f [alsa] Fix scan-build issue: Argument with 'nonnull' attribute passed null 2018-12-29 16:34:56 +01:00
ejurgensen
bb1347f2c0 Revert "[raop] Listen for _airplay._tcp and make it a condition for device removal (issue #496)"
This reverts commit 1e051407d5.
2018-12-01 10:03:22 +01:00
ejurgensen
357d346fce
Merge pull request #628 from chme/artwork
[jsonapi] Artwork url for non library items and streams
2018-11-30 10:12:41 +01:00
chme
534bbdb477 [artwork] Introduce constant for default artwork width/height 2018-11-28 20:28:38 +01:00
ejurgensen
1e051407d5 [raop] Listen for _airplay._tcp and make it a condition for device removal (issue #496) 2018-11-26 20:24:28 +01:00
ejurgensen
18acb73fdb [raop] Add option to make an Airplay speaker permanent in the speaker list (issue #496) 2018-11-26 20:24:28 +01:00
ejurgensen
df7456dc39 [mdns] Make connection test optional and only do it for Airplay (fixes #602)
Some remotes don't respond as expected to the test. Retune will give connection
refused, because the test is made too quickly, before the service is running.

Even if we delay the test it won't work because Retune crashes.

Since the false mdns advertisements are only seen on Airplay, we only do the
test there.
2018-10-14 22:13:58 +02:00
Don Cross
07e46d75c8 [alsa] Made resync period configurable 1..20 seconds, with default=10. (#604)
The unconfigurable resync period of 10 seconds was not frequent
enough to keep my own ALSA device in sync with the AirPlay stream.
Now the period is configurable.  The default is still at 10
seconds, to prevent any change in behavior unless opted in by
the user.

Currently the adjustment causes a tiny "click" distortion in the
ALSA output, so it is better to make the check as infrequent as
possible, while still being frequent enough to stay in sync
over lengthy sessions of playback.

Added source_sample_rate, target_sample_rate to alsa_session.
This is a first step toward rendering ALSA at a different
sampling rate than the AirPlay stream, so that (a) we will
be able to dynamically adjust the ALSA sampling rate for an
improved sync algorithm, and (b) later, a more generalized
resampling algorithm can accommodate very different hardware
sampling rates like 22050 Hz or 48000 Hz.

Reworked alsa_session_free() so that it can be used to
tear down a partially initialized alsa_session if an
error occurs in the middle of alsa_session_make().
This simplifies the error handling logic in alsa_session_make().
This refactoring will be helpful later when resampling is added,
because more data structures will be dynamically allocated
during initialization.

Signed-off-by: Don Cross <cosinekitty@gmail.com>
2018-10-14 20:40:36 +02:00
ejurgensen
830d8594aa [raop] Use et=4 to determine support for auth_setup (issue #557) 2018-10-09 21:35:15 +02:00
ejurgensen
aa3aa383ef [raop] If ipv6 fails, fall back to ipv4 and disable ipv6 permanently for the device 2018-09-19 23:03:33 +02:00
ejurgensen
97233d4753 [raop] Put ipv6 IP literals in brackets as per rfc3986 2018-09-16 22:19:27 +02:00
ejurgensen
a29772e8be [raop] Fix AirPlay 2 issue #557, fix for stream metadata, better logging
AirPlay 2 devices like Sonos One and AirPort Express with firmware 7.8
require auth-setup before ANNOUNCE, otherwise they will return 403.

Also fixed a problem where metadata did not get sent when toggling
a speaker on/off if we were playing an endless stream.
2018-09-02 20:22:38 +02:00
ejurgensen
ab1ded35e4 [config] Make user_agent configurable + don't use ffmpeg default (ref issue #562) 2018-08-12 19:49:23 +02:00
ejurgensen
b6e1269cf2 [raop/dacp/player] Support for Airplay speakers to register volume updates
Implements Active-Remote, which is sent to the speaker, so it can use this
to tell us who it is when it makes dacp request with a device-volume update.
2018-05-27 16:12:20 +02:00
ejurgensen
646bf37f17 [dacp] Add support for play + stop commands
These commands are not used by Remote, but some Airplay speakers are
able to make them (e.g. my Sony STR-DN1040).

Also prepare being able to set the device volume property.
2018-05-14 23:09:04 +02:00
ejurgensen
83b6bcebcd [raop] Use OPTIONS for keep_alive instead of GET_PARAMETER
Old Airport Express hangs up if we use GET_PARAMETER (despite announcing support
for it...), and since iTunes seems to use OPTIONS we also do that. We weren't
really using the return value of GET_PARAMETER anyway.

See also comment added to commit d9a67b6dce
2018-05-10 21:46:24 +02:00
ejurgensen
acd5bd3272 [raop] Always try to get volumes from devices at keep_alive intervals
Should be ok, even if the device does not support GET_PARAMETER for
volume, no harm done, we will just stop querying.
2018-04-14 22:19:53 +02:00
ejurgensen
d9a67b6dce [raop] Use GET_PARAMETER of volume to keep connection alive and get speaker volume 2018-04-11 22:29:07 +02:00
ejurgensen
666af127d5 [raop] Fix gcrypt error handling in raop_verification.c
And I learnt that gcrypt doesn't follow the negative-on-error pattern
2018-02-22 22:36:50 +01:00
ejurgensen
10233dcad3 [chromecast] Check for null address from getifaddrs() (credit @yantoz, issue #455) 2017-12-10 19:50:57 +01:00
chme
1689182432 [player/raop] Trigger the SPEAKER event if device verification
succeeded/failed
2017-12-03 10:46:03 +01:00
ejurgensen
5315bdf83e [raop] Make sure to set requires_auth if we get RTSP_FORBIDDEN 2017-11-19 20:11:42 +01:00
Wolfgang Scherer
540d771648 [pulseaudio] allow specification of pulseaudio server 2017-11-05 19:33:14 +01:00
ejurgensen
0c2773039b [-] Fix alsa.c null pointer deref + some minor bugs and do some housekeeping
Thanks to Denis Denisov and cppcheck for notifying about the below. The leaks
are edge cases, but the warning of dereference of avail in alsa.c points at
a bug that could probably cause actual crashes.

[src/evrtsp/rtsp.c:1352]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/httpd_daap.c:228]: (error) Memory leak: s
[src/library.c:280]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/library.c:284]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/library/filescanner_playlist.c:251]: (error) Resource leak: fp
[src/library/filescanner_playlist.c:273]: (error) Resource leak: fp
[src/outputs/alsa.c:143]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/alsa.c:657]: (warning) Possible null pointer dereference: avail
[src/outputs/dummy.c:75]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/fifo.c:245]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/raop.c:1806]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/raop.c:1371]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/outputs/raop.c:1471]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/outputs/raop_verification.c:705] -> [src/outputs/raop_verification.c:667]: (warning) Either the condition 'if(len_M)' is redundant or there is possible null pointer dereference: len_M.
2017-10-05 22:13:01 +02:00
ejurgensen
1c377035f1 [raop] Restore ATV4/tvOS11 support by removing needless requirement for timing_port (closes #422) 2017-09-26 21:41:53 +02:00
ejurgensen
394dee2a86 [raop] Log src and dst ip addresses (checking for ipv6, not sure it is allowed) 2017-08-06 22:31:43 +02:00
ejurgensen
3f2ad41094 [alsa] Fix missing cleanup of failed ALSA sessions 2017-07-14 23:20:53 +02:00
chme
e136c726c1 [raop] Add device name to log message for retransmit requests 2017-07-09 11:44:05 +02:00
ejurgensen
a23bb0b7e2 [raop] Clear auth_key for device verification if verify request to device is denied
- should make it easier for user to setup a new pin
2017-07-01 08:33:11 +02:00
ejurgensen
c2b1706855 [raop] Send correct volume as keep-alive for ATV's (fix for #368) 2017-06-26 20:11:31 +02:00
ejurgensen
f4e171db75 [raop] Save verification key to db immediately after verification 2017-06-24 23:59:02 +02:00
ejurgensen
01308f7f83 Misc fixup to keep scan-build happy 2017-06-20 22:07:49 +02:00
ejurgensen
20128e2235 [raop] Raise log level of verification setup complete message 2017-06-20 21:36:21 +02:00
ejurgensen
9369e97753 [raop] Lower log level of verification success slightly 2017-06-20 21:17:17 +02:00
ejurgensen
7626b6c535 [raop] Fix bad enum 2017-06-20 20:00:05 +02:00
ejurgensen
f63d103753 [raop] Add support for Apple TV device verification, required by tvOS 10.2 (fix for issue #377)
- also change how speakers are saved/retrieved from the db
- add generic authorization methods in outputs.c and player.c
- let filescanner read *.verification files (containing PIN)
- configure options to enable and disable, since libsodium is required
2017-06-19 21:52:01 +02:00
ejurgensen
f465f6a77d [raop] Fix possible incorrect address family in SDP 2017-05-04 19:31:26 +02:00
ejurgensen
fce68ebd1a [raop] Add option to exclude particular devices from speaker list 2017-03-15 23:24:24 +01:00
chme
82e216c931 Add missing FALLTHROUGH comments to switch-case statements
This allows to suppress code analysis warnings in IDEs for missing break
statements.
2017-02-26 11:04:04 +01:00
ejurgensen
26c22144fc [-] Misc housekeeping (minor memleaks, invalid free's) 2017-02-12 01:19:56 +01:00
ejurgensen
13e6889990 [cast] Use friendly device name from mdns announcement 2017-02-10 19:27:52 +01:00
ejurgensen
c50b038397 [misc] Move STOB and BTOS macros to misc.h 2017-01-27 22:01:24 +01:00
ejurgensen
084de7811e [raop] Fix missing uint64 cast, which since commit fdd85cc was giving too short song lengths 2017-01-23 23:41:10 +01:00
Scott Shambarger
bb68d59a6e [osx] Added missing timer/clock functions, support Bonjour mDNS on OSX
Added configure checks needed to detect missing functions on OSX
Added compat clock functions using clock_get_time on OSX
Added compat timer functions using clock_gettime and setitimer on OSX
Added byteswap functions on OSX
2017-01-14 00:56:43 -05:00
Scott Shambarger
ce4ef0aa23 [config] Many updates to configuration and feature checks
- Added custom checks for libraries and pkgconfig modules that test library
 presence with additional checks for use of headers and functions with
 given options.  Also support correct additional feature library checks
 using provided flags.
- Added custom enable/disable feature macros to simplify their use.
- Use custom CFLAGS and LIBS variables for Makefiles to simplify maintenance.
- Update many feature checks from platform to function.
- Streamline many function checks.
- Correctly check gnutls, gcrypt and gpg-error libraries.
- Fix chromecast and spotify config and compile on FreeBSD
- Added inotify, signalfd and kqueue, and byte swap checks.
- Many clarifications of error messages.
- Correct json-c checks to properly use supplied CFLAGS.
- Correct many quoting inconsistencies
- Use __DATE__ in place of BUILDDATE
- Use full path for gperf and antlr3
- Remove unnecessary CFLAGS
- Added tests for pthread_setname_np parameters
- Added tests for clock_gettime and timer_settime
- Added tests for time.h
- Test if pthread, dl and rt libs are required/available.
- Updated checks for libunistring
2017-01-06 00:44:18 -08:00
chme
fdd85ccf66 [raop/dmap] Build raop metadata from queue item 2016-12-03 20:40:54 +01:00
chme
27b9ee16c9 [fifo] Try to keep in sync with airplay speakers 2016-11-20 06:55:55 +01:00
chme
fcbd88c56c [fifo] Fix: flush must return the number of pending events 2016-11-20 06:55:55 +01:00
ejurgensen
bdd6bab982 [-] Lots of housekeeping thanks to scan-build and input from @acmay 2016-11-19 23:08:50 +01:00
chme
65732ccaf6 [outputs] New output type 'fifo' 2016-10-31 18:47:45 +01:00
ejurgensen
0c6af89807 [raop] Just remove ipv6 address if we can't connect with the one avahi gave us 2016-10-15 19:14:01 +02:00
ejurgensen
03513c56a8 [mdns] Simplify avahi implementation, e.g. drop record browser
- record browser and link level filtering doesn't seem required (I may regret this...)
- fix cast.c so it does not browse for ipv6 when disabled
2016-10-15 19:12:56 +02:00
ejurgensen
94e133e8dc [raop] Temporary fix for issue #293 2016-10-09 00:42:48 +02:00
ejurgensen
9a997551a2 [pulseaudio] Remove PA_STREAM_ADJUST_LATENCY - seems we then get a better match with the requested value 2016-10-08 21:40:49 +02:00
ejurgensen
9bd2ef4f42 [pulseaudio] Misc improvements
- Set volume on stream startup
- Change cleanup on server exit
- README update
2016-10-07 22:35:04 +02:00
ejurgensen
8b842b18d5 [pulseaudio] Add start/stop, config latency, avoid underruns when pausing and misc 2016-10-06 23:35:09 +02:00
ejurgensen
a0dfb5c93e [pulseaudio] Under/overrun detection + request 2 sec latency 2016-10-05 21:13:26 +02:00
ejurgensen
bc8c77c0d1 [pulseaudio] Go full async + some cleaning up 2016-10-05 08:53:14 +02:00
ejurgensen
8f6033e787 [pulseaudio] More logging 2016-10-02 18:48:00 +02:00
ejurgensen
07efdfe24e [pulseaudio] Drop autostarting again, won't work when running as non-root 2016-09-28 21:17:34 +02:00
ejurgensen
44ad4a8848 Merge branch 'autopulse' 2016-09-26 21:32:27 +02:00
ejurgensen
ac9900ff1a [pulseaudio] Modification of f202b5d: Now always try to start Pulseaudio 2016-09-26 20:48:00 +02:00
Pat Coulthard
ae79800493 Add mixer_device configuration file option for ALSA
Support a separate mixer_device configuration file option for
advanced ALSA configurations. Previously, ALSA local output
happened to work becasue "default" is valid as both a PCM and a
mixer. Now you can separately specify the device name for PCM
output and mixer operations.

In my setup, I am using the following setup:
card = "default:CARD=NVidia"
mixer = "Front"
mixer_device = "hw:CARD=NVidia"
2016-09-25 15:52:15 -05:00
ejurgensen
f202b5d2e9 [pulseaudio] Try to spawn Pulseaudio if it doesn't by itself
Requiring the user to set up Pulseaudio in system mode is not optimal. This
would, however, be required especially on headless systems. This is the
sledgehammer alternative to starting Pulseaudio.
2016-09-20 22:17:29 +02:00
ejurgensen
7f0d34d4e1 [pulseaudio] Remove temp log messages 2016-08-29 21:56:05 +02:00
ejurgensen
7af9c25964 Merge branch 'pulseaudio1' 2016-08-28 22:37:41 +02:00
ejurgensen
1d862dd701 [pulseaudio] Extra state check when changing volume 2016-08-28 22:33:58 +02:00
ejurgensen
fa6c6a1832 [pulseaudio] Kill sessions if context becomes invalid 2016-08-25 22:31:25 +02:00
ejurgensen
84a5772439 [Pulseaudio] Implement flush, avoid adding known sinks and misc fixing up 2016-08-24 23:06:25 +02:00
ejurgensen
9b243f855a [pulseaudio] Support for setting volume 2016-08-24 21:23:33 +02:00
ejurgensen
998ae31a56 [cast] Fixup switched format strings 2016-08-22 21:22:47 +02:00
ejurgensen
202d9b951e [cast] Use proper print formats for size_t 2016-08-22 21:18:24 +02:00
ejurgensen
da8fa6a686 [cast] Just run empty callback on last request to time out. Running more is unsafe since the first is likely to free the session. 2016-08-13 23:33:06 +02:00
ejurgensen
61457f2a09 [cast] Change how we read from TLS and fix bug due to masking of negative enum, ref issue #270 and #275
(should have been two commits...)
2016-08-13 23:31:41 +02:00
ejurgensen
8a9d8c31da [alsa] Remove risky negative enum (risky when AND'ing with ALSA_F_STARTED) 2016-08-13 17:08:14 +02:00
ejurgensen
cbc3323111 [cast] Try to fix issue #270 by making a GET_STATUS if the normal reply to a LAUNCH does not arrive 2016-08-01 09:05:09 +02:00
ejurgensen
306dd47f1e [cast] Fix for issue #275 where gnutls returns the 4 byte prefix of
a Chromecast response together with the response message itself
2016-08-01 00:12:08 +02:00
ejurgensen
187ed6c1f7 [cast] Log raw replies when in DEBUG_CONNECTION mode 2016-07-31 23:36:27 +02:00
ejurgensen
db6823d676 [pulseaudio] Support for adding/removing sinks 2016-07-30 00:05:32 +02:00