Wim Taymans
e3a643bffe
bluez5: remove useless pod_frame() call
2021-08-05 15:41:26 +02:00
lsde
579481ab70
Use correct RTP payload type for aptX, LDAC,SBC
...
According to the A2DP spec, the payload type should be
set to a number between 96 and 127.
This is fixed for AAC codec, but not the rest.
Original PulseAudio issue: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/591
2021-07-11 16:10:20 +00:00
Barnabás Pőcze
f5d51162c4
treewide: mark things static and const
...
Mark some structures, arrays static/const at various places.
In some cases this prevents unnecessary initialization
when a function is entered.
All in all, the text segments across all shared
libraries are reduced by about 2 KiB. However,
the total size increases by about 2 KiB as well.
2021-06-30 14:44:08 +02:00
Peter Hutterer
95a84e797a
treewide: replace !strcmp() with spa_streq()
...
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Peter Hutterer
2405f0942b
spa/buffer: rename SPA_MEMBER to SPA_PTROFF
...
SPA_MEMBER is misleading, all we're doing here is pointer+offset and a
type-casting the result. Rename to SPA_PTROFF which is more expressive (and
has the same number of characters so we don't need to re-indent).
2021-05-06 09:39:39 +00:00
Huang-Huang Bao
9384ba5500
bluez5: add properties for A2DP codec sample rate & channel mode configuration
...
Those properties are set as reference sample rate and channels number for A2DP configuration selecting.
2021-05-03 10:07:42 +00:00
Huang-Huang Bao
63281413bd
a2dp: fix a problem in b9d1b818
2021-03-31 19:33:21 +08:00
Huang-Huang Bao
b9d1b818d5
a2dp: guard against LDAC quality value, add labels for LDAC quality prop info
2021-03-31 11:14:58 +00:00
Huang-Huang Bao
5c93f780cf
a2dp: improve a2dp sink codec data flushing
...
Let codec decides when rtp packet need to be sent (terminated by MTU size in most case).
LDAC encoding loop can now be terminated by reading if frame_num is written, no 'frame_count' updating is needed.
RTP payload fragmentation can now be implemented more easily based on this.
2021-03-31 11:14:58 +00:00
Pauli Virtanen
a552655edc
bluez5: add bluetoothAudioCodec property to device
...
Also make the "codecless" profiles to automatically switch to the codec
profiles.
2021-03-26 16:59:07 +00:00
Huang-Huang Bao
abfa04caa4
a2dp: add props param support for LDAC
...
LDAC quality can now be set with SPA_PROP_quality on a2dp-sink node.
Also fix a NULL reference if device setting is empty.
2021-03-20 09:16:20 +00:00
Huang-Huang Bao
1d390addb1
a2dp: allow codec to hold Props params
...
Initial Props value are parsed from device settings, further changes are triggered by 'set_param' on a2dp node.
Codec can then use props to tweak its transcoder.
2021-03-20 09:16:20 +00:00
Huang-Huang Bao
43603dd75d
a2dp: add property to force LDAC encoding quality
...
Fixes #661
2021-03-19 11:50:56 +00:00
Pauli Virtanen
0908588d0c
bluez5: add codec check_caps + check vendor codec id for ldac & aptx
2021-02-02 09:56:29 +00:00
Huang-Huang
c778bd734c
a2dp: improve codec specific transport socket send buffer size setting
2021-01-31 09:01:40 +08:00
Wim Taymans
5bb7a0f573
a2dp-codecs: add settings to codec init function
...
To make it possible to add extra config options in init.
Also add a method to update settings in a codec.
2021-01-07 17:39:39 +01:00
Wim Taymans
ece8a95c29
bluez5: improve a2dp codec api
...
Pass dict to select_config to influence the selection
Make a method to validate a config.
Add spa_dict to the codec to pass more info around.
2021-01-07 17:28:49 +01:00
Huang-Huang Bao
b3bbc62870
a2dp: correct ldac config table
...
Signed-off-by: Huang-Huang Bao <eh5@sokka.cn>
2020-12-20 22:34:51 +08:00
Huang-Huang Bao
9653d748a3
a2dp: fix a2dp encoding under sampling rate of 88200, 96000
...
Signed-off-by: Huang-Huang Bao <eh5@sokka.cn>
2020-12-19 20:25:49 +08:00
Huang-Huang Bao
16f5058af9
a2dp: add ldac ABR support
...
Signed-off-by: Huang-Huang Bao <eh5@sokka.cn>
2020-12-19 19:17:15 +08: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
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
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
d2ff341263
a2dp: use right struct for ldac
...
Fixes #449
2020-12-06 13:03:05 +01:00
Wim Taymans
7996b44036
a2dp: fail if no ldac samplerate was found
2020-12-05 20:16:25 +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
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
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
dd8573a5c2
bluez5: add ldac codec
2020-12-03 10:16:14 +01:00