Commit graph

4500 commits

Author SHA1 Message Date
Wim Taymans c4aec3ef4e doc: fix typo 2020-09-19 13:34:33 +02:00
Wim Taymans 7a2741c9e1 v4l2: do TRY_FMT on the filter format
Do a TRY_FMT on the filter format before enumerating the sizes with it
because some drivers don't check the format anymore.

Fixes #294
2020-09-19 13:32:47 +02:00
Arun Raghavan 2c8e2f3a36 reserve: Fix check for whether acquire succeeded or not
We only deem success if we successfully became the primary name owner.
2020-09-19 11:02:04 +00:00
Arun Raghavan 272624fe83 alsa-monitor: Don't ignore device reservation failure
We were ignoring the reservation status, which is incorrect as we might
not have succeeded in grabbing the device.
2020-09-19 11:02:04 +00:00
Arun Raghavan 2acfa0ee10 alsa-monitor: Lower our device reservation priority
For now, let's lower our priority in device reservation below that of
PulseAudio (which currently uses a priority of 0), so that it takes
priority while contending for the same device.
2020-09-19 11:02:04 +00:00
Richard 4be4a0b250 Update overview.md 2020-09-19 10:56:51 +00:00
Wim Taymans 99b3f4a67f README: fix some errors 2020-09-18 20:53:06 +02:00
Wim Taymans 7a50026a2c pulse: clear queued bytes on flush 2020-09-18 20:44:21 +02:00
Wim Taymans 7c5192bc31 stream: use more accurate queued bytes and maxsize
Make lower latency streams work better.
2020-09-18 17:59:01 +02:00
Wim Taymans f777da9feb stream: copy the position before doing the callback
So that the callback can look at the updated queued bytes
2020-09-18 17:55:31 +02:00
Wim Taymans fc0354ae1d 0.3.12 2020-09-18 12:02:08 +02:00
Wim Taymans 1e6615f79d pulse: use the EnumFormat param to set reasonable defaults
Before the node is started, we don't get a Format parameters and we
don't know the channelmap of the node. This forces us to invent a
channelmap that might be wrong. We can do better by using the
EnumFormat param to extract some defaults for the format, rate and
channelmap. Fixes wrong channels in gnome-control-center when testing
speakers.
2020-09-18 11:06:06 +02:00
Wim Taymans 644a35a559 pulse: fallback when default sink/source not set
When we ask for the default sink/source and it is not set,
take the highest priority sink/source as the default.
2020-09-17 20:12:25 +02:00
Wim Taymans a01cf5eeda pulse: add missing format 2020-09-17 20:10:57 +02:00
Wim Taymans 023281fd0b pulse: parse and fill up the array of formats
A sink and source can have an array of pa_format_info structures
that contain the possible formats of the device. Parse them from
the EnumFormat and return them when introspecting.
2020-09-17 16:34:18 +02:00
Wim Taymans 8406ad8a4e pulse: small cleanup 2020-09-17 16:33:38 +02:00
Wim Taymans 1f9b0c75b7 pulse: always use the default pulse channel map
This causes the least surprises when the channelmap is not
propagated correctly from pipewire.
2020-09-17 12:37:57 +02:00
Wim Taymans 8ee07c3c66 policy-node: always boost default node priority
Make sure the default node as the highest priority.
Fixes a problem with default nodes not being selected when their
priority happens to be too low (bluetooth devices)
2020-09-17 12:35:33 +02:00
Wim Taymans 688041b083 pulse: fix drain
The drain operation does not complete with a sync from the server but
with an event from the stream. Set a flag in the operation that it
completes with a sync. Keep all operations without a sync around in
the list.
2020-09-17 11:48:21 +02:00
Wim Taymans a9c0435317 loop: don't recursively flush
If we are already in the loop thread and flushing, this means we
added a new invoke item on the list from a callback. Place the
item on the queue and let the flush code take care of it after the
callback completes.

Required to fix some issues with draining in pulse where a stream
is destroyed from the drained callback which then invokes a pause.
2020-09-17 11:46:55 +02:00
Wim Taymans e9fd38512e node: improve debug 2020-09-17 10:34:42 +02:00
Wim Taymans 8b168935ee a2dp-sink: don't overwrite duration in clock
We should not modify the duration field in the clock, it is set by
the host and contains the desired quantum.

See #297
2020-09-17 10:31:35 +02:00
Wim Taymans aea9d4fdfe a2dp: remove unused threshold field 2020-09-17 10:31:08 +02:00
Frédéric Danis 7c84b1251d bluez5: backend-hsphfpd: Fix transport release on disconnection
Release transport when endpoint connection property is updated to false.
This also checks if the transport is already created when receiving
endpoint properties update to prevent multiple transport creation.
2020-09-16 16:20:54 +00:00
Wim Taymans 51b6c2cbd7 context: handle the fallback node correctly
A passive node can still be the fallback node. It becomes non-passive
if there is a node assigned to it.
This makes the Dummy node work again in the case of jack clients
that always need to be scheduled.
2020-09-16 18:11:16 +02:00
Wim Taymans 1bf6dead10 alsa: add option to force a samplerate 2020-09-16 15:14:26 +02:00
Wim Taymans e5f7e040dc loop: simplify before and after events
Because the signal can't be removed from the callback we can
simply iterate backwards and then forwards.

