Skip to content

Commit f951054

Browse files
committed
audio-userspace: add microphone section
Signed-off-by: Florian Klink <flokli@flokli.de>
1 parent 7fb3b85 commit f951054

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

docs/sw/audio-userspace.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,53 @@ You can watch speakersafetyd in action by using `sudo journalctl -fu speakersafe
6262
Requirements according to [asahi-audio](https://github.com/AsahiLinux/asahi-audio)'s [README.md](https://github.com/AsahiLinux/asahi-audio/blob/main/README.md).
6363

6464
The correct deployment order is asahi-audio/speakersafetyd > (whatever you use to get those installed for users, e.g. metapackage) > kernel. If you push the kernel first before asahi-audio, users will get either a nonfunctional (if no speakersafetyd) or functional but bad-sounding (if speakersafetyd is installed) raw speaker device with no DSP.
65+
66+
# Microphone support
67+
68+
Currently supported models:
69+
70+
* MacBook Pro 13" (M1/M2)
71+
* MacBook Air 13" (M1/M2)
72+
* MacBook Pro 14" (M1 Pro/Max, M2 Pro/Max) [^j414]
73+
* MacBook Pro 16" (M1 Pro/Max, M2 Pro/Max)
74+
* MacBook Air 15" (M2)
75+
76+
77+
MacBooks have three Pulse Density Modulation (PDM) mics wired up to an ADC
78+
and decimator in the AOP. All three mics are plumbed directly to userspace on
79+
separate channels, with no preamplification.
80+
81+
They are very sensitive and omnidirectional, so to be able to use them, some
82+
kind of beamforming needs to be applied.
83+
84+
For this, [Triforce](https://github.com/chadmed/triforce) was built,
85+
implementing a Minimum Variance Distortionless Response adaptive beamformer.
86+
87+
`asahi-audio` includes the necessary wireplumber config to set this up.
88+
89+
## Known Bugs
90+
91+
### Requires `os-fw-version` > 13.5
92+
Microphone support currently only works if your `asahi,os-fw-version` is >= 13.5.
93+
This is due to `BOOTARGS_OFFSET` and `BOOTARGS_SIZE` being different on `12.4`.
94+
95+
If your `/proc/device-tree/chosen/asahi,os-fw-version` shows an older version, and you see a
96+
97+
```
98+
apple_aop 24ac00000.aop: probe with driver apple_aop failed with error -22
99+
```
100+
in dmesg, an update of the APFS container is needed (or adding support for the
101+
older version to the kernel driver).
102+
103+
### Macbook Pro 14" M2 (J414) probing issues
104+
There's been reports about the Macbook Pro 14" M2, where the AOP where it does
105+
not probe properly and microphone support doesn't work.
106+
107+
### Microphone indicator on constantly
108+
With microphone support set up, `gnome-shell` and `plasma` permanently report the microphone being used.
109+
110+
This is due to wireplumber reporting it has a handle open on a "microphone
111+
device".
112+
113+
Fixing this probably requires rearchitecturing a lot of concepts like nodes and
114+
handles in Pipewire / Wireplumber.

0 commit comments

Comments
 (0)