Skip to content

iPhone XR: all four microphones - #109

Merged
henrikklee merged 2 commits into
mainfrom
a12-mics
Dec 2, 2026
Merged

henrikklee merged 2 commits into
mainfrom
a12-mics

Conversation

@henrikklee

Copy link
Copy Markdown

All four of the iPhone XR's microphones record under Linux. The "Microphone" input (hw:0,2) now has up to four channels:

channel microphone
0 main, bottom left of the connector
1 rear, by the camera
2 front, at the earpiece
3 bottom right, by the loudspeaker

A mono capture still gives the main microphone, and stereo gives main plus rear.

How: set up as iOS records a video (codec registers read from iOS while filming). All four mic biases and ADCs are on, and ADC1-4 go into ASP2 TX channels 0-3 (24-bit, 96-clock frame). The SoC side is unchanged from linux#104.

Tested on the XR (RAM boot): scratching at each microphone's opening made its channel 15-30 dB louder than the others, which gives the mapping above. The silence floor is about -85 dBFS on every channel. Touch and the codec were also checked with linux#73's SPI change in this kernel.

As iOS records a video: mic bias 1-4, ADC1-4 powered with iOS's ADC2-4
setup, the four ADCs in ASP2 TX channels 0-3 (24-bit at clocks 0, 24, 48
and 72 of the 96-clock frame). A mono capture still takes the main
microphone, ADC1 in slot 0.

Assisted-by: LLM
Signed-off-by: Henrik Klee <henrik@goat-code.com>
The card takes slots 0-3 of the codec's ASP2, one microphone each; a
capture of fewer channels takes the first slots, so mono stays the main
microphone.

Assisted-by: LLM
Signed-off-by: Henrik Klee <henrik@goat-code.com>
@henrikklee
henrikklee merged commit dbd852b into main Dec 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant