Monorepo for Aesthetic.Computer aesthetic.computer

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.


+51 -37
1 changed file