Commit graph

9268 commits

Author SHA1 Message Date
Pauli Virtanen
8d66b2b2f7 bluez5: a2dp-source: more duplex codec workarounds
a2dp-sink writing duplex data to the BT socket breaks a2dp-source source
polling, also in A2DP source role. Hence, use the timer-based polling
workaround always in duplex mode.
2022-07-19 13:44:56 +00:00
Pauli Virtanen
f593a44069 bluez5: a2dp-sink: support duplex codec
Allow running a2dp-sink using the duplex codec, when the local endpoint
is the A2DP sink.
2022-07-19 13:44:56 +00:00
Wim Taymans
1a5ec4452f avb: fix compilation on big endian 2022-07-19 13:49:42 +02:00
Wim Taymans
aaa015d0c0 avb: fix compilation on big endian 2022-07-19 13:06:52 +02:00
Wim Taymans
f274e53d25 0.3.56 2022-07-19 09:49:51 +02:00
Wim Taymans
3c87541219 Revert "mixer-dsp: mix a quantum of data at a time"
This reverts commit ecc0eecf0f.

The io-position is not actually set or updated on the mixer node so it
might use the wrong values.

Fixes #2525
2022-07-18 21:34:57 +02:00
Pauli Virtanen
d82cd959e7 audioconvert: add different channel remap testcase 2022-07-18 20:33:05 +02:00
Pauli Virtanen
977d6e2321 audioconvert: fix input remapping
As currently implemented, input format convert channel remap is no-op.
This is because although the out_datas array is permuted, the original
pointer array is not referred to later on, so the only effect is that
the temporary data array is stored in permuted order.

Fix the permutation by permuting the pointers only for the conversion
step.
2022-07-18 20:31:46 +02:00
Wim Taymans
4eb81b13ac audioconvert: add test
Add test for F32_7p1_remapped to F32P_7p1_remapped

See #1324
2022-07-18 18:55:30 +02:00
Wim Taymans
aaeafa49c1 fix some printf arguments 2022-07-18 15:39:06 +02:00
Wim Taymans
67754ad3bc meson: remove sse_args from plain c build 2022-07-18 13:00:12 +02:00
Wim Taymans
ada39f3048 audioconvert: improve noise bits
Make a new noise method called PATTERN and use it to add a slow (every
1024 samples) repeating pattern of -1, 0.
Only use this method when we don't already use triangular dither.

See #2540
2022-07-18 11:41:57 +02:00
Wim Taymans
57f63feb92 audioconvert: Fix Wannamaker name 2022-07-18 10:22:21 +02:00
Hubert Figuière
86257a0013 jack.pc libraries should only be libjack 2022-07-17 23:12:19 -04:00
Wim Taymans
d030983212 pw-cat: don't print useless error
getopt has already printed a much better error for us.

See #2558
2022-07-17 16:47:24 +02:00
Doğukan Korkmaztürk
87f1979b36 stream: eliminate some implicit type conversions 2022-07-17 16:41:30 +02:00
Doğukan Korkmaztürk
c80c6b79d7 buffers: eliminate an implicit type conversion 2022-07-17 16:41:30 +02:00
Wim Taymans
9dbd016f9d audioconvert: fix compilation warnings 2022-07-17 13:15:00 +02:00
Wim Taymans
a4db745a7e audioconvert: improve noise shaping
Reorganize things a little so we can add more noise shapers.
Add sloped triangular noise.
Add wanamaker3 noise shaping.
2022-07-15 12:36:15 +02:00
Wim Taymans
7151150802 filter-chain: don't use invalid ports
When the stream has more channels than the filter inputs or outputs,
don't try to connect an invalid filter port but ignore the input and
clear the output.
2022-07-14 11:55:52 +02:00
Doğukan Korkmaztürk
43602911c6 module-rt: handle pthread_getschedparam() errors correctly
pthread_getschedparam() always returns non-negative values, so checking
if its return value is less than zero always evaluates to false.

