Linux + iPhone Continuity / iMessage / SMS
feat: phase 2 of airpods
Zack Bartelb7e37965512f
diff --git a/README.md b/README.mdindex e71fc9b..751e730 100644--- a/README.md+++ b/README.md@@ -33,7 +33,7 @@| **Messages (SMS/iMessage)** | ✅ Stable || **Notification Mirroring** | 🧪 Beta || **Phone Calls** (PipeWire only) | 🧪 Alpha |-| **AirPods** | 🧪 Alpha |+| **AirPods** (opt-in) | 🧪 Alpha |### Clipboard SyncText copied on your Linux desktop appears instantly on your iPhone, and vice versa.diff --git a/docs/BLUETOOTH.md b/docs/BLUETOOTH.mdindex bdc64aa..4b101f5 100644--- a/docs/BLUETOOTH.md+++ b/docs/BLUETOOTH.md@@ -482,6 +482,9 @@ the narrower check; it rules out the `*`/`#` supplementary-service codes deliberBattery for the buds and the case, the listening mode, and in-ear detection, in theDevices list and from `tether --bt-airpods`. No stem control yet.+**All of it is off until switched on** -- `tether --bt-airpods-enable on`. See "Standing+down" below.+It is the one feature here that does not go through BlueZ. AirPods report battery overApple's Accessory Protocol on an L2CAP channel, PSM `0x1001`, the same source an iPhoneuses. `src/core/src/bluetooth/airpods.cpp` opens it directly and is the only raw@@ -506,11 +509,48 @@ set-features 040004004d00d700000000000000request-notifications 040004000f00ffffffffff```+They are **paced, not sent in one burst**. The handshake goes 200ms after the channel+opens, set-features on the handshake acknowledgement, the notification request on the+features acknowledgement or 600ms in, whichever comes first. The firmware discards+anything sent ahead of its own pace, silently: no error, no refusal, the packet simply has+no effect. Each step also has a deadline, because some models never acknowledge and an+unacknowledged step must not stall the session.++Two more notifications are read, and they are what the ownership handoff runs on:++```+connected-devices 04 00 04 00 2E 00 [count] ([mac] * 6 [role] [state]) * count+audio-source 04 00 04 00 0E 00 [mac] * 6 [type]+```++`state` is the ownership field. **Read it as a threshold, never as an exact value**: at or+above `0x10` a host is engaged or about to be, `0x17` is an active owner, below `0x10` it+is not engaged. The exact numbers differ between models -- an idle iPhone sits at `0x15` on+AirPods Pro 2 and 3 and at `0x01` forever on Pro 1 -- so a rule written against exact+values breaks on somebody else's buds.++`0x15` is the one value that has to be carved out of that rule, and getting it wrong costs+the whole feature. It is what a **connected, idle iPhone** reports, permanently, and it is+the state this machine claims the buds *out of*. Treating it as "a peer has them" means the+claim is never sent, this machine never owns anything, and the phone keeps the buds --+which is exactly what a first cut of this did. So: a peer at `0x10`-`0x14` is escalating+and blocks a claim, `0x17` is holding them and blocks a claim, `0x15` blocks nothing.++The address is stored **least significant byte first in connected-devices and in normal+order in audio-source**. That is the protocol, not a bug, and getting it wrong makes a+machine read its own entry as a peer. Both parsers return BlueZ's own text order.++`type` in audio-source is a hint and nothing more: iOS reports `MEDIA` for real calls, and+sends `NONE` every twenty seconds or so *during* one. Deciding anything from it alone+takes the buds off a live call.+A battery notification is `04 00 04 00 04 00 [count]` followed by `count` five-byteentries, `[component] 01 [level] [status] 01`. Components are Right `0x02`, Left `0x04`,-Case `0x08`. Status `0x04` means the component is not reporting — a bud in the case, a-shut case — which is shown as unknown, never as 0%. A notification carries only what-changed, so anything it leaves out keeps its previous level.+Case `0x08`. Status is a **bitmask**: `0x04` is not reporting -- a bud in the case, a shut+case -- and it combines with the charging bits, so a pod charging in an open case reports+`0x05`. Testing for equality misses exactly the common case. Not reporting is shown as+unknown, never as 0%. A notification carries only what changed, so anything it leaves out+keeps its previous level.### Listening mode@@ -575,9 +615,45 @@ thread on one is acceptable.Off by default. `tether --bt-airpods-handoff on`, or the checkbox on the AirPods page.-When the iPhone has a call and the AirPods are connected to *this machine*, Tether pauses-local playback and disconnects them, so the phone can take them. When the call ends it-reconnects them and resumes what it paused.+There are two ways to do it, and which one runs is decided by the machine, not by a+setting: **ownership handoff** when the adapter presents itself as Apple hardware, and+**disconnect handoff** when it does not. `apple_device_id` in `bt_status` says which, and+the AirPods page prints the same thing in a sentence.++#### Ownership handoff++Apple's own. The buds keep both hosts connected and hand *ownership* between them, so the+link to this machine is never dropped, the AAP channel is never given up, and the volume+the stem sets is the volume of whoever owns them.++The trigger is the buds' own peer list, not the phone's call state, so **this path does+not need call control**: a connected-devices notification says the iPhone went active and+that is enough. Music started on the phone counts the same as a call, which is what the+buds themselves do.++`ownership_action()` is pure and tested, and is the same shape as `handoff_action()`: give+them up when a peer goes active, take them back when it lets go, never twice, and buds+already given up come back even if the setting was switched off while they were away.++Two guards carry the weight, both learned from a working implementation rather than from+review:++- **Never claim while a peer is taking the buds.** A claim sent then leaves this host+ contested, and the firmware closes the link about twenty seconds later at the next+ physical event. The peer states from the last connected-devices notification gate every+ claim -- but an idle peer at `0x15` is not one of them, per the wire protocol above.+- **A peer that goes quiet has not necessarily finished.** The firmware reports no audio+ source every twenty seconds or so *during* a call. So a reclaim waits three seconds and+ checks the peer again, up to three times, and stays yielded if the phone re-asserts.++The claim sent when the session comes up is deliberate: AirPods Pro 2 validates a host by+itself, Pro 3 never does, and an unvalidated host is dropped at the first pod movement.++#### Disconnect handoff++The fallback. When the iPhone has a call and the AirPods are connected to *this machine*,+Tether pauses local playback and disconnects them, so the phone can take them. When the+call ends it reconnects them and resumes what it paused.**It needs call control**, because the trigger is the iPhone's call state, which comesfrom `org.bluez.Telephony1` or `org.pipewire.Telephony`. With calls off there is no@@ -615,18 +691,73 @@ them. The phone does not drop the buds the instant a call ends, and retrying forwould fight it for them. Releasing is synchronous because the phone is ringing now;reclaiming runs on its own thread because it has to wait.-**What it does not cover.** Music or video playing on the iPhone is not a call, so-nothing here reacts to it. Seeing that would mean the machine acting as an A2DP sink for-the phone and reading `org.bluez.MediaPlayer1`, which is the opposite of "Keeping the-phone's audio on the phone" below. Not attempted.+#### Getting the audio back on the buds, not the speakers++Both paths have the same trap at the end. The buds come back on the link before their sink+comes back in the audio server, and playback resumed in that gap plays out of the+machine's own speakers -- which is what the user hears, and it was reported as a bug.++So a reclaim waits for the sink. `src/core/src/audio.cpp` asks `pactl`, which both+PulseAudio and PipeWire answer, for `bluez_output.<address>` and makes it the default sink+again before anything is resumed, up to eight seconds.++It only does that when the buds *were* the default sink at the moment they were given up.+Whether the A2DP profile is active is the wrong question -- it is active whenever the buds+are connected, even while the user listens on speakers -- and so is looking for streams on+the Bluetooth sink, because a virtual sink for an equaliser takes them instead. The+default sink is the one thing that reflects what the user actually chose.++ponytail: no silence stream. A host that is itself the audio source has to write inaudible+silence to keep the sink from being torn down while idle; here the media player is the+source and the sink wait covers the gap. Add one if a reclaim is ever seen racing a+sink that PipeWire has already dropped.++**What it does not cover.** On the disconnect path, music or video playing on the iPhone+is not a call, so nothing reacts to it. Seeing that would mean the machine acting as an+A2DP sink for the phone and reading `org.bluez.MediaPlayer1`, which is the opposite of+"Keeping the phone's audio on the phone" below. Not attempted. The ownership path gets it+for free, because the buds report the phone as active either way.++Neither path covers a call **dialled from this machine** over HFP. iOS routes it to the+hands-free unit that placed it, the buds never see the phone become active, and no+host-side action changes that once the call has started. Pick the AirPods on the phone.The constants come from librepods `linux/airpods_packets.h`. The prose`docs/AAP Definitions.md` in the same repository disagrees with the header and is wrong.-`DeviceID = bluetooth:004C:0000:0000` in `/etc/bluetooth/main.conf` is **not** needed for-any of this. It is what makes the machine present itself to the buds as Apple hardware.-Reading battery does not require it, and neither does setting the listening mode ---confirmed 2026-09-08 with the setting absent from `main.conf` on the test machine.+### Presenting as Apple hardware++`DeviceID = bluetooth:004C:0000:0000` under `[General]` in `/etc/bluetooth/main.conf`, then+`systemctl restart bluetooth`, makes the machine present itself to the buds as Apple hardware.+`Adapter1.Modalias` reports `bluetooth:v004Cp0000d0000` once it has taken, which is what+`Adapter::presents_as_apple()` reads and what `apple_device_id` in `bt_status` publishes.++Reading battery does not need it, and neither does setting the listening mode -- confirmed+2026-09-08 with the setting absent from `main.conf` on the test machine. **Apple's own handoff+does need it**: without it the buds offer no AAP ownership to this machine and the only way to+give them to the phone is to disconnect them.++It is a global adapter setting, not a per-application one, and it is not free. Once the firmware+believes it is talking to an Apple device it applies Apple expectations: the session watchdogs, the+ownership arbitration, and an intolerance of rapid repeated card-profile changes. A generic headset+connection is more forgiving precisely because the firmware expects nothing of it.++Tether never writes the file. It reads the result and says what is missing.++### Standing down++`airpods_enabled` in `bluetooth.json`, **off by default**. `tether --bt-airpods-enable on`, or the+checkbox at the top of the AirPods page. While it is off Tether opens no AAP channel at all: no+battery, no listening mode, no in-ear pausing, no handoff, and nothing to fight another AirPods+program for. It is a setting rather than a race to be won: see below.++Off by default for the same reason call control and pause-on-removal are. The channel takes one+client per machine, so opening it takes the buds away from whatever the user already runs -- and+that is not a thing to do to somebody who installed Tether for its notifications.++A reclaim outlives it. Buds already handed to the phone come back when the call ends even if the+setting was turned off while they were away, because the alternative is buds stranded on the phone+and local playback paused with nothing left to resume it.### The channel takes one client@@ -706,14 +837,19 @@ checks the daemon does not make.| The link reads down forever with `br-connection-unknown`, while messages, contacts and notifications all work | This computer offers the iPhone no BR/EDR profile to connect to, and BlueZ only reports a link up while some local profile is connected | Nothing. Tether no longer waits on that link -- see 2026-08-23 below. Call support does not change this: BlueZ's hands-free profile is not one of the local profiles BlueZ counts || The iPhone's audio moves to the computer when Tether connects | The machine advertises itself as a Bluetooth speaker/headset, and iOS routes to it. Not caused by Tether beyond bringing the link up | See "Keeping the phone's audio on the phone" below || `tether --bt-calls` reports call control off | PipeWire took the profile *and* its telephony D-Bus service is off, the iPhone reconnected on its own and never opened hands-free, or `bluetoothd` is running without `--experimental` | Either give BlueZ the profile by dropping `hfp_hf` from `bluez5.roles`, or set `bluez5.telephony-dbus-service = true` and let Tether drive PipeWire's gateway -- see "Calls". The daemon cycles the BR/EDR bearer once per outage for the second cause; confirm with `busctl --system tree org.bluez \| grep telephony` and `busctl --user tree org.pipewire.Telephony` |-| AirPods are listed but the battery stays blank, and the row says another program is using the channel | The AAP channel takes one client, and something else has it | Stop the other AirPods program (LibrePods, AirPods Center, a status-bar widget that reads battery). Nothing else releases it |+| AirPods are listed but the battery stays blank, and the row says another program is using the channel | The AAP channel takes one client, and something else has it | Stop the other AirPods program (LibrePods, AirPods Center, a status-bar widget that reads battery), or hand it over with `tether --bt-airpods-enable off` || Setting the AirPods listening mode to `off` does nothing, while the other three work | The buds declined it. Apple leaves Off out of the noise-control rotation by default on Pro models, and there is no refusal to report | Add Off to the rotation on the phone, under Settings > Bluetooth > (i) > Noise Control. Tether keeps showing the mode the buds are actually in |-| The AirPods handoff checkbox is greyed out | Handoff triggers on the iPhone's call state, and call control is off | Turn on calls first: `tether --bt-calls-enable on`, or the Calls page |-| A call started but the AirPods stayed on this computer | They were not connected here when it started, or handoff is off | Nothing to do in the first case. Otherwise `tether --bt-airpods-handoff on` |+| The AirPods handoff checkbox is greyed out | Neither path is available: the adapter does not present itself as Apple hardware, so handoff would have to trigger on the iPhone's call state, and call control is off | Set the adapter Device ID for ownership handoff, or turn on calls: `tether --bt-calls-enable on` |+| A call started but the AirPods stayed on this computer | They were not connected here when it started, handoff is off, or the call was dialled from this computer | Nothing to do in the first and last case -- pick the AirPods on the phone. Otherwise `tether --bt-airpods-handoff on` |+| Music resumed on the computer's speakers after a call | Fixed. A reclaim now waits for the buds' sink to come back before resuming | Nothing. `pactl` must be on `PATH` for the wait to work |+| A call dialled from this computer is routed to it by the iPhone and nobody hears anything | Stock `bluez5.roles` carries `hfp_hf`, so PipeWire owns the profile and rejects the SCO by default (`bluez5.telephony.default-reject-sco`). iOS routes a call to the unit that dialled it and does not reconsider, so the audio is offered to a machine that is refusing it | `tether --bt-call-audio on` accepts it for the current call. To keep call audio on the phone, where the AirPods are, drop `hfp_hf` per "Either stack can serve the calls" and reconnect |+| `--bt-call-audio on` answers `InvalidState` | `Activate` applies to audio the phone is offering right now, and there is none pending | Nothing. The `RejectSCO` half is applied either way, so the next offer is accepted |+| The stem swipe changes the iPhone's volume, not this computer's | The buds send volume to whichever host owns them, and only ownership handoff makes that this machine | Set the adapter Device ID, per "Presenting as Apple hardware" || The AirPods came back after a call but playback did not resume | Fixed. Disconnecting the buds for the call used to clear the remembered players, so there was nothing left to resume | Nothing. Press play on an older build || The AirPods did not come back after a call | The phone still had them after three attempts, so Tether gave up rather than fight it | Reconnect them from the phone or the Devices list. Playback is deliberately left paused || Playback does not pause when a bud comes out | Pause on removal is off, which is the default | Set it on the AirPods page, or `tether --bt-airpods-pause one-removed` || Playback pauses on removal but never resumes | Something else paused or stopped it in between, so the pause is no longer Tether's to undo. Or the buds disconnected, which deliberately leaves it paused | Press play. Both are working as designed |+| AirPods are connected but Tether shows no battery, and the page says it is not managing them | AirPods management is off, which is the default | `tether --bt-airpods-enable on`, or the checkbox on the AirPods page || AirPods do not appear in the Devices list at all | They are not connected, or BlueZ has never read their SDP record so there is no Modalias and the name does not contain "airpod" | Connect them, then `tether --bt-devices` -- the row carries an `airpods` flag when Tether recognizes them || Calls work but the audio is on the iPhone | Working as designed. BlueZ signals the call and never opens the voice link, so there is nothing to route here | Nothing. `./scripts/bt-probe.sh --calls` during a call shows the evidence; "Getting the call audio onto the desktop instead" is the trade if you want it || The Calls page is empty after configuring PipeWire for call audio | PipeWire's telephony D-Bus service is off, so neither stack exports anything Tether can read | Set `bluez5.telephony-dbus-service = true` and reconnect. With it on, Tether drives PipeWire's gateway directly and the Calls page works, minus carrier and signal |diff --git a/docs/man/man1/tether.1.in b/docs/man/man1/tether.1.inindex c1e1b3b..05ecc2e 100644--- a/docs/man/man1/tether.1.in+++ b/docs/man/man1/tether.1.in@@ -90,6 +90,11 @@ Show Bluetooth link and profile connection state.\fB\-\-bt-airpods\fRShow AirPods battery, for each bud and the case, and the current listening mode..TP+\fB\-\-bt-airpods-enable\fR \fIon\fR|\fIoff\fR+Manage AirPods from Tether at all: battery, listening mode, in-ear pausing and handoff.+Off by default, because the AAP channel takes one program per computer and opening it takes+the buds away from any other AirPods program.+.TP\fB\-\-bt-airpods-mode\fR \fIoff\fR|\fIanc\fR|\fItransparency\fR|\fIadaptive\fRSet the AirPods listening mode. The buds decline a mode they are not configured forwithout reporting an error, so check the result with \fB\-\-bt-airpods\fR.diff --git a/po/cs.po b/po/cs.poindex 389dd64..3b8c17b 100644--- a/po/cs.po+++ b/po/cs.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Czech\n"@@ -91,6 +91,10 @@ msgstr "Zobrazit stav Bluetooth spojení a profilů."msgid "Show AirPods and case battery."msgstr "Zobrazit baterii AirPods a pouzdra."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "Spravovat AirPods z Tetheru: on nebo off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr "Nastavit režim poslechu AirPods: off, anc, transparency, adaptive."@@ -461,10 +465,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "Nepodařilo se načíst baterii AirPods z démona.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "Nejsou připojena žádná AirPods.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "Správa AirPods je vypnutá.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Levé"@@ -482,6 +489,14 @@ msgstr "Pouzdro"msgid "Worn"msgstr "Nošení"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Tento počítač se nehlásí jako hardware Apple, takže hovor předá AirPods "+"jejich odpojením. Viz DeviceID v /etc/bluetooth/main.conf."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "Nepodařilo se spojit s démonem.\n"@@ -508,6 +523,14 @@ msgstr "Pozastavení při vyjmutí nastaveno na %s.\n"msgid "Use on or off.\n"msgstr "Použijte on nebo off.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether spravuje AirPods."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether uvolnil kanál AirPods pro jiný program."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -765,6 +788,14 @@ msgstr "Vytáčení."msgid "Answering."msgstr "Přijímání."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "Zvuk hovoru půjde do tohoto počítače."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "Zvuk hovoru zůstane v iPhonu."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Zavěšování."@@ -1273,6 +1304,10 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "Hovory se ovládají zde; zvuk se přehrává v iPhonu."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr "Tento počítač zvuk hovoru nepřenáší; přehrává se v iPhonu."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "Není to vytáčitelné číslo."@@ -1285,10 +1320,6 @@ msgstr "Nebyl uveden žádný hovor."msgid "That call is no longer active."msgstr "Tento hovor už není aktivní."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr "Tento počítač zvuk hovoru nepřenáší; přehrává se v iPhonu."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Neznámá akce hovoru."@@ -1535,6 +1566,10 @@ msgstr "Adaptivní"msgid "Noise Cancellation"msgstr "Potlačení hluku"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "Tether AirPods nespravuje, může je používat jiný program."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "Tato AirPods nehlásí režim poslechu."@@ -1555,6 +1590,20 @@ msgstr "Jedno sluchátko je v uchu."msgid "Neither bud is in."msgstr "Žádné sluchátko není v uchu."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "AirPods se předávají vlastním předáním od Applu."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"AirPods se předávají odpojením. Pro vlastní předání od Applu přidejte "+"DeviceID = bluetooth:004C:0000:0000 do sekce [General] v /etc/bluetooth/"+"main.conf a restartujte bluetooth."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Plný režim — zprávy, kontakty a oznámení."@@ -1845,6 +1894,18 @@ msgstr ""msgid "Scan for devices"msgstr "Hledat zařízení"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "Spravovat AirPods z Tetheru"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"Kanál AirPods přijme jeden program na počítač. Vypnutím se uvolní, aby ho "+"mohl použít jiný program pro AirPods."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Režim poslechu"@@ -2176,7 +2237,9 @@ msgstr "Zamknout relaci, když iPhone opustí dosah"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Zamkne asi půl minuty po vypršení spojení. Vypnutí Bluetooth na iPhonu nezamkne, stejně jako uspání tohoto počítače."+msgstr ""+"Zamkne asi půl minuty po vypršení spojení. Vypnutí Bluetooth na iPhonu "+"nezamkne, stejně jako uspání tohoto počítače."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2306,9 +2369,6 @@ msgstr "Spárujte zařízení a synchronizujte schránku po síti"#~ "Zapnout nebo vypnout ovládání hovorů. Vyžaduje roli hfp_hf a službu "#~ "telefonie ve WirePlumberu; viz docs/BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Zvuk hovoru přesunut do tohoto počítače."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/de.po b/po/de.poindex 5c356b9..a3f87f7 100644--- a/po/de.po+++ b/po/de.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-22\n""Last-Translator: Tether project\n""Language-Team: German\n"@@ -91,6 +91,10 @@ msgstr "Zustand von Bluetooth-Verbindung und Profilen anzeigen."msgid "Show AirPods and case battery."msgstr "Akkustand der AirPods und des Ladecase anzeigen."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "AirPods überhaupt von Tether verwalten lassen: on oder off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr "AirPods-Hörmodus setzen: off, anc, transparency, adaptive."@@ -109,7 +113,8 @@ msgstr "AirPods während eines Anrufs an das iPhone übergeben: on oder off."#: src/cli/main.cppmsgid "Lock the session when the iPhone goes out of range: on or off."-msgstr "Die Sitzung sperren, wenn das iPhone außer Reichweite gerät: on oder off."+msgstr ""+"Die Sitzung sperren, wenn das iPhone außer Reichweite gerät: on oder off."#: src/cli/main.cppmsgid "List iPhone message conversations."@@ -459,10 +464,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "Der Akkustand der AirPods konnte nicht vom Daemon gelesen werden.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "Keine AirPods verbunden.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "Die AirPods-Verwaltung ist ausgeschaltet.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Links"@@ -480,6 +488,15 @@ msgstr "Case"msgid "Worn"msgstr "Getragen"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Dieser Computer gibt sich nicht als Apple-Hardware aus, daher werden die "+"AirPods bei einem Anruf durch Trennen der Verbindung übergeben. Siehe "+"DeviceID in /etc/bluetooth/main.conf."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "Der Daemon war nicht erreichbar.\n"@@ -506,6 +523,14 @@ msgstr "Pause beim Herausnehmen auf %s gesetzt.\n"msgid "Use on or off.\n"msgstr "Verwenden Sie on oder off.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether verwaltet die AirPods."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether hat den AirPods-Kanal für ein anderes Programm freigegeben."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -769,6 +794,14 @@ msgstr "Wird gewählt."msgid "Answering."msgstr "Wird angenommen."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "Anrufaudio kommt auf diesen Computer."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "Anrufaudio bleibt auf dem iPhone."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Wird aufgelegt."@@ -1302,6 +1335,12 @@ msgid "Calls are controlled here; the audio plays on the iPhone."msgstr """Anrufe werden hier gesteuert; der Ton wird auf dem iPhone wiedergegeben."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr ""+"Dieser Computer überträgt den Anrufton nicht; er wird auf dem iPhone "+"wiedergegeben."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "Keine wählbare Nummer."@@ -1314,12 +1353,6 @@ msgstr "Kein Anruf angegeben."msgid "That call is no longer active."msgstr "Dieser Anruf ist nicht mehr aktiv."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr ""-"Dieser Computer überträgt den Anrufton nicht; er wird auf dem iPhone "-"wiedergegeben."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Unbekannte Anrufaktion."@@ -1567,6 +1600,11 @@ msgstr "Adaptiv"msgid "Noise Cancellation"msgstr "Geräuschunterdrückung"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr ""+"Tether verwaltet die AirPods nicht, ein anderes Programm kann sie verwenden."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "Diese AirPods melden keinen Hörmodus."@@ -1587,6 +1625,20 @@ msgstr "Ein Hörer ist eingesetzt."msgid "Neither bud is in."msgstr "Kein Hörer ist eingesetzt."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "Die AirPods werden mit Apples eigener Übergabe weitergereicht."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"Die AirPods werden durch Trennen der Verbindung übergeben. Für Apples eigene "+"Übergabe DeviceID = bluetooth:004C:0000:0000 unter [General] in /etc/"+"bluetooth/main.conf eintragen und Bluetooth neu starten."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Vollmodus — Nachrichten, Kontakte und Mitteilungen."@@ -1882,6 +1934,18 @@ msgstr ""msgid "Scan for devices"msgstr "Nach Geräten suchen"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "AirPods von Tether verwalten lassen"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"Der AirPods-Kanal nimmt nur ein Programm pro Computer an. Ausschalten gibt "+"ihn frei, damit ein anderes AirPods-Programm ihn verwenden kann."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Hörmodus"@@ -2222,7 +2286,10 @@ msgstr "Sitzung sperren, wenn das iPhone außer Reichweite gerät"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Sperrt etwa eine halbe Minute nachdem die Verbindung abgelaufen ist. Bluetooth am iPhone auszuschalten sperrt nicht, und diese Maschine in den Ruhezustand zu versetzen ebenso wenig."+msgstr ""+"Sperrt etwa eine halbe Minute nachdem die Verbindung abgelaufen ist. "+"Bluetooth am iPhone auszuschalten sperrt nicht, und diese Maschine in den "+"Ruhezustand zu versetzen ebenso wenig."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2360,9 +2427,6 @@ msgstr ""#~ "Anrufsteuerung ein- oder ausschalten. Erfordert die Rolle hfp_hf und den "#~ "Telefoniedienst in WirePlumber; siehe docs/BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Anrufaudio auf diesen Computer verlegt."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/es.po b/po/es.poindex 3023df1..23332e2 100644--- a/po/es.po+++ b/po/es.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-22\n""Last-Translator: Tether project\n""Language-Team: Spanish\n"@@ -92,6 +92,10 @@ msgstr "Mostrar el estado del enlace y de los perfiles Bluetooth."msgid "Show AirPods and case battery."msgstr "Mostrar la batería de los AirPods y del estuche."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "Gestionar los AirPods desde Tether: on u off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr ""@@ -463,10 +467,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "No se pudo leer la batería de los AirPods desde el demonio.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "No hay AirPods conectados.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "La gestión de los AirPods está desactivada.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Izq."@@ -484,6 +491,15 @@ msgstr "Estuche"msgid "Worn"msgstr "Puestos"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Este ordenador no se presenta como hardware de Apple, así que una llamada "+"pasa los AirPods desconectándolos. Consulta DeviceID en /etc/bluetooth/"+"main.conf."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "No se pudo contactar con el daemon.\n"@@ -510,6 +526,14 @@ msgstr "Pausa al quitarlos establecida en %s.\n"msgid "Use on or off.\n"msgstr "Use on u off.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether está gestionando los AirPods."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether ha liberado el canal de los AirPods para otro programa."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -768,6 +792,14 @@ msgstr "Marcando."msgid "Answering."msgstr "Respondiendo."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "El audio de la llamada pasa a este ordenador."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "El audio de la llamada se queda en el iPhone."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Colgando."@@ -1294,6 +1326,11 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "Las llamadas se controlan aquí; el audio se reproduce en el iPhone."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr ""+"Este equipo no transporta el audio de la llamada; se reproduce en el iPhone."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "No es un número marcable."@@ -1306,11 +1343,6 @@ msgstr "No se indicó ninguna llamada."msgid "That call is no longer active."msgstr "Esa llamada ya no está activa."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr ""-"Este equipo no transporta el audio de la llamada; se reproduce en el iPhone."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Acción de llamada desconocida."@@ -1560,6 +1592,11 @@ msgstr "Adaptativo"msgid "Noise Cancellation"msgstr "Cancelación de ruido"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr ""+"Tether no está gestionando los AirPods, así que otro programa puede usarlos."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "Estos AirPods no informan de un modo de escucha."@@ -1580,6 +1617,20 @@ msgstr "Un auricular está puesto."msgid "Neither bud is in."msgstr "Ningún auricular está puesto."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "Los AirPods se pasan con el traspaso propio de Apple."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"Los AirPods se pasan desconectándolos. Para el traspaso propio de Apple, "+"añade DeviceID = bluetooth:004C:0000:0000 en [General] de /etc/bluetooth/"+"main.conf y reinicia bluetooth."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Modo completo — mensajes, contactos y notificaciones."@@ -1874,6 +1925,18 @@ msgstr ""msgid "Scan for devices"msgstr "Buscar dispositivos"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "Gestionar los AirPods desde Tether"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"El canal de los AirPods admite un solo programa por ordenador. Al "+"desactivarlo se libera para que otro programa de AirPods pueda usarlo."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Modo de escucha"@@ -2211,7 +2274,9 @@ msgstr "Bloquear la sesión cuando el iPhone quede fuera de alcance"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Bloquea alrededor de medio minuto después de que el enlace expire. Apagar el Bluetooth en el iPhone no bloquea, y suspender esta máquina tampoco."+msgstr ""+"Bloquea alrededor de medio minuto después de que el enlace expire. Apagar el "+"Bluetooth en el iPhone no bloquea, y suspender esta máquina tampoco."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2345,9 +2410,6 @@ msgstr "Empareje dispositivos y sincronice el portapapeles a través de la red"#~ "Activar o desactivar el control de llamadas. Necesita el rol hfp_hf y el "#~ "servicio de telefonía en WirePlumber; consulte docs/BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Audio de la llamada pasado a este equipo."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/fr.po b/po/fr.poindex 86f2e2e..b55f254 100644--- a/po/fr.po+++ b/po/fr.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-22\n""Last-Translator: Tether project\n""Language-Team: French\n"@@ -93,6 +93,10 @@ msgstr "Afficher l'état du lien et des profils Bluetooth."msgid "Show AirPods and case battery."msgstr "Afficher la batterie des AirPods et du boîtier."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "Gérer les AirPods depuis Tether : on ou off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr ""@@ -466,10 +470,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "Impossible de lire la batterie des AirPods depuis le démon.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "Aucun AirPods connecté.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "La gestion des AirPods est désactivée.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Gauche"@@ -487,6 +494,15 @@ msgstr "Boîtier"msgid "Worn"msgstr "Portés"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Cet ordinateur ne se présente pas comme du matériel Apple ; un appel confie "+"donc les AirPods en les déconnectant. Voir DeviceID dans /etc/bluetooth/"+"main.conf."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "Impossible de joindre le démon.\n"@@ -513,6 +529,14 @@ msgstr "Pause au retrait réglée sur %s.\n"msgid "Use on or off.\n"msgstr "Utilisez on ou off.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether gère les AirPods."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether a libéré le canal des AirPods pour un autre programme."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -773,6 +797,14 @@ msgstr "Numérotation en cours."msgid "Answering."msgstr "Réponse en cours."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "L'audio de l'appel arrive sur cet ordinateur."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "L'audio de l'appel reste sur l'iPhone."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Raccrochage."@@ -1299,6 +1331,12 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "Les appels se pilotent ici ; l'audio est diffusé sur l'iPhone."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr ""+"Cet ordinateur ne transporte pas l'audio de l'appel ; il est diffusé sur "+"l'iPhone."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "Numéro non composable."@@ -1311,12 +1349,6 @@ msgstr "Aucun appel indiqué."msgid "That call is no longer active."msgstr "Cet appel n'est plus actif."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr ""-"Cet ordinateur ne transporte pas l'audio de l'appel ; il est diffusé sur "-"l'iPhone."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Action inconnue."@@ -1566,6 +1598,10 @@ msgstr "Adaptatif"msgid "Noise Cancellation"msgstr "Réduction de bruit"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "Tether ne gère pas les AirPods, un autre programme peut les utiliser."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "Ces AirPods ne signalent pas de mode d'écoute."@@ -1586,6 +1622,20 @@ msgstr "Un écouteur est en place."msgid "Neither bud is in."msgstr "Aucun écouteur n'est en place."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "Les AirPods sont confiés avec le transfert natif d'Apple."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"Les AirPods sont confiés en les déconnectant. Pour le transfert natif "+"d'Apple, ajoutez DeviceID = bluetooth:004C:0000:0000 sous [General] dans /"+"etc/bluetooth/main.conf et redémarrez bluetooth."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Mode complet — messages, contacts et notifications."@@ -1880,6 +1930,18 @@ msgstr ""msgid "Scan for devices"msgstr "Rechercher des appareils"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "Gérer les AirPods depuis Tether"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"Le canal des AirPods n'accepte qu'un programme par ordinateur. Le désactiver "+"le libère pour un autre programme AirPods."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Mode d'écoute"@@ -2218,7 +2280,10 @@ msgstr "Verrouiller la session quand l'iPhone sort de portée"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Verrouille environ une demi-minute après l'expiration du lien. Couper le Bluetooth sur l'iPhone ne verrouille pas, et mettre cette machine en veille non plus."+msgstr ""+"Verrouille environ une demi-minute après l'expiration du lien. Couper le "+"Bluetooth sur l'iPhone ne verrouille pas, et mettre cette machine en veille "+"non plus."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2355,9 +2420,6 @@ msgstr "Appairez des appareils et synchronisez le presse-papiers sur le réseau"#~ "Activer ou désactiver la gestion des appels. Nécessite le rôle hfp_hf et "#~ "le service de téléphonie dans WirePlumber ; voir docs/BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Audio de l'appel transféré vers cet ordinateur."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/it.po b/po/it.poindex 066db4a..a0da49f 100644--- a/po/it.po+++ b/po/it.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Italian\n"@@ -93,6 +93,10 @@ msgstr "Mostra lo stato del collegamento Bluetooth e dei profili."msgid "Show AirPods and case battery."msgstr "Mostra la batteria degli AirPods e della custodia."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "Gestire gli AirPods da Tether: on o off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr ""@@ -463,10 +467,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "Impossibile leggere la batteria degli AirPods dal demone.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "Nessun AirPods connesso.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "La gestione degli AirPods è disattivata.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Sinistro"@@ -484,6 +491,15 @@ msgstr "Custodia"msgid "Worn"msgstr "Indossati"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Questo computer non si presenta come hardware Apple, quindi una chiamata "+"passa gli AirPods disconnettendoli. Vedi DeviceID in /etc/bluetooth/"+"main.conf."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "Impossibile raggiungere il daemon.\n"@@ -510,6 +526,14 @@ msgstr "Pausa alla rimozione impostata su %s.\n"msgid "Use on or off.\n"msgstr "Usa on oppure off.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether sta gestendo gli AirPods."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether ha liberato il canale degli AirPods per un altro programma."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -768,6 +792,14 @@ msgstr "Composizione in corso."msgid "Answering."msgstr "Risposta in corso."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "L'audio della chiamata passa a questo computer."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "L'audio della chiamata resta sull'iPhone."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Chiusura in corso."@@ -1293,6 +1325,12 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "Le chiamate si controllano qui; l'audio viene riprodotto sull'iPhone."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr ""+"Questo computer non trasporta l'audio della chiamata; viene riprodotto "+"sull'iPhone."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "Non è un numero componibile."@@ -1305,12 +1343,6 @@ msgstr "Nessuna chiamata indicata."msgid "That call is no longer active."msgstr "Quella chiamata non è più attiva."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr ""-"Questo computer non trasporta l'audio della chiamata; viene riprodotto "-"sull'iPhone."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Azione di chiamata sconosciuta."@@ -1558,6 +1590,10 @@ msgstr "Adattiva"msgid "Noise Cancellation"msgstr "Cancellazione del rumore"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "Tether non sta gestendo gli AirPods, un altro programma può usarli."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "Questi AirPods non segnalano una modalità di ascolto."@@ -1578,6 +1614,20 @@ msgstr "Un auricolare è indossato."msgid "Neither bud is in."msgstr "Nessun auricolare è indossato."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "Gli AirPods vengono passati con il passaggio nativo di Apple."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"Gli AirPods vengono passati disconnettendoli. Per il passaggio nativo di "+"Apple, aggiungi DeviceID = bluetooth:004C:0000:0000 in [General] in /etc/"+"bluetooth/main.conf e riavvia bluetooth."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Modalità completa — messaggi, contatti e notifiche."@@ -1873,6 +1923,18 @@ msgstr ""msgid "Scan for devices"msgstr "Cerca dispositivi"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "Gestire gli AirPods da Tether"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"Il canale degli AirPods accetta un solo programma per computer. "+"Disattivandolo lo si libera per un altro programma AirPods."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Modalità di ascolto"@@ -2211,7 +2273,9 @@ msgstr "Blocca la sessione quando l'iPhone esce dalla portata"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Blocca circa mezzo minuto dopo la scadenza del collegamento. Disattivare il Bluetooth sull'iPhone non blocca, e nemmeno sospendere questa macchina."+msgstr ""+"Blocca circa mezzo minuto dopo la scadenza del collegamento. Disattivare il "+"Bluetooth sull'iPhone non blocca, e nemmeno sospendere questa macchina."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2348,9 +2412,6 @@ msgstr "Accoppia dispositivi e sincronizza gli appunti sulla rete"#~ "hfp_hf e il servizio di telefonia in WirePlumber; vedere docs/"#~ "BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Audio della chiamata spostato su questo computer."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/ja.po b/po/ja.poindex d2591dc..61b30d0 100644--- a/po/ja.po+++ b/po/ja.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Japanese\n"@@ -91,6 +91,10 @@ msgstr "Bluetooth リンクとプロファイルの接続状態を表示しまmsgid "Show AirPods and case battery."msgstr "AirPods とケースのバッテリーを表示します。"+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "AirPods を Tether で管理するかどうか: on または off。"+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr ""@@ -452,10 +456,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "デーモンから AirPods のバッテリーを読み取れませんでした。\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "AirPods は接続されていません。\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "AirPods の管理はオフです。\n"+#: src/cli/main.cppmsgid "Left"msgstr "左"@@ -473,6 +480,15 @@ msgstr "ケース"msgid "Worn"msgstr "装着"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"このコンピューターは Apple のハードウェアとして名乗っていないため、通話時は "+"AirPods を切断して渡します。/etc/bluetooth/main.conf の DeviceID を参照してく"+"ださい。"+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "デーモンに接続できませんでした。\n"@@ -499,6 +515,14 @@ msgstr "取り外し時の一時停止を %s に設定しました。\n"msgid "Use on or off.\n"msgstr "on または off を指定してください。\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether が AirPods を管理しています。"++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether は AirPods のチャンネルを他のプログラムのために解放しました。"+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -754,6 +778,14 @@ msgstr "発信しています。"msgid "Answering."msgstr "応答しています。"+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "通話音声はこのコンピューターで再生されます。"++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "通話音声は iPhone のままです。"+#: src/cli/main.cppmsgid "Hanging up."msgstr "終了しています。"@@ -1264,6 +1296,12 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "通話はここで操作し、音声は iPhone で再生されます。"+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr ""+"このコンピューターは通話音声を伝送していません。音声は iPhone で再生されま"+"す。"+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "発信できる番号ではありません。"@@ -1276,12 +1314,6 @@ msgstr "通話が指定されていません。"msgid "That call is no longer active."msgstr "その通話はもう有効ではありません。"-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr ""-"このコンピューターは通話音声を伝送していません。音声は iPhone で再生されま"-"す。"-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "不明な通話操作です。"@@ -1528,6 +1560,10 @@ msgstr "アダプティブ"msgid "Noise Cancellation"msgstr "ノイズキャンセリング"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "Tether は AirPods を管理していないため、別のプログラムが使用できます。"+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "この AirPods はリスニングモードを報告しません。"@@ -1548,6 +1584,20 @@ msgstr "片方のイヤホンを装着しています。"msgid "Neither bud is in."msgstr "イヤホンを装着していません。"+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "AirPods は Apple 本来のハンドオフで渡されます。"++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"AirPods は切断して渡されます。Apple 本来のハンドオフを使うには、/etc/"+"bluetooth/main.conf の [General] に DeviceID = bluetooth:004C:0000:0000 を追"+"加し、bluetooth を再起動してください。"+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "フルモード — メッセージ、連絡先、通知。"@@ -1838,6 +1888,18 @@ msgstr ""msgid "Scan for devices"msgstr "デバイスを検索"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "AirPods を Tether で管理する"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"AirPods のチャンネルは 1 台につき 1 つのプログラムしか使えません。オフにする"+"と解放され、別の AirPods プログラムが使用できます。"+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "リスニングモード"@@ -2172,7 +2234,9 @@ msgstr "iPhone が範囲外になったらセッションをロックする"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "リンクがタイムアウトしてから約 30 秒後にロックします。iPhone 側で Bluetooth を切ってもロックせず、このマシンをサスペンドしてもロックしません。"+msgstr ""+"リンクがタイムアウトしてから約 30 秒後にロックします。iPhone 側で Bluetooth "+"を切ってもロックせず、このマシンをサスペンドしてもロックしません。"#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2303,9 +2367,6 @@ msgstr "デバイスをペアリングし、ネットワーク越しにクリッ#~ "通話操作をオンまたはオフにします。WirePlumber の hfp_hf ロールとテレフォ"#~ "ニーサービスが必要です。docs/BLUETOOTH.md を参照してください。"-#~ msgid "Call audio moved to this computer."-#~ msgstr "通話音声をこのコンピューターに移しました。"-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/ko.po b/po/ko.poindex 983e6e4..e98afa4 100644--- a/po/ko.po+++ b/po/ko.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Korean\n"@@ -90,6 +90,10 @@ msgstr "Bluetooth 링크와 프로파일의 연결 상태를 표시합니다."msgid "Show AirPods and case battery."msgstr "AirPods 및 케이스 배터리를 표시합니다."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "Tether에서 AirPods를 관리할지 여부: on 또는 off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr "AirPods 청취 모드를 설정합니다: off, anc, transparency, adaptive."@@ -449,10 +453,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "데몬에서 AirPods 배터리를 읽을 수 없습니다.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "연결된 AirPods가 없습니다.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "AirPods 관리가 꺼져 있습니다.\n"+#: src/cli/main.cppmsgid "Left"msgstr "왼쪽"@@ -470,6 +477,14 @@ msgstr "케이스"msgid "Worn"msgstr "착용"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"이 컴퓨터는 Apple 하드웨어로 표시되지 않으므로 통화 시 AirPods 연결을 끊어 넘"+"깁니다. /etc/bluetooth/main.conf의 DeviceID를 참고하세요."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "데몬에 연결하지 못했습니다.\n"@@ -496,6 +511,14 @@ msgstr "제거 시 일시정지를 %s(으)로 설정했습니다.\n"msgid "Use on or off.\n"msgstr "on 또는 off를 사용하세요.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether가 AirPods를 관리하고 있습니다."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether가 다른 프로그램을 위해 AirPods 채널을 해제했습니다."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -750,6 +773,14 @@ msgstr "전화를 거는 중입니다."msgid "Answering."msgstr "전화를 받는 중입니다."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "통화 음성이 이 컴퓨터로 옵니다."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "통화 음성이 iPhone에 남습니다."+#: src/cli/main.cppmsgid "Hanging up."msgstr "전화를 끊는 중입니다."@@ -1251,6 +1282,11 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "통화는 여기서 제어하고 오디오는 iPhone에서 재생됩니다."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr ""+"이 컴퓨터는 통화 오디오를 전달하지 않습니다. 오디오는 iPhone에서 재생됩니다."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "전화를 걸 수 있는 번호가 아닙니다."@@ -1263,11 +1299,6 @@ msgstr "통화를 지정하지 않았습니다."msgid "That call is no longer active."msgstr "그 통화는 더 이상 활성 상태가 아닙니다."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr ""-"이 컴퓨터는 통화 오디오를 전달하지 않습니다. 오디오는 iPhone에서 재생됩니다."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "알 수 없는 통화 동작입니다."@@ -1511,6 +1542,11 @@ msgstr "적응형"msgid "Noise Cancellation"msgstr "노이즈 캔슬링"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr ""+"Tether가 AirPods를 관리하지 않으므로 다른 프로그램이 사용할 수 있습니다."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "이 AirPods는 청취 모드를 보고하지 않습니다."@@ -1531,6 +1567,20 @@ msgstr "한쪽 이어버드를 착용 중입니다."msgid "Neither bud is in."msgstr "이어버드를 착용하지 않았습니다."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "AirPods는 Apple 자체 핸드오프로 넘겨집니다."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"AirPods는 연결을 끊어 넘깁니다. Apple 자체 핸드오프를 사용하려면 /etc/"+"bluetooth/main.conf의 [General]에 DeviceID = bluetooth:004C:0000:0000 을 추가"+"하고 bluetooth를 다시 시작하세요."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "전체 모드 — 메시지, 연락처, 알림."@@ -1817,6 +1867,18 @@ msgstr ""msgid "Scan for devices"msgstr "기기 검색"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "Tether에서 AirPods 관리"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"AirPods 채널은 컴퓨터당 하나의 프로그램만 사용할 수 있습니다. 이 설정을 끄면 "+"채널이 해제되어 다른 AirPods 프로그램이 사용할 수 있습니다."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "청취 모드"@@ -2145,7 +2207,9 @@ msgstr "iPhone이 범위를 벗어나면 세션 잠그기"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "링크가 시간 초과된 뒤 약 30초 후에 잠급니다. iPhone에서 Bluetooth를 꺼도 잠기지 않으며, 이 기기를 절전 모드로 두어도 잠기지 않습니다."+msgstr ""+"링크가 시간 초과된 뒤 약 30초 후에 잠급니다. iPhone에서 Bluetooth를 꺼도 잠기"+"지 않으며, 이 기기를 절전 모드로 두어도 잠기지 않습니다."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2275,9 +2339,6 @@ msgstr "기기를 페어링하고 네트워크를 통해 클립보드를 동기#~ "통화 제어를 켜거나 끕니다. WirePlumber의 hfp_hf 역할과 전화 서비스가 필요"#~ "합니다. docs/BLUETOOTH.md를 참고하십시오."-#~ msgid "Call audio moved to this computer."-#~ msgstr "통화 오디오를 이 컴퓨터로 옮겼습니다."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/nl.po b/po/nl.poindex 2a063c7..cbb0cc6 100644--- a/po/nl.po+++ b/po/nl.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Dutch\n"@@ -91,6 +91,10 @@ msgstr "Status van de Bluetooth-verbinding en van de profielen tonen."msgid "Show AirPods and case battery."msgstr "Accu van de AirPods en de case tonen."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "AirPods door Tether laten beheren: on of off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr ""@@ -110,7 +114,8 @@ msgstr "De AirPods tijdens een gesprek aan de iPhone geven: on of off."#: src/cli/main.cppmsgid "Lock the session when the iPhone goes out of range: on or off."-msgstr "De sessie vergrendelen wanneer de iPhone buiten bereik raakt: on of off."+msgstr ""+"De sessie vergrendelen wanneer de iPhone buiten bereik raakt: on of off."#: src/cli/main.cppmsgid "List iPhone message conversations."@@ -460,10 +465,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "Kon de accu van de AirPods niet uitlezen via de daemon.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "Geen AirPods verbonden.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "AirPods-beheer staat uit.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Links"@@ -481,6 +489,15 @@ msgstr "Case"msgid "Worn"msgstr "Gedragen"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Deze computer presenteert zich niet als Apple-hardware, dus een gesprek "+"geeft de AirPods over door ze te ontkoppelen. Zie DeviceID in /etc/bluetooth/"+"main.conf."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "Kon de daemon niet bereiken.\n"@@ -507,6 +524,14 @@ msgstr "Pauzeren bij uitnemen ingesteld op %s.\n"msgid "Use on or off.\n"msgstr "Gebruik on of off.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether beheert de AirPods."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether heeft het AirPods-kanaal vrijgegeven voor een ander programma."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -764,6 +789,14 @@ msgstr "Bezig met kiezen."msgid "Answering."msgstr "Wordt beantwoord."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "Het gespreksgeluid komt naar deze computer."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "Het gespreksgeluid blijft op de iPhone."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Wordt opgehangen."@@ -1286,6 +1319,10 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "Oproepen worden hier bediend; het geluid speelt op de iPhone."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr "Deze computer voert de gespreksaudio niet; die speelt op de iPhone."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "Geen belbaar nummer."@@ -1298,10 +1335,6 @@ msgstr "Geen oproep opgegeven."msgid "That call is no longer active."msgstr "Die oproep is niet meer actief."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr "Deze computer voert de gespreksaudio niet; die speelt op de iPhone."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Onbekende oproepactie."@@ -1550,6 +1583,10 @@ msgstr "Adaptief"msgid "Noise Cancellation"msgstr "Ruisonderdrukking"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "Tether beheert de AirPods niet, een ander programma kan ze gebruiken."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "Deze AirPods melden geen luistermodus."@@ -1570,6 +1607,20 @@ msgstr "Eén oordopje is in."msgid "Neither bud is in."msgstr "Geen enkel oordopje is in."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "De AirPods worden overgedragen met Apple's eigen overdracht."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"De AirPods worden overgedragen door ze te ontkoppelen. Zet voor Apple's "+"eigen overdracht DeviceID = bluetooth:004C:0000:0000 onder [General] in /etc/"+"bluetooth/main.conf en start bluetooth opnieuw."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Volledige modus — berichten, contacten en meldingen."@@ -1862,6 +1913,18 @@ msgstr ""msgid "Scan for devices"msgstr "Zoek apparaten"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "AirPods door Tether laten beheren"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"Het AirPods-kanaal neemt één programma per computer aan. Uitschakelen geeft "+"het vrij, zodat een ander AirPods-programma het kan gebruiken."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Luistermodus"@@ -2195,7 +2258,10 @@ msgstr "De sessie vergrendelen wanneer de iPhone buiten bereik raakt"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Vergrendelt ongeveer een halve minuut nadat de verbinding verlopen is. Bluetooth uitzetten op de iPhone vergrendelt niet, en deze machine in slaapstand zetten evenmin."+msgstr ""+"Vergrendelt ongeveer een halve minuut nadat de verbinding verlopen is. "+"Bluetooth uitzetten op de iPhone vergrendelt niet, en deze machine in "+"slaapstand zetten evenmin."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2330,9 +2396,6 @@ msgstr "Apparaten koppelen en het klembord over het netwerk synchroniseren"#~ "Oproepbediening in- of uitschakelen. Vereist de rol hfp_hf en de "#~ "telefoniedienst in WirePlumber; zie docs/BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Oproepaudio naar deze computer verplaatst."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/pl.po b/po/pl.poindex 0ffc146..300771d 100644--- a/po/pl.po+++ b/po/pl.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Polish\n"@@ -92,6 +92,10 @@ msgstr "Pokaż stan połączenia Bluetooth i profili."msgid "Show AirPods and case battery."msgstr "Pokaż poziom baterii AirPods i etui."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "Zarządzanie AirPods przez Tether: on lub off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr "Ustaw tryb słuchania AirPods: off, anc, transparency, adaptive."@@ -464,10 +468,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "Nie można odczytać poziomu baterii AirPods z demona.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "Nie podłączono żadnych AirPods.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "Zarządzanie AirPods jest wyłączone.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Lewa"@@ -485,6 +492,15 @@ msgstr "Etui"msgid "Worn"msgstr "Noszone"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Ten komputer nie przedstawia się jako sprzęt Apple, więc połączenie "+"przekazuje AirPods przez ich rozłączenie. Zobacz DeviceID w /etc/bluetooth/"+"main.conf."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "Nie udało się połączyć z demonem.\n"@@ -511,6 +527,14 @@ msgstr "Wstrzymanie przy wyjęciu ustawione na %s.\n"msgid "Use on or off.\n"msgstr "Użyj on lub off.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether zarządza AirPods."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether zwolnił kanał AirPods dla innego programu."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -770,6 +794,14 @@ msgstr "Wybieranie numeru."msgid "Answering."msgstr "Odbieranie."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "Dźwięk połączenia trafia na ten komputer."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "Dźwięk połączenia zostaje na iPhonie."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Rozłączanie."@@ -1287,6 +1319,11 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "Połączeniami sterujesz tutaj; dźwięk odtwarzany jest na iPhonie."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr ""+"Ten komputer nie przenosi dźwięku połączenia; jest on odtwarzany na iPhonie."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "To nie jest numer, który można wybrać."@@ -1299,11 +1336,6 @@ msgstr "Nie wskazano połączenia."msgid "That call is no longer active."msgstr "To połączenie nie jest już aktywne."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr ""-"Ten komputer nie przenosi dźwięku połączenia; jest on odtwarzany na iPhonie."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Nieznana akcja połączenia."@@ -1551,6 +1583,10 @@ msgstr "Adaptacyjny"msgid "Noise Cancellation"msgstr "Redukcja szumów"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "Tether nie zarządza AirPods, może ich używać inny program."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "Te AirPods nie zgłaszają trybu słuchania."@@ -1571,6 +1607,20 @@ msgstr "Jedna słuchawka jest w uchu."msgid "Neither bud is in."msgstr "Żadna słuchawka nie jest w uchu."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "AirPods są przekazywane własnym mechanizmem Apple."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"AirPods są przekazywane przez rozłączenie. Aby użyć własnego mechanizmu "+"Apple, dodaj DeviceID = bluetooth:004C:0000:0000 w sekcji [General] w /etc/"+"bluetooth/main.conf i uruchom ponownie bluetooth."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Tryb pełny — wiadomości, kontakty i powiadomienia."@@ -1862,6 +1912,18 @@ msgstr ""msgid "Scan for devices"msgstr "Szukaj urządzeń"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "Zarządzanie AirPods przez Tether"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"Kanał AirPods przyjmuje jeden program na komputer. Wyłączenie zwalnia go, "+"aby mógł go użyć inny program do AirPods."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Tryb słuchania"@@ -2197,7 +2259,9 @@ msgstr "Zablokuj sesję, gdy iPhone znajdzie się poza zasięgiem"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Blokuje około pół minuty po wygaśnięciu połączenia. Wyłączenie Bluetootha w iPhonie nie blokuje, podobnie jak uśpienie tego komputera."+msgstr ""+"Blokuje około pół minuty po wygaśnięciu połączenia. Wyłączenie Bluetootha w "+"iPhonie nie blokuje, podobnie jak uśpienie tego komputera."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2332,9 +2396,6 @@ msgstr "Sparuj urządzenia i synchronizuj schowek przez sieć"#~ "Włącz lub wyłącz sterowanie połączeniami. Wymaga roli hfp_hf i usługi "#~ "telefonii w WirePlumber; zobacz docs/BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Dźwięk połączenia przeniesiony na ten komputer."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/pt_BR.po b/po/pt_BR.poindex 4928935..acb4a20 100644--- a/po/pt_BR.po+++ b/po/pt_BR.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Brazilian Portuguese\n"@@ -92,6 +92,10 @@ msgstr "Mostrar o estado do enlace Bluetooth e dos perfis."msgid "Show AirPods and case battery."msgstr "Mostrar a bateria dos AirPods e do estojo."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "Gerenciar os AirPods pelo Tether: on ou off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr ""@@ -460,10 +464,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "Não foi possível ler a bateria dos AirPods do daemon.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "Nenhum AirPods conectado.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "O gerenciamento dos AirPods está desativado.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Esq."@@ -481,6 +488,14 @@ msgstr "Estojo"msgid "Worn"msgstr "Em uso"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Este computador não se apresenta como hardware da Apple, então uma chamada "+"passa os AirPods desconectando-os. Veja DeviceID em /etc/bluetooth/main.conf."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "Não foi possível alcançar o daemon.\n"@@ -507,6 +522,14 @@ msgstr "Pausa ao remover definida como %s.\n"msgid "Use on or off.\n"msgstr "Use on ou off.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "O Tether está gerenciando os AirPods."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "O Tether liberou o canal dos AirPods para outro programa."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -765,6 +788,14 @@ msgstr "Discando."msgid "Answering."msgstr "Atendendo."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "O áudio da chamada vem para este computador."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "O áudio da chamada fica no iPhone."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Encerrando."@@ -1288,6 +1319,12 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "As chamadas são controladas aqui; o áudio toca no iPhone."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr ""+"Este computador não está transportando o áudio da chamada; ele toca no "+"iPhone."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "Não é um número discável."@@ -1300,12 +1337,6 @@ msgstr "Nenhuma chamada indicada."msgid "That call is no longer active."msgstr "Essa chamada não está mais ativa."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr ""-"Este computador não está transportando o áudio da chamada; ele toca no "-"iPhone."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Ação de chamada desconhecida."@@ -1553,6 +1584,10 @@ msgstr "Adaptativo"msgid "Noise Cancellation"msgstr "Cancelamento de ruído"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "O Tether não está gerenciando os AirPods, outro programa pode usá-los."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "Estes AirPods não informam um modo de escuta."@@ -1573,6 +1608,20 @@ msgstr "Um fone está colocado."msgid "Neither bud is in."msgstr "Nenhum fone está colocado."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "Os AirPods são passados com a transferência da própria Apple."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"Os AirPods são passados desconectando-os. Para a transferência da própria "+"Apple, coloque DeviceID = bluetooth:004C:0000:0000 em [General] no /etc/"+"bluetooth/main.conf e reinicie o bluetooth."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Modo completo — mensagens, contatos e notificações."@@ -1865,6 +1914,18 @@ msgstr ""msgid "Scan for devices"msgstr "Procurar dispositivos"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "Gerenciar os AirPods pelo Tether"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"O canal dos AirPods aceita um programa por computador. Desativar libera o "+"canal para outro programa de AirPods."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Modo de escuta"@@ -2198,7 +2259,9 @@ msgstr "Bloquear a sessão quando o iPhone sair do alcance"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Bloqueia cerca de meio minuto após o enlace expirar. Desligar o Bluetooth no iPhone não bloqueia, e suspender esta máquina também não."+msgstr ""+"Bloqueia cerca de meio minuto após o enlace expirar. Desligar o Bluetooth no "+"iPhone não bloqueia, e suspender esta máquina também não."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2332,9 +2395,6 @@ msgstr "Pareie dispositivos e sincronize a área de transferência pela rede"#~ "Ativar ou desativar o controle de chamadas. Requer o papel hfp_hf e o "#~ "serviço de telefonia no WirePlumber; consulte docs/BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Áudio da chamada movido para este computador."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/ru.po b/po/ru.poindex f2f2b96..2b9cbf2 100644--- a/po/ru.po+++ b/po/ru.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Russian\n"@@ -92,6 +92,10 @@ msgstr "Показать состояние соединения Bluetooth и пmsgid "Show AirPods and case battery."msgstr "Показать заряд AirPods и футляра."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "Управлять AirPods из Tether: on или off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr "Задать режим прослушивания AirPods: off, anc, transparency, adaptive."@@ -464,10 +468,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "Не удалось получить заряд AirPods от службы.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "AirPods не подключены.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "Управление AirPods отключено.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Левый"@@ -485,6 +492,14 @@ msgstr "Футляр"msgid "Worn"msgstr "В ушах"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Этот компьютер не представляется оборудованием Apple, поэтому при звонке "+"AirPods передаются отключением. См. DeviceID в /etc/bluetooth/main.conf."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "Не удалось связаться с демоном.\n"@@ -511,6 +526,14 @@ msgstr "Пауза при извлечении установлена на %s.\nmsgid "Use on or off.\n"msgstr "Используйте on или off.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether управляет AirPods."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether освободил канал AirPods для другой программы."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -771,6 +794,14 @@ msgstr "Идёт набор."msgid "Answering."msgstr "Ответ на вызов."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "Звук вызова идёт на этот компьютер."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "Звук вызова остаётся на iPhone."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Завершение вызова."@@ -1286,6 +1317,10 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "Вызовами управляют отсюда; звук воспроизводится на iPhone."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr "Этот компьютер не передаёт звук вызова; он воспроизводится на iPhone."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "Такой номер набрать нельзя."@@ -1298,10 +1333,6 @@ msgstr "Вызов не указан."msgid "That call is no longer active."msgstr "Этот вызов уже не активен."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr "Этот компьютер не передаёт звук вызова; он воспроизводится на iPhone."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Неизвестное действие с вызовом."@@ -1549,6 +1580,10 @@ msgstr "Адаптивный"msgid "Noise Cancellation"msgstr "Шумоподавление"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "Tether не управляет AirPods, их может использовать другая программа."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "Эти AirPods не сообщают режим прослушивания."@@ -1569,6 +1604,20 @@ msgstr "Один наушник в ухе."msgid "Neither bud is in."msgstr "Ни один наушник не в ухе."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "AirPods передаются собственным механизмом Apple."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"AirPods передаются отключением. Для собственного механизма Apple добавьте "+"DeviceID = bluetooth:004C:0000:0000 в раздел [General] в /etc/bluetooth/"+"main.conf и перезапустите bluetooth."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Полный режим — сообщения, контакты и уведомления."@@ -1863,6 +1912,18 @@ msgstr ""msgid "Scan for devices"msgstr "Искать устройства"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "Управлять AirPods из Tether"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"Канал AirPods принимает одну программу на компьютер. Отключение освобождает "+"его для другой программы для AirPods."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Режим прослушивания"@@ -2197,7 +2258,10 @@ msgstr "Блокировать сеанс, когда iPhone выходит изmsgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Блокирует примерно через полминуты после истечения времени соединения. Выключение Bluetooth на iPhone не блокирует, как и переход этой машины в спящий режим."+msgstr ""+"Блокирует примерно через полминуты после истечения времени соединения. "+"Выключение Bluetooth на iPhone не блокирует, как и переход этой машины в "+"спящий режим."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2332,9 +2396,6 @@ msgstr "Создавайте пары устройств и синхронизи#~ "Включить или выключить управление вызовами. Требуется роль hfp_hf и "#~ "служба телефонии в WirePlumber; см. docs/BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Звук вызова переведён на этот компьютер."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/sv.po b/po/sv.poindex b95812a..c7d938e 100644--- a/po/sv.po+++ b/po/sv.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Swedish\n"@@ -92,6 +92,10 @@ msgstr "Visa status för Bluetooth-länken och profilerna."msgid "Show AirPods and case battery."msgstr "Visa batterinivå för AirPods och etui."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "Låt Tether hantera AirPods: on eller off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr "Ställ in AirPods lyssningsläge: off, anc, transparency, adaptive."@@ -457,10 +461,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "Kunde inte läsa AirPods batterinivå från demonen.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "Inga AirPods anslutna.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "Hanteringen av AirPods är avstängd.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Vänster"@@ -478,6 +485,15 @@ msgstr "Etui"msgid "Worn"msgstr "Bärs"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Den här datorn presenterar sig inte som Apple-hårdvara, så ett samtal lämnar "+"över AirPods genom att koppla från dem. Se DeviceID i /etc/bluetooth/"+"main.conf."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "Kunde inte nå demonen.\n"@@ -504,6 +520,14 @@ msgstr "Paus vid urtagning inställd på %s.\n"msgid "Use on or off.\n"msgstr "Använd on eller off.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether hanterar AirPods."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether har släppt AirPods-kanalen till ett annat program."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -761,6 +785,14 @@ msgstr "Ringer upp."msgid "Answering."msgstr "Besvarar."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "Samtalsljudet kommer till den här datorn."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "Samtalsljudet stannar på iPhone."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Lägger på."@@ -1273,6 +1305,10 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "Samtal styrs härifrån; ljudet spelas upp på iPhone."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr "Den här datorn bär inte samtalsljudet; det spelas upp på iPhone."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "Inte ett uppringbart nummer."@@ -1285,10 +1321,6 @@ msgstr "Inget samtal angivet."msgid "That call is no longer active."msgstr "Det samtalet är inte längre aktivt."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr "Den här datorn bär inte samtalsljudet; det spelas upp på iPhone."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Okänd samtalsåtgärd."@@ -1533,6 +1565,10 @@ msgstr "Adaptivt"msgid "Noise Cancellation"msgstr "Brusreducering"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "Tether hanterar inte AirPods, ett annat program kan använda dem."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "De här AirPods rapporterar inget lyssningsläge."@@ -1553,6 +1589,20 @@ msgstr "En propp sitter i."msgid "Neither bud is in."msgstr "Ingen propp sitter i."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "AirPods lämnas över med Apples egen överlämning."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"AirPods lämnas över genom att koppla från dem. För Apples egen överlämning, "+"lägg till DeviceID = bluetooth:004C:0000:0000 under [General] i /etc/"+"bluetooth/main.conf och starta om bluetooth."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Fullt läge — meddelanden, kontakter och aviseringar."@@ -1844,6 +1894,18 @@ msgstr ""msgid "Scan for devices"msgstr "Sök efter enheter"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "Låt Tether hantera AirPods"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"AirPods-kanalen tar ett program per dator. Att stänga av släpper den, så att "+"ett annat AirPods-program kan använda den."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Lyssningsläge"@@ -2177,7 +2239,10 @@ msgstr "Lås sessionen när iPhonen hamnar utom räckhåll"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Låser ungefär en halv minut efter att länken gått ut. Att stänga av Bluetooth på iPhonen låser inte, och inte heller att försätta den här maskinen i vila."+msgstr ""+"Låser ungefär en halv minut efter att länken gått ut. Att stänga av "+"Bluetooth på iPhonen låser inte, och inte heller att försätta den här "+"maskinen i vila."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2309,9 +2374,6 @@ msgstr "Parkoppla enheter och synkronisera urklipp över nätverket"#~ "Slå på eller av samtalsstyrning. Kräver rollen hfp_hf och "#~ "telefonitjänsten i WirePlumber; se docs/BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Samtalsljudet flyttat till den här datorn."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/tether.pot b/po/tether.potindex 43d5820..2d278c8 100644--- a/po/tether.pot+++ b/po/tether.pot@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether 0.2.28\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <[email protected]>\n"@@ -90,6 +90,10 @@ msgstr ""msgid "Show AirPods and case battery."msgstr ""+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr ""+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr ""@@ -416,10 +420,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr ""#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr ""+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr ""+#: src/cli/main.cppmsgid "Left"msgstr ""@@ -437,6 +444,12 @@ msgstr ""msgid "Worn"msgstr ""+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr ""@@ -463,6 +476,14 @@ msgstr ""msgid "Use on or off.\n"msgstr ""+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr ""++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr ""+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -708,6 +729,14 @@ msgstr ""msgid "Answering."msgstr ""+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr ""++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr ""+#: src/cli/main.cppmsgid "Hanging up."msgstr ""@@ -1148,19 +1177,19 @@ msgid "Calls are controlled here; the audio plays on the iPhone."msgstr ""#: src/core/src/bluetooth/telephony.cpp-msgid "Not a dialable number."+msgid "This computer is not carrying the call audio; it plays on the iPhone."msgstr ""#: src/core/src/bluetooth/telephony.cpp-msgid "No call named."+msgid "Not a dialable number."msgstr ""#: src/core/src/bluetooth/telephony.cpp-msgid "That call is no longer active."+msgid "No call named."msgstr ""#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgid "That call is no longer active."msgstr ""#: src/core/src/bluetooth/telephony.cpp@@ -1400,6 +1429,10 @@ msgstr ""msgid "Noise Cancellation"msgstr ""+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr ""+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr ""@@ -1420,6 +1453,17 @@ msgstr ""msgid "Neither bud is in."msgstr ""+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr ""++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr ""@@ -1682,6 +1726,16 @@ msgstr ""msgid "Scan for devices"msgstr ""+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr ""++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr ""diff --git a/po/tr.po b/po/tr.poindex 1414a69..2723552 100644--- a/po/tr.po+++ b/po/tr.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Turkish\n"@@ -90,6 +90,10 @@ msgstr "Bluetooth bağlantısının ve profillerin durumunu göster."msgid "Show AirPods and case battery."msgstr "AirPods ve kutu pil durumunu göster."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "AirPods'u Tether'dan yönet: on veya off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr "AirPods dinleme modunu ayarla: off, anc, transparency, adaptive."@@ -458,10 +462,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "AirPods pil durumu arka plan hizmetinden okunamadı.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "Bağlı AirPods yok.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "AirPods yönetimi kapalı.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Sol"@@ -479,6 +486,15 @@ msgstr "Kutu"msgid "Worn"msgstr "Takılı"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Bu bilgisayar kendisini Apple donanımı olarak tanıtmıyor, bu yüzden bir "+"çağrıda AirPods bağlantısı kesilerek devredilir. /etc/bluetooth/main.conf "+"içindeki DeviceID'ye bakın."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "Arka plan hizmetine ulaşılamadı.\n"@@ -505,6 +521,14 @@ msgstr "Çıkarınca duraklatma %s olarak ayarlandı.\n"msgid "Use on or off.\n"msgstr "on veya off kullanın.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether AirPods'u yönetiyor."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether, AirPods kanalını başka bir program için bıraktı."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -762,6 +786,14 @@ msgstr "Aranıyor."msgid "Answering."msgstr "Yanıtlanıyor."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "Çağrı sesi bu bilgisayara geliyor."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "Çağrı sesi iPhone'da kalıyor."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Kapatılıyor."@@ -1273,6 +1305,10 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "Çağrılar buradan yönetilir; ses iPhone’da çalar."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr "Bu bilgisayar çağrı sesini taşımıyor; ses iPhone’da çalıyor."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "Aranabilir bir numara değil."@@ -1285,10 +1321,6 @@ msgstr "Çağrı belirtilmedi."msgid "That call is no longer active."msgstr "Bu çağrı artık etkin değil."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr "Bu bilgisayar çağrı sesini taşımıyor; ses iPhone’da çalıyor."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Bilinmeyen çağrı işlemi."@@ -1533,6 +1565,10 @@ msgstr "Uyarlanabilir"msgid "Noise Cancellation"msgstr "Gürültü Engelleme"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "Tether AirPods'u yönetmiyor, başka bir program kullanabilir."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "Bu AirPods bir dinleme modu bildirmiyor."@@ -1553,6 +1589,20 @@ msgstr "Bir kulaklık takılı."msgid "Neither bud is in."msgstr "Hiçbir kulaklık takılı değil."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "AirPods, Apple'ın kendi devretme yöntemiyle aktarılıyor."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"AirPods bağlantısı kesilerek devrediliyor. Apple'ın kendi devretme yöntemi "+"için /etc/bluetooth/main.conf dosyasında [General] altına DeviceID = "+"bluetooth:004C:0000:0000 ekleyin ve bluetooth'u yeniden başlatın."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Tam kip — mesajlar, kişiler ve bildirimler."@@ -1840,6 +1890,19 @@ msgstr ""msgid "Scan for devices"msgstr "Aygıtları tara"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "AirPods'u Tether'dan yönet"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"AirPods kanalını bilgisayar başına tek bir program kullanabilir. Bunu "+"kapatmak kanalı serbest bırakır, böylece başka bir AirPods programı "+"kullanabilir."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Dinleme modu"@@ -2174,7 +2237,10 @@ msgstr "iPhone menzil dışına çıkınca oturumu kilitle"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Bağlantı zaman aşımına uğradıktan yaklaşık yarım dakika sonra kilitler. iPhone'da Bluetooth'u kapatmak kilitlemez, bu makineyi uyku moduna almak da kilitlemez."+msgstr ""+"Bağlantı zaman aşımına uğradıktan yaklaşık yarım dakika sonra kilitler. "+"iPhone'da Bluetooth'u kapatmak kilitlemez, bu makineyi uyku moduna almak da "+"kilitlemez."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2307,9 +2373,6 @@ msgstr "Aygıtları eşleştirin ve panoyu ağ üzerinden eşzamanlayın"#~ "Çağrı denetimini aç veya kapat. WirePlumber’da hfp_hf rolünü ve telefon "#~ "hizmetini gerektirir; bkz. docs/BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Çağrı sesi bu bilgisayara taşındı."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/uk.po b/po/uk.poindex 188bdf1..b4de291 100644--- a/po/uk.po+++ b/po/uk.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Ukrainian\n"@@ -93,6 +93,10 @@ msgstr "Показати стан з'єднання Bluetooth і профіліmsgid "Show AirPods and case battery."msgstr "Показати заряд AirPods і футляра."+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "Керувати AirPods із Tether: on або off."+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr ""@@ -465,10 +469,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "Не вдалося отримати заряд AirPods від служби.\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "AirPods не під'єднано.\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "Керування AirPods вимкнено.\n"+#: src/cli/main.cppmsgid "Left"msgstr "Лівий"@@ -486,6 +493,15 @@ msgstr "Футляр"msgid "Worn"msgstr "У вухах"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"Цей комп'ютер не представляється обладнанням Apple, тому під час дзвінка "+"AirPods передаються через відключення. Див. DeviceID у /etc/bluetooth/"+"main.conf."+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "Не вдалося зв'язатися з демоном.\n"@@ -512,6 +528,14 @@ msgstr "Паузу при вийманні встановлено на %s.\n"msgid "Use on or off.\n"msgstr "Використовуйте on або off.\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether керує AirPods."++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether звільнив канал AirPods для іншої програми."+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -770,6 +794,14 @@ msgstr "Триває набір."msgid "Answering."msgstr "Відповідь на виклик."+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "Звук дзвінка йде на цей комп'ютер."++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "Звук дзвінка залишається на iPhone."+#: src/cli/main.cppmsgid "Hanging up."msgstr "Завершення виклику."@@ -1284,6 +1316,10 @@ msgstr ""msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "Викликами керують звідси; звук відтворюється на iPhone."+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr "Цей комп’ютер не передає звук виклику; він відтворюється на iPhone."+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "Такий номер набрати не можна."@@ -1296,10 +1332,6 @@ msgstr "Виклик не вказано."msgid "That call is no longer active."msgstr "Цей виклик уже не активний."-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr "Цей комп’ютер не передає звук виклику; він відтворюється на iPhone."-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "Невідома дія з викликом."@@ -1547,6 +1579,10 @@ msgstr "Адаптивний"msgid "Noise Cancellation"msgstr "Шумозаглушення"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "Tether не керує AirPods, їх може використовувати інша програма."+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "Ці AirPods не повідомляють режим прослуховування."@@ -1567,6 +1603,20 @@ msgstr "Один навушник у вусі."msgid "Neither bud is in."msgstr "Жоден навушник не у вусі."+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "AirPods передаються власним механізмом Apple."++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"AirPods передаються через відключення. Для власного механізму Apple додайте "+"DeviceID = bluetooth:004C:0000:0000 у розділ [General] у /etc/bluetooth/"+"main.conf і перезапустіть bluetooth."+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "Повний режим — повідомлення, контакти та сповіщення."@@ -1860,6 +1910,18 @@ msgstr ""msgid "Scan for devices"msgstr "Шукати пристрої"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "Керувати AirPods із Tether"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"Канал AirPods приймає одну програму на комп'ютер. Вимкнення звільняє його "+"для іншої програми для AirPods."+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "Режим прослуховування"@@ -2195,7 +2257,9 @@ msgstr "Блокувати сеанс, коли iPhone виходить із зmsgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "Блокує приблизно за півхвилини після того, як з'єднання завершиться за часом. Вимкнення Bluetooth на iPhone не блокує, як і присипляння цієї машини."+msgstr ""+"Блокує приблизно за півхвилини після того, як з'єднання завершиться за "+"часом. Вимкнення Bluetooth на iPhone не блокує, як і присипляння цієї машини."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2329,9 +2393,6 @@ msgstr "Створюйте пари пристроїв і синхронізуй#~ "Увімкнути або вимкнути керування викликами. Потрібна роль hfp_hf і служба "#~ "телефонії у WirePlumber; див. docs/BLUETOOTH.md."-#~ msgid "Call audio moved to this computer."-#~ msgstr "Звук виклику переведено на цей комп’ютер."-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/po/zh_CN.po b/po/zh_CN.poindex 5ea7a04..fe54d2c 100644--- a/po/zh_CN.po+++ b/po/zh_CN.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-08 22:55-0700\n"+"POT-Creation-Date: 2026-09-09 20:19-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Simplified Chinese\n"@@ -90,6 +90,10 @@ msgstr "显示蓝牙链路和配置文件的连接状态。"msgid "Show AirPods and case battery."msgstr "显示 AirPods 和充电盒电量。"+#: src/cli/main.cpp+msgid "Manage AirPods from Tether at all: on or off."+msgstr "是否由 Tether 管理 AirPods:on 或 off。"+#: src/cli/main.cppmsgid "Set the AirPods listening mode: off, anc, transparency, adaptive."msgstr "设置 AirPods 聆听模式:off、anc、transparency、adaptive。"@@ -439,10 +443,13 @@ msgid "Could not read the AirPods battery from the daemon.\n"msgstr "无法从守护进程读取 AirPods 电量。\n"#: src/cli/main.cpp-#, c-formatmsgid "No AirPods connected.\n"msgstr "未连接 AirPods。\n"+#: src/cli/main.cpp+msgid "AirPods management is off.\n"+msgstr "AirPods 管理已关闭。\n"+#: src/cli/main.cppmsgid "Left"msgstr "左"@@ -460,6 +467,14 @@ msgstr "充电盒"msgid "Worn"msgstr "佩戴"+#: src/cli/main.cpp+msgid ""+"This computer does not present itself as Apple hardware, so a call hands the "+"buds over by disconnecting them. See DeviceID in /etc/bluetooth/main.conf."+msgstr ""+"本机没有以 Apple 硬件的身份出现,因此通话时通过断开连接来移交 AirPods。参见 /"+"etc/bluetooth/main.conf 中的 DeviceID。"+#: src/cli/main.cppmsgid "Could not reach the daemon.\n"msgstr "无法连接到守护进程。\n"@@ -486,6 +501,14 @@ msgstr "取下时暂停已设为 %s。\n"msgid "Use on or off.\n"msgstr "请使用 on 或 off。\n"+#: src/cli/main.cpp+msgid "Tether is managing the AirPods."+msgstr "Tether 正在管理 AirPods。"++#: src/cli/main.cpp+msgid "Tether has released the AirPods channel for another program."+msgstr "Tether 已释放 AirPods 通道,供其他程序使用。"+#: src/cli/main.cppmsgid """An iPhone call will hand the AirPods to the phone and take them back after."@@ -737,6 +760,14 @@ msgstr "正在拨号。"msgid "Answering."msgstr "正在接听。"+#: src/cli/main.cpp+msgid "Call audio comes to this computer."+msgstr "通话声音转到这台电脑。"++#: src/cli/main.cpp+msgid "Call audio stays on the iPhone."+msgstr "通话声音留在 iPhone 上。"+#: src/cli/main.cppmsgid "Hanging up."msgstr "正在挂断。"@@ -1217,6 +1248,10 @@ msgstr "免提由 PipeWire 承载,因此通话音频可以在本机播放。"msgid "Calls are controlled here; the audio plays on the iPhone."msgstr "通话在此控制,音频在 iPhone 上播放。"+#: src/core/src/bluetooth/telephony.cpp+msgid "This computer is not carrying the call audio; it plays on the iPhone."+msgstr "本机未承载通话音频;音频在 iPhone 上播放。"+#: src/core/src/bluetooth/telephony.cppmsgid "Not a dialable number."msgstr "不是可拨打的号码。"@@ -1229,10 +1264,6 @@ msgstr "未指定通话。"msgid "That call is no longer active."msgstr "该通话已不再有效。"-#: src/core/src/bluetooth/telephony.cpp-msgid "This computer is not carrying the call audio; it plays on the iPhone."-msgstr "本机未承载通话音频;音频在 iPhone 上播放。"-#: src/core/src/bluetooth/telephony.cppmsgid "Unknown call action."msgstr "未知的通话操作。"@@ -1475,6 +1506,10 @@ msgstr "自适应"msgid "Noise Cancellation"msgstr "降噪"+#: src/gtk/devices_view.cpp+msgid "Tether is not managing the AirPods, so another program can use them."+msgstr "Tether 未管理 AirPods,其他程序可以使用它们。"+#: src/gtk/devices_view.cppmsgid "These AirPods do not report a listening mode."msgstr "此 AirPods 不报告聆听模式。"@@ -1495,6 +1530,20 @@ msgstr "已佩戴一只耳机。"msgid "Neither bud is in."msgstr "未佩戴耳机。"+#: src/gtk/devices_view.cpp+msgid "The buds are handed over with Apple's own handoff."+msgstr "使用 Apple 原生的移交方式交出 AirPods。"++#: src/gtk/devices_view.cpp+msgid ""+"The buds are handed over by disconnecting them. For Apple's own handoff, put "+"DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/"+"main.conf and restart bluetooth."+msgstr ""+"通过断开连接交出 AirPods。若要使用 Apple 原生的移交方式,请在 /etc/bluetooth/"+"main.conf 的 [General] 下加入 DeviceID = bluetooth:004C:0000:0000 并重启 "+"bluetooth。"+#: src/gtk/devices_view.cppmsgid "Full mode — messages, contacts, and notifications."msgstr "完整模式 —— 信息、通讯录和通知。"@@ -1776,6 +1825,18 @@ msgstr ""msgid "Scan for devices"msgstr "搜索设备"+#: src/gtk/devices_view.cpp+msgid "Manage AirPods from Tether"+msgstr "由 Tether 管理 AirPods"++#: src/gtk/devices_view.cpp+msgid ""+"The AirPods channel takes one program per computer. Turning this off "+"releases it, so another AirPods program can use it."+msgstr ""+"每台电脑只有一个程序能占用 AirPods 通道。关闭后即可释放,供其他 AirPods 程序"+"使用。"+#: src/gtk/devices_view.cppmsgid "Listening mode"msgstr "聆听模式"@@ -2100,7 +2161,8 @@ msgstr "当 iPhone 超出范围时锁定会话"msgid """Locks about half a minute after the link times out. Switching Bluetooth off ""on the iPhone does not lock, and neither does suspending this machine."-msgstr "在链路超时约半分钟后锁定。在 iPhone 上关闭蓝牙不会锁定,将本机挂起也不会。"+msgstr ""+"在链路超时约半分钟后锁定。在 iPhone 上关闭蓝牙不会锁定,将本机挂起也不会。"#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."@@ -2223,9 +2285,6 @@ msgstr "配对设备并通过网络同步剪贴板"#~ "开启或关闭通话控制。需要 WirePlumber 中的 hfp_hf 角色和电话服务;参见 "#~ "docs/BLUETOOTH.md。"-#~ msgid "Call audio moved to this computer."-#~ msgstr "通话音频已转到本机。"-#~ msgid ""#~ "Play the call through this computer's speakers and microphone. Handing it "#~ "back applies to the next call."diff --git a/src/cli/main.cpp b/src/cli/main.cppindex edec726..70a0b16 100644--- a/src/cli/main.cpp+++ b/src/cli/main.cpp@@ -192,6 +192,7 @@ static const Opt kOptions[] = {{"--bt-devices", N_("List Bluetooth devices known to BlueZ.")},{"--bt-connection", N_("Show Bluetooth link and profile connection state.")},{"--bt-airpods", N_("Show AirPods and case battery.")},+ {"--bt-airpods-enable", N_("Manage AirPods from Tether at all: on or off.")},{"--bt-airpods-mode", N_("Set the AirPods listening mode: off, anc, transparency, adaptive.")},{"--bt-airpods-pause", N_("Pause local playback when an AirPod is removed: never, one-removed, both-removed.")},{"--bt-airpods-handoff", N_("Hand the AirPods to the iPhone during a call: on or off.")},@@ -507,15 +508,20 @@ static int print_bt_devices(tether::Client& client) {static int print_bt_airpods(tether::Client& client) {nlohmann::json resp;+ nlohmann::json status;try {resp = nlohmann::json::parse(client.send_and_wait("{\"command\":\"bt_airpods\"}\n"));+ status = nlohmann::json::parse(client.send_and_wait("{\"command\":\"bt_status\"}\n"));} catch (const std::exception&) {debug::log(ERR, _("Could not read the AirPods battery from the daemon.\n"));return 1;}if (resp.value("address", "").empty()) {- fprintf(stdout, _("No AirPods connected.\n"));+ fprintf(stdout,+ "%s",+ status.value("airpods_enabled", false) ? _("AirPods management is off.\n")+ : _("No AirPods connected.\n"));return 0;}@@ -545,6 +551,12 @@ static int print_bt_airpods(tether::Client& client) {const std::string reason = resp.value("reason", "");if (!reason.empty())fprintf(stdout, " %s\n", reason.c_str());++ if (!status.value("apple_device_id", false))+ fprintf(stdout,+ " %s\n",+ _("This computer does not present itself as Apple hardware, so a call hands the buds over by "+ "disconnecting them. See DeviceID in /etc/bluetooth/main.conf."));return 0;}@@ -580,6 +592,22 @@ static int set_bt_airpods_pause(tether::Client& client, const std::string& mode)return 0;}+static int set_bt_airpods_enable(tether::Client& client, const std::string& value) {+ if (value != "on" && value != "off") {+ debug::log(ERR, _("Use on or off.\n"));+ return 1;+ }+ if (!client.send(nlohmann::json{{"command", "bt_airpods_enable"}, {"enabled", value == "on"}}.dump() + "\n")) {+ debug::log(ERR, _("Could not reach the daemon.\n"));+ return 1;+ }+ fprintf(stdout,+ "%s\n",+ value == "on" ? _("Tether is managing the AirPods.")+ : _("Tether has released the AirPods channel for another program."));+ return 0;+}+static int set_bt_airpods_handoff(tether::Client& client, const std::string& value) {if (value != "on" && value != "off") {debug::log(ERR, _("Use on or off.\n"));@@ -1061,6 +1089,10 @@ int main(int argc, char* argv[]) {action = "bt_connection";} else if (arg == "--bt-airpods") {action = "bt_airpods";+ } else if (arg == "--bt-airpods-enable") {+ action = "bt_airpods_enable";+ if (i + 1 < argc && argv[i + 1][0] != '-')+ arg_val = argv[++i];} else if (arg == "--bt-airpods-mode") {action = "bt_airpods_mode";if (i + 1 < argc && argv[i + 1][0] != '-')@@ -1314,6 +1346,8 @@ int main(int argc, char* argv[]) {return print_bt_connection(client);} else if (action == "bt_airpods") {return print_bt_airpods(client);+ } else if (action == "bt_airpods_enable") {+ return set_bt_airpods_enable(client, arg_val);} else if (action == "bt_airpods_mode") {return set_bt_airpods_mode(client, arg_val);} else if (action == "bt_airpods_pause") {@@ -1345,7 +1379,11 @@ int main(int argc, char* argv[]) {nlohmann::json request;request["command"] = "bt_call_action";request["action"] = arg_val;- return run_call_command(client, request, arg_val == "answer" ? _("Answering.") : _("Hanging up."));+ const char* done = arg_val == "answer" ? _("Answering.")+ : arg_val == "audio_here" ? _("Call audio comes to this computer.")+ : arg_val == "audio_phone" ? _("Call audio stays on the iPhone.")+ : _("Hanging up.");+ return run_call_command(client, request, done);} else if (action == "bt_calls_enable") {if (arg_val != "on" && arg_val != "off") {debug::log(ERR, _("Expected on or off, e.g. --bt-calls-enable on\n"));diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txtindex 9283010..2363941 100644--- a/src/core/CMakeLists.txt+++ b/src/core/CMakeLists.txt@@ -13,6 +13,7 @@ add_library(tether STATICsrc/extension_host.cppsrc/discovery.cppsrc/mpris.cpp+ src/audio.cppsrc/bluetooth/objects.cppsrc/bluetooth/monitor.cppsrc/bluetooth/config.cppdiff --git a/src/core/include/tether/audio.hpp b/src/core/include/tether/audio.hppnew file mode 100644index 0000000..73cf572--- /dev/null+++ b/src/core/include/tether/audio.hpp@@ -0,0 +1,25 @@+#pragma once++#include <string>++// The audio server, through pactl, which both PulseAudio and PipeWire answer.+// Every call is a no-op returning empty when pactl is not installed.+namespace tether::audio {++ // The sink the audio server is currently sending new streams to.+ std::string default_sink();++ // The sink for a Bluetooth device ("bluez_output.AC_F2_3C_AF_52_9C.1")+ // or empty when the device has no sink right now.+ std::string bluez_sink(const std::string& address);++ bool set_default_sink(const std::string& name);++ // Waits for a Bluetooth device's sink to come back and makes it the default+ // again. False when it did not appear before the deadline.+ bool restore_default_sink(const std::string& address, int timeout_ms);++ // Sink name for a Bluetooth address, exposed for tests.+ std::string sink_prefix(const std::string& address);++} // namespace tether::audiodiff --git a/src/core/include/tether/bluetooth/airpods.hpp b/src/core/include/tether/bluetooth/airpods.hppindex 9665f65..36bf1ce 100644--- a/src/core/include/tether/bluetooth/airpods.hpp+++ b/src/core/include/tether/bluetooth/airpods.hpp@@ -9,6 +9,7 @@#include <nlohmann/json.hpp>#include <optional>#include <string>+#include <vector>namespace tether::bluetooth {@@ -34,6 +35,40 @@ namespace tether::bluetooth {const char* to_string(AncMode mode);std::optional<AncMode> anc_mode_from_string(const std::string& name);+ // Ownership state of one host attached to the buds, the `B` field of a+ // connected-devices notification.+ inline constexpr uint8_t AAP_PEER_ENGAGED = 0x10;+ // Connected and idle. An iPhone sits here for as long as it is paired and doing+ // nothing, so this one value is not a peer taking the buds.+ inline constexpr uint8_t AAP_PEER_PASSIVE = 0x15;+ inline constexpr uint8_t AAP_PEER_ACTIVE = 0x17;++ // One host in a connected-devices notification.+ struct AapPeer {+ std::string address;+ // Role and generation counter. Zero for our own address means the firmware+ // evicted us, but it also occurs when the buds swap primary and secondary.+ uint8_t role = 0;+ uint8_t state = 0;++ bool active() const { return state >= AAP_PEER_ACTIVE; }+ // Escalating towards taking the buds, or already holding them. Claiming+ // against this leaves the host contested and the firmware closes the link.+ bool taking_over() const { return state >= AAP_PEER_ENGAGED && state != AAP_PEER_PASSIVE; }++ bool operator==(const AapPeer&) const = default;+ };++ // What the buds are carrying for a host.+ enum class AudioSource { None, Call, Media };++ struct AudioSourceEvent {+ std::string address;+ AudioSource source = AudioSource::None;++ bool operator==(const AudioSourceEvent&) const = default;+ };+// Where a bud is.enum class EarStatus { Unknown, InEar, OutOfEar, InCase };@@ -86,6 +121,8 @@ namespace tether::bluetooth {struct AirPodsState {std::string address;std::string name;+ bool peer_taking_over = false;+ bool peer_active = false;AirPodsBattery battery;// Unset until the buds report one. Not every model has the feature.std::optional<AncMode> anc;@@ -110,6 +147,26 @@ namespace tether::bluetooth {// offset 6 and the secondary at 7.std::optional<EarState> parse_ear(const uint8_t* data, size_t len);+ // Decodes a connected-devices notification:+ // 04 00 04 00 2E 00 [count] ([mac] * 6 [role] [state]) * count+ // The MAC is stored least-significant byte first here, unlike the audio-source+ // notification; both come back in BlueZ's own text order.+ std::optional<std::vector<AapPeer>> parse_connected_devices(const uint8_t* data, size_t len);++ // Decodes an audio-source notification, 13 bytes: prefix, MAC, then the type.+ std::optional<AudioSourceEvent> parse_audio_source(const uint8_t* data, size_t len);++ // Whether any host other than `local` is engaged with the buds, or actively+ // holding them. A machine's own entry is never a peer.+ struct PeerSummary {+ bool taking_over = false;+ bool active = false;++ bool operator==(const PeerSummary&) const = default;+ };++ PeerSummary summarize_peers(const std::vector<AapPeer>& peers, const std::string& local);+// Decodes a listening-mode notification, 11 bytes carrying the mode at offset 7.// Returns no value for anything else, including an out-of-range mode.std::optional<AncMode> parse_anc(const uint8_t* data, size_t len);@@ -123,8 +180,13 @@ namespace tether::bluetooth {// What an iPhone call should do to AirPods that are connected to this machine.enum class HandoffAction { None, Release, Reclaim };+ // What the buds' own view of their hosts should do to local audio, for the+ // native handoff: the phone taking them is a peer going active, not a call.+ HandoffAction ownership_action(bool peer_active, bool released, bool enabled);+// `released` is whether this code is what disconnected them: buds the user- // took away by hand are never reclaimed.+ // took away by hand are never reclaimed. A reclaim outlives `enabled` going+ // false, so turning the feature off mid-call does not strand them.HandoffAction handoff_action(bool call_active, bool buds_on_linux, bool released, bool enabled);// Whether a bt_calls payload describes a call worth handing the buds over for.@@ -145,13 +207,22 @@ namespace tether::bluetooth {// Points the watcher at a connected device, or stops it when `address` is// empty. Cheap to call on every BlueZ snapshot: an unchanged target is a no-op.- void set_device(const std::string& address, const std::string& name);+ void set_device(const std::string& address, const std::string& name, const std::string& local = {});++ // Stands the watcher down. The channel takes one client per machine, so+ // this is what lets another AirPods program have it.+ void set_enabled(bool enabled);// Asks the buds to switch listening mode. Sent on the open channel, and// dropped if the channel closes before it goes out; the buds answer with a// notification, which is what actually updates the published state.void set_anc(AncMode mode);+ // Takes the buds or gives them up over AAP, which is what Apple's own+ // handoff does. A claim is dropped while a peer is engaged: sending one then+ // leaves this host contested and the firmware closes the link.+ void set_ownership(bool own);+AirPodsState state() const;private:diff --git a/src/core/include/tether/bluetooth/config.hpp b/src/core/include/tether/bluetooth/config.hppindex 5303ed2..4672988 100644--- a/src/core/include/tether/bluetooth/config.hpp+++ b/src/core/include/tether/bluetooth/config.hpp@@ -49,6 +49,8 @@ namespace tether::bluetooth {Retention retention = Retention::Encrypted;// Whether the daemon shows desktop popups at all.bool desktop_popups_enabled = true;+ // Whether Tether manages AirPods at all. Off until asked.+ bool airpods_enabled = false;// Whether removing an AirPod pauses local playback.PauseMode airpods_pause = PauseMode::Never;// Whether an iPhone call hands the AirPods to the phone and takes them back after.diff --git a/src/core/include/tether/bluetooth/objects.hpp b/src/core/include/tether/bluetooth/objects.hppindex 552bed5..1817c74 100644--- a/src/core/include/tether/bluetooth/objects.hpp+++ b/src/core/include/tether/bluetooth/objects.hpp@@ -44,6 +44,7 @@ namespace tether::bluetooth {bool has_role(const std::string& role) const;bool class_is_handsfree() const { return (device_class & COD_MASK) == COD_TARGET; }+ bool presents_as_apple() const;bool operator==(const Adapter&) const = default;};diff --git a/src/core/include/tether/bluetooth/telephony.hpp b/src/core/include/tether/bluetooth/telephony.hppindex ee898c0..34a58a2 100644--- a/src/core/include/tether/bluetooth/telephony.hpp+++ b/src/core/include/tether/bluetooth/telephony.hpp@@ -99,6 +99,10 @@ namespace tether::bluetooth {GVariant* args,std::string& err);+ // Moves the call audio between this computer and the iPhone. Fails when the+ // stack holding Hands-Free cannot carry audio at all.+ bool route_audio(TelephonySource& source, const TelephonySnapshot& snap, bool to_phone, std::string& err);+std::vector<std::unique_ptr<TelephonySource>> sources_;std::string address_;};diff --git a/src/core/src/audio.cpp b/src/core/src/audio.cppnew file mode 100644index 0000000..474ab53--- /dev/null+++ b/src/core/src/audio.cpp@@ -0,0 +1,98 @@+#include "tether/audio.hpp"++#include <tether/log.hpp>++#include <chrono>+#include <glib.h>+#include <sstream>+#include <thread>++namespace tether::audio {++ namespace {++ constexpr int POLL_INTERVAL_MS = 200;++ std::string trimmed(const std::string& text) {+ const size_t begin = text.find_first_not_of(" \t\r\n");+ if (begin == std::string::npos)+ return {};+ const size_t end = text.find_last_not_of(" \t\r\n");+ return text.substr(begin, end - begin + 1);+ }++ // Never blocks the caller for long, pactl answers locally or not at all.+ // `ok` reports whether pactl ran and succeeded.+ std::string run(const char* command, bool* ok = nullptr) {+ gchar* out = nullptr;+ gint status = 0;+ GError* error = nullptr;+ if (ok)+ *ok = false;+ if (!g_spawn_command_line_sync(command, &out, nullptr, &status, &error)) {+ g_clear_error(&error);+ g_free(out);+ return {};+ }+ std::string text = out ? out : "";+ g_free(out);+ if (status != 0)+ return {};+ if (ok)+ *ok = true;+ return text;+ }++ } // namespace++ std::string sink_prefix(const std::string& address) {+ std::string name = "bluez_output.";+ for (char c : address)+ name.push_back(c == ':' ? '_' : static_cast<char>(std::toupper(static_cast<unsigned char>(c))));+ return name;+ }++ std::string default_sink() { return trimmed(run("pactl get-default-sink")); }++ std::string bluez_sink(const std::string& address) {+ if (address.empty())+ return {};+ const std::string prefix = sink_prefix(address);+ std::istringstream lines(run("pactl list short sinks"));+ for (std::string line; std::getline(lines, line);) {+ // index<TAB>name<TAB>driver...+ const size_t first = line.find('\t');+ if (first == std::string::npos)+ continue;+ const size_t second = line.find('\t', first + 1);+ const std::string name = line.substr(first + 1, second - first - 1);+ if (name.rfind(prefix, 0) == 0)+ return name;+ }+ return {};+ }++ bool set_default_sink(const std::string& name) {+ if (name.empty())+ return false;+ bool ok = false;+ run(("pactl set-default-sink " + name).c_str(), &ok);+ return ok;+ }++ bool restore_default_sink(const std::string& address, int timeout_ms) {+ const auto deadline = std::chrono::steady_clock::now() + std::chrono::milliseconds(timeout_ms);+ while (std::chrono::steady_clock::now() < deadline) {+ const std::string sink = bluez_sink(address);+ if (!sink.empty()) {+ if (default_sink() != sink)+ set_default_sink(sink);+ return true;+ }+ std::this_thread::sleep_for(std::chrono::milliseconds(POLL_INTERVAL_MS));+ }+ debug::log(DEBUG, "audio: no sink for {} within {}ms", address, timeout_ms);+ return false;+ }++} // namespace tether::audiodiff --git a/src/core/src/bluetooth/airpods.cpp b/src/core/src/bluetooth/airpods.cppindex 84ffb58..c8ec736 100644--- a/src/core/src/bluetooth/airpods.cpp+++ b/src/core/src/bluetooth/airpods.cpp@@ -6,8 +6,10 @@#include <algorithm>#include <array>#include <cerrno>+#include <chrono>#include <cstdlib>#include <cstring>+#include <map>#include <mutex>#include <poll.h>#include <sys/eventfd.h>@@ -66,6 +68,18 @@ namespace tether::bluetooth {0x04, 0x00, 0x04, 0x00, 0x4d, 0x00, 0xd7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};constexpr uint8_t REQUEST_NOTIFICATIONS[] = {0x04, 0x00, 0x04, 0x00, 0x0f, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff};+ // Ownership, the two packets Apple's own handoff turns on.+ constexpr uint8_t CLAIM[] = {0x04, 0x00, 0x04, 0x00, 0x09, 0x00, 0x06, 0x01, 0x00, 0x00, 0x00};+ constexpr uint8_t RELEASE[] = {0x04, 0x00, 0x04, 0x00, 0x09, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};+ // The firmware's own ownership verdict arrives on the same shape.+ constexpr uint8_t OWNS_CONNECTION_PREFIX[] = {0x04, 0x00, 0x04, 0x00, 0x09, 0x00, 0x06};++ // Claims are answered slowly and the firmware saturates on a burst of them.+ constexpr int CLAIM_COOLDOWN_MS = 1000;++ constexpr uint8_t HANDSHAKE_ACK[] = {0x01, 0x00, 0x04, 0x00};+ constexpr uint8_t FEATURES_ACK[] = {0x04, 0x00, 0x04, 0x00, 0x2b, 0x00};+constexpr uint8_t BATTERY_PREFIX[] = {0x04, 0x00, 0x04, 0x00, 0x04, 0x00};constexpr size_t BATTERY_ENTRY_BYTES = 5;@@ -75,10 +89,27 @@ namespace tether::bluetooth {constexpr uint8_t EAR_PREFIX[] = {0x04, 0x00, 0x04, 0x00, 0x06, 0x00};constexpr size_t EAR_PACKET_BYTES = 8;+ constexpr uint8_t CONNECTED_DEVICES_PREFIX[] = {0x04, 0x00, 0x04, 0x00, 0x2e, 0x00};+ constexpr size_t CONNECTED_DEVICES_ENTRY_BYTES = 8;++ constexpr uint8_t AUDIO_SOURCE_PREFIX[] = {0x04, 0x00, 0x04, 0x00, 0x0e, 0x00};+ constexpr size_t AUDIO_SOURCE_PACKET_BYTES = 13;+constexpr uint8_t ANC_PREFIX[] = {0x04, 0x00, 0x04, 0x00, 0x09, 0x00, 0x0d};constexpr size_t ANC_PACKET_BYTES = 11;constexpr size_t ANC_MODE_OFFSET = 7;+ // The firmware ignores anything sent before it has answered the step before,+ // and paces its own state broadcast at roughly 800ms.+ constexpr int HANDSHAKE_DELAY_MS = 200;+ // Sent anyway when the buds do not acknowledge; some models never do.+ constexpr int FEATURES_FALLBACK_MS = 500;+ constexpr int NOTIFICATIONS_AT_MS = 600;+ // The buds broadcast their host list unprompted at roughly 800ms. The opening+ // claim waits for it so it can be skipped when the phone already has them, and+ // goes out anyway at this deadline when no list arrives.+ constexpr int OPENING_CLAIM_BY_MS = 1500;+constexpr int CONNECT_TIMEOUT_MS = 8000;constexpr int FIRST_PACKET_TIMEOUT_MS = 8000;// A channel that has gone quiet this long is recycled.@@ -106,7 +137,7 @@ namespace tether::bluetooth {}// Waits for `fd` or the wake eventfd. Returns 1 for fd, 0 for a wake, -1 on- // error or timeout. A negative timeout waits forever.+ // timeout and -2 on error. A negative timeout waits forever.int wait_for(int fd, int wake_fd, short events, int timeout_ms) {pollfd fds[2]{};nfds_t count = 0;@@ -118,13 +149,33 @@ namespace tether::bluetooth {const int wake_slot = static_cast<int>(count);fds[count++] = {wake_fd, POLLIN, 0};- if (::poll(fds, count, timeout_ms) <= 0)+ const int rc = ::poll(fds, count, timeout_ms);+ if (rc == 0)return -1;+ if (rc < 0)+ return -2;if (socket_slot >= 0 && fds[socket_slot].revents != 0)return 1;return fds[wake_slot].revents != 0 ? 0 : -1;}+ // Six MAC bytes as BlueZ writes them. `reversed` for the notifications that+ // carry the address least-significant byte first.+ std::string format_address(const uint8_t* mac, bool reversed) {+ std::string out(17, ':');+ static constexpr char HEX[] = "0123456789ABCDEF";+ for (int i = 0; i < 6; ++i) {+ const uint8_t byte = mac[reversed ? 5 - i : i];+ out[static_cast<size_t>(i) * 3] = HEX[byte >> 4];+ out[static_cast<size_t>(i) * 3 + 1] = HEX[byte & 0x0f];+ }+ return out;+ }++ bool starts_with(const uint8_t* data, size_t len, const uint8_t* prefix, size_t prefix_len) {+ return len >= prefix_len && std::memcmp(data, prefix, prefix_len) == 0;+ }+bool write_all(int fd, const uint8_t* data, size_t len) {return ::send(fd, data, len, MSG_NOSIGNAL) == static_cast<ssize_t>(len);}@@ -157,6 +208,8 @@ namespace tether::bluetooth {{"case", s.battery.case_},{"ear", {{"primary", to_string(s.ear.primary)}, {"secondary", to_string(s.ear.secondary)}}},{"in_ear", s.ear.in_ear()},+ {"peer_taking_over", s.peer_taking_over},+ {"peer_active", s.peer_active},{"status", to_string(s.status)},{"reason", s.reason},};@@ -232,6 +285,46 @@ namespace tether::bluetooth {return static_cast<AncMode>(mode);}+ std::optional<std::vector<AapPeer>> parse_connected_devices(const uint8_t* data, size_t len) {+ if (data == nullptr || len < sizeof(CONNECTED_DEVICES_PREFIX) + 1)+ return std::nullopt;+ if (std::memcmp(data, CONNECTED_DEVICES_PREFIX, sizeof(CONNECTED_DEVICES_PREFIX)) != 0)+ return std::nullopt;++ const size_t count = data[sizeof(CONNECTED_DEVICES_PREFIX)];+ size_t offset = sizeof(CONNECTED_DEVICES_PREFIX) + 1;+ if (offset + count * CONNECTED_DEVICES_ENTRY_BYTES > len)+ return std::nullopt;++ std::vector<AapPeer> peers;+ peers.reserve(count);+ for (size_t i = 0; i < count; ++i, offset += CONNECTED_DEVICES_ENTRY_BYTES)+ peers.push_back({format_address(data + offset, true), data[offset + 6], data[offset + 7]});+ return peers;+ }++ std::optional<AudioSourceEvent> parse_audio_source(const uint8_t* data, size_t len) {+ if (data == nullptr || len != AUDIO_SOURCE_PACKET_BYTES)+ return std::nullopt;+ if (std::memcmp(data, AUDIO_SOURCE_PREFIX, sizeof(AUDIO_SOURCE_PREFIX)) != 0)+ return std::nullopt;++ AudioSourceEvent event;+ event.address = format_address(data + sizeof(AUDIO_SOURCE_PREFIX), false);+ switch (data[AUDIO_SOURCE_PACKET_BYTES - 1]) {+ case 0x01:+ event.source = AudioSource::Call;+ break;+ case 0x02:+ event.source = AudioSource::Media;+ break;+ default:+ event.source = AudioSource::None;+ break;+ }+ return event;+ }+std::optional<BatteryUpdate> parse_battery(const uint8_t* data, size_t len) {if (data == nullptr || len < sizeof(BATTERY_PREFIX) + 1)return std::nullopt;@@ -248,7 +341,8 @@ namespace tether::bluetooth {const uint8_t component = data[offset];const uint8_t level = data[offset + 2];const uint8_t status = data[offset + 3];- const int percent = (status == AAP_STATUS_DISCONNECTED || level > 100) ? -1 : static_cast<int>(level);+ // A bitmask: a pod charging in an open case reports charging|disconnected.+ const int percent = ((status & AAP_STATUS_DISCONNECTED) || level > 100) ? -1 : static_cast<int>(level);switch (component) {case AAP_COMPONENT_LEFT:update.levels.left = percent;@@ -288,6 +382,29 @@ namespace tether::bluetooth {return MediaAction::None;}+ HandoffAction ownership_action(bool peer_active, bool released, bool enabled) {+ // Buds already given up come back when the peer lets go, whatever the+ // setting says now: the alternative is audio stranded on the phone.+ if (released && !peer_active)+ return HandoffAction::Reclaim;+ if (!enabled)+ return HandoffAction::None;+ if (peer_active && !released)+ return HandoffAction::Release;+ return HandoffAction::None;+ }++ PeerSummary summarize_peers(const std::vector<AapPeer>& peers, const std::string& local) {+ PeerSummary summary;+ for (const auto& peer : peers) {+ if (!local.empty() && peer.address == local)+ continue;+ summary.taking_over = summary.taking_over || peer.taking_over();+ summary.active = summary.active || peer.active();+ }+ return summary;+ }+bool call_wants_audio(const nlohmann::json& calls) {if (!calls.is_array())return false;@@ -300,13 +417,15 @@ namespace tether::bluetooth {}HandoffAction handoff_action(bool call_active, bool buds_on_linux, bool released, bool enabled) {+ // Only after the call, and only buds this code took away. Ahead of the+ // enabled check: buds given to the phone come back even if the setting+ // was turned off while they were away.+ if (!call_active && released)+ return HandoffAction::Reclaim;if (!enabled)return HandoffAction::None;if (call_active && buds_on_linux && !released)return HandoffAction::Release;- // Only after the call, and only buds this code took away.- if (!call_active && released)- return HandoffAction::Reclaim;return HandoffAction::None;}@@ -329,6 +448,9 @@ namespace tether::bluetooth {struct AirPodsWatcher::Impl {explicit Impl(std::function<void(const AirPodsState&)> cb) : on_change(std::move(cb)) {}+ // Session setup, paced by the buds' own acknowledgements.+ enum class Stage { Handshake, Features, Notifications, Ready };+std::function<void(const AirPodsState&)> on_change;mutable std::mutex mutex;@@ -336,11 +458,15 @@ namespace tether::bluetooth {AirPodsState published;std::string target_address;std::string target_name;+ std::string local_address;// Handed to the worker rather than written from the caller's thread: the// socket belongs to the session and closing it out from under a write is// the one race worth not having.std::optional<AncMode> pending_anc;+ std::optional<bool> pending_ownership;+ std::chrono::steady_clock::time_point last_claim{};bool stopping = false;+ bool enabled = true;int wake_fd = -1;std::thread worker;@@ -373,7 +499,7 @@ namespace tether::bluetooth {bool retargeted(const std::string& address) const {std::lock_guard<std::mutex> lock(mutex);- return stopping || target_address != address;+ return stopping || !enabled || target_address != address;}// Sleeps, returning early if the target changed or the watcher is stopping.@@ -382,14 +508,79 @@ namespace tether::bluetooth {drain_wake();}+ // Records a peer list, logging every ownership transition: almost every+ // diagnosis of a dropped link starts from one.+ void note_peers(const std::vector<AapPeer>& peers, std::map<std::string, uint8_t>& seen, bool delivered) {+ std::string local;+ {+ std::lock_guard<std::mutex> lock(mutex);+ local = local_address;+ }+ for (const auto& peer : peers) {+ auto [it, inserted] = seen.insert({peer.address, peer.state});+ if (inserted || it->second != peer.state) {+ debug::log(DEBUG,+ "airpods: {} {} {:#04x} -> {:#04x}",+ peer.address,+ peer.address == local ? "us" : "peer",+ inserted ? peer.state : it->second,+ peer.state);+ it->second = peer.state;+ }+ }++ const auto summary = summarize_peers(peers, local);+ {+ std::lock_guard<std::mutex> lock(mutex);+ state.peer_taking_over = summary.taking_over;+ state.peer_active = summary.active;+ }+ publish(delivered ? AirPodsStatus::Live : AirPodsStatus::Connecting, "");+ }++ // Takes or gives up ownership, on the worker thread. A claim sent while a peer+ // is taking the buds is the one packet that reliably kills the link, so the+ // peer state from the last connected-devices notification gates it. An idle+ // iPhone is not that: claiming out from under one is the whole point.+ bool send_ownership(int fd, bool own) {+ if (!own) {+ if (write_all(fd, RELEASE, sizeof(RELEASE)))+ return true;+ debug::log(DEBUG, "airpods: release write failed: {}", std::strerror(errno));+ return false;+ }++ const auto now = std::chrono::steady_clock::now();+ {+ std::lock_guard<std::mutex> lock(mutex);+ if (state.peer_taking_over) {+ debug::log(DEBUG, "airpods: not claiming, a peer is taking the buds");+ return true;+ }+ // ponytail: a flat cooldown. Claims come from call transitions here, not+ // from every play event; measure the pause length if that ever changes.+ if (now - last_claim < std::chrono::milliseconds(CLAIM_COOLDOWN_MS))+ return true;+ last_claim = now;+ }+ if (write_all(fd, CLAIM, sizeof(CLAIM)))+ return true;+ debug::log(DEBUG, "airpods: claim write failed: {}", std::strerror(errno));+ return false;+ }+// Sends whatever the caller queued, on the worker thread. False means the// write failed and the session is over.bool send_pending(int fd) {std::optional<AncMode> mode;+ std::optional<bool> ownership;{std::lock_guard<std::mutex> lock(mutex);std::swap(mode, pending_anc);+ std::swap(ownership, pending_ownership);}+ if (ownership && !send_ownership(fd, *ownership))+ return false;if (!mode)return true;const uint8_t packet[] = {@@ -451,31 +642,142 @@ namespace tether::bluetooth {}}- if (!write_all(fd, HANDSHAKE, sizeof(HANDSHAKE)) || !write_all(fd, SET_FEATURES, sizeof(SET_FEATURES)) ||- !write_all(fd, REQUEST_NOTIFICATIONS, sizeof(REQUEST_NOTIFICATIONS))) {- debug::log(DEBUG, "airpods: handshake failed: {}", std::strerror(errno));- ::close(fd);- return;- }+ using clock = std::chrono::steady_clock;+ const auto opened = clock::now();+ Stage stage = Stage::Handshake;+ auto due = opened + std::chrono::milliseconds(HANDSHAKE_DELAY_MS);+ auto last_packet = opened;++ // Sends the next step of the session setup. Each one goes out on the+ // previous step's acknowledgement, or at its deadline when the buds stay+ // quiet, because the firmware discards anything sent ahead of its own pace.+ const auto advance = [&](clock::time_point now) {+ switch (stage) {+ case Stage::Handshake:+ if (!write_all(fd, HANDSHAKE, sizeof(HANDSHAKE)))+ return false;+ stage = Stage::Features;+ due = now + std::chrono::milliseconds(FEATURES_FALLBACK_MS);+ return true;+ case Stage::Features:+ if (!write_all(fd, SET_FEATURES, sizeof(SET_FEATURES)))+ return false;+ stage = Stage::Notifications;+ due = std::max(opened + std::chrono::milliseconds(NOTIFICATIONS_AT_MS), now);+ return true;+ case Stage::Notifications:+ if (!write_all(fd, REQUEST_NOTIFICATIONS, sizeof(REQUEST_NOTIFICATIONS)))+ return false;+ stage = Stage::Ready;+ due = opened + std::chrono::milliseconds(OPENING_CLAIM_BY_MS);+ return true;+ case Stage::Ready:+ return true;+ }+ return true;+ };++ // AirPods Pro 2 validates a host by itself once the session is up; Pro 3+ // never does, and an unvalidated host is dropped at the first pod movement.+ // So a session claims once it knows the phone does not have them, and keeps+ // waiting for that to be true rather than claiming into a peer's call.+ bool claim_sent = false;+ bool claim_deadline_passed = false;+ const auto claim = [&] {+ bool blocked = false;+ {+ std::lock_guard<std::mutex> lock(mutex);+ blocked = state.peer_taking_over;+ }+ if (blocked)+ return true;+ claim_sent = true;+ return send_ownership(fd, true);+ };+ std::map<std::string, uint8_t> peer_states;std::array<uint8_t, 1024> buffer{};while (!retargeted(address)) {- const int timeout = delivered ? IDLE_TIMEOUT_MS : FIRST_PACKET_TIMEOUT_MS;- const int ready = wait_for(fd, wake_fd, POLLIN, timeout);+ const auto now = clock::now();+ const auto quiet_for = std::chrono::duration_cast<std::chrono::milliseconds>(now - last_packet);+ const int quiet_timeout = (delivered ? IDLE_TIMEOUT_MS : FIRST_PACKET_TIMEOUT_MS);+ int timeout = quiet_timeout - static_cast<int>(quiet_for.count());+ if (stage != Stage::Ready || !claim_deadline_passed) {+ const auto until_due = std::chrono::duration_cast<std::chrono::milliseconds>(due - now);+ timeout = std::min(timeout, static_cast<int>(until_due.count()));+ }+ const int ready = wait_for(fd, wake_fd, POLLIN, std::max(timeout, 0));if (ready == 0) {drain_wake();if (!send_pending(fd))break;continue;}- if (ready < 0)+ if (ready == -2)break;+ if (ready < 0) {+ if (clock::now() >= due) {+ if (stage != Stage::Ready) {+ if (!advance(clock::now()))+ break;+ continue;+ }+ // No host list arrived in time, so claim on the reference's own+ // schedule and let the peer check catch the rest.+ claim_deadline_passed = true;+ if (!claim_sent && !claim())+ break;+ continue;+ }+ if (clock::now() - last_packet >= std::chrono::milliseconds(quiet_timeout))+ break;+ continue;+ }const ssize_t got = ::recv(fd, buffer.data(), buffer.size(), 0);if (got <= 0)break;const size_t size = static_cast<size_t>(got);+ last_packet = clock::now();++ if (stage == Stage::Features &&+ starts_with(buffer.data(), size, HANDSHAKE_ACK, sizeof(HANDSHAKE_ACK))) {+ if (!advance(last_packet))+ break;+ continue;+ }+ if (stage == Stage::Notifications &&+ starts_with(buffer.data(), size, FEATURES_ACK, sizeof(FEATURES_ACK))) {+ if (!advance(last_packet))+ break;+ continue;+ }++ if (starts_with(buffer.data(), size, OWNS_CONNECTION_PREFIX, sizeof(OWNS_CONNECTION_PREFIX)) &&+ size > sizeof(OWNS_CONNECTION_PREFIX)) {+ debug::log(DEBUG, "airpods: ownership verdict {:#04x}", buffer[sizeof(OWNS_CONNECTION_PREFIX)]);+ continue;+ }++ if (auto peers = parse_connected_devices(buffer.data(), size)) {+ note_peers(*peers, peer_states, delivered);+ // The host list is what says whether claiming is safe.+ if (stage == Stage::Ready && !claim_sent && !claim())+ break;+ continue;+ }++ if (auto source = parse_audio_source(buffer.data(), size)) {+ debug::log(DEBUG,+ "airpods: audio source {} on {}",+ source->source == AudioSource::Call ? "call"+ : source->source == AudioSource::Media ? "media"+ : "none",+ source->address);+ continue;+ }+if (auto mode = parse_anc(buffer.data(), size)) {{std::lock_guard<std::mutex> lock(mutex);@@ -507,9 +809,10 @@ namespace tether::bluetooth {}{- // A queued mode change does not outlive the channel it was meant for.+ // A queued write does not outlive the channel it was meant for.std::lock_guard<std::mutex> lock(mutex);pending_anc.reset();+ pending_ownership.reset();}::close(fd);}@@ -525,7 +828,7 @@ namespace tether::bluetooth {std::lock_guard<std::mutex> lock(mutex);if (stopping)return;- address = target_address;+ address = enabled ? target_address : std::string{};name = target_name;}@@ -537,6 +840,8 @@ namespace tether::bluetooth {state.battery = {};state.anc.reset();state.ear = {};+ state.peer_taking_over = false;+ state.peer_active = false;}publish(AirPodsStatus::Idle, "");backoff_ms = BACKOFF_START_MS;@@ -553,6 +858,8 @@ namespace tether::bluetooth {state.battery = {};state.anc.reset();state.ear = {};+ state.peer_taking_over = false;+ state.peer_active = false;}state.name = name;}@@ -602,9 +909,10 @@ namespace tether::bluetooth {::close(impl_->wake_fd);}- void AirPodsWatcher::set_device(const std::string& address, const std::string& name) {+ void AirPodsWatcher::set_device(const std::string& address, const std::string& name, const std::string& local) {{std::lock_guard<std::mutex> lock(impl_->mutex);+ impl_->local_address = local;if (impl_->target_address == address && impl_->target_name == name)return;impl_->target_address = address;@@ -613,6 +921,24 @@ namespace tether::bluetooth {impl_->wake();}+ void AirPodsWatcher::set_enabled(bool enabled) {+ {+ std::lock_guard<std::mutex> lock(impl_->mutex);+ if (impl_->enabled == enabled)+ return;+ impl_->enabled = enabled;+ }+ impl_->wake();+ }++ void AirPodsWatcher::set_ownership(bool own) {+ {+ std::lock_guard<std::mutex> lock(impl_->mutex);+ impl_->pending_ownership = own;+ }+ impl_->wake();+ }+void AirPodsWatcher::set_anc(AncMode mode) {{std::lock_guard<std::mutex> lock(impl_->mutex);diff --git a/src/core/src/bluetooth/config.cpp b/src/core/src/bluetooth/config.cppindex af4de1d..f22cfaf 100644--- a/src/core/src/bluetooth/config.cpp+++ b/src/core/src/bluetooth/config.cpp@@ -64,6 +64,7 @@ namespace tether::bluetooth {j["adapter"] = config.adapter;j["retention"] = to_string(config.retention);j["desktop_popups_enabled"] = config.desktop_popups_enabled;+ j["airpods_enabled"] = config.airpods_enabled;j["airpods_pause"] = to_string(config.airpods_pause);j["airpods_handoff"] = config.airpods_handoff;j["lock_on_away"] = config.lock_on_away;@@ -89,6 +90,7 @@ namespace tether::bluetooth {config.adapter = j.value("adapter", "");config.retention = retention_from_string(j.value("retention", "encrypted"));config.desktop_popups_enabled = j.value("desktop_popups_enabled", true);+ config.airpods_enabled = j.value("airpods_enabled", false);config.airpods_pause = pause_mode_from_string(j.value("airpods_pause", ""));config.airpods_handoff = j.value("airpods_handoff", false);config.lock_on_away = j.value("lock_on_away", false);diff --git a/src/core/src/bluetooth/objects.cpp b/src/core/src/bluetooth/objects.cppindex c2e81b9..3c56dc8 100644--- a/src/core/src/bluetooth/objects.cpp+++ b/src/core/src/bluetooth/objects.cpp@@ -252,22 +252,25 @@ namespace tether::bluetooth {bool Device::looks_like_iphone() const { return supports_ancs() || (supports_map() && supports_pbap()); }+ namespace {+ std::string lowered(std::string text) {+ std::transform(text.begin(), text.end(), text.begin(), [](unsigned char c) {+ return static_cast<char>(std::tolower(c));+ });+ return text;+ }+ } // namespace++ bool Adapter::presents_as_apple() const { return lowered(modalias).rfind(MODALIAS_APPLE, 0) == 0; }+bool Device::looks_like_airpods() const {// An iPhone carries the same vendor id, so the audio profile is what separates them.if (looks_like_iphone() || !has_uuid(UUID_A2DP_SINK))return false;- std::string lowered = modalias;- std::transform(lowered.begin(), lowered.end(), lowered.begin(), [](unsigned char c) {- return static_cast<char>(std::tolower(c));- });- if (lowered.rfind(MODALIAS_APPLE, 0) == 0)+ if (lowered(modalias).rfind(MODALIAS_APPLE, 0) == 0)return true;// Modalias is absent until SDP has been read at least once.- lowered = name;- std::transform(lowered.begin(), lowered.end(), lowered.begin(), [](unsigned char c) {- return static_cast<char>(std::tolower(c));- });- return lowered.find("airpod") != std::string::npos;+ return lowered(name).find("airpod") != std::string::npos;}const Adapter* BluezObjects::find_adapter(const std::string& path) const {diff --git a/src/core/src/bluetooth/telephony.cpp b/src/core/src/bluetooth/telephony.cppindex 6242fe4..97b68cc 100644--- a/src/core/src/bluetooth/telephony.cpp+++ b/src/core/src/bluetooth/telephony.cpp@@ -213,6 +213,31 @@ namespace tether::bluetooth {return true;}+ bool TelephonyClient::route_audio(TelephonySource& source,+ const TelephonySnapshot& snap,+ bool to_phone,+ std::string& err) {+ const char* transport = source.ids().transport_iface;+ if (!transport) {+ err = _("This computer is not carrying the call audio; it plays on the iPhone.");+ return false;+ }+ if (!invoke(source,+ snap.gateway.path,+ IFACE_PROPS,+ "Set",+ g_variant_new("(ssv)", transport, "RejectSCO", g_variant_new_boolean(to_phone)),+ err))+ return false;+ if (to_phone)+ return true;++ std::string activate_err;+ if (!invoke(source, snap.gateway.path, transport, "Activate", nullptr, activate_err))+ debug::log(INFO, "telephony: no call audio to take yet: {}", activate_err);+ return true;+ }+bool TelephonyClient::dial(const std::string& number, std::string& err) {const std::string dialable = normalize_dial_string(number);if (dialable.empty()) {@@ -257,22 +282,8 @@ namespace tether::bluetooth {*source, target, source->ids().call_iface, action == "answer" ? "Answer" : "Hangup", nullptr, err);}- if (action == "audio_here" || action == "audio_phone") {- const char* transport = source->ids().transport_iface;- if (!transport) {- err = _("This computer is not carrying the call audio; it plays on the iPhone.");- return false;- }- const bool to_phone = action == "audio_phone";- if (!invoke(*source,- snap.gateway.path,- IFACE_PROPS,- "Set",- g_variant_new("(ssv)", transport, "RejectSCO", g_variant_new_boolean(to_phone)),- err))- return false;- return to_phone || invoke(*source, snap.gateway.path, transport, "Activate", nullptr, err);- }+ if (action == "audio_here" || action == "audio_phone")+ return route_audio(*source, snap, action == "audio_phone", err);static const std::pair<const char*, const char*> gateway_actions[] = {{"hangup_all", "HangupAll"},diff --git a/src/core/src/net.cpp b/src/core/src/net.cppindex e978673..f31573c 100644--- a/src/core/src/net.cpp+++ b/src/core/src/net.cpp@@ -310,6 +310,7 @@ namespace tether {status["retention"] = to_string(config.retention);status["retention_ready"] = secret::have_key();status["desktop_popups_enabled"] = config.desktop_popups_enabled;+ status["airpods_enabled"] = config.airpods_enabled;status["airpods_pause"] = to_string(config.airpods_pause);status["airpods_handoff"] = config.airpods_handoff;status["lock_on_away"] = config.lock_on_away;@@ -322,10 +323,14 @@ namespace tether {}status["capability"] = bluetooth::to_json(bluetooth::g_bluez->capability());+ const auto objects = bluetooth::g_bluez->snapshot();nlohmann::json adapters = nlohmann::json::array();- for (const auto& adapter : bluetooth::g_bluez->snapshot().adapters)+ for (const auto& adapter : objects.adapters)adapters.push_back(bluetooth::to_json(adapter));status["adapters"] = adapters;+ // AirPods handoff needs the controller to present itself as Apple hardware.+ const auto* adapter = bluetooth::preferred_adapter(objects, bluetooth::g_bluez->preferred_adapter_id());+ status["apple_device_id"] = adapter != nullptr && adapter->presents_as_apple();return status;}@@ -962,6 +967,14 @@ namespace tether {std::string payload = build_bt_airpods().dump() + "\n";write_plain_packet(client_fd, payload);continue;+ } else if (j.contains("command") && j["command"] == "bt_airpods_enable" && j.contains("enabled")) {+ auto config = bluetooth::load_config();+ config.airpods_enabled = j.value("enabled", false);+ bluetooth::save_config(config);+ if (bluetooth::g_airpods)+ bluetooth::g_airpods->set_enabled(config.airpods_enabled);+ broadcast_local_event(build_bt_status().dump());+ continue;} else if (j.contains("command") && j["command"] == "bt_airpods_handoff" && j.contains("enabled")) {auto config = bluetooth::load_config();config.airpods_handoff = j.value("enabled", false);diff --git a/src/daemon/main.cpp b/src/daemon/main.cppindex d5b054f..43d4214 100644--- a/src/daemon/main.cpp+++ b/src/daemon/main.cpp@@ -5,6 +5,7 @@#include <mutex>#include <nlohmann/json.hpp>#include <sys/timerfd.h>+#include <tether/audio.hpp>#include <tether/bluetooth/airpods.hpp>#include <tether/bluetooth/config.hpp>#include <tether/bluetooth/connection.hpp>@@ -53,6 +54,10 @@ static void redirect_output_to_log() {// How long to let the phone finish with the buds before reclaiming them.constexpr int HANDOFF_SETTLE_SECONDS = 2;constexpr int HANDOFF_RECLAIM_ATTEMPTS = 3;+// The phone goes quiet mid-call, so a peer that let go is checked again after this before the buds are taken back.+constexpr int HANDOFF_GUARD_SECONDS = 3;+// How long to wait for the buds' sink to come back before resuming anything.+constexpr int SINK_RETURN_TIMEOUT_MS = 8000;int main(int argc, char** argv) {redirect_output_to_log();@@ -258,6 +263,7 @@ int main(int argc, char** argv) {mutable std::mutex mutex;std::string released;bool busy = false;+ bool own_output = false;bool holding_buds() const {std::lock_guard<std::mutex> lock(mutex);@@ -266,12 +272,92 @@ int main(int argc, char** argv) {};auto handoff = std::make_shared<Handoff>();+ // Set when the controller presents itself as Apple hardware, which is what makes+ // the buds offer ownership to this machine instead of only to the phone.+ std::atomic<bool> native_handoff{false};++ // Apple's own handoff. The buds say when the phone has taken them, and ownership+ // moves over AAP with the link left up.+ const auto run_ownership = [handoff](const tether::bluetooth::AirPodsState& state) {+ const auto config = tether::bluetooth::load_config();++ std::string target;+ bool released_now = false;+ {+ std::lock_guard<std::mutex> lock(handoff->mutex);+ if (handoff->busy)+ return;+ released_now = !handoff->released.empty();+ target = released_now ? handoff->released : state.address;+ }+ if (target.empty() || !tether::bluetooth::g_airpods)+ return;++ const auto action = tether::bluetooth::ownership_action(+ state.peer_active, released_now, config.airpods_handoff && config.airpods_enabled);++ if (action == tether::bluetooth::HandoffAction::Release) {+ if (tether::g_media)+ tether::g_media->pause();+ const bool ours = tether::audio::default_sink() == tether::audio::bluez_sink(target);+ {+ std::lock_guard<std::mutex> lock(handoff->mutex);+ handoff->released = target;+ handoff->own_output = ours;+ }+ tether::bluetooth::g_airpods->set_ownership(false);+ debug::log(INFO, "airpods: gave the buds to the iPhone");+ return;+ }+ if (action != tether::bluetooth::HandoffAction::Reclaim)+ return;++ {+ std::lock_guard<std::mutex> lock(handoff->mutex);+ handoff->busy = true;+ }+ std::thread([handoff] {+ bool reclaimed = false;+ for (int attempt = 0; attempt < HANDOFF_RECLAIM_ATTEMPTS && !reclaimed; ++attempt) {+ std::this_thread::sleep_for(std::chrono::seconds(HANDOFF_GUARD_SECONDS));+ if (!tether::bluetooth::g_airpods)+ break;+ // The firmware reports no audio source periodically during a call.+ if (tether::bluetooth::g_airpods->state().peer_active)+ continue;+ tether::bluetooth::g_airpods->set_ownership(true);+ reclaimed = true;+ }+ if (reclaimed) {+ bool ours = false;+ std::string address;+ {+ std::lock_guard<std::mutex> lock(handoff->mutex);+ ours = handoff->own_output;+ address = handoff->released;+ }+ if (ours)+ tether::audio::restore_default_sink(address, SINK_RETURN_TIMEOUT_MS);+ if (tether::g_media)+ tether::g_media->resume();+ }+ debug::log(reclaimed ? INFO : WARN,+ reclaimed ? "airpods: took the buds back from the iPhone"+ : "airpods: the iPhone still has the buds; leaving them to it");+ std::lock_guard<std::mutex> lock(handoff->mutex);+ if (reclaimed)+ handoff->released.clear();+ handoff->busy = false;+ }).detach();+ };+// AirPods battery arrives on its own L2CAP channel, not through BlueZ.tether::MediaControl media;tether::bluetooth::EarState last_ear;tether::bluetooth::AirPodsWatcher airpods(- [&media, &last_ear, handoff](const tether::bluetooth::AirPodsState& state) {- const auto mode = tether::bluetooth::load_config().airpods_pause;+ [&media, &last_ear, handoff, &native_handoff, &run_ownership](const tether::bluetooth::AirPodsState& state) {+ const auto config = tether::bluetooth::load_config();+ const auto mode = config.airpods_enabled ? config.airpods_pause : tether::bluetooth::PauseMode::Never;switch (tether::bluetooth::ear_media_action(last_ear, state.ear, mode, media.holding())) {case tether::bluetooth::MediaAction::Pause:if (const size_t paused = media.pause())@@ -288,11 +374,18 @@ int main(int argc, char** argv) {if (state.address.empty() && !handoff->holding_buds())media.forget();+ if (native_handoff.load())+ run_ownership(state);+last_ear = state.ear;tether::broadcast_local_event(tether::bluetooth::to_json(state).dump());});- const auto run_handoff = [&bluez, &media, handoff](const nlohmann::json& calls) {+ const auto run_handoff = [&bluez, &media, handoff, &native_handoff](const nlohmann::json& calls) {+ // Ownership handoff runs off the buds' own peer state, not the call list.+ if (native_handoff.load())+ return;+const auto config = tether::bluetooth::load_config();const bool active = tether::bluetooth::call_wants_audio(calls);@@ -312,8 +405,8 @@ int main(int argc, char** argv) {if (!released_now && device)target = device->address;- const auto action =- tether::bluetooth::handoff_action(active, device != nullptr, released_now, config.airpods_handoff);+ const auto action = tether::bluetooth::handoff_action(+ active, device != nullptr, released_now, config.airpods_handoff && config.airpods_enabled);if (action == tether::bluetooth::HandoffAction::None || target.empty())return;@@ -324,9 +417,11 @@ int main(int argc, char** argv) {if (action == tether::bluetooth::HandoffAction::Release) {media.pause();+ const bool ours = tether::audio::default_sink() == tether::audio::bluez_sink(target);{std::lock_guard<std::mutex> lock(handoff->mutex);handoff->released = target;+ handoff->own_output = ours;}std::string err;const bool ok = tether::bluetooth::disconnect_device(bluez, target, err);@@ -354,6 +449,14 @@ int main(int argc, char** argv) {std::this_thread::sleep_for(std::chrono::seconds(HANDOFF_SETTLE_SECONDS));}}+ bool ours = false;+ {+ std::lock_guard<std::mutex> lock(handoff->mutex);+ ours = handoff->own_output;+ }+ // The buds are back on the link, but their sink takes a moment longer.+ if (ok && ours)+ tether::audio::restore_default_sink(target, SINK_RETURN_TIMEOUT_MS);if (tether::g_media) {if (ok)tether::g_media->resume();@@ -369,11 +472,17 @@ int main(int argc, char** argv) {}).detach();};- const auto follow_airpods = [&bluez, &airpods]() {+ const auto follow_airpods = [&bluez, &airpods, &native_handoff]() {const auto snapshot = bluez.snapshot();const auto* device = tether::bluetooth::find_airpods(snapshot);- airpods.set_device(device ? device->address : std::string{}, device ? device->name : std::string{});+ // The buds report this machine back in their own peer list.+ const auto* adapter = tether::bluetooth::preferred_adapter(snapshot, bluez.preferred_adapter_id());+ native_handoff.store(adapter != nullptr && adapter->presents_as_apple());+ airpods.set_device(device ? device->address : std::string{},+ device ? device->name : std::string{},+ adapter ? adapter->address : std::string{});};+ airpods.set_enabled(bt_config.airpods_enabled);if (bluez.start()) {tether::bluetooth::g_bluez = &bluez;diff --git a/src/gtk/devices_view.cpp b/src/gtk/devices_view.cppindex fd1b22e..76c6632 100644--- a/src/gtk/devices_view.cpp+++ b/src/gtk/devices_view.cpp@@ -63,8 +63,10 @@ namespace tether::ui {GtkWidget* lbl_airpods_battery = nullptr;GtkWidget* lbl_airpods_reason = nullptr;GtkWidget* lbl_airpods_worn = nullptr;+ GtkWidget* chk_airpods_enabled = nullptr;GtkWidget* cmb_airpods_pause = nullptr;GtkWidget* chk_airpods_handoff = nullptr;+ GtkWidget* lbl_airpods_apple_id = nullptr;GtkWidget* airpods_mode_buttons[4] = {nullptr, nullptr, nullptr, nullptr};bool airpods_syncing = false;@@ -250,6 +252,13 @@ namespace tether::ui {daemon_send({{"command", "bt_airpods_pause"}, {"mode", AIRPODS_PAUSE_MODES[index]}});}+ void on_airpods_enabled_toggled(GtkWidget* button, gpointer) {+ if (g_devices.airpods_syncing)+ return;+ daemon_send({{"command", "bt_airpods_enable"},+ {"enabled", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)) == TRUE}});+ }+void on_airpods_handoff_toggled(GtkWidget* button, gpointer) {if (g_devices.airpods_syncing)return;@@ -265,23 +274,28 @@ namespace tether::ui {void update_airpods_pane() {const nlohmann::json& airpods = g_devices.bt_airpods;+ const bool managed = g_devices.bt_status.value("airpods_enabled", false);set_markup(g_devices.lbl_airpods_name,"<b>" + escape_markup(json_string(airpods, "name", g_devices.selected_bt_name)) + "</b>");const std::string levels = airpods_status_text(airpods);- set_text(g_devices.lbl_airpods_battery, levels.empty() ? _("Reading battery\u2026") : levels);+ set_text(g_devices.lbl_airpods_battery,+ !managed ? ""+ : levels.empty() ? _("Reading battery\u2026")+ : levels);const std::string current = json_string(airpods, "anc");g_devices.airpods_syncing = true;for (int i = 0; i < 4; ++i) {GtkWidget* button = g_devices.airpods_mode_buttons[i];gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), current == AIRPODS_MODES[i].wire);- gtk_widget_set_sensitive(button, !current.empty());+ gtk_widget_set_sensitive(button, managed && !current.empty());}g_devices.airpods_syncing = false;// Reuses the daemon's own sentence rather than inventing a second one.- const char* reason = !current.empty() ? ""+ const char* reason = !managed ? _("Tether is not managing the AirPods, so another program can use them.")+ : !current.empty() ? "": json_string(airpods, "address").empty()? _("No AirPods are connected."): _("These AirPods do not report a listening mode.");@@ -305,12 +319,24 @@ namespace tether::ui {if (pause == AIRPODS_PAUSE_MODES[i])gtk_combo_box_set_active(GTK_COMBO_BOX(g_devices.cmb_airpods_pause), i);}- gtk_widget_set_sensitive(g_devices.cmb_airpods_pause, ear_known);+ gtk_widget_set_sensitive(g_devices.cmb_airpods_pause, managed && ear_known);+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_devices.chk_airpods_enabled), managed);gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_devices.chk_airpods_handoff),g_devices.bt_status.value("airpods_handoff", false));+ // Ownership handoff runs off the buds' own state; only the disconnect+ // fallback needs the iPhone's call state.+ const bool apple_id = g_devices.bt_status.value("apple_device_id", false);const bool calls_on = g_devices.bt_status.value("calls_enabled", false);- gtk_widget_set_sensitive(g_devices.chk_airpods_handoff, calls_on);+ gtk_widget_set_sensitive(g_devices.chk_airpods_handoff, managed && (apple_id || calls_on));++ // Apple's own handoff needs the controller to look like a Mac; without it+ // the buds are handed over by disconnecting them.+ set_text(g_devices.lbl_airpods_apple_id,+ apple_id ? _("The buds are handed over with Apple's own handoff.")+ : _("The buds are handed over by disconnecting them. For Apple's own handoff, put "+ "DeviceID = bluetooth:004C:0000:0000 under [General] in /etc/bluetooth/main.conf "+ "and restart bluetooth."));g_devices.airpods_syncing = false;}@@ -1453,6 +1479,13 @@ namespace tether::ui {gtk_container_set_border_width(GTK_CONTAINER(airpods_box), 32);gtk_widget_set_valign(airpods_box, GTK_ALIGN_CENTER);+ g_devices.chk_airpods_enabled = gtk_check_button_new_with_label(_("Manage AirPods from Tether"));+ gtk_widget_set_tooltip_text(g_devices.chk_airpods_enabled,+ _("The AirPods channel takes one program per computer. Turning this off "+ "releases it, so another AirPods program can use it."));+ g_signal_connect(g_devices.chk_airpods_enabled, "toggled", G_CALLBACK(on_airpods_enabled_toggled), nullptr);+ gtk_box_pack_start(GTK_BOX(airpods_box), g_devices.chk_airpods_enabled, FALSE, FALSE, 0);+g_devices.lbl_airpods_name = gtk_label_new(nullptr);gtk_label_set_xalign(GTK_LABEL(g_devices.lbl_airpods_name), 0.0);gtk_box_pack_start(GTK_BOX(airpods_box), g_devices.lbl_airpods_name, FALSE, FALSE, 0);@@ -1526,6 +1559,13 @@ namespace tether::ui {g_signal_connect(g_devices.chk_airpods_handoff, "toggled", G_CALLBACK(on_airpods_handoff_toggled), nullptr);gtk_box_pack_start(GTK_BOX(airpods_box), g_devices.chk_airpods_handoff, FALSE, FALSE, 0);+ g_devices.lbl_airpods_apple_id = gtk_label_new(nullptr);+ gtk_label_set_xalign(GTK_LABEL(g_devices.lbl_airpods_apple_id), 0.0);+ gtk_label_set_line_wrap(GTK_LABEL(g_devices.lbl_airpods_apple_id), TRUE);+ gtk_label_set_selectable(GTK_LABEL(g_devices.lbl_airpods_apple_id), TRUE);+ gtk_style_context_add_class(gtk_widget_get_style_context(g_devices.lbl_airpods_apple_id), "muted");+ gtk_box_pack_start(GTK_BOX(airpods_box), g_devices.lbl_airpods_apple_id, FALSE, FALSE, 0);+gtk_stack_add_named(GTK_STACK(g_devices.right_pane_stack), airpods_box, "airpods");// Bluetoothdiff --git a/test/CMakeLists.txt b/test/CMakeLists.txtindex 3e127e8..e4662d3 100644--- a/test/CMakeLists.txt+++ b/test/CMakeLists.txt@@ -1,6 +1,7 @@add_executable(tether_testtest_base64.cpptest_airpods.cpp+ test_audio.cpptest_bluetooth_objects.cpptest_bluetooth_monitor.cpptest_bluetooth_pairing.cppdiff --git a/test/test_airpods.cpp b/test/test_airpods.cppindex 7311afc..4eca974 100644--- a/test/test_airpods.cpp+++ b/test/test_airpods.cpp@@ -181,9 +181,96 @@ TEST(AirPods, PutsABudInTheCaseTheSameAsOutOfTheEar) {EXPECT_EQ(ear_media_action(in_case, in_case, PauseMode::OneRemoved, false), MediaAction::None);}-TEST(AirPods, HandoffIsOffUnlessEnabled) {- EXPECT_EQ(handoff_action(true, true, false, false), HandoffAction::None);- EXPECT_EQ(handoff_action(false, false, true, false), HandoffAction::None);+// A pod charging inside an open case reports charging|disconnected, so the status+// byte only ever means anything as a bitmask.+TEST(AirPods, TreatsTheBatteryStatusAsABitmask) {+ const std::vector<uint8_t> charging_in_case = {+ 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x04, 0x01, 0x63, 0x05, 0x01};+ auto update = parse(charging_in_case);+ ASSERT_TRUE(update.has_value());+ EXPECT_TRUE(update->has_left);+ EXPECT_EQ(update->levels.left, -1);+}++TEST(AirPods, ParsesTheConnectedDeviceList) {+ // Two hosts: this machine, then an iPhone sitting idle. Addresses are stored+ // least-significant byte first.+ const std::vector<uint8_t> packet = {0x04, 0x00, 0x04, 0x00, 0x2e, 0x00, 0x02, 0x9c, 0x52, 0xaf, 0x3c, 0xf2,+ 0xac, 0x01, 0x03, 0xf3, 0x6a, 0x30, 0xc8, 0x71, 0x81, 0x02, 0x15};+ auto peers = parse_connected_devices(packet.data(), packet.size());+ ASSERT_TRUE(peers.has_value());+ ASSERT_EQ(peers->size(), 2u);+ EXPECT_EQ((*peers)[0].address, "AC:F2:3C:AF:52:9C");+ EXPECT_EQ((*peers)[0].state, 0x03);+ EXPECT_FALSE((*peers)[0].taking_over());+ EXPECT_EQ((*peers)[1].address, "81:71:C8:30:6A:F3");+ // 0x15 is an iPhone sitting there doing nothing, which is the state this machine+ // claims the buds out of. Reading it as "taken" means never claiming at all.+ EXPECT_FALSE((*peers)[1].taking_over());+ EXPECT_FALSE((*peers)[1].active());++ // A truncated list is not a list.+ EXPECT_FALSE(parse_connected_devices(packet.data(), packet.size() - 1).has_value());+ EXPECT_FALSE(parse_connected_devices(packet.data(), 4).has_value());+}++// A peer on its way to the buds blocks a claim; one already holding them also ends+// local playback. An idle peer does neither.+TEST(AirPods, SeparatesAnIdlePeerFromOneTakingTheBuds) {+ const auto peer = [](uint8_t state) { return AapPeer{"81:71:C8:30:6A:F3", 0x02, state}; };+ EXPECT_FALSE(peer(0x15).taking_over());+ EXPECT_TRUE(peer(0x12).taking_over());+ EXPECT_TRUE(peer(0x17).taking_over());+ EXPECT_TRUE(peer(0x17).active());+ EXPECT_FALSE(peer(0x15).active());+ // AirPods Pro 1 leaves a healthy iPhone at 0x01 forever.+ EXPECT_FALSE(peer(0x01).taking_over());+}++// This machine's own entry rises with its own ownership and is never a peer.+TEST(AirPods, SummarisesPeersWithoutCountingItself) {+ const std::vector<AapPeer> peers = {{"AC:F2:3C:AF:52:9C", 0x01, 0x17}, {"81:71:C8:30:6A:F3", 0x02, 0x12}};+ const auto summary = summarize_peers(peers, "AC:F2:3C:AF:52:9C");+ EXPECT_TRUE(summary.taking_over);+ EXPECT_FALSE(summary.active);++ // A phone on a call is the case handoff exists for.+ const std::vector<AapPeer> on_a_call = {{"81:71:C8:30:6A:F3", 0x02, 0x17}};+ EXPECT_TRUE(summarize_peers(on_a_call, "AC:F2:3C:AF:52:9C").active);++ // Without a local address every entry counts, which is the safe way round.+ EXPECT_TRUE(summarize_peers(peers, "").active);+}++TEST(AirPods, ParsesTheAudioSource) {+ // Here the address is not reversed.+ const std::vector<uint8_t> packet = {0x04, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x81, 0x71, 0xc8, 0x30, 0x6a, 0xf3, 0x01};+ auto event = parse_audio_source(packet.data(), packet.size());+ ASSERT_TRUE(event.has_value());+ EXPECT_EQ(event->address, "81:71:C8:30:6A:F3");+ EXPECT_EQ(event->source, AudioSource::Call);++ EXPECT_FALSE(parse_audio_source(packet.data(), packet.size() - 1).has_value());+}++TEST(AirPods, OwnershipFollowsThePeerTakingTheBuds) {+ EXPECT_EQ(ownership_action(true, false, true), HandoffAction::Release);+ // Given up already: nothing to give up twice.+ EXPECT_EQ(ownership_action(true, true, true), HandoffAction::None);+ EXPECT_EQ(ownership_action(false, true, true), HandoffAction::Reclaim);+ EXPECT_EQ(ownership_action(false, false, true), HandoffAction::None);+}++TEST(AirPods, OwnershipIsOffUnlessEnabledButStillGivesTheBudsBack) {+ EXPECT_EQ(ownership_action(true, false, false), HandoffAction::None);+ EXPECT_EQ(ownership_action(false, true, false), HandoffAction::Reclaim);+}++TEST(AirPods, HandoffIsOffUnlessEnabled) { EXPECT_EQ(handoff_action(true, true, false, false), HandoffAction::None); }++// Turning the setting off while the phone has the buds must not strand them there.+TEST(AirPods, ReclaimsReleasedBudsEvenWhenTurnedOff) {+ EXPECT_EQ(handoff_action(false, false, true, false), HandoffAction::Reclaim);}TEST(AirPods, HandsBudsOverForACallAndTakesThemBack) {diff --git a/test/test_audio.cpp b/test/test_audio.cppnew file mode 100644index 0000000..5e83d47--- /dev/null+++ b/test/test_audio.cpp@@ -0,0 +1,15 @@+#include <gtest/gtest.h>+#include <tether/audio.hpp>++using namespace tether::audio;++// The audio server names a Bluetooth sink by the address in upper case with+// underscores, whatever case BlueZ reported it in.+TEST(Audio, NamesTheSinkAfterTheAddress) {+ EXPECT_EQ(sink_prefix("ac:f2:3c:af:52:9c"), "bluez_output.AC_F2_3C_AF_52_9C");+ EXPECT_EQ(sink_prefix("AC:F2:3C:AF:52:9C"), "bluez_output.AC_F2_3C_AF_52_9C");+ EXPECT_EQ(sink_prefix(""), "bluez_output.");+}++// No address means no sink to look for, and no pactl call.+TEST(Audio, HasNoSinkWithoutAnAddress) { EXPECT_TRUE(bluez_sink("").empty()); }diff --git a/test/test_bluetooth_objects.cpp b/test/test_bluetooth_objects.cppindex a8094f6..608df38 100644--- a/test/test_bluetooth_objects.cpp+++ b/test/test_bluetooth_objects.cpp@@ -112,6 +112,19 @@ TEST(BluetoothObjects, ParsesAdapterProperties) {EXPECT_TRUE(a.class_is_handsfree());}+// DeviceID in main.conf is what makes AirPods treat the machine as a Mac.+TEST(BluetoothObjects, ReadsTheApplePresentationFromTheAdapterModalias) {+ Adapter apple;+ apple.modalias = "bluetooth:v004Cp0000d0000";+ EXPECT_TRUE(apple.presents_as_apple());++ Adapter stock;+ stock.modalias = "usb:v1D6Bp0246d0548";+ EXPECT_FALSE(stock.presents_as_apple());++ EXPECT_FALSE(Adapter{}.presents_as_apple());+}+TEST(BluetoothObjects, ParsesDeviceAndBearer) {Payload p(IPHONE_BONDED);auto objects = parse_managed_objects(p.v);diff --git a/test/test_bluetooth_pairing.cpp b/test/test_bluetooth_pairing.cppindex 79addbf..a51cab0 100644--- a/test/test_bluetooth_pairing.cpp+++ b/test/test_bluetooth_pairing.cpp@@ -81,6 +81,7 @@ TEST(BluetoothConfig, RoundTrips) {config.lock_on_away = true;config.lock_away_seconds = 45;config.lock_command = "hyprlock";+ config.airpods_enabled = true;EXPECT_EQ(deserialize_config(serialize_config(config)), config);}@@ -98,6 +99,8 @@ TEST(BluetoothConfig, DefaultsToConnectFirstAndAncsEnabled) {EXPECT_FALSE(config.calls_enabled);// A config written before the switch existed keeps showing popups.EXPECT_TRUE(config.desktop_popups_enabled);+ // AirPods are not managed until asked: the channel takes one client per machine.+ EXPECT_FALSE(config.airpods_enabled);// Locking the screen is never assumed; logind performs it once switched on.EXPECT_FALSE(config.lock_on_away);EXPECT_EQ(config.lock_away_seconds, AWAY_LOCK_GRACE_SECONDS);