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