-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Initial FreeBuds Studio driver impl (#47)
- Loading branch information
1 parent
3e9d99b
commit 175c85e
Showing
6 changed files
with
70 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# HUAWEI FreeBuds Studio | ||
|
||
Protocol: Huawei SPP, port 1 | ||
|
||
## Features | ||
|
||
- Fetch device information and battery level: ❓ (untested) | ||
- Control noise cancellation: ❓ (untested) | ||
- With cancellation level | ||
- With dynamic cancellation | ||
- Wear detection (aka auto-pause) configuration: ❓ (untested) | ||
- Equalizer: ❓ (untested) | ||
- 3 built-in presets, hardcoded | ||
- AI Life didn't see current equalizer mode, looks like application or firmware bug | ||
- Change voice language: ❓ (no information, currently disabled) | ||
|
||
## Not planned features | ||
|
||
- Firmware update |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
from openfreebuds.driver.generic_debug import * | ||
from openfreebuds.driver.huawei import * | ||
from openfreebuds.driver.huawei.driver.per_model.buds_studio import OfbDriverHuaweiStudio | ||
|
||
DEVICE_TO_DRIVER_MAP = { | ||
"HONOR Earbuds 2": OfbDriverHuawei4I, | ||
"HUAWEI FreeBuds 4i": OfbDriverHuawei4I, | ||
"HUAWEI FreeBuds 5i": OfbDriverHuawei5I, | ||
"HUAWEI FreeBuds 6i": OfbDriverHuawei6I, | ||
"HUAWEI FreeBuds SE": OfbDriverHuaweiSe, | ||
"HUAWEI FreeLace Pro": OfbDriverHuaweiLacePro, | ||
"HUAWEI FreeLace Pro 2": OfbDriverHuaweiLacePro2, | ||
"HUAWEI FreeBuds 4i": OfbDriverHuawei4I, | ||
"HONOR Earbuds 2": OfbDriverHuawei4I, | ||
"HUAWEI FreeBuds Pro": OfbDriverHuaweiPro, | ||
"HUAWEI FreeBuds Pro 2": OfbDriverHuaweiPro2, | ||
"HUAWEI FreeBuds Pro 3": OfbDriverHuaweiPro3, | ||
"HUAWEI FreeBuds SE": OfbDriverHuaweiSe, | ||
"HUAWEI FreeBuds Studio": OfbDriverHuaweiStudio, | ||
"HUAWEI FreeLace Pro": OfbDriverHuaweiLacePro, | ||
"HUAWEI FreeLace Pro 2": OfbDriverHuaweiLacePro2, | ||
"Debug: Virtual device": OfbFileDeviceDriver, | ||
} |
19 changes: 19 additions & 0 deletions
19
openfreebuds/driver/huawei/driver/per_model/buds_studio.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from openfreebuds.driver.huawei.driver.generic import OfbDriverHuaweiGeneric | ||
from openfreebuds.driver.huawei.handler import * | ||
|
||
|
||
class OfbDriverHuaweiStudio(OfbDriverHuaweiGeneric): | ||
def __init__(self, address): | ||
super().__init__(address) | ||
self._spp_service_port = 1 | ||
self.handlers = [ | ||
OfbHuaweiInfoHandler(), | ||
OfbHuaweiBatteryHandler(w_tws=False), | ||
OfbHuaweiAncHandler(w_cancel_lvl=True, w_cancel_dynamic=True, w_voice_boost=True), | ||
OfbHuaweiConfigAutoPauseHandler(), | ||
OfbHuaweiEqualizerPresetHandler(wo_read=True, w_presets={ | ||
1: "default", | ||
2: "hardbass", | ||
3: "treble", | ||
}), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters