Commit graph

1571 commits

Author SHA1 Message Date
Wim Taymans
c3138a9bac spa: make null-sink rate and channels configurable 2020-11-25 21:05:21 +01:00
Wim Taymans
b055b9de25 alsa: Make sure we handle errors in close
When a device is removed, close() will error. Warn about this but
continue closing our other things including marking the device
as closed so that we don't try to close it again later.

Fixes #413
2020-11-25 12:37:51 +01:00
Wim Taymans
a482e2e6e2 libcamera: delete the camera on error
Fixes #403
2020-11-24 09:25:07 +01:00
Wim Taymans
95e2ec9f72 channelmix: always copy the target channelmap 2020-11-23 20:17:38 +01:00
Elliott Sales de Andrade
6224068586 Fix some possible leaks. 2020-11-23 15:36:08 +00:00
Wim Taymans
231c3c8b8e channelmix: add channelmap in properties 2020-11-23 15:33:11 +01:00
Wim Taymans
abaf63dfe6 acp: put channelmap in properties 2020-11-23 15:31:51 +01:00
Wim Taymans
af3f18b489 acp: add channel layout and map channels 2020-11-23 15:31:10 +01:00
Wim Taymans
8f7e5dd950 spa: add channelMap property param 2020-11-23 15:28:24 +01:00
Wim Taymans
fc2b0b20ad hook: zero hooks before adding them
Clear the hook before adding it so that we are sure the removed
callback doesn't contain garbage and cause a crash on disconnect.

Mark the removed and priv fields as private. Make sure to add the
removed callback after adding the hook.

Fixes a crash in kwin
2020-11-20 09:40:24 +01:00
Wim Taymans
04aa5472d3 journal: make it possible to set level from info 2020-11-18 17:42:47 +01:00
Wim Taymans
935851a6a6 spa: add safe_reverse function 2020-11-18 15:00:01 +01:00
Wim Taymans
8c0f27c016 audioadapter: emit xrun when source can't produce data 2020-11-17 17:18:14 +01:00
Wim Taymans
79fb95bf90 stream: implement Flush
Flush out pending samples in the resampler
Set the io area status to _OK so that buffers are recycled and
new buffers produced.
2020-11-17 17:15:26 +01:00
Wim Taymans
573e2afd5e bluez5: fix compilation of fallback Hsphfpd backend 2020-11-16 20:27:55 +01:00
Frédéric Danis
6308c5d806 bluez5: backend-hsphfpd: Add mSBC support
mSBC can be enabled by passing "bluez5.msbc-support=true" parameter to
pipewire-media-session.
mSBC is automatically selected if remote device supports it.
2020-11-16 18:15:39 +01:00
Frédéric Danis
7d28b51713 bluez5: Add mSBC support to sco-source
This has been tested with a UART Bluetoth chipset, on a Raspberry Pi 3.
It may work with USB Bluetoot chipset/dongle.
2020-11-16 18:15:39 +01:00
Frédéric Danis
1759aa834f bluez5: Add mSBC support to sco-sink
This has been tested with a UART Bluetoth chipset, on a Raspberry Pi 3.
It doesn't seem to work with USB Bluetooth chipset/dongle.
2020-11-16 18:15:39 +01:00
Wim Taymans
0d9cc9e36e loop: always place the invoke item in the queue
Always place the invoke item in the queue and then either signal the
other thread or flush the queue when not already flushing.
2020-11-16 15:16:20 +01:00
Wim Taymans
b8b2ce6ba9 loop: always wake up blocking items
We should always wake up the blocking items if we scheduled the
item.
2020-11-13 16:50:23 +01:00
Wim Taymans
31216c09c4 bluez5: fix memleak 2020-11-09 16:48:44 +01:00
Wim Taymans
42dd52c7fe acp: clean up card object
Fixes #369
2020-11-09 15:01:07 +01:00
Sergey Bugaev
c101ff2057 support: add a journald logger implementation
Closes https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/358

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2020-11-06 15:51:24 +00:00
Wim Taymans
80967e88ad utils: add function to clean hook list 2020-11-06 15:32:49 +01:00
Wim Taymans
5a98a9b1cd alsa: reload alsa configuration
Fixes #332
2020-11-05 10:00:25 +01:00
Wim Taymans
17e3087397 bluez5: fix some whitespace and indent 2020-11-05 09:46:11 +01:00
Wim Taymans
395a30b5d6 a2dp: fix sign of out_decoded 2020-11-02 09:16:59 +01:00
Grzegorz Uriasz
c1530ba171 Use RegisterApplication in bluez5 for A2DP if possible 2020-11-02 09:14:37 +01:00
George Kiagiadakis
5c749cf7c3 alsa-acp: bind the acp log func to the spa_log object directly
When the acp-device impl struct is passed to the log func, it is
possible that when this device is removed, another device using acp
is going to crash while logging a message
2020-11-02 08:10:29 +00:00
Wim Taymans
0320eca79e pulse-server: add port_type and availability-group 2020-10-28 12:18:26 +01:00
Wim Taymans
8116da41b9 acp: use properties for port type and available group 2020-10-28 11:48:24 +01:00
Wim Taymans
6eaf8d6921 spa: remove property, we don't implement a getter 2020-10-28 10:51:08 +01:00
Wim Taymans
f3dda8e57b pulse: Use the right conversion functions for volumes
PulseAudio uses cubic volumes and PipeWire uses linear volumes
so use the right conversion functions from one to the other.
2020-10-22 19:34:47 +02:00
Jan Grulich
743cf58fb7 Define SPA_FALLTHROUGH to make fall-through annotations work for all compilers
This is needed for example for Clang compiler which uses different
annotations than GCC. It will make WebRTC to happily use PipeWire
since the spa library is header-only and WebRTC defaults to use
Clang with -Wimplicit-fallthrough.
2020-10-22 13:31:19 +02:00
Wim Taymans
c1ea63fa7a alsa-pcm: try to recover in all cases
Even if we can't get the current status, still try to recover the
device.

