Commit graph

1652 commits

Author SHA1 Message Date
Wim Taymans
d968ab56a5 a2dp: report PARAM_IO, as advertized 2020-12-17 12:25:12 +01:00
Wim Taymans
6e6cd0d684 acp: add new files as well 2020-12-17 12:07:31 +01:00
Wim Taymans
d6530bc0cd acp: sync with pulseaudio 2020-12-17 12:04:18 +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
e8dcd7f5f9 acp: sync
Remove >2 channel support until upstream
Fix availability groups
2020-12-17 11:03:31 +01:00
Wim Taymans
22c793aa87 v4l2: add inotify support
Wait with inotify until we can access the device node before emiting
the new device.
Clean up alsa-udev and make it more like v4l2-udev
2020-12-17 10:43:57 +01:00
Wim Taymans
69da2ec601 alsa: refactor some helpers to add/remove a card 2020-12-17 09:36:19 +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
1636e08368 alsa: first rough attempt at inotify support
Wait until the device is accessible before exposing it.
2020-12-16 19:18:32 +01:00
Wim Taymans
05e06f16ba audioconvert: improve channel remap some more
See #461
2020-12-16 12:53:11 +01:00
Wim Taymans
3803055403 audioconvert: remap channels only once
for planar formats, we should not remap twice or we undo the
remapping.

See #461
2020-12-16 09:53:29 +01:00
Wim Taymans
13cb51efbd spa: fix array type info
Descend into the type info of the array. Fixes names of channels
in position array.
2020-12-15 16:06:10 +01:00
Marijn Suijten
44882f5ab3 acp: Probe and set up HW volume for cards detected through UCM
The codepath `pa_alsa_ucm_add_ports` -> `probe_volumes` ->
`pa_alsa_path_probe` was never called leading to no HW volume being set
up when loading a card through UCM. PulseAudio calls this from
`card_set_profile` -> `pa_alsa_{sink,source}_new`.
2020-12-15 09:36:52 +00:00
Marijn Suijten
d636cadbb8 acp: alsa-ucm: Print iterated path name instead of current path
data->path (current path for selected profile) is not set yet here
resulting in segfaults. We are not interested in printing that anyway
but instead care about the iterated `path` from data->paths.
2020-12-15 09:36:52 +00:00
Wim Taymans
0e910a9d03 audioconvert: correctly remap in fmtconvert
Only remap channels on the planar buffers.

See #472
2020-12-15 09:47:37 +01:00
Wim Taymans
3ac2bc0ad2 pod: descend in array type if possible 2020-12-14 16:18:57 +01:00
Wim Taymans
7c5cb5a281 param: the position property is an array of channelpositions 2020-12-14 16:18:12 +01:00
Wim Taymans
c61502f57c acp: rename fields
pulseaudio -> pipewire
PULSE_* -> ACP_*

Hopefully this does not interfere with pulseaudio anymore.

See #436
2020-12-14 15:01:05 +01: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
c6f94def08 null-sink: fix null sink scheduling
The null sink pulls in data and provides data after it got the
data in _process.

See #472 #442
2020-12-14 10:21:13 +01:00
Wim Taymans
0f528dc73c splitter: place destination address in tmp array
We then remap the tmp array to the destination array.

Fixes #477
2020-12-14 09:49:44 +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
d71259a02c alsa: handle batch devices
For batch devices that are not usb devices, lower the period and
add an extra period of heardoom to avoid xruns.

See !330
2020-12-11 17:38:27 +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
8cb1db5a61 alsa-udev: add property to emit ACP devices 2020-12-11 10:10:20 +01:00
Haochen Tong
7dd69651b8
test-audioconvert: fix test failure after 7d73f0b8 2020-12-10 14:30:28 +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
7768a87a0b alsa: make it possible to fix format 2020-12-09 20:33:57 +01:00
Wim Taymans
7d73f0b8d0 audioconvert: use some defines for the max ports 2020-12-09 20:32:44 +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
bd4663b3cc v4l2: log open/close as info 2020-12-09 17:24:54 +01:00
Wim Taymans
4e7be858e4 node: Add ParamBegin/End
Use these commands to mark the begin and end of a series of Param
enumerations and configuration, like when doing format negotiation. The
idea is that the device can remain open while we do this.
Use this in adapter when negotiating a format.
2020-12-09 17:10:52 +01:00
Wim Taymans
ec77979890 alsa-pcm: default to max channels
When nothing else is specified, suggest the max number of channels
for a device.

See #467
2020-12-09 12:10:13 +01:00
Wim Taymans
d776a0917d alsa: refactor dll code 2020-12-09 12:09:40 +01:00
Wim Taymans
78e7a45e6e audioconvert: remap channels
We also need to remap channels for the splitter and merger.

Remember the port-config format and its channel layout. Internally,
we use a canonical channel layout which is simply all channels sorted
by id. Remap the channels accordingly.

Fixes #445
2020-12-07 14:21:21 +01:00
Wim Taymans
2d8a7809f1 audioconvert: set port-config flags 2020-12-07 14:20:56 +01: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
136fc028a5 prefer S24 over S16 formats
Prefer the higher quality over performance.

Fixes #457
2020-12-06 10:37:40 +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