Commit graph

7511 commits

Author SHA1 Message Date
zayar lwin 1fe54e5f17 Update LINGUAS now conclude [my] 2021-08-27 11:44:19 +00:00
zayar lwin 979239355e po: ADD burmese [my] translation 2021-08-26 15:33:54 +00:00
Wim Taymans 73854e9ec9 filter-chain: improve convolver
Make the input buffer a little larger and leave the top blockSize
samples zero. That way we can fill up the lower part, leave the upper
part zero padded and feed this to the fft directly. Also only clear
the lower part when we can't fill it completely.

This removes some memcpy and memset operations.
2021-08-26 17:19:48 +02:00
Wim Taymans 1924c2c298 0.3.34 2021-08-26 13:05:12 +02:00
Julian Bouzas 34b1ecc244 pw-cat: calculate number of samples properly with io_rate_match
Fixes wrong buffer sizes when adapter is configured in passthrough mode.
2021-08-25 19:23:23 +00:00
Wim Taymans a701a500af filter-chain: add hilbert function
Can be used to perform a 90 degree phase shift.
2021-08-25 21:20:42 +02:00
Wim Taymans 09a0fdcc0f protocol-simple: avoid freeing client multiple times
Ensure we only queue one cleanup operation and cancel all pending
operations when we destroy the client.

Fixes #1550
2021-08-25 21:19:25 +02:00
Pauli Virtanen 63ba9f98ba bluez5: don't create aptx-ll/faststream sink endpoints
We don't currently implement encoding for the duplex channel
for these codecs, so they are not fully functional as A2DP sinks,
and their main use is anyway with headphones.

Also, the number of endpoints in BlueZ appears to be limited, and
appears to be counted across all adapters.  Unclear whether this comes
from AVDTP limitation, but currently plugging in a second BT adapter
causes the second media application registration to fail.  This change
reduces the number of endpoints enough so that registration succeeds for
two adapters.
2021-08-25 20:58:15 +03:00
jakobrs d1f521af40 Add missing > in link factory usage string 2021-08-25 15:39:06 +00:00
Wim Taymans a9169cf491 pulse-server: Handle formats of virtual devices better
Virtual devices tend to start with partial fields set in the EnumFormat
param (usually rate is missing). This causes virtual devices to be
invisible until they are used in some way.

Fix this by relaxing the parsing of EnumFormat and by falling back to
the server defaults for the unspecified fields.

Fixes #1413
2021-08-25 17:33:22 +02:00
Wim Taymans 3526e33fe1 impl-node: send Pause when a Play reply is pending
When we send a Play request to the client but it deactivates before
sending the reply, make sure we send a Pause request as well so that
Play/Pause is always matched up.

Fixes #1548
2021-08-25 16:29:59 +02:00
Wim Taymans 743aaa3dbd audioconvert: don't just copy the converter flags
We need to manage our own flags based on the direction of the follower.

We also need to make sure we only clear the NEED_CONFIGURE flag
after we are actually configured, not just when we configured our
internal converter.

See #1548
2021-08-25 15:11:54 +02:00
Wim Taymans 67965d60be stream: fix debug message 2021-08-25 13:08:49 +02:00
Wim Taymans 762f45c5a0 jack: move the free object list to globals
Move the free object list as a global so that we can even access old
objects after client_closed.
Move the objects from a client to the global free list when we close
the client.

Ardour wants to access objects even after calling client_close() so
we need to keep them around a little longer.