See #347
2020-10-22 09:16:45 +02:00
Frédéric Danis
48c64f9084 bluez5: backend-hsphfpd: Fix PCM agent name
The audio agent gets or provides data in the format requested between host
and chipset.
The HSP and HFP profile request PCM data to be sent to the chipset which
will encode/decode them in CVSD format.
This audio agent format may be re-used later for another air codec hw
encoded.
So, rename the audio agent to be more explicit.
2020-10-20 19:10:21 +00:00
Frank Praznik
62a34f8c48 defs: rename variables in min/max macros
Fixes a variable shadow warning when SPA_CLAMP() is used.
2020-10-20 19:08:25 +00:00
Frank Praznik
796db2b11b builder: fix variable shadow warning 2020-10-20 19:08:25 +00:00
Wim Taymans
77b91823f3 a2dp: mark a2dp-source as stream and autoconnect 2020-10-19 18:53:18 +02:00
Wim Taymans
6cc3224031 a2dp-source: fix source
Use codec methods. Init codec at start.
Remove rate match until we actually implement this
Add some buffering of packets before we hand them out.
Always simply fill a buffer and hand it out.
don't emit signals when we are following another driver.
Acquire transport as soon as it goes to PENDING.
2020-10-19 18:25:52 +02:00
Wim Taymans
d727123b86 a2dp-codecs: add more codec params 2020-10-19 18:12:47 +02:00
Wim Taymans
cdb83fa225 a2dp-sbc: implement decode 2020-10-19 18:12:13 +02:00
Wim Taymans
a91d129698 a2dp-sink: fix timing 2020-10-19 15:35:45 +02:00
Wim Taymans
53ee5ce72a bluez5: make codecs configurable
Make the list of supported codecs available.
Register all supported codecs endpoints
Find the codec from the endpoint name
Put the codec on the transport for the sink to find.
2020-10-19 13:27:11 +02:00
Wim Taymans
e18c4d76dc a2dp: move codecs to separate files 2020-10-19 12:12:21 +02:00
Wim Taymans
5c5b9f61bb a2dp: generate format info from config in init 2020-10-19 10:38:22 +02:00
Wim Taymans
574c0afc93 a2dp: refactor codec functions 2020-10-19 09:48:57 +02:00
Wim Taymans
e1fc51d965 a2dp-sink: don't force flush 2020-10-16 13:25:35 +02:00
Wim Taymans
3be0e7e1c6 a2dp-sink: fix playback
Use a simple periodic timeout to pull in samples and write them to the
socket
2020-10-16 13:13:04 +02:00
Wim Taymans
1b7d052098 support: remove useless assignment 2020-10-16 13:11:27 +02:00