Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
native: cleaner PCM scan — find-then-open, two-pass, safe fallback master
Earlier smart-PCM commit had a lifecycle bug: on HiFi match it set err>=0 but didn't break, so the next loop iteration tried another snd_pcm_open() on the same state. On the G7 this wrote 15KB of binary garbage to ac-native-stderr.log and produced zero sdmode toggles, meaning ac-native crashed before audio init completed. Split into enumerate-then-open: first pass prefers "Speaker", second pass falls back to "Jack"/"HiFi" (SOF combined FE name). Remember the winning device, open exactly once. If that open fails drop through to the legacy hardcoded-list. HDA-direct paths untouched because their /proc/asound names don't match any token.
Author prompt.ac/@jeffrey Date (Apr 15, 2026, 7:24 AM UTC) Commit 302de686 302de686aa782beb28b70efcf05fed96fcc8de61 Parent 54b76831 54b768312734e746c0610f36eec4d330b0a7ef6d