Commit graph

13380 commits

Author SHA1 Message Date
Wim Taymans
33584dae1d ump: handle sysex from UMP to MIDI1 better
SysEx in UMP can span multiple packets. In MIDI1 we can't split them up
into multiple events so we need to collect the complete sysex and then
write out the event.

Fixes SysEx writes to ALSA seq by running the event encoder until a
valid packet is completed.

Also fixes split MIDI1 packets in the JACK API when going through the
tunnel or via netjack.
2025-03-19 17:53:05 +01:00
Wim Taymans
ada2146692 jack-tunnel: improve port names
Prefix midi port names with midi_ and number ports from 1 instead
of 0.
2025-03-19 17:53:05 +01:00
Wim Taymans
a241495eaf jack-tunnel: support passing port names to link
Add jack.connect-audio and jack.connect-midi to specify an array of port
names to link to instead of the default phyisical ports.

Also actually fixes linking the midi ports correctly.
2025-03-19 17:53:05 +01:00
Wim Taymans
74035f0a34 rtp-sdp: format ptime in the C locale
Don't place locale dependent strings in the SDP.

Fixes #4615
2025-03-19 17:53:04 +01:00
Wim Taymans
21e9fdf8ad conf: add a jack-tunnel config snippet
The minimal config might want to enable JACK as a backend so add
an example config for this.
2025-03-19 17:53:04 +01:00
Sanchayan Maity
d329dac6ba gst: Do not use video only info for SPA_PARAM_BUFFERS_blocks
We mistakenly used video only info for setting SPA_PARAM_BUFFERS_blocks,
which would be completely incorrect for audio.

Fixes 6c9ada270.
2025-03-14 12:41:38 +00:00
Wim Taymans
4ffa82b590 jack: add another node name fallback
Use the object-path as a fallback name for the node.
2025-03-14 13:28:48 +01:00
Wim Taymans
4e421e0012 audioadapter: return error code from set_param 2025-03-14 13:26:21 +01:00
Wim Taymans
f1ed12fc8d audioconvert: PortConfig only needs channels and position 2025-03-14 13:25:45 +01:00
Wim Taymans
f0e09ae363 filter-graph: make the filter-graph ports dynamic
When parsing the graph, parse the input and output port names into
a separate string array. This was we can keep them around when
setting up the graph.

Instead of setting up the graph right after loading it, do the graph
setup when we activate the graph. This makes it possible to pass the
input channels to the filter-graph and let it create the right amount of
plugins and ouput channels.

When setting up the graphs in the audioconverter, pass the current
number of channels as the input to the graph and keep track of the
channels that each filter produces.

This way we can also load a custom upmix or downmix graph, for example.
2025-03-14 10:10:18 +01:00
Wim Taymans
76619eaa1d audioconvert: fix the filter-graph samplerate
The filter graph runs before or after the resampler depending on the
direction of the conversion.
2025-03-14 10:03:44 +01:00
Pauli Virtanen
bd3a8b594f spa: acp: indicate ALSA UCM profile errors in UIs
Add "[ALSA UCM error]" to the end of card description, to indicate
something is wrong.
2025-03-13 21:25:55 +00:00
Pauli Virtanen
4338189f76 spa: acp: allow also too few channels in SplitPCM configs
GoXLR Mini has different numbers of channels actually available (21, 23,
or 25) depending on its firmware/etc, but its UCM profile specifies
always 23. The count can then be bigger or smaller than what is actually
available.

Fail a bit more gracefully in the case of too few channels: create all
the split devices specified by the profile. The channels that aren't
actually available in HW just won't get routed anywhere.

ALSA upstream IIUC is saying that the channel counts should be fixed, so
spew warnings that say the UCM profiles are wrong if they look wrong.
2025-03-13 21:25:55 +00:00
Sanchayan Maity
6c9ada270b gst: Fix handling of video planar formats
Tiled formats are not tested and supported yet.
2025-03-13 18:53:23 +05:30
sunyuechi
60981494d6 Add x86 CPU check in meson.build for clang build fix
have_avx = cc.has_argument(avx_args)

gcc generates an error when AVX is unsupported, whereas clang only
produces a warning.

Thus, using Clang on the RISC-V platform incorrectly enables AVX file
compilation, leading to build failures.
2025-03-12 20:49:26 +00:00
Frédéric Danis
1af1fc846c bluez5: backend-native: Add volume support to HFP HF
The volume synchronization could be done even if there's no audio link
and so no transport opened.

