[PATCH] bluetooth: Add support for automatic switch between hsp and a2dp profiles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26 Sep 2014 14:19, "Pali Roh?r" <pali.rohar at gmail.com> wrote:
>
> On Friday 26 September 2014 06:55:38 Arun Raghavan wrote:
> > On 26 September 2014 03:06, Pali Roh?r <pali.rohar at gmail.com>
> wrote:
> > > On Wednesday 24 September 2014 19:08:55 Pali Roh?r wrote:
> > >> With this patch module-bluetooth-policy automatically
> > >> switch from a2dp profile to hsp profile if some
> > >> application want to start recording.
> > >>
> > >> By default a2dp profile is used for listening music, but
> > >> for VOIP calls is needed profile with microphone support
> > >> (hsp). So this patch will switch to hsp profile if some
> > >> application want to use microphone and after it release it
> > >> profile is switched back to a2dp. So this patch allows to
> > >> use bluetooth microphone automatically without need of
> > >> user interaction.
> > >>
> > >> Signed-off-by: Pali Roh?r <pali.rohar at gmail.com>
> > >> ---
> > >
> > > And with this patch a2dp profile could be preferred and has
> > > higher priority then hsp. Because a2dp has better audio
> > > quality and when recording is needed my patch for
> > > module-bluetooth-policy will switch to hsp. What do you
> > > think about it?
> >
> > I'm not in favour of an exception-list-based approach (too
> > much of a moving target). I'd written something similar in
> > the past based on the media role. I'd prefer something like
> > this since it allows us to take action based on what the
> > stream is meant to be doing, rather than having a blanket
> > policy that may or may not make sense.
> >
> > http://cgit.freedesktop.org/~arun/pulseaudio/tree/src/modules/
> > module-profile-switcher.c?h=bluetooth
> >
> > The intention when we last discussed on the list wast to
> > integrate this into module-bluetooth-policy (the patch
> > predates merge of m-b-p).
> >
> > -- Arun
>
> This approach depends on that output stream set by application
> will have correct PA_PROP_MEDIA_ROLE. So basically will not work
> with any existing application. So this is useless for me and for
> other people too.

Why not fix said applications? Exposing this metadata correctly allows
several things, such a automatic routing, echo cancellation/noise
suppression, AGC.

The fix can be made via code or starting the app with an environment
variable set.

-- Arun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20140926/fda66fb0/attachment-0001.html>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux