Car microphone return routing¶
The car microphone can be used by DriveDeck's voice features and, where supported, by another phone app or keyboard on the car display. Sending phone playback to the car is a separate audio backend.
The return path¶
When the microphone return is active, DriveDeck receives microphone PCM from the head unit and supplies it to a Shizuku helper through a pipe. The helper creates a loopback recorder mix for supported Android recording presets, and a virtual-source AudioTrack feeds the mix. Eligible recordings by other apps can then receive the car microphone rather than the phone microphone. DriveDeck's own UID is excluded from that mix; its own recorder follows its separate input path.
The injector uses mono PCM16, a bounded queue and a continuously playing track while the policy is registered. Silence fills gaps when no car frames are available, because Android chooses the recording device when recording starts. Closing the policy releases the route so recordings can return to the phone microphone. Source: CarMicInjector.kt.
This is a routing mechanism, not a promise that every recording app or vendor device will accept the route. Android microphone permissions, the selected recording preset, app behavior and the car's microphone availability still matter. The selected keyboard may also have its own speech service, model, privacy policy and network requirements.
Format, buffering and recording sources¶
The helper currently feeds 16 kHz, mono, 16-bit PCM in 20 ms chunks. Each chunk contains 320 samples, or 640 bytes. Its queue holds up to ten chunks (200 ms); if it fills, the oldest queued chunk is discarded so dictation can catch up to the present. The writer supplies silence when no car audio is queued, keeping the virtual source available while the policy is active. These are implementation details of the return injector, not a claim about every car's native microphone format.
The mix matches Android's MIC, VOICE_RECOGNITION and UNPROCESSED capture presets and
excludes DriveDeck's own UID. Calls and camcorder capture are not included in that preset list.
When a receiving app starts recording, Android chooses its recording device; an app that already
started recording before the route became available may need to stop and start recording again.
The helper watches recording configurations to report eligible active recordings, but a report
alone does not prove speech recognition succeeded.
Try voice typing¶
- Enable your preferred keyboard on the phone and select it under Settings → Car screen in DriveDeck. See keyboard choices.
- Open a text field on the car display and tap the keyboard's microphone key, if that keyboard and field offer one.
- Grant the keyboard's own microphone permission if Android asks, then speak. Check its speech settings if it does not recognize anything.
If a parked app was already open, reopen it after changing the car keyboard. A keyboard microphone key and DriveDeck's own voice assistant are separate features and may use different recognition services.
Diagnose voice typing¶
If a keyboard opens but speech does not become text, check the path in order:
- Confirm that the car is connected and Shizuku is running with DriveDeck authorized. The return route needs an active projection session.
- Confirm that the chosen keyboard has microphone permission and that its microphone key is available in the current text field. Start a new recording after connecting the car; Android selects the input device when recording begins.
- Check the keyboard's own voice-typing settings and connectivity or downloaded language model. Receiving microphone samples does not guarantee that its recognizer is available or understands the selected language.
- Try DriveDeck's own voice feature separately. It follows a different input and recognition path, so one result does not prove the other path works.
For a focused log, connect an authorized computer and use the serial of the intended device:
Start the log before connecting, then reproduce one attempt and stop it with Ctrl+C. The helper can report that the car microphone was offered to other apps, and separately that an eligible recorder started or stopped. The first message indicates that the route was set up; the second reports Android's recording configuration. Neither proves that intelligible speech reached a recognizer or that text was entered. A route can also close if its audio pipe fails or the projection ends. Compare the timestamps with the keyboard attempt, and review logs for app names and connection details before sharing them. For playback in the other direction, follow car audio diagnostics.
