Commit Graph

6 Commits

Author SHA1 Message Date
Tom Yan
29b6c114f4 libpulseaudio: fix aaudio error callback
The error callback can be called before the transition of the sink
state has completed. It therefore needs to wait until the sink has
left init state before reconfiguring it with pa_sink_suspend calls.

Also try to recover from all errors (and log what the error is when
it is not AAUDIO_ERROR_DISCONNECTED).
2019-04-09 14:22:37 +03:00
Tom Yan
54ebd431e5 libpulseaudio: do nothing to backend when unlinking suspended sink 2019-03-06 22:46:16 +08:00
Tom Yan
88af57a51b libpulseaudio: do not stop if we are going to close aaudio stream
Apparently it's safer if we don't:
https://android.googlesource.com/platform/frameworks/av/+/refs/heads/oreo-release/media/libaaudio/src/client/AudioStreamInternal.cpp#182
2019-03-06 18:12:04 +08:00
Tom Yan
4c089efc4a libpulseaudio: render via process_msg/asyncmsgq 2019-02-26 21:55:24 +01:00
Tom Yan
fd97ae4e21 libpulseaudio: set alternate sample rate in aaudio sink data
The "core" alternate sample rate must not kick in with our sink.
The sample rate of the sink must be locked onto that of the AAudio
stream.
2018-09-16 22:44:20 +02:00
Tom Yan
6b1d24adf0 libpulseaudio: add module-aaudio-sink
Add a sink module that makes use of the AAudio API, which is
available in Oreo or later.

The sink will have its sample rate and latency configured based on
the info we got with the API. They will also be updated accordingly
when the output device is changed.
2018-08-16 14:40:57 +02:00