Commit graph

908 commits

Author SHA1 Message Date
Wim Taymans
9613f16caf alsa-pcm: ignore error after recover
If we get an error after receovering, ignore it and assume we filled
the buffer completely. We need to do this or otherwise we stop the
timer and audio stops.
2020-03-12 10:52:52 +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
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
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
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
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
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
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
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
50ce87df32 node: we are supposed to produce data when != HAVE_DATA
We can produce data whenever the io area status != HAVE_DATA. We
don't need to look for NEED_DATA.
Also recycling buffer happens whenever the status != HAVE_DATA.
2020-02-04 12:59:16 +01:00
Wim Taymans
f9d6a42f63 audiotestsrc: set stride correctly 2020-02-04 12:41:43 +01:00
Wim Taymans
1cce9a69c8 pw-cat: add channel-map option and option to delay connect
If the target node is set to 0, remove the autoconnect flag. This makes
the session manager disable stream autoconnect and some other program
needs to connect the stream to a sink or node.

Use the channelmap from the file, if available.

Add option to specify/override the channel map for playback.
2020-02-04 11:45:45 +01:00
Wim Taymans
e7b5bd5e5b alsa: actually place the delay in clock.delay 2020-01-30 19:32:19 +01:00
Wim Taymans
3d8eaf8e02 ffmpeg: fix install dir 2020-01-30 17:50:45 +01:00
Wim Taymans
65caf8832c spa: install in versioned directory
So that we can run old and new plugins side by side.
2020-01-29 15:51:41 +01:00
Wim Taymans
82e099ed37 alsa: use the card name in the object.path
The card name (id) can be configured with udev rules to remain
constant based on where the device is plugged in even when there
mulitple of the same devices.
2020-01-29 13:37:35 +01:00
Fabrice Fontaine
3583352feb support: fix build on uclibc
Define TFD_TIMER_CANCEL_ON_SET if needed

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-01-27 23:50:02 +01:00
Wim Taymans
f4387e0568 fmt-ops: add support for s24 with endian conversion 2020-01-27 15:46:25 +01:00
Wim Taymans
6ac9b7b3a7 spa: add spa_aprintf helper
Add a asprintf helper function that handles errors correctly.
Use this in places where we use asprintf to avoid warnings when we
don't check the return value.
2020-01-27 12:19:21 +01:00
Wim Taymans
102a3a3fe0 cpu: add fallback dummy init() function
If the CPU is unknown, make an empty init() function or else we
get undefined symbols.
2020-01-15 13:57:59 +01:00
George Kiagiadakis
0c63d045ee alsa-pcm: call reuse_buffers when resetting the state of the buffers
This allows the upstream node to put buffers back to its pool in case
they were left around in the ready list locally when the alsa-pcm-sink
was last paused.

Fixes #203
2020-01-14 11:28:04 +00:00
Wim Taymans
9db240e786 bluez: implement profile on device
Enumerate the available profiles on the device. Make params
visible.

Implement set_profile, only expose the nodes that belong to the
profile.
2020-01-10 13:25:40 +01:00
Wim Taymans
5f70a2713e a2dp: fix audio
Don't just remove the buffer from the queue when it was only
partially written. To do this, return the error code from add_buffer
and only remove the buffer when there is a real error.
2020-01-10 09:55:02 +01:00
Wim Taymans
f026e95585 audioconvert: use position rate as default rate 2020-01-09 16:50:02 +01:00