Commit graph

4512 commits

Author SHA1 Message Date
Wim Taymans
28f60eaf6f spa: install the spa-resample tool 2020-09-23 11:37:16 +02:00
Wim Taymans
61523d383a tools: add pw-reserve to reverse and monitor a device 2020-09-23 10:24:06 +02:00
Wim Taymans
f4bf7bc7e6 media-session: don't emit busy when we are acquiring 2020-09-23 10:22:22 +02:00
Wim Taymans
136f556d79 jack: lock for accessing the globals 2020-09-22 13:10:58 +02:00
Wim Taymans
3f844f7b09 media-session: make the same node name as PulseAudio
Fixes #299
2020-09-22 12:59:13 +02:00
Wim Taymans
66cc13cc56 acp: update properties correctly
After modifying the properties, update the exported dictionary again
because the memory might have changed.

Fixes #304
2020-09-22 12:40:21 +02:00
Wim Taymans
a4e079e1cb media-session: guard against invalid input
See #304
2020-09-22 12:39:39 +02:00
Wim Taymans
cf2c32f0a9 alsa: rework device reservation
Always try to first reserve the device name and then start the probing
so that we can be sure that the device is not in use.
2020-09-21 15:23:36 +02:00
Wim Taymans
2b8568e14f reserve: don't call busy/available when we are the owner
Also ignore acquired from our other devices.
2020-09-21 14:35:32 +02:00
Wim Taymans
cc470c048b reserve: improve debug 2020-09-21 14:35:08 +02:00
Wim Taymans
392eff4628 audioconvert: debug stride as well 2020-09-21 11:21:15 +02:00
Wim Taymans
995cf66f92 pulse: don't go lower than 8 samples per minreq 2020-09-21 11:21:15 +02:00
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