Actually, been struggling a little with the mixer code on the driver, but worked out what was wrong (the documentation referred to the api in the alsa-driver tree which is somewhat ahead of the code in the kernel).
21 Mar 2006 (updated 21 Mar 2006 at 14:30 UTC) »
Try as I might I just could not get the stereo to work - firstly because I assumed that, as I had done with the OSS driver, I'd have to write the stereo separation code myself (in fact the ALSA middle layer does all that) and then because of what appeared to be repeated buffer over-runs.
I had built an OSS only version of mpg123 to test this and try as I might I just got clicks and gaps as the middle layer responded to the over runs by restarting the DMA transfer.
Eventually I realised that ALSA was assuming that my buffer stayed a constant size (in fact it doubles in size for stereo). Once I cut the hardware buffers in half and fixed up the period sizes to something close to optimum it all worked.
I can now also see how to add additional channels - not too difficult really. But I am not sure I can see a reason.
Working on the mixer code now.
12 Mar 2006 (updated 12 Mar 2006 at 01:16 UTC) »
The code is now at http://newgolddream.dyndns.info/cgi-bin/cvsweb
Key events today were fianlly burning a new boot cdrom so I didn't have to struggle with the five year old one that would only boot when cold (I assume that was the reason) and realising that timer polling was the way to go - the ARM7->SH4 interrupt clearly wasn't fully reversed as it just didn't worked as described.
But I still have lots of problems. it only plays on the left hand side for instance (a consequence of me not working out how to handle stereo in this model) and it get stuck in an endless loop. Previously - in the white noise era - it didn't, so it's been two steps forward and one step back in that regard.
The main breakthrough today has been on the ARM7 side - I dug up some arm7-elf generating tools (couldn't be bothered to build them all myself so got RPMs and installed them on a Fedora box I have here - my main dev box is Ubuntu these days). Wrote some new code to raise an interrupt - needed, I think, for the driver's overall health - and not only did this code work (the SH4 portion treats it as firmware), it played better sound - I think the only firmware may have been broken or corrupted over time.
15 Feb 2006 (updated 15 Feb 2006 at 14:16 UTC) »
But it's still a thrill to see a piece of code go from completely broken to behaving as expected after just a few tweaks. That is what hacking is all about!
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!