Commit graph

5393 commits

Author SHA1 Message Date
Wim Taymans
26d5fe373e bluez5: fix mute
Actually remember the mute state and use this when reporting our
state.

See #559
2021-01-25 15:21:23 +01:00
Wim Taymans
39f082fc86 default-profile: don't try to restore bluetooth profiles 2021-01-25 13:17:22 +01:00
Wim Taymans
b3f728b1a0 bluez5: set device.bus to bluetooth 2021-01-25 13:07:31 +01:00
Wim Taymans
3366eeb65e media-session: restore route volumes
Follow the active input/output routes. If the route changes, restore
the previously saved settings. If only the properties change, save
them to be restored later.

Fixes #402
2021-01-25 12:11:16 +01:00
Wim Taymans
ebf324590b pod: handle various ways of making empty array/choice
Make it possible to make empty array/choice
Handle empty array/choice
Add some tests to make empty arrays/choice objects
2021-01-25 10:55:30 +01:00
Wim Taymans
c913abffef pulse-server: Fix underrun check
We're underrun when we can't produce the required number of samples.

See #617
2021-01-24 20:33:30 +01:00
Wim Taymans
96d98c7955 pulse-server: express latency in samples in all cases 2021-01-24 20:33:30 +01:00
jasker5183
b44cb0a897 Add bluetooth issue.md 2021-01-23 12:49:06 +00:00
Pauli Virtanen
59452a0904 pulse-server: send server change events when default nodes change
Send server change events to subscribers, when default nodes change due
to some nodes being added/removed/changed, also if there is no metadata
change.  Make sure the event is consistent with the result from
find_device at the time.

Previously, these were not necessarily sent, or information from
find_device immediately after the event might not reflect the change
yet.
2021-01-23 07:17:19 +01:00
Sami Farin
906a1f5448 Make getrandom() failure fatal 2021-01-23 07:15:55 +01:00
Pauli Virtanen
8b4fbac187 sco-sink: msbc timeout should follow processed samples
Remove wrong adjustment to the write timeout with mSBC.

The time between writes should be the 7.5ms at which we encode, which is
correct even when the frames get fragmented to incommensurate tx packets
(on USB BT adapters).

Fixes sound on RTL8176B. This adapter has large reported write_mtu, so
the wrong delay affected it.
2021-01-22 23:11:17 +02:00
Wim Taymans
14dcfb8a28 pulse-server: find the target device in play_sample
Use the regular logic to find the target device for play sample so
that it supports @DEFAULT_SINK@ etc.

See #612
2021-01-22 19:53:46 +01:00
Wim Taymans
1eb9d73814 bluez5: skip routes without a profile 2021-01-22 17:35:27 +01:00
Wim Taymans
2b98b7dc7a pw-dump: print None pod as null 2021-01-22 17:23:33 +01:00
Wim Taymans
8f5231bd45 impl-core: handle getrandom errors
Handle getrandom errors and fall back to rand() if all fails.

See #583
2021-01-22 16:38:34 +01:00
Frédéric Danis
f464d8c596 bluez5: Fix NULL dereference in backend-native
Fixes: #602
2021-01-22 15:28:21 +00:00
jasker5183
2521e6db1b Add msbc expectations 2021-01-22 15:16:37 +00:00
Wim Taymans
9a6888486f impl-core: use getrandom for cookie
Fixes #583
2021-01-22 15:47:12 +01:00
jasker5183
0dad70eb48 Add buffer.md to fix link in tutorial4.md 2021-01-22 14:07:59 +01:00
Oschowa
f767521baf spa: fix test-buffer
there is a new meta type since b39a2258
2021-01-22 13:51:08 +01:00
Wim Taymans
c866d5c1f4 Increase memlock limits in systemd service files 2021-01-22 13:18:48 +01:00
Wim Taymans
652a4ae26d pulse-server: use stream flags to tune latency
Use the early_requests and adjust_latency flags to choose the right
latency values, just like what pulseaudio does.
2021-01-22 11:39:47 +01:00
Wim Taymans
61dab51425 stream: use busy metadata
When we get a buffer from the server, mark it busy, when we queue it
again, mark it unbusy.
Refuse to dequeue a buffer when it is busy.
2021-01-21 17:46:47 +01:00
Wim Taymans
b39a2258c4 meta: add busy metadata
Metadata on buffers to mark when a buffer is in use. Writers
should only use buffers with a count of 0.
2021-01-21 17:46:47 +01:00
Wim Taymans
07b52299db pw-top: make a line shorter so that it fits better 2021-01-21 17:46:47 +01:00
Wim Taymans
73896bfa83 alsa: rework batch handling a bit
By default, use a 512 period for batch and use 512 headroom
Add a property to disable special batch handling.
2021-01-21 17:14:51 +01:00
Wim Taymans
af092a9a7e v4l2: respect allowed data types
Check if we can do DmaBuf as the data type before we attempt this.
Otherwise we don't get any data in clients that can't deal with
DmaBuf.
2021-01-21 16:04:37 +01:00
Wim Taymans
4fb967211e pw-top: refresh immediately 2021-01-21 15:20:07 +01:00
Wim Taymans
f96c7ede11 stream: handle drain from process
When process calls drain, also do one more loop to complete
the drain.
2021-01-21 13:41:06 +01:00
Wim Taymans
486d797735 pulse-server: use rate match to feed samples
Fixes #595
2021-01-21 13:39:54 +01:00
jasker5183
11f95fe11e Remove obsolete intructions 2021-01-21 12:04:37 +01:00
Wim Taymans
d9af97899c pulse-server: don't destroy clients playing a sample
When a sample is playing a cached sample and it disconnects we should
wait until all the pending samples are finished otherwise we stop
their playback and get a chopped or broken sample.

