George Kiagiadakis
129ccd3a3e
audioconvert: do setup internal links and buffers also in convert mode
2019-07-12 14:30:31 +02:00
Wim Taymans
6fc02ca5e0
move some debug to trace
2019-07-12 10:26:44 +02:00
Wim Taymans
1acefc00a6
audioadapter: implement reuse_buffer on the slave
2019-07-12 09:51:49 +02:00
Wim Taymans
0e765de519
props: remove pointers in property values in protocol
...
Mark pointers in property values with pointer: and remove them
when sending the properties over the wire to avoid errors.
2019-07-11 12:52:55 +02:00
Wim Taymans
00c2f6fe4f
adapter: produce output when we have a monitor
2019-07-11 11:28:26 +02:00
Wim Taymans
a6ce5e7eeb
merger: respect DYNAMIC_DATA flag when copy pointers
2019-07-11 11:19:09 +02:00
Wim Taymans
afd6e578a8
audioadapter: we don't need to clear the dynamic flag
2019-07-11 11:15:47 +02:00
Wim Taymans
a9bce3803a
cleanups and debug improvements
2019-07-11 11:15:24 +02:00
Wim Taymans
a07fb58a21
adapter: set driver property
...
Pass the node.driver property from the slave to the adapter.
Set the media-class on the adapter.
2019-07-10 19:18:53 +02:00
Wim Taymans
9364f64b10
adapter: move to SPA plugin
...
Move the adapter code to a SPA plugin and make the adapter module
use the plugin instead.
2019-07-10 18:04:59 +02:00
Wim Taymans
c7d7058896
Improve rate matching and clock slaving
...
Use a new rate_match io area to exhange rate matching info between
sink/source and resampler.
Compensate for the rate match delay when scheduling timeouts.
Let the resampler notify the source of how many samples it needs to
produce the desired quantum. Make sure we keep an extra buffer in
the device to be able to make this possible.
Let the adapter directly call the slave node process function.
2019-07-09 17:44:07 +02:00
Wim Taymans
595dc0ab5b
resample: fix phase calculation
2019-07-09 16:54:52 +02:00
Wim Taymans
a6a7b3ab54
resample: add functions to calculate in/out length
...
Add test for this as well
2019-07-08 18:26:08 +02:00
Wim Taymans
0154e6eaac
small cleanups
...
resample: remove unused index variable
2019-07-08 18:23:22 +02:00
Wim Taymans
0726a608df
Improve debug and small cleanups
2019-07-02 17:11:45 +02:00
Wim Taymans
170c3e4d6c
small cleanups
2019-07-01 09:31:15 +02:00
Wim Taymans
6720ded529
names: add standard factory name definitions
...
Define a set of standard factory names and document what they
contain. This makes it possible to change the implementation by
mapping the factory-name to a different shared library.
2019-06-21 13:31:34 +02:00
Wim Taymans
8cda0dd962
test: clear resample struct before use
2019-06-07 17:25:28 +02:00
Wim Taymans
497a8364c5
printf format fixes
2019-06-07 17:16:02 +02:00
Wim Taymans
d46c239ab0
some printf fixes
2019-06-07 16:37:08 +02:00
Wim Taymans
49ef8f9b5f
spa: add keys for properties
...
Define and document property keys
2019-06-03 16:48:01 +02:00
Wim Taymans
bf677d55da
spa: implement node sync
2019-05-28 14:01:18 +02:00
Wim Taymans
857b2a0cfb
spa: add result type
...
We need this to know the type of result, especially when serializing.
2019-05-28 13:59:48 +02:00
Wim Taymans
a680f434d2
port: use right properties
...
Use format.dsp as a key to mark the dsp format on a port
Use audio.channel as the key to set the audio channel on a port
2019-05-24 16:14:19 +02:00
Wim Taymans
ff946e3d4b
interface: add an interface struct
...
The interface struct has the type,version and methods of the
interface.
Make spa interfaces extend from spa_interface and make a
separate structure for the methods.
Pass a generic void* as the first argument of methods, like
we don in PipeWire.
Bundle the methods + implementation in a versioned inteface
and use that to invoke methods. This way we can do version
checks on the methods.
Make resource and proxy interfaces that we can can call. We
can then make the core interfaces independent on proxy/resource and
hide them in the lower layers.
Add add_listener method to methods of core interfaces, just
like SPA.
2019-05-23 12:59:24 +02:00
Wim Taymans
eb6481efb3
fmtconvert: also return all formats when not negotiated
...
Also return all possible formats if the other port was not
negotiated.
2019-05-23 10:27:54 +02:00
Wim Taymans
a564d9f3f1
Move implementation helpers to utils
2019-05-20 10:14:00 +02:00
Wim Taymans
3cb400bb61
audioconvert: don't use range
...
Use the spa_io_position->size to decide how many samples to output
from the resampler.
2019-05-17 10:31:20 +02:00
Wim Taymans
e009fead09
io: remove unused range
2019-05-16 16:42:49 +02:00
Wim Taymans
5858c992ef
audioconvert: improve debug
2019-05-14 18:05:51 +02:00
Wim Taymans
a70fd80c2d
fmtconvert: fix format enumeration
...
Rework the format enumeration so that it also return the other
rate/channels, even when using a canonical format.
2019-05-10 11:39:51 +02:00
Wim Taymans
1a7fcaf9c6
Fix cleanup
2019-05-10 11:15:48 +02:00
Wim Taymans
41ab051b68
fmtconvert: fix format enumeration
...
Even if the other pad is already negotiated, we can convert all
formats to F32.
2019-05-09 09:35:03 +02:00
Wim Taymans
636c02d38b
audioconvert: fix native variable rate resampler
2019-04-30 15:14:05 +02:00
Wim Taymans
cd779a1c93
splitter: disable passthrough in more cases
...
Also disable passthrough when we first negotiate output format/buffers
and passthrough is not possible because the output buffer does not
have the dynamic data flag set..
2019-04-25 12:54:03 +02:00
Wim Taymans
2912d2506f
audioconvert: improve resampler
...
Also emit port info the the merger monitor ports.
Proxy params and buffers to the right monitor ports.
fmtconvert does not always have dsp ports
Increase resampler output buffer sizes so that we can up and downsample.
Fix little off by one in native resampler.
Fix passthrough in speex resampler.
2019-04-23 17:34:27 +02:00
Wim Taymans
092a0c660d
make bitfields unsigned
...
Remove driver property from client-node of client-stream.
2019-04-10 17:52:42 +02:00
Wim Taymans
ae3e5787af
audioconvert: unroll some loop
2019-04-10 12:53:25 +02:00
Wim Taymans
dc01b294a2
resample: return the number of consumed samples
...
We need to return the number of consumed samples, even when we don't
start from the first sample in the buffer.
Add some more logging.
2019-04-02 23:06:46 +02:00
Wim Taymans
56158fbb62
channelmix: do passthrough if identity
2019-03-29 21:00:31 +01:00
Wim Taymans
d8e399dee9
audioconvert: pass state to functions
...
Pass some state to convert and channelmix functions. This makes it
possible to select per channel optimized convert functions but
also makes it possible to implement noise shaping later.
Pass the channelmix matrix and volume in the state.
Handle specialized 2 channel s16 -> f32 conversion
2019-03-29 17:39:59 +01:00
Wim Taymans
d47353c0e6
resample-native: small tweaks
2019-03-29 12:08:45 +01:00
Wim Taymans
d260cb19be
audioconvert: compile c version separately
...
Also compile the c versions in a separate module with their own
flags.
2019-03-28 21:07:53 +01:00
Wim Taymans
fe6ebd0e8a
bench: add avx resampler to benchmark
2019-03-28 16:53:26 +01:00
Wim Taymans
e7ef13e310
audioconvert: add avx optimizations
2019-03-28 16:45:57 +01:00
Wim Taymans
7f041f4098
audioconvert: improve benchmark
...
Also include the simd versions in the benchmark
Fix some issues found by new test
2019-03-28 13:26:06 +01:00
Wim Taymans
c8d3d475bb
audioconvert: handle more optimizations
...
Compile an optimized library for the given CPU with the right flags,
then link it with the main library.
2019-03-27 17:58:48 +01:00
Wim Taymans
eaffb25cc2
resample-native: optimize equal input and output sample rates
2019-03-27 13:38:34 +01:00
Wim Taymans
4fafd10a89
resample-native: cleanups
...
Add some comments, reorganize for better readability
More alignment of filter and history
Add some more test
2019-03-27 11:23:52 +01:00
Wim Taymans
555fe2f9f5
resample-native: implement variable rate
2019-03-26 17:25:14 +01:00