mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
bluez5: report HF indicator 2 based battery status
HF indicator 2 (see [assigned-numbers], Hands-Free Profile) is able to report battery percentage at 1% intervals (in range [0, 100]), contrary to the `+XAPL` `+IPHONEACCEV` extension which only supports 10% increments. This does not guarantee increased granularity however, as peers may still be limited to imprecise battery measurements internally or round to coarser percentages. Supporting both additionally broadens the range of devices for which PW can report its battery level. [assigned-numbers]: https://www.bluetooth.com/specifications/assigned-numbers/
This commit is contained in:
parent
f816f702a5
commit
f87942027f
2 changed files with 34 additions and 0 deletions
|
|
@ -256,6 +256,12 @@ enum spa_bt_hfp_hf_feature {
|
|||
SPA_BT_HFP_HF_FEATURE_ESCO_S4 = (1 << 9),
|
||||
};
|
||||
|
||||
/* https://btprodspecificationrefs.blob.core.windows.net/assigned-numbers/Assigned%20Number%20Types/Hands-Free%20Profile.pdf */
|
||||
enum spa_bt_hfp_hf_indicator {
|
||||
SPA_BT_HFP_HF_INDICATOR_ENHANCED_SAFETY = 1,
|
||||
SPA_BT_HFP_HF_INDICATOR_BATTERY_LEVEL = 2,
|
||||
};
|
||||
|
||||
enum spa_bt_hfp_sdp_hf_features {
|
||||
SPA_BT_HFP_SDP_HF_FEATURE_NONE = (0),
|
||||
SPA_BT_HFP_SDP_HF_FEATURE_ECNR = (1 << 0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue