native: revert audio smart-PCM scan (segfault trigger); keep probe API
The audio.c startup-time PCM scan was making ac-native crash with
SIGSEGV at dynamic linking time (ld-linux offset 0x1416d, exit code
139 before any stderr output). Not worth debugging inline — the goal
of the scan (prefer Speakers over Headset on SOF topologies) is
better served by the new speaker.mjs probe piece that lets a human
press space on each PCM and listen.
On the G7 specifically, /proc/asound tells us pcm0p IS "Speakers"
anyway, so the legacy hw:0,0-first order was correct. The scan was
solving a problem we don't actually have on this board.
Also moved the <alsa/asoundlib.h> include from mid-file to the top
block of js-bindings.c — best-practice but also a plausible cause
of the weird loader crash when the compiler sees ALSA types
introduced only after other functions were already compiled.
Kept:
- SOF-aware 10ms/40ms period sizing (the real audio fix)
- system.audio.listPcms / testPcm (piece-driven probing)
- speaker.mjs diagnostic piece + SCORE.md hardware-probing docs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>