mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
bluetooth: Provide (HSP/HFP-received) battery level as device property
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/482>
This commit is contained in:
parent
d2c97190ef
commit
c667befe9a
4 changed files with 42 additions and 0 deletions
|
|
@ -769,6 +769,7 @@ static void rfcomm_io_callback(pa_mainloop_api *io, pa_io_event *e, int fd, pa_i
|
|||
switch (key) {
|
||||
case 1:
|
||||
pa_log_notice("Battery Level: %d0%%", val + 1);
|
||||
pa_bluetooth_device_report_battery_level(t->device, (val + 1) * 10);
|
||||
break;
|
||||
case 2:
|
||||
pa_log_notice("Dock Status: %s", val ? "docked" : "undocked");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue