Commit graph

995 commits

Author SHA1 Message Date
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
Wim Taymans
c14881fbe2 Respect the rate from the position as the default 2020-01-09 16:43:08 +01:00
Wim Taymans
852ac043d3 Use the DSP format for dsp formats
Use the DSP media subtype to describe DSP formats. DSP formats
don't include the rate, channels and channel position in the
format and must use the rate and duration from the position io. This
makes it possible to later change the samplerate dynamically without
having to renegotiate the graph.

The same goes for the video DSP format, which uses the io_video_size
from the io_position to get the size/stride. Set this up in the node
based on the defaults from the context.

Make it possible to define defaults in the daemon config file, such
as samplerate, quantum, video size and framerate. This is stored in
the context and used for the DSP formats.
2020-01-09 15:18:59 +01:00
Wim Taymans
9ffa9c0b08 v4l2: handle suspend 2020-01-08 13:23:35 +01:00
Wim Taymans
8f3b2b9543 bluez5: implement sync, profile and enum_profile 2020-01-03 13:01:54 +01:00
Michael Tretter
8e6a5a1714 v4l2: print pixelformat as string
The pixelformats are actual 4 letter sequences. Print the letters
instead of the hex value to make the output more readable.
2019-12-19 15:43:13 +01:00
Wim Taymans
f391353c7f Make interface types a string
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
2019-12-19 13:36:04 +01:00
Wim Taymans
9657486a81 alsa-seq: update duration when slaved as well 2019-12-18 13:27:29 +01:00
Wim Taymans
24ab22db12 audioadapter: avoid infinite loop
Rewrite the slave/converter loop a little to avoid infinite loops.
2019-12-18 12:58:42 +01:00
Wim Taymans
d67d012362 audioadapter: loop until we have data
Keep caling the slave processing function until we have data from
the converter or until no process can be made.
2019-12-17 15:11:31 +01:00
Wim Taymans
58a7e18ed5 audioadapter: set data flags 2019-12-17 15:08:39 +01:00
Wim Taymans
49a4440692 audioadapter: pass slave properties directly 2019-12-10 12:48:18 +01:00
Wim Taymans
3131acea46 alsa-seq: close seq device
When we unload, close the seq device again so that the source is
removed from the main loop.
2019-11-28 11:21:41 +01:00
Gleb Popov
b73976ff10 logger: use CLOCK_MONOTONIC on freebsd 2019-11-21 17:55:59 +01:00