This patch allows to send the Speaker (AT+VGS) and Microphone (AT+VGM)
commands at the end of the SLC. And to exchange volume updates using the
telephony DBus interface, even without a transport.
2025-03-12 11:01:50 +01:00
Wim Taymans
48a32e4ced loop: remove return from function returning void
Fixes #4603
2025-03-11 16:34:28 +01:00
Wim Taymans
6598938f12 doc: update MIDI doc 2025-03-11 16:31:08 +01:00
Wim Taymans
8e8306cad8 doc: link to the protocol message documentation 2025-03-11 16:26:06 +01:00
Wim Taymans
b997ff8ac1 devolpment is 1.5.0 2025-03-11 15:14:03 +01:00
Wim Taymans
bf3c7aa6e1 alsa-seq: fix UMP output
We need to set the UMP flag, which is done with
snd_seq_ev_set_ump_data() to make it output the midi data.
2025-03-11 13:29:38 +01:00
Wim Taymans
ff08c28b62 alsa-seq: avoid uninitialized warning 2025-03-11 12:33:08 +01:00
Wim Taymans
badd8691bd audioconvert: remove some unused fields 2025-03-11 11:52:52 +01:00
Wim Taymans
d43fb09ea1 audioconvert: configure resample channels correctly
Depending on the direction of the conversion, we run the resampler
before or after the channelmix. This means we need to use the channel
count before or after the channelmixer instead of always using the
channels after channelmixing.

Fixes #4595
2025-03-11 11:50:48 +01:00
Pauli Virtanen
a503244c10 spa: avoid casting between snd_seq_event_t & snd_seq_ump_event_t
Although the two structs have same initial sequence, it's not really
correct to cast between their pointers. Alsa-lib also does this only
internally, but not in API.
2025-03-10 18:12:54 +00:00
Pauli Virtanen
fd5bd5ca6e spa: fix ALSA UMP support detection in meson 2025-03-10 18:12:54 +00:00
Pauli Virtanen
4379cf446f spa: alsa: support also MIDI-1.0 IO for ALSA seq
Support also non-UMP IO with ALSA seq, in case either alsa-lib or the
kernel does not have UMP enabled.

Add configuration option "api.alsa.seq.ump" for optionally turning UMP
I/O off, for easier debugging.
2025-03-10 18:12:54 +00:00
Nikolay Borodin
6620c6cde1 spa: alsa: allow building without UMP in libalsa
Allow building with older libalsa releases that don't have UMP.
2025-03-10 18:12:54 +00:00
msizanoen
9bc29b4b37 systemd: Disable pipewire user services for root
The `access(2)` based multi-user mediation mechanism doesn't quite work
for the root user, which may cause it to conflict with a running
foreground user session. Prevent this by not running the user service at
all for the root user, which nobody should be doing anyway.
2025-03-10 20:10:31 +07:00
Jan Grulich
4442ab007f stream: don't emit process when disconnecting
Commit b160a72018 introduced this change
before, but it was omitted in e1e0a886d5.

This makes again sure we don't call process callback while disconnecting
stream.

Fixes #3314
2025-03-10 13:23:10 +01:00
Pauli Virtanen
5c1d6fb5ad spa: acp: make spa-acp-tool debug output easier to read
Include log level, file/line numbers, and indent messages for debug
levels.
2025-03-09 16:15:56 +02:00
Pauli Virtanen
6d51b4bb11 spa: acp: be more noisy when UCM profiles fail to be supported
Generally ALSA UCM profiles should all work as they're supposed to be
device-specific, so be more noisy when the profile fails to be supported
due to the PCM device failing to open.

Some logging on the probe outcome in failure case also makes
spa-acp-tool etc. log output easier to read.
2025-03-09 13:10:37 +02:00
Pauli Virtanen
bc890d3b83 spa: acp: in SplitPCM probe channel count and allow excess
In SplitPCM mode, Focusrite Scarlett Gen 4 (USB 1235:8218) UCM profile
specifies "CaptureChannels 2" for the Mic1/2 inputs, but
snd_pcm_hw_params_set_channels(2) fails for the HW device.