See #1546
2021-08-25 11:56:19 +02:00
Wim Taymans 999083105c jack: protect against bad ports and buffers 2021-08-25 11:54:41 +02:00
Wim Taymans 11cb77c577 context: fall back to default rate in case of errors
When the allowed rates does not contain the default rate, also
fall back to only the default rate.
See the configured rates in the properties so it can be inspected.
2021-08-25 09:28:23 +02:00
Wim Taymans df92c09ff5 filter-chain: fix loop index 2021-08-24 16:45:11 +02:00
Wim Taymans 1e4e83d305 filter-chain: add more mixer ports
Add option to set NULL data as the port data so that plugins can
skip processing.
Add 8 mixer ports and skip NULL data.
Move silence and discard samples to static area.
Improve the virtual sink examples. use the correct mixing for the HRIR
channels.
2021-08-24 16:26:06 +02:00
Wim Taymans 123fe3d1c5 filter-chain: improve pffft compilation and CPU support
Compile different pffft versions per CPU.
Plug the right version depending on the runtime CPU.

See #1543
2021-08-24 12:07:37 +02:00
Wim Taymans 0f5face73f filter-chain: use pffft for the convolver
It is faster.
2021-08-23 21:00:45 +02:00
Wim Taymans 9dbfa63193 audioconvert: silence an info debug message 2021-08-23 17:44:56 +02:00
Wim Taymans 34e53113e2 pulse-server: handle the case where rate-match returns 0
Still feed the minreq amount of data into the converter.
2021-08-23 17:27:45 +02:00
Wim Taymans b0a9945ed0 alsa: only enable PCM iec958 codec when configured
Rework the codec enumeration a little and don't automatically enable PCM
as the code unless requested by the user.
2021-08-23 17:07:17 +02:00
Wim Taymans 454a9bd55f media-session: detect passthrough and passthrough only nodes 2021-08-23 13:28:02 +02:00
Wim Taymans 44d575ba70 stream: enable adapter for all audio streams
This way, we can support streams with normal and passthrough
formats by switching the adapter mode.
2021-08-23 13:06:06 +02:00
Wim Taymans 10c3bf5ff3 media-session: detect and block passthrough-only streams
If we see that the stream only has passthrough formats, make them
error immediately for now.
2021-08-23 13:03:50 +02:00
Wim Taymans 1a713e963a pulse-server: fix parsing and creation of iec958 formats
Implement creating IEC958 format EnumFormat params.

Fix parsing of negotiated IEC958 formats and convert to our internal
format.
2021-08-23 12:09:53 +02:00
Wim Taymans bceb9a4b6e pipewire-pulse: enumerate iec958 formats for sinks 2021-08-23 11:58:29 +02:00
Wim Taymans 2e6f80f808 alsa: only list IEC958 codecs when iec958 or hdmi device. 2021-08-23 11:58:29 +02:00
Wim Taymans 437275460c alsa: add set_format for iec958 formats 2021-08-23 11:31:52 +02:00
Wim Taymans 5feb88575c spa: add helpers to parse and create iec958 formats 2021-08-23 11:31:52 +02:00
Wim Taymans 9dfe35b17c alsa: add enumeration of iec958 format
For hdmi and iec958 devices, enumerate the iec958 formats and
codecs. Initially only PCM is supported as a codec but with
a property or an init option, the list of codecs can be dynamically
configured.
2021-08-23 11:31:52 +02:00
Wim Taymans 8147772cf5 spa: add definitions for IEC958 (S/PDIF)
Add Format subtype and codec property.
Add codecs to include in the format codec property.
Add property to configure elements with supported codecs.
Add type info.
2021-08-23 11:31:52 +02:00
Wim Taymans 0af0cceca2 audioadapter: use format directly when reconfiguring
There is no need to parse and then recreate the format.
2021-08-23 11:20:52 +02:00
Wim Taymans 2427eeae2b audioconvert: reset converter format as well
Reset the format of the converter so that when we go back to DSP mode,
we don't expose the old ports again.
.
2021-08-23 11:20:52 +02:00
Wim Taymans 8f7a972a48 audioadapter: fix passthrough switching some more
Remove the follower ports when leaving passthrough, add the DSP
ports.
Set up the link_io between follower and convert again when leaving
passthrough.
2021-08-23 11:20:40 +02:00
Wim Taymans 9090f19b0a audioconvert: improve passthrough mode
When in passthrough mode, use the position io to update the
io_rate_match fields for the follower. This makes it possible for the
follower to also provide the right amount of data when the converter
is not selected in passthrough.

