Skip to content

Commit

Permalink
Merge pull request #51 from melianmiko/release/v0.15.0
Browse files Browse the repository at this point in the history
v0.15.0 features
  • Loading branch information
melianmiko authored Nov 17, 2024
2 parents fa1b625 + b7d7588 commit d3dc486
Show file tree
Hide file tree
Showing 80 changed files with 3,017 additions and 1,402 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,20 @@ jobs:
- uses: actions/checkout@v4
- name: Install dev-dependencies
run: |
sudo apt update
sudo apt install -y build-essential
sudo ./scripts/install_dpkg_dependencies.sh
- name: Set up poetry environment
run: poetry install
- name: Change in-app version
run: python3 ./scripts/bump_version.py git
- name: Run build script
run: bash ./scripts/build_debian/build.sh
- name: Build
run: dpkg-buildpackage -b
- name: Move release to dist dir
run: mv ../*.deb ./dist
- name: Upload bundle
uses: actions/upload-artifact@v4
with:
name: Debian package
path: ./scripts/build_debian/openfreebuds*
path: ./dist/*
if-no-files-found: error
37 changes: 19 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
<p>
<img src="https://img.shields.io/github/v/release/melianmiko/openfreebuds" alt="Last release"/>
<img src="https://img.shields.io/aur/last-modified/openfreebuds" alt="Last AUR release"/>
<a href="https://translate.mmk.pw/projects/0a1e818d-92b0-4f43-a1be-570e2ec35c8a"><img alt="Translated" src="https://translate.mmk.pw/0a1e818d-92b0-4f43-a1be-570e2ec35c8a/percentage_reviewed_badge.svg" /></a>
<a href="https://github.com/melianmiko/OpenFreebuds/actions/workflows/on_push.yml">
<img src="https://github.com/melianmiko/OpenFreebuds/actions/workflows/on_push.yml/badge.svg" alt="Test build status"/>
</a>
</p>
<p>
<a href="https://mmk.pw/en/openfreebuds"><b>💿 Download binaries</b></a> | <a href="https://mmk.pw/en/openfreebuds/help/"><b>❓ FAQ</b></a> | <a href="https://translate.mmk.pw/projects/0a1e818d-92b0-4f43-a1be-570e2ec35c8a">🌍 Suggest translation</a>
<a href="https://mmk.pw/en/openfreebuds"><b>💿 Download binaries</b></a> | <a href="https://mmk.pw/en/openfreebuds/help/"><b>❓ FAQ</b></a>
</p>
<p>
<img alt="Tray menu preview" src="docs/preview_0.png" />
Expand All @@ -32,7 +31,7 @@ Features

![Settings preview](docs/preview_1.png)

Device compatability
Device compatibility
------------------------

See device page to get information about supported features.
Expand All @@ -41,10 +40,12 @@ If your device isn't listed here, you could try to use it with profile for other
- [HUAWEI FreeBuds 4i](./docs/devices/HUAWEI_FreeBuds_4i.md)
- **HONOR Earbuds 2** is same
- [HUAWEI FreeBuds 5i](./docs/devices/HUAWEI_FreeBuds_5i.md)
- [HUAWEI FreeBuds 6i](./docs/devices/HUAWEI_FreeBuds_6i.md)
- [HUAWEI FreeBuds Pro](./docs/devices/HUAWEI_FreeBuds_Pro.md)
- [HUAWEI FreeBuds Pro 2](./docs/devices/HUAWEI_FreeBuds_Pro_2.md)
- [HUAWEI FreeBuds Pro 3](./docs/devices/HUAWEI_FreeBuds_Pro_3.md)
- [HUAWEI FreeBuds SE](./docs/devices/HUAWEI_FreeBuds_SE.md)
- [HUAWEI FreeBuds Studio](./docs/devices/HUAWEI_FreeBuds_Studio.md)
- [HUAWEI FreeLace Pro](./docs/devices/HUAWEI_FreeLace_Pro.md)
- [HUAWEI FreeLace Pro 2](./docs/devices/HUAWEI_FreeLace_Pro_2.md)

Expand All @@ -53,15 +54,22 @@ May also work with newer/older devices in same series. If you want to get better
Download & install
-----------------

- **Windows**: [Download here](https://mmk.pw/en/openfreebuds/).
- **Debian/Ubuntu**:
[![Download for Windows](./docs/download_buttons/windows.png)](https://mmk.pw/en/openfreebuds/)
[![Available in FlatHub](./docs/download_buttons/flathub.png)](https://flathub.org/apps/pw.mmk.OpenFreebuds)


#### Debian/Ubuntu

```shell
curl -s https://deb.mmk.pw/setup | sudo bash -
sudo apt install openfreebuds
```
- **Arch Linux**: `openfreebuds` [available in AUR](https://aur.archlinux.org/packages/openfreebuds).
- **Flatpak**: _Coming soon_

#### Arch Linux

`openfreebuds` [available in AUR](https://aur.archlinux.org/packages/openfreebuds).

#### Test builds

Most recent `dev`-binaries can be found in [GitHub Actions](https://github.com/melianmiko/OpenFreebuds/actions/workflows/on_push.yml) build artifacts.

Expand All @@ -87,13 +95,7 @@ poetry install
### Just launch without installation

```shell
# Compile Qt Designer & Linguist sources
./scripts/make_qt_parts.sh

# Launch
poetry run python -m openfreebuds_qt -vcs

# use --help for options description
./scripts/make.py build_launch
```

### Windows
Expand All @@ -111,11 +113,10 @@ Output binaries will be located in `scripts\build_win32\dist`
Install all packaging dependencies automated way:
`apt install build-essentials && ./scripts/install_dpkg_dependencies.sh`.

Go to `scripts/build_debian` and run build script:

```shell
cd scripts/build_debian
./build.sh
dpkg-buildpackage -b
```

Output file will be located in parent folder (`../*.deb`).

![Extra dialogs preview](docs/preview_2.png)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/make -f

%:
dh $@

override_dh_auto_build:
python ./scripts/make.py build

override_dh_auto_install:
python3 ./scripts/make.py install debian/openfreebuds/usr debian/openfreebuds/usr/lib/python3/dist-packages

override_dh_clean:
git clean -xfd -e accent.json
4 changes: 4 additions & 0 deletions debian/source/options
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tar-ignore = "*venv"
tar-ignore = ".git"
tar-ignore = "accent.json"

11 changes: 0 additions & 11 deletions docs/accent.json

This file was deleted.

30 changes: 30 additions & 0 deletions docs/devices/HUAWEI_FreeBuds_6i.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# HUAWEI FreeBuds 6i

Protocol: Huawei SPP, port 1

## Features

- Fetch device information and battery level: ✅
- Fetch in-ear status: ✅
- Sound quality preference: ✅
- Low-latency mode: ✅
- Control noise cancellation: ✅
- With cancellation level
- With dynamic cancellation
- Set double-tap action: ✅
- Set triple-tap action: ✅
- Set swipe action: ✅
- Wear detection (aka auto-pause) configuration: ✅
- Set long-tap action: ✅
- Split configuration store
- Change voice language: ✅
- English, Chinese
- Dual connect: ✅
- Equalizer: ✅
- 4 built-in presets
- 2 fake built-in presets (stored in application)
- Up to ??? custom presets in-device memory

## Not planned features

- Firmware update
19 changes: 19 additions & 0 deletions docs/devices/HUAWEI_FreeBuds_Studio.md
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 added docs/download_buttons/flathub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/download_buttons/windows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/research.ods
Binary file not shown.
13 changes: 8 additions & 5 deletions openfreebuds/driver/constants.py
Original file line number Diff line number Diff line change
@@ -1,15 +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 = {
"HUAWEI FreeBuds 5i": OfbDriverHuawei5I,
"HUAWEI FreeBuds SE": OfbDriverHuaweiSe,
"HUAWEI FreeLace Pro": OfbDriverHuaweiLacePro,
"HUAWEI FreeLace Pro 2": OfbDriverHuaweiLacePro2,
"HUAWEI FreeBuds 4i": OfbDriverHuawei4I,
"HONOR Earbuds 2": OfbDriverHuawei4I,
"HUAWEI FreeBuds 4i": OfbDriverHuawei4I,
"HUAWEI FreeBuds 5i": OfbDriverHuawei5I,
"HUAWEI FreeBuds 6i": OfbDriverHuawei6I,
"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,
}
4 changes: 2 additions & 2 deletions openfreebuds/driver/generic/spp.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ async def stop(self):
await self.__task_recv
self.__task_recv = None

self._writer.close()
# await self._writer.wait_closed()
if self._writer is not None:
self._writer.close()

self._writer = None
self.started = False
Expand Down
1 change: 1 addition & 0 deletions openfreebuds/driver/huawei/driver/per_model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .buds_4i import OfbDriverHuawei4I
from .buds_5i import OfbDriverHuawei5I
from .buds_6i import OfbDriverHuawei6I
from .buds_pro import OfbDriverHuaweiPro
from .buds_pro_2 import OfbDriverHuaweiPro2
from .buds_pro_3 import OfbDriverHuaweiPro3
Expand Down
32 changes: 32 additions & 0 deletions openfreebuds/driver/huawei/driver/per_model/buds_6i.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from openfreebuds.driver.huawei.driver.generic import OfbDriverHuaweiGeneric
from openfreebuds.driver.huawei.handler import *


class OfbDriverHuawei6I(OfbDriverHuaweiGeneric):
"""
HUAWEI FreeBuds 6i
"""
def __init__(self, address):
super().__init__(address)
self._spp_service_port = 1
self.handlers = [
OfbHuaweiInfoHandler(),
OfbHuaweiStateInEarHandler(),
OfbHuaweiBatteryHandler(),
OfbHuaweiAncHandler(w_cancel_lvl=True, w_cancel_dynamic=True),
OfbHuaweiActionDoubleTapHandler(w_in_call=True),
OfbHuaweiActionTripleTapHandler(),
OfbHuaweiActionLongTapSplitHandler(w_right=True),
OfbHuaweiActionSwipeGestureHandler(),
OfbHuaweiConfigAutoPauseHandler(),
OfnHuaweiSoundQualityPreferenceHandler(),
OfbHuaweiLowLatencyPreferenceHandler(),
OfbHuaweiEqualizerPresetHandler(w_presets={
1: "default",
2: "hardbass",
3: "treble",
9: "voices",
}, w_fake_built_in=True, w_custom=True),
OfbHuaweiVoiceLanguageHandler(),
OfbHuaweiDualConnectHandler(w_auto_connect=False),
]
19 changes: 19 additions & 0 deletions openfreebuds/driver/huawei/driver/per_model/buds_studio.py
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",
}),
]
Loading

0 comments on commit d3dc486

Please sign in to comment.