Debug sound on linux-next
Epic: https://source.puri.sm/Librem5/use-cases/issues/1, https://source.puri.sm/Librem5/use-cases/issues/95, https://source.puri.sm/Librem5/use-cases/issues/108
To test sound you can use alsabat.
alsabat -D plughw:CARD=sgtl5000,DEV=0 -c2 --saveplay default_dual.wav --standalone
The sgtl5000 some times doesn't come up or does come up but can't read/write.
root@pureos:~# aplay -D plughw:CARD=sgtl5000,DEV=0 default_dual.wav
Playing WAVE 'default_dual.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
aplay: pcm_write:2053: write error: Input/output error
In this state we see a high number of sai and HP_DET interrupts.
root@pureos:~# cat /proc/interrupts | grep sai
19: 0 0 0 0 GPCv2 90 Edge sai
29: 1175024 0 0 0 GPCv2 96 Edge sai
root@pureos:~# cat /proc/interrupts | grep HP
128: 35536 0 0 0 gpio-mxc 20 Edge HP_DET