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
Wim Taymans
54b499b1cf
alsa: do the right log level checks
...
spa_log_level_enabled does not work when a custom log level has
been set. Use spa_log_level_topic_enabled instead.
2022-08-05 15:03:22 +02:00
Wim Taymans
73073eb33f
alsa: redirect alsa output to log file
...
Make a custom snd_output object that redirects output to the log
file.
2022-08-05 14:01:37 +02:00
Wim Taymans
0dc5a08bfd
alsa: debug hw_params
2022-08-05 13:00:44 +02:00
Wim Taymans
a9ced45d4b
acp: add debug for open and close
...
Debug open and close calls.
Make pa_alsa_close to close the device.
2022-08-05 12:31:28 +02:00
Wim Taymans
34c1c1614e
alsa: add some more debug
...
See #2614
2022-08-04 14:25:24 +02:00
Wim Taymans
1118c35956
acp: handle some more mixer NULL cases
...
These are in pulseaudio handled with asserts.
Fixes #2612
2022-08-04 09:06:28 +02:00
Wim Taymans
6c5ec409bf
audioconvert: Improve buffer params
...
Scale the default size of the buffer with the sample rate conversion
factor.
2022-08-03 17:21:48 +02:00
Wim Taymans
6144d037ce
acp: handle NULL mixer_handle
...
It can be NULL for some UCM configs.
Fixes #2612
2022-08-03 12:34:13 +02:00
Wim Taymans
e22e522ab8
alsa-pcm: limit the target to the buffer size
...
Don't try to wait for more samples than can fit in the ringbuffer.
See #2603
2022-08-03 12:22:38 +02:00
Wim Taymans
a23d154952
audioconvert: always use DSP rate on DSP ports
...
Always use the DSP rate on DSP ports for format conversion, not the
previous used rate.
This avoids some resampler reconfiguration as it negotiates a non-passthrough
rate conversion and then switches to passthrough when the rate correction is
done to match the graph rate.
See #2614
2022-08-03 11:32:10 +02:00
Frédéric Danis
e7f17e1523
bluez5: use lower case for UUIDs
...
BlueZ uses lower case version for the UUIDs in its DBus interface.
This will simplify future UUID tests.
2022-08-03 06:15:54 +00:00
Frédéric Danis
76adcfaabe
bluez5: Add AAC decoder
2022-08-02 11:12:25 +02:00
Isa Mert Gurbuz
f32017c874
bluez5: Disable hw-volume for Soundcore Motion B
2022-08-01 19:34:39 +00:00
Pauli Virtanen
3579857a64
bluez5: opus: tweak ABR
...
Count retry from last non-good interval. Minimum retry interval 5sec.
2022-08-01 19:23:07 +00:00
Pauli Virtanen
5724d405d6
bluez5: opus: better default bitrates
...
Use smaller bitrate caps, as it's not necessary to use all bandwidth
available.
2022-08-01 19:23:07 +00:00
Barnabás Pőcze
aab15433c8
spa: aec: rename first argument of methods in spa_audio_aec_methods
...
The first parameter is a pointer to the object implementing the aec
interface, the name `object` is better than `data`.
2022-07-23 08:58:18 +00:00
Barnabás Pőcze
44e7817702
spa: aec: mark aec method tables const
2022-07-23 08:58:18 +00:00
Barnabás Pőcze
c2d357b5af
spa: aec: null: remove unnecessary cast
2022-07-23 08:58:18 +00:00
Barnabás Pőcze
e88df3a324
spa: aec: null: initialize variable when defined
2022-07-23 08:58:18 +00:00
Barnabás Pőcze
98c0092ee7
spa: aec: null: specify vtable version
2022-07-23 08:58:18 +00:00
Barnabás Pőcze
c9cc2fe6dc
spa: aec: mark handle factory objects static
2022-07-23 08:58:18 +00:00
Barnabás Pőcze
a506ddd799
spa: aec: webrtc: use static_cast to cast from void *
2022-07-23 08:58:18 +00:00
Barnabás Pőcze
35c011b955
spa: aec: webrtc: simplify webrtc_get_spa_bool()
2022-07-23 08:58:18 +00:00
Huang-Huang Bao
c5bce24f01
bluez5: correct type of arguments to a dbus function
...
The 3rd "value" arguments to dbus_message_iter_append_basic() should be the address of a basic-typed value.
Fixes #2591
2022-07-23 16:35:01 +08:00
Frédéric Danis
343ae88bbf
bluez5: Simplify DBus append_basic_* helpers
...
String key is used in all calls to append_basic_variant_dict_entry() and
append_basic_array_variant_dict_entry().
2022-07-22 19:10:26 +00:00
Frédéric Danis
e560468800
bluez5: Removed unused variables in meson.build
2022-07-22 18:46:35 +02:00
Wim Taymans
b1b8b0985a
audioconvert: fix rounding on arm neon
...
Add the neon functions to the test
2022-07-21 17:24:55 +02:00
Pauli Virtanen
67c41336db
bluez5: fix minor issues / warnings
...
Make static analysis happier.
2022-07-21 07:12:22 +00:00
Wim Taymans
38b3d027ec
audioconvert: remove S32_SCALE
...
We don't use it, we use S24_SCALE and then shift. Also adjust the
S32_MIN and S32_MAX values, based on S24 values.
2022-07-20 17:45:34 +02:00
Barnabás Pőcze
5cdf4d6c64
spa: libcamera: remove unnecessary cast
2022-07-20 10:48:24 +00:00
Barnabás Pőcze
8bccad3ade
spa: libcamera: only add "api.libcamera.location" property when available
2022-07-20 10:48:24 +00:00
Barnabás Pőcze
4072f63ab6
spa: libcamera: make cameraLoc() return a static string
...
There is no compelling reason to use `std::string`.
2022-07-20 10:48:24 +00:00
Barnabás Pőcze
237174b7f2
spa: libcamera: mark two functions static
...
`cameraLoc()` and `cameraModel()` are only used in one
translation unit.
2022-07-20 10:48:24 +00:00