-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microphones via AOP (+ a few SEP bits). #342
Microphones via AOP (+ a few SEP bits). #342
Conversation
2b10dce
to
45cd0d4
Compare
45cd0d4
to
d9ef781
Compare
1543478
to
44dba3b
Compare
d9ef781
to
0e12ac5
Compare
The missing SAFETY comments should be fixed later... Signed-off-by: Asahi Lina <[email protected]>
Commit reference: 3dfc5eb
The missing SAFETY comments should be fixed later... Signed-off-by: Asahi Lina <[email protected]>
Computed based on the PAGE_SHIFT macro from C. // Co-authored-by: Adam Bratschi-Kaye <[email protected]> // Co-authored-by: Miguel Ojeda <[email protected]> // Signed-off-by: Asahi Lina <[email protected]>
Commit reference: 3dfc5eb
This is the same behavior as kstrtol/kstrtoul, and allows simple `echo 0 > /sys/module/foo/parameters/bar` commands to work. Signed-off-by: Asahi Lina <[email protected]>
The missing SAFETY comments should be fixed later... Signed-off-by: Asahi Lina <[email protected]>
Commit reference: 3dfc5eb
This abstraction enables Rust drivers to walk Device Tree nodes and query their properties. Signed-off-by: Asahi Lina <[email protected]>
Signed-off-by: Hector Martin <[email protected]>
Signed-off-by: Janne Grunau <[email protected]>
Signed-off-by: Janne Grunau <[email protected]>
Commit reference: 3dfc5eb
This patch adds a logic similar to `devm_platform_ioremap_resource` function adding: - `IoResource` enumerated type that groups the `IORESOURCE_*` macros. - `get_resource()` method that is a binding of `platform_get_resource` - `ioremap_resource` that is newly written method similar to `devm_platform_ioremap_resource`. Lina: Removed `bit` dependency and rebased Co-developed-by: Asahi Lina <[email protected]> Signed-off-by: Maciej Falkowski <[email protected]>
Allows drivers to configure the DMA masks for a device. Implemented here, not in device, because it requires a mutable platform device reference this way (device::Device is a safely clonable reference). Signed-off-by: Asahi Lina <[email protected]>
Apple SoCs require non-posted mappings for MMIO, and this is automatically handled by devm_ioremap_resource() and friends via a resource flag. Implement the same logic in kernel::io_mem, so it can work the same way. Signed-off-by: Asahi Lina <[email protected]>
Signed-off-by: Janne Grunau <[email protected]>
Commit reference: 3dfc5eb
The AOP co-processor present on certain Apple SoCs exposes various environmental sensors as "HID" (really not) devices. Add drivers for the ambient light and lid angle sensors exposed that way. Signed-off-by: Sasha Finkelstein <[email protected]>
Signed-off-by: Sasha Finkelstein <[email protected]>
Signed-off-by: Sasha Finkelstein <[email protected]>
This is a co-processor in charge of various security-related features on Apple SoCs. This driver only boots the firmware, which is needed to unlock the mic secure disable on certain laptop models. Signed-off-by: Sasha Finkelstein <[email protected]>
Signed-off-by: Sasha Finkelstein <[email protected]>
Signed-off-by: Sasha Finkelstein <[email protected]>
34a5c14
to
48132eb
Compare
I've merged everything except the device tree changes into bits/ branches. Most of it into I did some minimal fixups. Can you please send 85e9396 ("dmaengine: apple-admac: Avoid accessing registers in probe") (without the compatible addition) as soon as possible. If I remember correctly special power sequencing requirements do not warrant a different compatible. If we fix upstream now we can upstream aop-admac with the same compatible string later. Downstream we will keep "apple,admac2" for now. For commit b63a090 ("rust: Only export module id tables if building as module") please reply to https://lore.kernel.org/rust-for-linux/[email protected]/ |
045ef5e
to
d21bcc2
Compare
5f5bf6e
to
fce34c8
Compare
Can the necessary configurations for |
Sorry i am not quite sure i understand. Are you asking as to whether there will be rust bindings for alsa? If so - yes, eventually, and those may or may not come from me. |
I've played a with this for a bit, and at least on my m1 macbook air, the sound is absolutely usable! Here's a short 3 channel recording: mic_test_j313.wav.zip Please merge the devicetree bindings and let people have some fun with it. |
How much did you boost the signal? |
It's not boosted. I've just set configuration profile to "Pro Audio" and gain to 0dB in pavucontrol, and recorded with |
Well, this is not how it works on, say j314, where a boost of 50-ish dba is required for the signal to be audible. |
Is it broken on every j314? |
At least two of them. j415 also needs 20-30 dba of boost. |
That mic signal is useless and almost silent. J313 will need boosting too. |
device nodes (disabled) included in asahi-6.12.8-1, going to close this PR changes compared to this PR:
|
This adds the AOP driver, microphone support, lid angle sensor driver, and ambient light sensor driver (disabled pending some m1n1 work). Also contains just enough of a SEP driver to unlock SECDIS on base m1.
Obsoletes #151
Draft, since the mic output is basically useless without correct userspace configs (coming soontm).