Today's audio update:
There is indeed a mic on the Chumby 8. In fact, there was a helpful post on this forum explaining how to test it on the stock kernel:
https://forum.chumby.com/viewtopic.php?pid=38820#p38820
So I tested it, and it works after I got the MICBIAS working in the device tree, which basically entailed hooking up the WM8961 to the PXA168 "properly" as I was talking about in my second bullet point above. It revealed a few bugs where I was doing the I2S slightly wrong and the channels were kind of swapped from what they should be, so I did some hacky fixes for that. I'm still not super proud of these fixes, but the pxa2xx ssp audio driver is tough to work on because it supports so many other machines that I don't want to break if possible. The SSP controller is really a pain to mess with, I hope I'm done with it for now.
There was also a problem where if you stopped recording or playing, it would halt any existing playback or recording, respectively. That's fixed now too.
All the other stuff I listed in the previous message is also handled. I'm configuring the WM8961 just fine. The original kernel defaulted to a higher speaker AC gain, and did a slight power saving thing with the DSP enable that the mainline kernel driver doesn't bother with. Other than that, it's pretty much all the same. The headphone jack detection works great, that was basically a one line change in the device tree.
As always, the latest changes are pushed to my linux and buildroot repos.
To detect if the headphone is plugged in, I'm not sure how ALSA stuff does it, but it shows up as /dev/input/event1 now. For testing purposes, evtest is capable of monitoring the status and notifying when it changes. "amixer events" also shows an event occurs when headphones are plugged in or removed.
To set up for playing sound through the headphones:
amixer set Headphone 70%
amixer set Speaker 0%
Or you can play out both simultaneously if you'd like, by setting Speaker to something other than 0%.
To record 5 seconds of audio (initial setup shamelessly copied from the link above):
amixer set Capture 85%
amixer set "Capture PGA" 100%
amixer set "Capture PGA" on
amixer set "Capture Boost" 100%
arecord -c 1 -r 44100 -d 5 -f S16_LE -t wav > /tmp/test.wav
You can also record in stereo by using the command at the link above instead, but there's no point in doing so because the second channel is empty. The right channel input for the mic is wired to nothing on the board.
I began noticing today that ever since I got audio working, the touchscreen has been super unresponsive and printing error messages. It appears that ever since I got DMA working, it's using DMA even for the simple 2-byte transfers that the touchscreen driver does. That's silly, so I increased the DMA threshold in the PXA SPI driver to something a bit more reasonable (8 bytes) so we won't waste a bunch of time setting up DMA just for 2 bytes to be transferred.
Oh yeah, and there's an issue that causes a bunch of DMA-related errors to be printed at startup: "-ENXIO: IRQ index 1 not found", "IRQ index 2 not found", etc. all the way through to index 31. This is a nonissue and everything is working correctly with the DMA controller. It has to do with the way the DMA controller figures out its interrupts when setting up. I'll try to figure out a workaround for the errors sometime soon.
Anyway, I'm not really sure what's next. Clean up the buildroot so it builds a fully bootable SD card without needing manual environment setup? Honestly, with working audio, WiFi, minimal framebuffer, and touchscreen, that opens up a lot of possible development opportunities for people who want to play around! Maybe a cool stretch goal would be an "actual" video driver. Supposedly there's a 2D graphics accelerator on this chip compatible with the etnaviv driver. I'm curious how hard that would be to get working...