Commit graph

1389 commits

Author SHA1 Message Date
Jonas Holmberg
0ccad38df1 alsa-pcm: Fix target calculation
Use threshold instead of last_threshold so that early wakeup is detected
in handle_capture() when duration changes.
2021-01-28 16:18:35 +00:00
Wim Taymans
b2e4f1358d bluez5: clean up some profile names 2021-01-27 20:50:23 +01:00
Wim Taymans
7fa1833310 bluez5: use function to get profile name 2021-01-27 20:39:02 +01:00
Wim Taymans
3312757706 acp: use auto-profile and auto-port properties
Also disable initial automatic profile selection when auto-profile
is set to false
2021-01-27 13:48:10 +01:00
Wim Taymans
64b078d7bb acp: fix port and profile name lookup 2021-01-27 13:48:10 +01:00
Wim Taymans
cdce04bdb1 jack-device: set node.description
Some apps crash when it's not set
2021-01-27 13:48:10 +01:00
Jonas Holmberg
30848ada6b alsa-pcm: Change resync warning to info
Do not print a warning when a client with custom latency disconnects.
2021-01-26 15:46:23 +01:00
Wim Taymans
fbb5dad6d1 alsa: bundle param changes
Only poll events and set_param can cause a param changed events.
Keep track of all the changes in the param user data and at the
end of the poll/set_param emit one notification for all changed
params.
2021-01-25 17:06:54 +01:00
Wim Taymans
30d568403c bluez5: mark profiles as available 2021-01-25 15:53:36 +01:00
Wim Taymans
26d5fe373e bluez5: fix mute
Actually remember the mute state and use this when reporting our
state.

See #559
2021-01-25 15:21:23 +01:00
Wim Taymans
b3f728b1a0 bluez5: set device.bus to bluetooth 2021-01-25 13:07:31 +01:00
Pauli Virtanen
8b4fbac187 sco-sink: msbc timeout should follow processed samples
Remove wrong adjustment to the write timeout with mSBC.

The time between writes should be the 7.5ms at which we encode, which is
correct even when the frames get fragmented to incommensurate tx packets
(on USB BT adapters).

Fixes sound on RTL8176B. This adapter has large reported write_mtu, so
the wrong delay affected it.
2021-01-22 23:11:17 +02:00
Wim Taymans
1eb9d73814 bluez5: skip routes without a profile 2021-01-22 17:35:27 +01:00
Frédéric Danis
f464d8c596 bluez5: Fix NULL dereference in backend-native
Fixes: #602
2021-01-22 15:28:21 +00:00
Wim Taymans
73896bfa83 alsa: rework batch handling a bit
By default, use a 512 period for batch and use 512 headroom
Add a property to disable special batch handling.
2021-01-21 17:14:51 +01:00
Wim Taymans
af092a9a7e v4l2: respect allowed data types
Check if we can do DmaBuf as the data type before we attempt this.
Otherwise we don't get any data in clients that can't deal with
DmaBuf.
2021-01-21 16:04:37 +01:00
Wim Taymans
d82066e49f acp: sync with pulseaudio 2021-01-19 10:52:28 +01:00
Wim Taymans
88727afbd2 resample: take already queued sample into account
When asking for samples, take into account the amount of samples
we already have converted.
2021-01-18 15:09:54 +01:00
Wim Taymans
51d44e9154 test: improve resampler test
Test with different amount of input samples.
2021-01-18 15:08:23 +01:00
Wim Taymans
d9a63dc69f alsa: disable pause-on-idle by default
snd_pcm_drop() causes pops and cracks. It is better to just let the
sink consume silence until it gets suspended.
2021-01-18 11:13:48 +01:00
Wim Taymans
19be555fa6 audioadapter: run the converter after follower drained
When the follower drained, rerun the converter again to let it drain
as well.
2021-01-18 10:29:50 +01:00
Wim Taymans
9b9b85ddbf alsa: put card name in udev monitor event
So that we can use it to construct a good name for the card.

Fixes #524
2021-01-17 11:35:27 +01:00
Wim Taymans
02295c5e2b alsa: call prepare again but ignore EBUSY
Not calling _prepare can cause problems on my card. So call it
again but ignore -EBUSY.
2021-01-15 18:42:35 +01:00
Wim Taymans
6b0abd2057 channelmix: Improve unknown channel layout handling
Clamp position to valid range. so that AUX becomes UNKNOWN.
If we have one mono source channel and unknown destination, copy it
to all destination channels.
If we have one mono destination channel and unknown source layout,
average all channels.
Otherwise, pair source and dest channels.

See #538
2021-01-15 17:51:07 +01:00
Wim Taymans
376436fc2c alsa: remove snd_pcm_prepare() call, it is not needed
set_hw_params already called _prepare for us and calling it twice
might cause trouble in some drivers.

