[pulseaudio-discuss] Bluetooth HSP and HFP support in pulseaudio

Pali Rohár pali.rohar at gmail.com
Tue Apr 28 14:12:31 UTC 2020


On Tuesday 28 April 2020 16:33:01 Tanu Kaskinen wrote:
> On Tue, 2020-04-28 at 13:08 +0200, Pali Rohár wrote:
> > On Tuesday 28 April 2020 13:57:42 Tanu Kaskinen wrote:
> > > Just to chime in on the ofono removal issue: I'm also of the opinion
> > > that removing ofono support is not an option.
> > 
> > Well, in this case you have 3 choices:
> > 
> > * Fix it yourself or find somebody who will work on it and would maintain this code in future
> > * Try asking ofono community to start cooperate and tell them start
> >   working and fixing that pulseaudio ofono code (including future maintenance)
> > * Do not take my now fully working hsphpfd support in pulseaudio and do not implement HSP and HFP profiles properly in pulseaudio at all
> > 
> > I'm not going to spend another time with ofono and its buggy audio
> > support, I tried it and it was waste of time, and specially now when
> > ofono community is not interested in cooperation; and I have working
> > better alternative suitable also for supporting other parts (like
> > battery support, input button support, etc...)
> > 
> > And... what is the purpose of buggy ofono backend support in pulseaudio,
> > now when I provided better code HSP and HFP profiles?
> 
> Last year a Collabora developer made a patch that fixed a crash in the
> oFono backend. I assume their customer is using PulseAudio with oFono,
> so I would also assume that it's not so buggy that it's useless (and
> indeed, Georg reports that it's working fine for him). oFono also
> integrates HFP to the telephony stack, which hsphfpd doesn't do.

Also there are lot of users for which HFP profile via current ofono
pulseaudio implementation does not work, see tons of bugs in issue
tracker and tons of blames for pulseaudio and its totally broken and
non-working microphone bluetooth support on internet forums. And I
understand it, for majority of people it does not work.

Really look at reality, bluetooth microphone support in pulseaudio is
worse then poor. And *nobody* did anything in pulseaudio for years.
I was able to implement now everything related to bluetooth audio.

Is that Collabora developer going to implement all missing, needed and
broken stuff in next days? Or at least next weeks/months? If not, who
other is going to handle all those bluetooth problems? Or do you think
that everything is working fine and there is no need to do anything with
bluetooth related code?

I do not want to disagree that for some people it works, I have no
reason to not trust Georg that it works for him.

> Even if hsphfpd could do everything that oFono does, it's a new
> project, I'd call it experimental at this stage. I don't want to tell
> users that they have to change their working software stack in order to
> keep old features when updating to a new PulseAudio version.
> 
> If oFono is not working for you and you therefore can't test it, then
> don't test it. Fixing existing bugs in oFono isn't your job. Just avoid
> touching the oFono code as much as possible.

I really cannot implement and use hsphpfd backend coexistence with
current ofono backend. And I cannot implement (asynchronous) support for
profile switching between A2DP, HSP and HFP profile which I did in that
published code with current ofono backend. This profile switching is
required for hsphfpd and it is not possible to implement it without
touching and fixing ofono code. So this was also another reason why I
removed it from my WIP codebase.

I spend lot of time to understand how is that bluetooth related stuff
working, what is needed for implementation, designed it and implemented.
It is not easy task and I can say that I understand now all parts of
A2DP, HSP and HFP profiles, including how SCO and A2DP audio socket /
transfer works.

Do you think that I'm saying something which is wrong, does not make
sense or could be in better way? If yes, please show me it, so I can
improve that bluetooth parts.

-- 
Pali Rohár
pali.rohar at gmail.com


More information about the pulseaudio-discuss mailing list