Commit graph

4619 commits

Author SHA1 Message Date
Wim Taymans 9d694b7b38 stream: tweak the timings and buffer attributes
Use tlength as the latency.
Round attributes to frame size
Only use the delay in get_time().
Tweak queued, writable and required bytes for callbacks.
2020-09-24 17:57:10 +02:00
Wim Taymans abf268d168 stream: tweak the timings and buffer attributes
Use tlength as the latency.
Round attributes to frame size
Only use the delay in get_time().
Tweak queued, writable and required bytes for callbacks.
2020-09-24 17:28:30 +02:00
Wim Taymans 584ae678c6 audioadapter: improve the processing loop
Handle the case where the converter in a source needs more output
buffers (-EPIPE). Schedule the follower in that case and try to
run the converter again until we have output or we can't make progress
anymore.

If the converter needs more data, schedule the follower before we
exit the loop with the data. This gives the follower a chance to get
more data asynchronously for the next iteration.
2020-09-24 17:18:47 +02:00
Wim Taymans 9dc1c3b168 stream: improve the input process loop
Only try to reuse a buffer when the io area is not already in
the NEED_DATA state or else we might overwrite a previous buffer
reuse and run out of buffers.
We also always need more input.
2020-09-24 17:15:47 +02:00
Wim Taymans 1cccaaa2bd merger: we always consume all input
Even when we only have empty input buffers
2020-09-24 16:57:15 +02:00
Wim Taymans 6bc3b1b764 audioconvert: fix Buffers param debug 2020-09-24 11:53:10 +02:00
Wim Taymans c6358c4ed5 alsa: add and install spa-acp-tool 2020-09-23 11:37:53 +02:00
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