Wim Taymans
d968ab56a5
a2dp: report PARAM_IO, as advertized
2020-12-17 12:25:12 +01:00
Wim Taymans
90bdab8414
bluez5: improve param enumeration
...
Return -EIO when we can't enumerate the params
Don't check for end-of-params in a2dp-sink, we do that in the codec.
2020-12-17 11:43:53 +01:00
Wim Taymans
9b414b0a9e
a2dp: fix a warning
2020-12-16 19:50:14 +01:00
Huang-Huang Bao
30755c4a44
bluez5: fix ldac stuttering
...
Signed-off-by: Huang-Huang Bao <eh5@sokka.cn>
2020-12-17 02:29:04 +08:00
Wim Taymans
1934b0adb9
bluez5: add codec name to node
2020-12-14 13:29:12 +01:00
Wim Taymans
7f6339e307
bluez5: Don't deref the transport to get the fd
...
Use the configured fd in the source for reading and writing because
the transport might be disconnected and cleared from the main thread
at any time.
2020-12-14 13:17:48 +01:00
Wim Taymans
c1bdc58d31
a2dp: prefer aptx_hd over aptx
2020-12-11 20:04:57 +01:00
Wim Taymans
7763154239
a2dp: increase temp buffer
...
ldac frames are larger and need more space.
See #449
2020-12-11 19:23:30 +01:00
Wim Taymans
6bc8ab18dc
bluez5: aptx wants S24 input sample format
2020-12-11 15:13:59 +01:00
Wim Taymans
8b52e44836
bluez5: support other ldac bit depth
...
Make the format_info const in codec_init, we just need to read the
final negotiated format in some cases.
Add some more ldac bit depths we support.
2020-12-11 13:30:11 +01:00
Wim Taymans
0237821b38
a2dp: reorder codecs a little
...
Move higher quality codecs first.
2020-12-09 20:56:29 +01:00
Wim Taymans
e1b8f24d17
a2dp: improve LDAC
...
When we update the quality, get the new num_blocks.
Set the channel positions correctly.
2020-12-09 20:29:22 +01:00
Wim Taymans
34a9b1dc1a
a2dp: set channel map
2020-12-09 18:08:24 +01:00
Wim Taymans
29fe356fdf
a2dp: copy aptx config in configure
2020-12-09 18:00:42 +01:00
Frédéric Danis
8bc711ce4d
bluez5: backend-ofono: Add mSBC support
...
oFono tries to use the best codec when setting up the audio connection, so
the codec to use is known during call to `acquire` function, after the
transport has been created.
To get the codec before creating the transport, an audio connection is
set-up and discarded during `ofono_audio_card_found()`. It should return
the best codec available, which should not change during the time the
remote is connected.
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-12-09 16:28:30 +00:00
Wim Taymans
6566f52a7e
a2dp-sink: don't accept more data when we need to flush
...
See #449
2020-12-06 15:56:04 +01:00
Wim Taymans
d2ff341263
a2dp: use right struct for ldac
...
Fixes #449
2020-12-06 13:03:05 +01:00
Wim Taymans
316a96d501
improve debug
2020-12-06 09:32:12 +01:00
Wim Taymans
6d494c120f
bluez5: improve debug
2020-12-05 20:56:56 +01:00
Wim Taymans
7996b44036
a2dp: fail if no ldac samplerate was found
2020-12-05 20:16:25 +01:00
Kamil Sołtysik
0a8a854721
Fix codec names in comments
2020-12-05 19:23:27 +01:00
Wim Taymans
c3c1a1184c
a2dp: use unsigned for sizes
2020-12-05 08:30:14 +01:00
Wim Taymans
4797018e4f
ldac: fix sample rates
...
Fix selection of sample rates.
Higer samplerates are not supported by the library so disable them.
See #449
2020-12-05 08:18:01 +01:00
Wim Taymans
635a378ca4
bluez5: don't error on 0 decode length
...
It can happen for the first frame when the codec is filling up.
2020-12-04 12:00:42 +01:00
Wim Taymans
a592eb60a8
bluez5: fix buffer filled check
...
Just check if the encode buffer is full. The max number of frames
has been obtained before.
2020-12-04 11:59:40 +01:00
Wim Taymans
106d597305
bluez5: add aptX and aptX HD codecs
...
They need the libopenaptx libraries from
https://github.com/pali/libopenaptx
2020-12-04 11:34:38 +01:00
Wim Taymans
9818582abe
a2dp: fix aac codec compilation
2020-12-03 19:03:38 +01:00
Wim Taymans
73b13e8ad5
a2dp: deinit codec_data in stop
2020-12-03 18:11:06 +01:00
Wim Taymans
8bf0b7b4db
a2dp: delay codec init to after acquire
...
Some codecs need the MTU as a parameter so wait until we acquire
with creating the codec context.
Make some method to enumerate the parameters from the transport
config and use that for the EnumFormat param.
2020-12-03 18:05:57 +01:00
Wim Taymans
67694a1491
a2dp-ldac: free handle on error
2020-12-03 11:18:27 +01:00
Wim Taymans
908e3f3d1f
bluez5: only register available A2DP encoder/decoder
2020-12-03 11:09:13 +01:00
Wim Taymans
dd8573a5c2
bluez5: add ldac codec
2020-12-03 10:16:14 +01:00
Wim Taymans
3363544d05
bluez5: use start_decode to skip the header
2020-12-02 17:01:22 +01:00
Wim Taymans
75a4cff450
improve debug
2020-11-29 16:38:36 +01:00
Wim Taymans
b8300c663b
improve some errors
...
Silence some -ENOENT warnings, they can happen when the object we
are introspecting is destroyed
2020-11-29 16:22:50 +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
31216c09c4
bluez5: fix memleak
2020-11-09 16:48:44 +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
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
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