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.
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.
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
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
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
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.