Also, pthread functions don't set errno. While logging a warning
message, use the return value of pthread_getschedparam() instead of
errno.
2022-07-14 10:55:33 +02:00
Wim Taymans
a458b39774 tests: add test for rounding 2022-07-14 10:48:37 +02:00
Wim Taymans
419517fd55 audioconvert: build C versions with -Ofast and -ffast-math
Move resampler implementations to a -c version.
Compile some of the functions with other flags to make them more
optimized.
2022-07-14 10:07:07 +02:00
Wim Taymans
0ba3e7c5db audioconvert: round instead of truncate, to reduce distortion
See #2543
2022-07-13 20:56:13 +02:00
Wim Taymans
d18428f8bb audiconvert: make macros for conversions
Make a common macro for float to int and int to float so that we can
change the algorithms easily.
2022-07-13 18:10:25 +02:00
Wim Taymans
117fb6d697 filter-chain: add example LFE generator 2022-07-13 17:15:14 +02:00
Wim Taymans
b2bb2fe028 filter-chain: be more carefull with buffer sizes
Take the min of the input buffer size as the output size. Make sure we
don't process more than the output buffer maxsize as well.
2022-07-13 16:45:57 +02:00
Wim Taymans
7a76e55c36 module-looback: improve data copy between streams
First go over all the input and collect pointers and the size that we
need to copy. Then go over all destinations and copy the source or
clear the buffer memory.

This fixes the problem where extra planes in the destination would get
a 0 size, which would make the converter produce 0 output. It also
ensure that the output size is consistent.
2022-07-13 16:21:25 +02:00
Wim Taymans
4062077472 avb: remove wrong cargs
Fix a typo
2022-07-13 13:14:07 +02:00
Wim Taymans
e82145aeae spa-resample: don't flush too much
Also clamp the amount of input samples we push when flushing. do several
rounds of zero pushing until we have flushed enough.
Handle the cases where no input is needed or no output is generated.

Fixes crashes when downsampling from 96000 to 1000 Hz or so.
2022-07-13 12:02:12 +02:00
Wim Taymans
0c24d66dc3 context: add method to get the data loop
Handy for invoking or adding/removing sources.
2022-07-13 11:26:12 +02:00
Fabian Vogt
ed88cad583 spa/alsa-udev: Check accessibility of pcm devices as well
The order of attribute changes is random, so it's possible that controlCX is
accessible before the other devices, which marks the device as available but it
actually fails to open. Only consider the device accessible if both control and
PCM devices can be accessed.

This requires reacting to ATTRIB changes of pcm devices as well now.

Fixes #2534
2022-07-13 09:17:08 +00:00
Wim Taymans
35082e4f4b pulse-server: add the delay
Actually add the delay to the buffered amount of time instead of
overwriting.
2022-07-13 10:49:26 +02:00
Wim Taymans
855d17ac1b pulse-server: add some debugging 2022-07-13 10:42:00 +02:00
Wim Taymans
52281b9a7e alsa: check the offset against the size of the buffer
We need to check the last offset against the size of the buffer, not the
remaining size in the buffer.

When the writing is split, this could cause the buffer to be reused
wrongly.

See #2536
2022-07-13 09:37:01 +02:00
Wim Taymans
11bc60a53d spa-resample: handle init errors 2022-07-12 17:39:58 +02:00
Wim Taymans
ce9a912f1a audioconvert: set scale to cutoff when upsampling 2022-07-12 17:39:14 +02:00
Pauli Virtanen
d6a7db8020 bluez5: mark HFP/HSP streams with media.role=Communication 2022-07-12 14:04:31 +00:00
Pauli Virtanen
6e37110efd bluez5: adjust source rate control
Use different filter function than spa_dll for the rate control.
Also use a longer window for spike determination.
2022-07-12 13:55:54 +00:00
Wim Taymans
00d18217a6 avb: remove unused line
Probably a leftover from earlier merge..
2022-07-12 15:53:51 +02:00
Wim Taymans
40552a0e91 jack: only mix when we have input to mix
Avoids a crash when starting ardour6.
2022-07-12 15:10:02 +02:00
Wim Taymans
ee84f96915 audioconvert: tweak the resampler a bit 2022-07-12 14:35:23 +02:00
jole
404d7e5ed1 fmt: add a space after comment header in config
consitent with the formatting of the other configuration files
2022-07-12 10:58:55 +00:00
Wim Taymans
9d48224c02 doc: add AVB module 2022-07-12 12:41:45 +02:00
Wim Taymans
4304a147e9 avb: properties are owned by avb object 2022-07-12 12:37:58 +02:00
Wim Taymans
10e54dc0ee avb: fill in some more values 2022-07-12 12:27:22 +02:00
Wim Taymans
9bfb23f3f8 avb: don't include ethernet header in in packets
Move vlan_id and prio to the stream.
2022-07-12 12:27:22 +02:00
Wim Taymans
dec2bdf241 avb: reply with advertise to discover 2022-07-12 12:27:22 +02:00
Wim Taymans
a34417eed0 avb: handle command errors better
Ignore unknown commands.
Set the right reply message type for unsupported methods.
2022-07-12 12:27:22 +02:00
Wim Taymans
fa9fcbe964 avb: save and load maap state 2022-07-12 12:27:22 +02:00