Add new linux app#241
Conversation
91f5884 to
5e5b428
Compare
should probably have an indication when not connected
tbh, I did not want to get results right away; batching would have been fine. But, BlueR seems to give the first scan result only after 10s if I set sampling period.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
@YuseiRun you are running the old version, not this rewrite. Please limit the comments here to the rewrite. |
…ort (#469) * feat: add stem press track control and headless mode support - Parse STEM_PRESS packets and emit AACPEvent::StemPress with press type and bud side - Enable double/triple tap detection on init via StemConfig control command (0x06) - Double press → next track, triple press → previous track via MPRIS D-Bus - Add next_track() and previous_track() to MediaController - Add --no-tray flag for headless operation without a GUI - Replace unwrap() on ui_tx.send() calls with graceful warn! logging (vibecoded) * Update main.rs * feat: make stem press track control optional with GUI toggle Add a --no-stem-control CLI flag and a toggle in the Settings tab for environments that handle AirPods AVRCP commands natively (e.g. via BlueZ/PipeWire). The feature remains enabled by default. - Load stem_control from app settings JSON on startup; --no-stem-control overrides it to false regardless of the saved value - Share an Arc<AtomicBool> between the async backend and the GUI thread; AirPodsDevice holds the Arc directly so the event loop reads the live value on every stem press — toggle takes effect immediately without reconnecting - Persist stem_control to settings JSON alongside theme and tray_text_mode - Add a "Controls" section to the Settings tab with a toggler labelled "Stem press track control", with a subtitle explaining the AVRCP conflict scenario - Fix StemConfig bitmask comment to clarify it uses a separate numbering scheme from the StemPressType event enum values (0x05–0x08)
|
thanks so much for the continued work on this! one minor issue I'd like to report is missing the case battery percentage, using AirPods Pro 3.
More importantly, in my opinion, is that conversation awareness doesn't take into account when you're in a call, so when the microphone is in use. This causes for the conversation awareness to trigger and lower the volume of the call. I think if there's a way to check an ongoing microphone use, conversation awareness shouldn't lower the volume. The workaround is manually disabling this feature and re-enabling it as needed. I'm using latest artifact from 2f1208c. |
|
@randshell the battery is only shown when one of the AirPods are in the case. From your screenshot, I believe none of the AirPods are charging. Thanks for the suggestion about the conversational awareness. I'll implement it when get the time. |
Yes, your assumption is correct.
If it helps, I remember that |
|
I have noticed that the app forces Airpods Pro 3 to SBC-XQ is this intended behaviour and if so why? |
I can reproduce this. |
|
The app handles the audio profiles to route all audio properly based on if the AirPods are worn. And the app also activates/deactivates the profile when some other device connected to AirPods plays audio. It is specifically SBC-XQ because I remember reading somewhere it better than AAC, but I can add an option in the settings to pick which codec to use. For using headset profile- as long as no media starts playing (anything that creates a MPRIS service) when you manually switch to HSP/HFP, the app will not switch to A2DP. |
|
SBC-XQ does indeed have higher quality than AAC. Under most circumstances it is the best choice, but can reduce battery life slightly. If librepods could record what A2DP profile is set by the user on the Pulse/PW side and use that, that'd work and be transparent. I understand that's more complicated to implement than a static default though. |
omg, this 100%. I've quit LibrePods-rust and changed from SBC-XQ to AAC and the link now is more stable when I'm out of the room, and the breaks in the audio are considerably less. It's just more useable overall like this. |
I use AAC preferably that should be also native for AirPods i think but i agree with what @Ari-43 said it would be great if it could get the A2DP profile from system settings. |
I think SBC-XQ is still a fairly sensible default for most users as long as there is some way to choose other codecs. If it is not possible to have LibrePods remember what the user sets in PulseAudio/PipeWire--the most transparent solution--then an option in LibrePods would suffice. |
…495) This fix allows the send thread to make 10 attempts to send it's data. This gives access to seeing the battery status
4bbaa29 to
cb246d1
Compare
|
`
I personally think that SBC-XQ would be the better option as the default as well. I've noticed not insignificant audio latency issues with AAC that don't exist with SBC-XQ on my APP2 -- not sure if its an issue with the BlueZ implementation of AAC or the APP2 however. |
|
First off, I wanted to ask everyone in the thread how often they use the app’s UI? I’m looking for a clear view on if I should separate the background stuff (ear detection, conversational awareness. etc.) from the UI entirely or leave it in the same program and have a headless mode like it currently is. Secondly, I know not everyone’s a developer here looking to make a frontend for this, but what IPC should the app use? D-Bus is my top preference right now, with the app exposing only the parts that are going to be shown, like control commands (config like Listening Mode, Conversational Awareness enabled), battery etc., i.e. the in-ear status, conversational awareness state, and other info will not be available over this. Third- would you use the AirPods microphone if you could continue using A2DP and not switch to HSP/HFP? Because this would involve creating virtual audio source, processing the audio stream and feeding that, a lot of overhead IMO. And lastly, I wanted to go a little off-topic here and throw an idea out here- would it be useful to have a Linux machine as a relay between AirPods and Android TV? I guess that not even everyone in the Apple ecosystem has an Apple TV, so having access basic stuff like ear detection and conversational awareness sounds like a good idea to me. Of course there are several barriers, like having a capable enough Bluetooth adapter to be able to do 2 continuous audio streams and perhaps even more if head-tracked audio ever comes to life. |
I'll throw in my two cents as a user. I rarely use the app's UI---basically only ever to toggle transparency mode. I wish that I could set a keyboard shortcut to do this, which leads into my response to your second question. I think that it would be most useful and idiomatic to expose a As for your last question: if I had an extra Linux machine I would personally prefer to just run Kodi with |
I mostly use this application to reliably monitor battery levels via the tray application. Optimally this would be accessible via a script-friendly CLI as well so I can put it in my bar directly without having a tray icon at all, similar to what I do with my mouse via
I always assumed this was due to a Bluetooth bandwidth limitation on the earbuds' end. Is this no longer the case on modern earbuds? The main issue I have with using HFP, besides the obvious quality drop that severely harms media playback, is the fact that it's significantly louder than the A2DP modes. That issue can be remedied by changing per-application playback volumes, but this is exceedingly annoying to do regularly. |
Not often, I mostly use the tray icon for controls. Although it seems the state of Conversation Awareness isn’t always consistent between the UI and the tray icon’s menu, like state doesn’t copy from one to the other.
If it’s possible to get improved audio while using the mic I would, whether that involves manually switching profiles or not. Currently I leave my AirPods in A2DP and use my webcam’s mic. I’ve seen this article about Apple implementing AAC-ELD in HFP, which seems difficult to say the least (I think this is the same as #545, but only in HFP). So for improved audio it would be nice, but otherwise I don't mind. |
|
I'd love if the microphone could work over A2DP. I often only have my Airpods with me when I am travelling and being able to go on video calls without using my laptop mic would be great. As for the app itself: Given that it is by design Linux only, I think a headless binary with a dbus interface would make the most sense, perhaps accommpanied with a Gnome extension that integrates nicely into the desktop. But once the API is out there, this could easily be built by other people. |



not sure if this is gonna stay in this repo (reason below)
So, the current Qt app wasn’t really as updated as the Android app- the maintainer didn’t have time, and it was too different from the Android implementation for me to easily port new stuff.
This new app is built in Rust, using the iced library, and borrowing the AACP and ATT implementation from the Android app. This app also has a much better UI, and now isn’t just limited to AirPods! The AirPods basic implementation like ear detection and conversational awareness is already in place, along with battery and changing ANC mode.
To-Do List
UI message channel closed)Nothingwill work on this after airpods so it can be merged firstParse notificationsRead battery status from bluez (or something else- it's not sent over ATT)