Skip to content

kboot: forward Apple audio calibration and speaker identity to /chosen - #31

Open
ADevWithAnIdea wants to merge 3 commits into
mainfrom
PR_audio_calibration
Open

ADevWithAnIdea wants to merge 3 commits into
mainfrom
PR_audio_calibration

Conversation

@ADevWithAnIdea

Copy link
Copy Markdown
Member

Forward apple,acoustic-id, apple,speaker-id (including GPIO speaker-id strapping where present), and apple,speaker-thiele-small (spts) from the ADT into /chosen so Linux beatdropd can identify the exact speaker configuration and factory calibration across all Apple Silicon Macs.

Add adt_getprop_exact() for bounds-safe fixed-size ADT property reads
and adt_find_phandle_path() to resolve an AAPL,phandle under a subtree
while populating the trace array for adt_get_reg() and its path string.

Signed-off-by: Cody Ho <codyho@cs.stanford.edu>
Assisted-By: LLM
@ADevWithAnIdea
ADevWithAnIdea force-pushed the PR_audio_calibration branch 2 times, most recently from 418d234 to 9f7c02b Compare December 3, 2026 03:53
Cody Ho added 2 commits December 2, 2026 19:58
Add dedicated Apple GPIO register definitions and helpers
(gpio_sample_pin() and gpio_adt_sample_fn()) to temporarily sample an
input pin described by an ADT GPIO function property and restore its
original pin configuration. Only invoke pmgr_adt_power_enable() when
the GPIO controller actually declares clock-gates (always-on gpio0
nodes omit clock-gates).

Signed-off-by: Cody Ho <codyho@cs.stanford.edu>
Assisted-By: LLM
Move audio /chosen DT forwarding into dedicated kboot_audio.{c,h}
(matching kboot_atc.{c,h}) and keep kboot.c limited to calling
kboot_setup_audio(dt). Forwards apple,acoustic-id,
apple,speaker-thiele-small (spts), apple,speaker-cpms-budget-*,
apple,speaker-config, and GPIO-strapped apple,speaker-id across all
Apple Silicon Macs (including M1 audio-tas5770L-* speaker nodes).

Signed-off-by: Cody Ho <codyho@cs.stanford.edu>
Assisted-By: LLM
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