bluez-alsa
bluez-alsa copied to clipboard
ALSA Hook PCM for HFP-AG support
This is a tentative proposal, more a proof-of-concept or discussion piece than a finished work.
Issue #266 proposes adding basic HFP call transfer and termination support to the BlueALSA server when used with HFP-AG profile. This PR addresses the same requirement by adding optional extra functionality to the ALSA client.
I've deliberately kept the new function completely separated from the existing client by implementing it as a Hook PCM with a distinct config file: this is to simplify discussion, experimentation and initial testing. If the new functionality is deemed desirable then the implememtation could possibly be made more efficient by integrating it with the existing ALSA client.
There's no documentation yet, but the idea is that the user is given a new pre-defined PCM called "hfp" that adds call session handling and is used in much the same way as the bluealsa
PCM:
aplay -D hfp sounds.wav
arecord -D hfp:DEV=XX:XX:XX:XX:XX:XX,CODEC=msbc -r 16000 -c 1 -f s16_le recording.wav
I've just force-pushed a re-factored version which will be easier to add into the bluealsa pcm plugin, should that be desired, and hopefully is also more robust
Codecov Report
Base: 69.13% // Head: 62.40% // Decreases project coverage by -6.72%
:warning:
Coverage data is based on head (
4c1a12a
) compared to base (d35297c
). Patch has no changes to coverable lines.
:exclamation: Current head 4c1a12a differs from pull request most recent head b93770a. Consider uploading reports for the commit b93770a to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #525 +/- ##
==========================================
- Coverage 69.13% 62.40% -6.73%
==========================================
Files 44 32 -12
Lines 7564 6544 -1020
==========================================
- Hits 5229 4084 -1145
- Misses 2335 2460 +125
Impacted Files | Coverage Δ | |
---|---|---|
src/hfp.c | 33.33% <0.00%> (-58.34%) |
:arrow_down: |
src/bluealsa-skeleton.c | 67.56% <0.00%> (-32.44%) |
:arrow_down: |
src/bluealsa-dbus.c | 37.61% <0.00%> (-30.85%) |
:arrow_down: |
src/shared/dbus-client.c | 54.30% <0.00%> (-17.41%) |
:arrow_down: |
src/dbus.c | 32.69% <0.00%> (-15.39%) |
:arrow_down: |
src/asound/bluealsa-pcm.c | 71.31% <0.00%> (-4.16%) |
:arrow_down: |
src/asound/bluealsa-ctl.c | 71.83% <0.00%> (-4.08%) |
:arrow_down: |
src/a2dp.c | 39.93% <0.00%> (-3.87%) |
:arrow_down: |
src/ba-transport.c | 72.59% <0.00%> (-2.03%) |
:arrow_down: |
src/io.c | 63.29% <0.00%> (-0.67%) |
:arrow_down: |
... and 24 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
I now feel this product would sit better outside of the bluez-alsa project, and so it is now maintained as a distinct project here: https://github.com/borine/bluealsa-hfp-ag-plugin