Add an option to configure the converter in None port config where it
removes all the ports. We can use this when removing the converter to
make sure all it's ports are removed.

When we remove the converter, make sure we expose the follower ports
directly so we can use them for passthrough.
2021-08-23 11:11:11 +02:00
Wim Taymans 24f61deefd media-session: also check restore-stream when info updates
We only need an info update to restore the stream so check for that
in addition to a param update.

The info update can be used to restore the stream and the param update
to update the stored value.
2021-08-23 10:58:29 +02:00
Pauli Virtanen 7362a6be04 bluez5: update mSBC kernel version blocklist
Also versions 5.10.y, y >= 51 contain patch that removes ALT 1 support,
and fix has not reached stable yet.
2021-08-23 08:21:44 +00:00
Pauli Virtanen 82fc54f252 media-session: bluez-autoswitch: save user-selected headset profile
When switching back from the recording mode, save currently selected
profile as the default headset profile to use in future.

This allows users to select a specific profile they want to use for
input, and to avoid autoswitching to HFP/HSP if they want to use a
different microphone, without needing to edit configuration files.
2021-08-23 08:21:13 +00:00
Pauli Virtanen ab5fcf4a66 bluez5: boost A2DP duplex microphone volume by 20 dB
There doesn't seem to be a way to control the A2DP duplex microphone
HW volume gain, and devices sometimes have very low mic volumes.

Work around this by boosting the software volume scale by +20 dB.  If it
causes clipping, the user can just reduce the volume to bring SW gain
below 1.0.
2021-08-23 08:17:46 +00:00
Pauli Virtanen e08cdf27d5 bluez5: add FastStream codec
A2DP codec that uses SBC.  Has a duplex channel, which sends an SBC
stream back.
2021-08-23 08:17:46 +00:00
Pauli Virtanen c628975a75 bluez5: update fastream caps from bluez 2021-08-23 08:17:46 +00:00
Julian Bouzas b368bea98c audioconvert: do _port_set_param on fmtconvert if convert mode
The fmtconvert plugin does not support SPA_PARAM_PortConfig. Instead, we need to
set the format in the specific port with SPA_PARAM_Format.
2021-08-23 08:11:21 +00:00
Pauli Virtanen dedc08cdf8 bluez5: enable duplex for aptx-ll
aptX-LL sink devices may send back mSBC encoded data corresponding to
microphone input.  It appears to be enabled when the bidirectional link
is set in the caps, and the device also supports this.

Implement mSBC decoding in the duplex channel.

Tested to be working on Avantree Aria Pro.
2021-08-22 17:41:50 +03:00
Pauli Virtanen 623b6df8a2 bluez5: work around obscure issue with a2dp-source with duplex
For unknown reason the BT socket when working with A2DP "duplex" stream,
sometimes stops waking up poll when data arrives. Regardless, recv() can
read data packets from it.

To work around this, when A2DP source is in duplex mode, instead of
polling on data, we poll on a timer.
2021-08-21 20:00:52 +03:00
Pauli Virtanen eca37b58a6 bluez5: make room for a2dp duplex channel
Some non-standard A2DP codecs (FastStream/aptX-LL) have "voice duplex
channel" that can be used to provide an A2DP duplex mode.

Add support for duplex channels, accounting for the fact that the two
directions may be encoded with different actual codecs.
2021-08-21 20:00:52 +03:00
Wim Taymans 4ab8ecfe06 pipewire: allow : in SPA_PLUGIN_DIR to scan multiple paths 2021-08-20 10:15:21 +02:00
Wim Taymans abf37f618e modules: ensure node.name and description are set
Most apps need this and some even crash when they are not set.
2021-08-20 09:26:17 +02:00
Stefan Riesenberger bb2f637839 pipewire-pulse: set description for ladspa sources 2021-08-19 17:33:31 +02:00