Frédéric Danis
496dda1bcc
bluez5: Check if BlueZ daemon support LE Audio
...
Legacy BlueZ 5 API doesn't support to register BAP codecs, which prevents
to register A2DP enhanced codecs.
2022-09-15 11:17:20 +00:00
Frédéric Danis
b7ad1d1869
bluez5: Add SelectProperties DBus method support
2022-09-15 11:17:20 +00:00
Frédéric Danis
96acc5a79a
bluez5: Add LE Audio BAP support to bluez5-device
2022-09-15 11:17:20 +00:00
Frédéric Danis
201fd7755d
bluez5: Add LC3 codec support to LE Audio BAP
...
By default this codec is disabled as the BlueZ support for LE Audio is
still experimental.
2022-09-15 11:17:20 +00:00
Frédéric Danis
fd0bcb1699
bluez5: Add LE Audio BAP support to media-codecs
2022-09-15 11:17:20 +00:00
Frédéric Danis
00d51c3d31
bluez5: Rename codec API from *a2dp* to *media*
...
The BlueZ Media1 interface will not only be used for A2DP but also for
LE Audio and code related can be shared.
2022-09-15 11:17:20 +00:00
Wim Taymans
565bb2c493
resample: fix peaks sse code
...
Fix the shuffle arguments.
Use another way of making 0x80000000 and use andnot to remove the
sign bit.
2022-09-14 16:58:41 +02:00
Dmitry Sharshakov
3b89e6f369
alsa-seq: add an option to disable longname in MIDI ports
...
Untested yet
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2022-09-13 07:46:40 +00:00
Dmitry Sharshakov
ea646c2d98
alsa-seq: set card long name or number in port names
...
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2022-09-13 07:46:40 +00:00
Wim Taymans
634d7107a4
v4l2: use the device name to open in BeginParams
2022-09-12 09:51:55 +02:00
Wim Taymans
a7c28d64ae
resample-peaks: small improvement
...
Makes it easier for the compiler to make a constant.
2022-09-08 15:40:01 +02:00
Wim Taymans
46c8c9ec03
audioconvert: set monitor port buffer size correctly
...
Also use quantum_limit samples on the monitor ports.
Fixes #2677
2022-09-08 12:25:28 +02:00
Wim Taymans
903f831b2d
alsa: scale min value back to nominal rate
2022-09-07 23:39:51 +02:00
Wim Taymans
7057cca05e
alsa: adjust min and max rates
...
Use the DSD scaler and interleave factors to calculate the min and
max rates.
2022-09-07 21:58:32 +02:00
Wim Taymans
955815b468
alsa: only scale DSD samplerates
2022-09-07 21:42:45 +02:00
Wim Taymans
68581235ae
alsa: fix min dsd rate
...
We just need to allow from DSD64 onwards. Remove some unused fields.
2022-09-07 20:23:53 +02:00
Wim Taymans
72b6788c68
alsa: don't set impossible rates
...
When the max rate is smaller than the min rate, don't add the DSD
format at all because it is not possible to play it.
See #93
2022-09-07 19:58:30 +02:00
Wim Taymans
23522651f9
alsa: dsd rates are expressed in byte rate
...
DSD64 would be a rate of 44100 * 64 / 8. When packed in U32_BE, we would
negotiate 44100 * 8 / 4 (88200) with the device, this means all rates
from 88200 and up are allowed for DSD64 in U32_BE.
2022-09-07 19:54:09 +02:00
Wim Taymans
c9ee142b78
resample-peaks: unroll loop a little
2022-09-07 16:18:58 +02:00
Wim Taymans
187006f30e
audioconvert: remove some double defines
2022-09-07 16:08:21 +02:00
Wim Taymans
6e9e02b420
audioconvert: refactor peaks resampler
...
Use common code in macro and generate arch specific version.
Compile with -Ofast to optimize some fmaxf calls.
2022-09-07 16:00:31 +02:00
Frédéric Danis
2c72597271
bluez5: Use spa_log_hexdump() to dump media properties/configuration
2022-09-07 07:50:23 +02:00
Wim Taymans
5b2b93f915
alsa: add period-size, period-num and headroom in props
...
Add the currently configured alsa hw_params in the properties for
easier access.
2022-09-06 20:16:29 +02:00
Wim Taymans
ffc09ce55e
videoconvert: refresh with latest audioadapter copy
2022-09-06 17:48:00 +02:00
Wim Taymans
201e6ae9fd
audioconvert: use given channelmap for volume
...
Use the given channelmap for the volume, like it used to be in old
audioconvert.
This makes new streams expose a volume even when not negotiated yet.
2022-09-05 15:29:16 +02:00
Wim Taymans
71ec8650ba
audioconvert: remove redundant set_volume calls
2022-09-05 13:23:18 +02:00
Wim Taymans
0c47ab76a7
channelmix: Only filter FC/LFE when present
2022-09-05 13:22:40 +02:00
Wim Taymans
7b432aec88
spa: make default samplerate 48000
...
Remove some 44100 default rates and use 48000 instead.
2022-09-05 12:21:20 +02:00
Wim Taymans
cad7db9f58
libcamera: close camera in error path
2022-09-05 09:25:42 +02:00
Pauli Virtanen
df858cae7c
bluez5: clarify OPUS-A2DP spec
...
Also remove DRAFT tag.
2022-09-03 19:08:27 +00:00
Wim Taymans
9123710971
spa: clean up some port io checks
...
We should not generate a warning.
2022-09-01 15:39:34 +02:00
Wim Taymans
2fa1b4384b
spa: don't warn for NULL io
...
The io is set to NULL when the port becomes unnegotiated.
2022-09-01 15:31:14 +02:00
Wim Taymans
2054dcf36f
alsa: Improve format negotiation
...
When the device is not running but has a format, close/open the
device to get all the available formats again. Do the same when
setting a format.
Otherwise, the configuration space of the device is restricted to the
current negotiated format and we can't query the other possibilities
or change it.
Fixes #2625
2022-08-31 10:03:39 +02:00
Wim Taymans
b33ffcf683
test: print channel map as reported by alsa as well
...
See #1707
2022-08-30 16:45:35 +02:00
Wim Taymans
24f6225c5d
audioconvert: don't emit changed events for rate changes
...
Rate changes can happen very often when a stream is doing rate control,
so don't emit the changes every time.
2022-08-30 16:00:00 +02:00
Wim Taymans
e04e3ef40e
audioconvert: fix rate match for sources
...
Only update the resampler rate when we ask for more data, when we have
more input data, use the previously configured rate to calculate how
many samples we will consume.
Fixes resync errors with multiple sources. One source would do rate
matching, audioconvert would ask it to produce X samples, the source is
scheduled to produce the samples, the rate match is updated with the new
rate correction, audioconvert is scheduled again. It should now use the
X samples it asked to produce and apply the new rate correction for the
next iteration.
2022-08-30 12:43:14 +02:00
Pauli Virtanen
c0e8b397f6
bluez5: avoid (harmless) integer overflow
...
If no packets have been received and spa_bt_decode_buffer_process is
called, this->packet_size.max == INT32_MIN, which can give overflows.
Guard against this condition, although it should be harmless.
2022-08-24 16:59:21 +00:00
Frédéric Danis
6b3390387d
bluez5: Test transport pointer before using it
...
If this->transport is NULL the debug log will crash.
2022-08-18 12:57:04 +02:00
Barnabás Pőcze
68ff3ad841
treewide: meson.build: use host_machine instead of build_machine
...
At the moment, cross compilation may not work in certain cases because
checks are carried out against the build machine instead of the host machine.
Replace uses of `build_machine` with `host_machine` to fix that.
In native compilation, all three "machine objects" available in meson
are the same, so this change should have no effect in that case.
More: https://mesonbuild.com/Cross-compilation.html
2022-08-17 07:34:20 +00:00
Barnabás Pőcze
358254f20a
spa: meson.build: add missing new line
2022-08-17 07:34:20 +00:00
Pauli Virtanen
b9baeeb587
bluez5: opus: react faster to too long packet queue
...
React immediately to "bad" buffer level. Use smaller bitrate
increments/decrements. Fix ABR timer increment for fragmented packets.
Handle actual bitrate being smaller than target during silence.
2022-08-13 15:58:08 +03:00
Pauli Virtanen
c1acb5168d
bluez5: bump Opus max bitrates
...
Limit bitrates to 2-2.5x Opus recommended "good quality", instead of
1.5x, which is safer quality-wise for CVBR.
2022-08-13 15:12:35 +03:00
Gleb Popov
4a0395d23e
Enable AVB on Linux only.
2022-08-11 17:23:16 +03:00
Wim Taymans
3df0fb21a0
channelmix: only produce REAR/SIDE from FC in simple upmix
...
Only simple upmixing would replicate the FC channel into REAR/SIDE.
The PSD method would take the diff between FL/FR (which would
be 0 if only FC is available) and not generate output.
2022-08-11 09:37:43 +02:00
Wim Taymans
da9868594d
channelmix: produce STEREO from FC
...
Make it possible to produce STEREO from FC.
2022-08-11 09:35:54 +02:00
Wim Taymans
b03b57c77a
channelmix: also filter FC and LFE when no layout
...
Always apply filter based on dest layout, even when distributing,
averaging or copying a signal.
2022-08-11 09:33:34 +02:00
Wim Taymans
0ad7cb3298
loop: flush items before stopping
...
Before leaving the loop, flush out any pending items in the invoke
queue.
See #2631
2022-08-09 20:38:06 +02:00
Wim Taymans
f971362f76
alsa: improve test
...
Add capture mode, add more info for class
2022-08-09 12:16:37 +02:00
Wim Taymans
80b59a4971
alsa: add test for dumping hw_params
...
See #2620
2022-08-09 11:51:20 +02:00
Pauli Virtanen
8f0478a2ce
bluez5: sco-source: deal with incomplete CVSD frames
...
Rarely BT adapter may send CVSD packets with incomplete frames. Ignore
such packets, as it's not clear if they contain valid data at all.
2022-08-05 13:12:24 +00:00