See #580
2021-01-15 16:12:42 +01:00
Wim Taymans
482f96a644 alsa: add option to disable mmap access mode 2021-01-15 15:44:22 +01:00
Wim Taymans
2ff4615e53 alsa: prefer planar formats
They are easier to convert
2021-01-15 15:18:39 +01:00
Wim Taymans
d7ff7d098b audioadapter: don't emit xrun when drained 2021-01-15 09:46:17 +01:00
Wim Taymans
a8faad9f17 fmt: support f32p -> s24s conversion
As used by MAudio Fasttrack Pro

See rhbz#916017
2021-01-14 17:58:54 +01:00
Wim Taymans
be107317f5 Silence some dbus errors
Log info when a service is not running and disable it.
2021-01-14 17:11:42 +01:00
Wim Taymans
7347b5ef05 alsa: add api.alsa.headroom setting
Can be used to tweak the extra distance kept between the hardware
and software pointers when reading and writing.

See #289
2021-01-14 17:10:05 +01:00
Wim Taymans
abe73c9146 meson: use global b_pie to build PIE executables 2021-01-14 16:29:32 +01:00
Frédéric Danis
1b10bee6f8 bluez5: Fix double free in backend-native
This occurs when exiting `pipewire-media-session` with a headset connected.

Fixes !395
2021-01-14 15:16:31 +01:00
Wim Taymans
c9354c238f Add -fPIE to installed executables
Fixes #570
2021-01-13 19:40:37 +01:00
Frédéric Danis
514836eebe bluez5: Create spa_bt_transport when codec has been negotiated
This waits for codec negotiation completion, i.e. on `SLC` completion if
codec negotiation is not supported or on `AT+BCS` reception if codec
negotiation is supported, before creating the `spa_bt_transport`
2021-01-13 17:35:57 +01:00
Sebastian Apel
8ac5a89583 bluez5: Added mSBC support in bluze5 backend native, including check to make sure the computer's bluetooth adapter
supports the transport modes required for mSBC
2021-01-13 11:20:22 +01:00
Frédéric Danis
7bd86df6df bluez5: Add simple HFP AG support to backend-native 2021-01-12 11:21:55 +01:00
Frédéric Danis
677f122f1d bluez5: Split RFComm from spa_bt_transport
RFComm channel should not be part of the spa_bt_transport as this one may
change during HFP connection.
2021-01-12 11:21:55 +01:00
Frédéric Danis
00cce32514 bluez5: Rename backend-hsp-native to backend-native 2021-01-12 11:21:55 +01:00
Nicolai Syvertsen
09a690b123 spa-acp-tool: fix set-volume vol argument parse 2021-01-11 22:26:30 +01:00
Wim Taymans
b3f8a4b99b acp: update pcm proplist for UCM as well
Update the properties we get from the pcm handle right before we
close the handle.
Also set properties on the UCM devices.

See #524
2021-01-11 15:39:48 +01:00
Wim Taymans
6a9552a4ac acp; fall back to default when profile-set is not accessible 2021-01-11 13:05:11 +01:00
Wim Taymans
ac861a86c0 acp: make it possible to pass properties to test tool
So you can do:

spa-acp-tool -c 1 -p 'device.profile-set=behringer-umc202.conf'
2021-01-11 11:44:13 +01:00
Wim Taymans
dea4836203 alsa-pcm: always start device
Also start device after writing silence.

Fixes #558
2021-01-11 07:11:09 +01:00
Wim Taymans
4d15df6f24 bluez5: improve device and node properties
Set form factor, name routes based on form factor.
Improve profile names
Make card and node names like pulseaudio, with bt address in them.
Fill in port type in the route info.

Fixes #544
2021-01-10 20:56:27 +01:00
Jarkko Sakkinen
7aabd50d1e udev: Make Udev optional
In order to further simplify "unprivileged" builds, add "udev" boolean,
which make installing Udev rules optional.

I.e. without requiring any ugly hacks (mktemp -d), an privileged build
capable of running PulseAudio and JACK applications, can be configured
trivially:

meson --prefix=~/.local build
meson configure build -Dsystemd-user-unit-dir=$HOME/.config/systemd/user
meson configure build -Dpipewire-alsa=false
meson configure build -Dudev=false

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
2021-01-09 23:42:05 +02:00
Pauli Virtanen
7ca568db86 bluez5: don't crash if validate_config fails
transport->device_link has to be set when transport->device is not NULL
2021-01-09 12:08:47 +01:00
Sebastian Apel
cbea225abd Improved workaround (v3): adapt processing of mSBC to handle bogus 'all-zero' packets (see #549) 2021-01-09 10:21:45 +00:00
Wim Taymans
540011f1e3 test-resample: fix unit test
Caller should not have to resubmit old samples anymore.

Fixes #551
2021-01-09 10:55:51 +01:00
Wim Taymans
d1f9966a77 resample: implement methods we now call 2021-01-08 17:43:13 +01:00