Commit graph

1431 commits

Author SHA1 Message Date
Wim Taymans
7f086da39e monitor: fix copy and paste errors
Remove some leftover stuff from the spa_monitor

Spotted by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2020-03-06 18:30:34 +01:00
Wim Taymans
8b53ff55d0 param: add one user field to keep state
The this field can be used by apps who keep a copy of the
spa_param_info. They can use it, for example, to keep a counter
with the amount of changes since last processed.
2020-03-06 15:40:53 +01:00
Pantelis Antoniou
4db9a1e96d audiotestsrc: Make audiotestsrc work
This small patch makes audiotestsrc work.

You will need to uncomment the following lines in pipewire.conf

	add-spa-lib audiotestsrc audiotestsrc/libspa-audiotestsrc
	create-object adapter node.name=my-test factory.name=audiotestsrc

If you use pw-record, use --list-targets to find the target id and
record using --target=<n>

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2020-03-05 18:41:53 +01:00
Wim Taymans
d4fcbaa5d1 debug: make function to get short name 2020-03-05 18:18:54 +01:00
Wim Taymans
c4b2be2aad use true and false for boolean properties
So that it's easier to convert them to booleans in introspection
code later.
2020-03-03 18:17:46 +01:00
Wim Taymans
8096984b7e testsrc: remove checks in suspend and pause
We don't need to have a format or buffers to be able to pause.
2020-03-03 13:17:28 +01:00
Wim Taymans
fef0e17b76 buffer: document memory type when allocating
When allocating buffers the type will contain a bitmask of
allowed types.
2020-03-02 17:28:07 +01:00
Wim Taymans
c3b550478a pod: document that the choice array might have excess elements
The choice array might have excess elements when the type has been
changed, for example by fixation. This is not a problem and the
excess elements should simply be ignored.
2020-02-27 16:23:12 +01:00
Wim Taymans
d43f8011b8 utils: print error in spa_return_*if_fail()
These are really programming errors that need to be logged.
2020-02-25 14:25:00 +01:00
Wim Taymans
cc00e87bdd param: fix types of params 2020-02-25 13:26:31 +01:00
Wim Taymans
e31bfc78ac videotestsrc: mark as driver by default 2020-02-21 16:49:53 +01:00
Wim Taymans
9e625441ad videotestsrc: implement enum port-io 2020-02-21 16:25:55 +01:00
Wim Taymans
90968bbb40 testsrc: implement suspend 2020-02-21 16:24:41 +01:00
Wim Taymans
ee617682c3 audioconvert: implement Portconfig query 2020-02-21 14:59:38 +01:00
Pantelis Antoniou
634a9558e4 Add a spa_debug_type_find_short_name method
Using the short name of a type without the base part is common enough
that a common utility method is warranted.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
2020-02-21 11:30:49 +01:00
Wim Taymans
d8bac82e72 improve logging
Remove some harmless warnings from the log
Remove some excessive info logging
2020-02-21 11:09:34 +01:00
Wim Taymans
a528189d26 slave -> follower
We use master/follower terminology everywhere.
2020-02-21 10:47:32 +01:00
Wim Taymans
bdeeebfdd4 enable and fix -Werror=suggest-attribute=format 2020-02-20 18:20:04 +01:00
George Kiagiadakis
0bff0e345f audioconvert: disable monitor port logic if both sides are in dsp mode
There is a use case where you may want to use audioconvert with
both input & output sides configured in dsp mode, for altering
the stream volume. When it is configured like that, the
IS_MONITOR_PORT macro wrongly thinks that all output ports except
the first one are monitor ports, originating in the merger instead
of the splitter.

