[pulseaudio-discuss] [PATCH v3 2/2] bluetooth: Add optional heuristic for switching between hsp and a2dp profiles
Arun Raghavan
arun at accosted.net
Tue May 5 05:10:28 PDT 2015
On 1 November 2014 at 04:20, Pali Rohár <pali.rohar at gmail.com> wrote:
> Not all VOIP applications (specially those which use alsa) set media.role to
> phone. This means we need some heuristic to determinate if we want to switch
> from a2dp to hsp profile based on number and types of source output (recording)
> streams. Some people want to use their bluetooth headset (with microphone) as
> their default recording device but some do not want to because of low quality.
>
> This patch implements some heuristic in module-bluetooth-policy module to decide
> if pulseaudio should switch to hsp profile or not. It check if there is some
> source output with pass all these conditions:
>
> * does not have set media.role
> * do not use peak resample method (which is used by desktop volume programs)
> * has assigned client/application (non virtual stream)
> * do not record from monitor of sink
>
> And if yes it switch to hsp profile.
>
> By default this heuristic is disabled and can be enabled when loading module
> module-bluetooth-policy with specifying parameter switch=2
>
> Signed-off-by: Pali Rohár <pali.rohar at gmail.com>
> ---
This patch is a NACK from me. I disagree with the validity of the
heuristic, and think that the two workarounds I've mentioned in the
original thread (repeated below) are sufficient. I don't want to carry
additional code for this corner case.
1. Patch the app to appropriately set a role, set it via an env.
variable if you can't
2. User specifically opts in for recording from the HSP source via UI
if that's really what he/she wants to do
-- Arun
More information about the pulseaudio-discuss
mailing list