As AG, set node.rate for output streams that originate from remote
source, so that graph switches rate as needed. This follows what
pipewire-pulse etc. do.
The patch is by Wim.
In this error condition, execution is supposed to return immediately
because rfcomm is no longer valid. However, the code was incorrectly
changed to jump to the done label, which would try to use rfcomm
again to process pending commands.
To be sure that the AG reply correspond to the command sent, this
postpone the new command if previous reply (OK, ERROR or +CME) has
not yet been received.
The postponed command is sent on reception of the reply.
This allows implementing UI mechanisms to transfer the audio of a call
to the HF (pipewire) only when the user explicitly asks/allows it.
Normally, when a call is connected, the phone initiates a SCO connection
and the HF accepts it, transfering audio automatically. In order to
allow for user interaction, this patch enables the UI to set the RejectSCO
property to 'true' in order to automatically reject the SCO connection.
Later on, at the UI's discression, the audio may be reconnected by calling
the Activate() method, which sends AT+BCC to re-initialize the SCO channel.
A configuration file option is also added to configure the default value
of the RejectSCO property. By setting this to 'true' in the config file,
it is possible to implement rejecting the audio of a call that is already
active at the time the Bluetooth connection to the phone initializes.
This is useful for implementations that do hardware offloading of the
SCO audio channel and need to communicate state information to the
hardware (at least).
Start call id at 1 as for the index calls in HFP, and move this id
to spa_bt_telephony_[ag|call] so they can be used by CLCC to retrieve
the related call.
if enhanced call status is supported, send AT+CLCC on +CIEV events to
get the calls information.
The HF should declare the features supported before trying to send
related AT commands.
It should only send AT+CHLD related commands if the remote AG supports
them.
On some phones (at least), sending AT+CHLD=0 while there is no held
call returns an error. Make sure we don't do this to avoid returning
an error on D-Bus when in fact hangup_all actually succeeds.
This commit implements the dial, answer and hangup callbacks to manage
call when connected to HFP AG device.
This adds +CLIP support to be able to get remote party phone number.
Setting a format does not automatically mean making a wav file.
Instead, check for the extension on the output file name and when we
can't find any good containet, use the same as the input file.
This makes more sense than doing `spa-resample test.flac -r 44100 test.wav`
and ending up with a FLAC file named test.wav. Or
`spa-resample test.flac -r 44100 -f s16 test2.flac` and ending up with a
wav file named test2.flac.
The videoadapter always exposes the EnumPortConfig parameter. If no
converter is loaded, the EnumPortConfig parameter doesn't return a
parameter.
In this case, the client-node in the PipeWire server returns -ENOENT for
the EnumPortConfig, which in turn causes WirePlumber to fail the object
activation and it won't be able to create a link for the object.
This happens since Commit b57375ba85 ("stream: enable videoadapter in
all cases"), since now the videoadapter is always added. Before that,
the EnumPortConfig parameter was just not exposed and linking worked.
Running another client that ignores the error codes for missing
parameters (e.g., pw-dump) hides the issue, as the EnumPortConfig result
is cached as successful with 0 parameters and accessing the cache
doesn't return an error code.
Return the same PortConfig for EnumPortConfig as for PortConfig to fix
this.
Do not add/connect the profile for unconnected devices.
This fixes the issue where a previously paired ASHA device
would show up in the pavucontrol output device list even
when not connected.
We only need to switch between the converter ports and the follower port
when we switch between passthrough. Avoid emiting remove of the (non
existing) follower ports when the mode changes from none to DSP at startup.