See #595
2021-01-21 11:53:06 +01:00
Wim Taymans
dcc5779cd6 pulse-server: put valid volume in sample info 2021-01-21 09:42:04 +01:00
Wim Taymans
44cad2d533 pulse-server: implement suspend 2021-01-20 20:33:16 +01:00
Wim Taymans
aee694fb82 0.3.20 2021-01-20 15:54:15 +01:00
Wim Taymans
2c4c78c51e media-session: add alsa.jack-device property to alsa-monitor 2021-01-20 13:48:06 +01:00
jasker5183
c3d4eea6ca Add new issue template 2021-01-20 12:43:09 +01:00
George Kiagiadakis
6a2778c2e7 spa: add type info for device event objects 2021-01-20 11:15:17 +00:00
Wim Taymans
4084db8641 module-access: Relax access check errors
Assume -EACCES is a normal thing when checking /proc/<pid>/root and
continue with just an info message. Log a warning and assume
flatpak for all other errors.

Fixes #432
2021-01-20 12:12:56 +01:00
Wim Taymans
675a12ef33 alsa: clamp elapsed time to delay
If the elapsed time is larger than the delay, we are dealing with
an older timestamp.

Fixes #597
2021-01-20 11:54:19 +01:00
Wim Taymans
384b8a4593 pulse-server: Only allow one memblock in the queue
Allow only one memblock in the output queue. Otherwise, if the
client is for some reason not reading from the socket, we would queue
an unlimited amount of messages until we get killed by OOM.

Change some warn to debug in the process function for things we
handle from the non-rt thread.

Fixes #488
2021-01-20 10:41:34 +01:00
Wim Taymans
8f80a2bc15 media-session: handle key == NULL
The key can be null when the metadata subject is removed.
2021-01-19 17:01:24 +01:00
Wim Taymans
96a2a2b4e2 pulse-server: Use the spa json implementation 2021-01-19 16:57:33 +01:00
Wim Taymans
579e8a4ea6 json: allocate one extra byte for the \0 2021-01-19 16:56:55 +01:00
Wim Taymans
f891324e25 pw-dump: mark objects without events as changed
Usually the event function marks the object as changed so when
there is no event function, mark the change immediately so that
we can dump it.
2021-01-19 16:36:55 +01:00
Wim Taymans
0e5ad1c0a4 module-rtkit: log the dbus error as a warning 2021-01-19 15:02:37 +01:00
Wim Taymans
abfc67a3ca Revert "remove mlock and use MAP_LOCKED"
This reverts commit ab91e94b59.

When no memory can be locked, the mmap fails with -EAGAIN.

Fixes #592
2021-01-19 14:47:52 +01:00
Wim Taymans
8c84c96fe1 daemon: add support for mlockall 2021-01-19 12:17:29 +01:00
Wim Taymans
ab91e94b59 remove mlock and use MAP_LOCKED
The warnings are confusing and a properly tuned system would have
the limits set correctly.
2021-01-19 11:59:21 +01:00
Wim Taymans
89641785c3 pulse-server: keep global free message pool 2021-01-19 11:06:00 +01:00