Reputation: 339
Can anyone please elaborate following questions?
Upvotes: 1
Views: 1628
Reputation: 194
I just bought some universal Android TV remote and questioned the same thing, as the built-in mic didn't detect in Linux (presumably, it would work on any Android TV box, but my goal was make use of it in Linux).
I found out nowadays all these Android TV remotes are mostly unified regarding built-in mic input architecture, as Google stepped in and produced some Reference design for such remotes specifically for Android TV. That made them incompatible with usual Bluetooth sound input devices (headsets, microphones, etc.), so even plain Android might be out of scope here. That design was cloned by many Chinese vendors since then (with varied grade of success).
As it's turned out, all these built-in mic's now follow so called "Google Voice over BLE spec". This spec apparently is mostly intended for vendors and not publicly available, but I managed to find some essential info from it.
So I created Bluez (Linux Bluetooth stack) support issue and put all related info I could find there. I still didn't find out where on Android TV side things are implemented and if it open sourced at all, so that info is highly welcomed:
https://github.com/bluez/bluez/issues/1086
Upvotes: 0
Reputation: 2927
Basically, voice commands over BLE require:
In the android world, command processing framework is google sauce (closed) that most easily gets its audio from an ALSA device. What is left to be done is getting audio from the remote to an ALSA device.
So for audio streaming, either you:
Audio over BLE is not standard, so all implementations do not do the actual same thing. In Nexus Player case, implementation uses HID: It streams an ADPCM audio stream, chunked in HID reports. There is a special HID driver "hid-atv-remote.c" in Android linux kernel that exposes an ALSA device in addition to input device. Bluedroid has no information about audio, all it does is forwarding HID reports from BLE to UHID.
Upvotes: 3