Fix by not requiring the channel count to be exact for SplitPCM, but
also allow larger numbers of channels than what UCM profile specifies.
2025-03-09 13:04:26 +02:00
Jan Palus
ef023916b9 module-roc: require roc >= 0.4.0
3270bd4 introduced changes reyling on features from roc 0.4.0
(upstream commit: d18d342)
2025-03-07 08:35:42 +00:00
Frédéric Danis
0e92ab9307 bluez5: backend-native: Fix 3way active call hangup
HFP/HF/TWC/BV-03-C test, which setup an active and a held calls,
expects to receive AT+CHLD=1 (release and swap calls) instead of
AT+CHUP on active call hang up request.

As this changes the active call to disconnected and held call to
being active, the call states should be managed in hfp_hf_hangup
instead of waiting for +CIEV (callheld=0) event which will drop
the previously held call before AT+CLCC reply can inform this call
is now active.
2025-03-07 08:31:24 +00:00
Frédéric Danis
90b95ae065 bluez5: backend-native: Fix incoming call crash
HFP/HF/TWC/BV-01-C test creates an incoming call as soon as the SLC is
completed, i.e. a +CIEV: <callsetup>,1 event just after AT+CHLD=? reply
has been received. This try to parse the rfcomm->telephony_ag->call_list
which has not yet been created.

This commit move the telephony_ag creation to the SLC completed event.
2025-03-07 08:31:24 +00:00
Frédéric Danis
be1fc5f3a6 bluez5: backend-native: Fix ECNR support in HFP HF SDP record
Sending AT+ECNR is supported by the native backend
2025-03-07 08:31:24 +00:00
Wim Taymans
22951a9b87 protocol: document to client-node communication flow a little 2025-03-06 16:52:27 +01:00
Wim Taymans
df1c36aec2 1.4.0 2025-03-06 13:11:38 +01:00
Wim Taymans
4e63717e77 spa: fix device.profile key 2025-03-06 13:11:38 +01:00
Taruntej Kanakamalla
a4a9d3540d gst: sink: copy frames if video buffer from other pool
In case of the video, if the buffer to be rendered is from upstream and
not from the pipewirepool, map the memory into video frames and copy the
frames instead of doing a buffer copy.

Avoid splitting of buffers in the case of video, because that might break
the frame layout, especially planar formats, for the applications which
use pipewiresink as a camera source to capture video.
2025-03-04 22:54:47 +05:30
Wim Taymans
0b5d669679 jack: add option and disable MIDI2 port flags by default
Add an option to add the MIDI2 flag on ports. This is disabled by
default because most JACK apps don't know about the flag and then
refuse to show the MIDI ports.

Fixes #4584
2025-03-04 15:51:39 +01:00
Wim Taymans
3905e3b3d3 stream: set errno to the current error
Make the state_changed event and _get_state() function set errno with
the current error value if the state is in error, so that application
can use this to give more detailed error reporting.

Use this in alsa, v4l2 and pulse to give some other error codes than
EIO.

Fixes #4574
2025-03-04 13:22:51 +01:00
George Kiagiadakis
491fb26f18 bluez5: backend-native: fix parsing +CLCC response with optional number
The format is: <idx>,<dir>,<status>,<mode>,<mpty>[,<number>,<type>]
so the response can be considered parsed when mpty is read.
2025-03-04 08:29:30 +00:00
Stefan Ursella
fb7c37aeb4 alsa-pcm: recognize headroom to calculate max_error and max_resync 2025-03-03 12:26:05 +01:00
Nicolas Fella
398914e609 Add missing includes to metadata.h
Fixes https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4575
2025-02-25 12:49:46 +00:00
Philippe Normand
9296d1645f gst: deviceprovider: Notify default devices changes
This allows GStreamer apps using GstDeviceMonitor to be notified when the user
changes the default input/output devices.
2025-02-25 12:48:21 +00:00
Wim Taymans
54836736b0 pod: avoid use-after-free error because of reallocation
When the pod to filter is in the target builder memory and reallocation
is needed, make sure we refer to the filter in the reallocated memory
instead of the old freed memory.

Fixes #4445
2025-02-25 13:18:37 +01:00
Wim Taymans
fb4475b5da adapter: evaluate node rules before loading the follower
So that the right node.rules are applied to the follower.

See #4562
2025-02-20 17:06:24 +01:00
Wim Taymans
e67c1bc734 1.3.83 2025-02-20 15:19:41 +01:00