The first added hook (the unlock/lock pair) is called last before
going into the poll and first when leaving. This executes all other
callbacks inside a locked situation. And removing them with the lock
is not going to cause problems.
2020-09-16 13:31:47 +02:00
Wim Taymans 854d019343 pipewire: improve get_prgname() 2020-09-16 12:19:33 +02:00
Wim Taymans 581d4521fd pulse: clean up build file 2020-09-16 12:19:13 +02:00
Wim Taymans 6e77791c8e node: Use the work queue to cancel old operations
Keep track of the last state change and cancel the previous one
if it's still busy.
2020-09-16 10:36:47 +02:00
Wim Taymans af1cf3d87a work-queue: avoid invalid sequence numbers 2020-09-16 10:36:09 +02:00
Wim Taymans 5821f84c4b work-queue: improve debug 2020-09-16 10:21:45 +02:00
Wim Taymans e0ce311bc0 impl-node: only complete the last pending state
If we get a complete reply from an old state change, ignore it.
2020-09-15 20:33:30 +02:00
Wim Taymans 23e7a54340 pulse: destroy context immediately
The mainloop might not run anymore to actually destroy the context.
2020-09-15 20:31:09 +02:00
Wim Taymans 05ae8a24de loop: make safe version of befor and after signal
Use a safer version of the before and after hooks. First call
all before hooks and save them in reverse order in a save list.
Then call the after event for the ones remaining in the save list
and move them back to the hook list.

This makes it possible to remove the hooks from one the callbacks or
even from other threads with the right locks. Found as a solution to
the following problem as observed in vlc:

main thread                            thread_loop

pw_thread_loop_lock()            before hook: lock suspend thread
pw_context_destroy()
  - removes before hook to flush clients
pw_thread_loop_unlock()
                                 before hook: lock acquired, resume
				 before hook: flush client hook executed
				   *crash*

pw_thread_loop_stop()
pw_thread_loop_destroy()

Any of the safer cursor methods (like spa_hook_list_call()) would also
work but are more expensive and don't reverse the before/after
order.
2020-09-15 20:13:32 +02:00
Wim Taymans b5517cc2fe thread-loop: add some more debug 2020-09-15 18:01:51 +02:00
Wim Taymans eaa08e209f protocol-native: remove mainloop hook only once 2020-09-15 18:00:08 +02:00
Wim Taymans 175cd43226 context: don't leak ports 2020-09-15 15:45:04 +02:00
Wim Taymans a599e91c68 context: don't leak port info proplist 2020-09-15 14:04:57 +02:00
Wim Taymans 1a2e783a6f protocol-native: keep client around while processing
When we process the messages of a client, keep the client around
because some callback might have disconnected and tried to free
us.
2020-09-15 13:54:50 +02:00
Wim Taymans 8332d3e3ed alsa: don't change the resampler delay value
Don't change the resampler delay value, we need it to make sure
we keep samples around for the next round. With small period sizes,
we set the delay to 0 and mess up the resampler and cause dropouts
and clicking.

Fixes #287
2020-09-15 13:22:41 +02:00
Wim Taymans f29bf9cb40 resample: reset resample state when starting
Update the initial delay and size in the rate_match io area when
starting.
2020-09-15 13:22:41 +02:00
Wim Taymans c10feda5ce merger: follow the position duration if we can 2020-09-15 13:22:41 +02:00
Wim Taymans 8825a21e86 fmtconvert: improve channel debug names 2020-09-15 13:22:41 +02:00
Wim Taymans e142e40cfe stream: set latency variable correctly 2020-09-15 13:22:41 +02:00
Wim Taymans f07aa6a9fd node: only warn for slow clients
Just use debug level for other clients and warning for the ones
that are still busy.
2020-09-15 08:19:23 +02:00
Wim Taymans 2b0b44edc0 alsa: add option do use chmap from alsa, disable by default
This should be more in line with what PulseAudio does and so lead
to less surprises.

See #289
2020-09-14 20:19:44 +02:00
Wim Taymans 30dfe16c52 media-session: destroy errored links
When a link we create is in error, destroy it.
2020-09-14 20:19:44 +02:00
Simon McVittie 8dcf76f661 audioconvert tests: Default to using an installed libspa-support
This makes installed-tests (see commit b852b58f) do the right thing.
For build-time testing, spa/plugins/audioconvert/meson.build overrides
this with the SPA_PLUGIN_DIR environment variable, and for ad-hoc
testing by developers, pw-uninstalled.sh sets the necessary variables.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-09-14 18:16:49 +00:00
Siwon Kang f7b22b934c doc: fix typos
Signed-off-by: Siwon Kang <siwon.kang@daimler.com>
2020-09-14 20:00:59 +02:00