This change fixes that and it also completely disables exposing
monitor ports, even if they are enabled, when both sides are in
dsp mode (fmt_input_port_info() also uses the same macro to check
if the monitor ports are to be exposed)
2020-02-20 12:34:42 +00:00
Wim Taymans
01934297bd fix compilation warning 2020-02-20 12:03:16 +01:00
Wim Taymans
11086f23ea pod: add and use reserve_bytes helper 2020-02-19 11:02:00 +01:00
Wim Taymans
ea911f2e3f tweak buffers a little
JACK can handle 2 buffers at most, make the default buffer allocator
allocate 2 buffers when no params are given.
Prefer 2 buffers, it allows some form of async fill/consume
2020-02-19 10:17:00 +01:00
Wim Taymans
632c8440f8 builder: pass NULL to _raw to reserve memory 2020-02-19 09:57:57 +01:00
Wim Taymans
2a487d5fdb filter: implement filter with Step
Implement filter between Step and Range as if the Step were a
range, ignoring the step value for now.
2020-02-18 18:04:05 +01:00
Wim Taymans
75e14ecadc resample: tweak resample qualities a little 2020-02-14 20:23:15 +01:00
Wim Taymans
621f6ca10b resample: reset props first, then override 2020-02-14 20:22:55 +01:00
Wim Taymans
dbd483cb46 resample: add resample.quality property 2020-02-14 20:19:47 +01:00
Wim Taymans
3fab544d3d resample: add quality property 2020-02-14 20:16:50 +01:00
Wim Taymans
0023aac9b9 resample: add some more qualities
Clamp quality to available qualities.
0 is a valid quality
2020-02-14 18:00:49 +01:00
Wim Taymans
484d211119 spa-resample: quality 0 is a valid value. 2020-02-14 16:55:37 +01:00
Wim Taymans
046f41c31c test: fix number of queued samples
The number of queued samples is twice the delay.
2020-02-14 10:52:21 +01:00
Wim Taymans
6603fab405 spa-resample: flush last samples
Use 0 samples to flush out the last samples from the resampler.
2020-02-14 09:50:49 +01:00
Wim Taymans
039f6751e1 resample: fix delay reporting 2020-02-14 09:50:35 +01:00
Wim Taymans
5df1c5ae40 resample-native: fix phase shift 2020-02-13 20:41:14 +01:00
Wim Taymans
7267a6bc34 resample: remove old debug variable 2020-02-13 20:11:39 +01:00
Wim Taymans
83f2e890ad tools: add generic resampler tool
Add a tool that can convert the sample rate of an input file and
write it to an output file. This tool can be used to test the
resampler.
2020-02-13 16:46:03 +01:00
Wim Taymans
761119f640 resample: fix start position of new samples
When we finished processing the history it might be possible that we
need to skip some samples from the input. Implement this by adding
a start offset for the samples in the buffer.
2020-02-13 16:43:06 +01:00
Wim Taymans
192fee98a4 fmtconvert: suggest 2 buffers by default
When running pw_stream with async process, we need an extra buffer
to compensate for the thread switch.
2020-02-13 09:47:19 +01:00
Wim Taymans
454e743d1a resample: make quality configurable 2020-02-12 13:31:03 +01:00
Wim Taymans
e68139079d volume: set the right info flags for params 2020-02-11 12:12:49 +01:00
Wim Taymans
6085c0eaee v4l2: use the buffer time as pts
Don't try to use the seq number as pts, just use the timestamp
returned from v4l2 if any so it can be matched against the clock.
2020-02-11 11:21:34 +01:00
Wim Taymans
09503f0987 meta: move seq number around for v2 compat
The v2 gstreamer elements use the pts for timestamps so make sure
it is still in the same place as before.
2020-02-11 11:20:40 +01:00
Philipp Zabel
cb1071bce7 alsa-seq: fix seq_open error path
If snd_seq_open fails, do not call snd_seq_close(NULL).
2020-02-07 19:07:14 +01:00
Wim Taymans
42b1e163d7 tests: make benchmarks less busy
Reduce iterations of the benchmark so that can finish on slower
devices.
2020-02-07 15:22:35 +01:00
Wim Taymans
7e95897a3b fmt-ops: fix test for big endian 2020-02-05 17:09:23 +01:00
Wim Taymans
95ecbacfe0 meson: install headers in versioned paths
Make sure all headers and plugins are installed in versioned paths
so that we can parallel install versions if we want.
2020-02-05 16:28:22 +01:00
Wim Taymans
5ff970a62e param: add Control param
A control param contains a set of timed events that are applied
in the next cycle.
2020-02-05 10:01:14 +01:00
Wim Taymans
1404cb4182 alsa-pcm: add device to object path
Use card id and device in the object path.
2020-02-04 18:01:48 +01:00
Wim Taymans
8abbf653e6 pw-cat: Use default channel layout when nothing given
Make channel layout definitions a little more useful. We can now
assign them to a layout_info struct or in the raw_info.
Make some default channel layouts for use in pw-cat
2020-02-04 15:54:57 +01:00
Julian Bouzas
25e81d844a spa: add SPA_PARAM_PORT_CONFIG_control param
Needed for nodes with optional configurable control ports.
2020-02-04 13:25:25 +01:00