[maemo-developers] ALSA sound driver for Nokia 770 and DSP programming
From: Felipe Contreras felipe.contreras at gmail.comDate: Thu Sep 25 22:59:38 EEST 2008
- Previous message: ALSA sound driver for Nokia 770 and DSP programming
- Next message: ALSA sound driver for Nokia 770 and DSP programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Sep 25, 2008 at 10:07 PM, Siarhei Siamashka <siarhei.siamashka at gmail.com> wrote: > Hi, > > As has been discovered long ago [1] but eventually forgotten, Nokia 770 has > AIC23 audio hardware [2] which can be used not only from DSP side, but > from ARM as well. Moreover, OS2006 kernel sources even contain an ARM driver > for it, but this driver is disabled (that's understandable as the driver is > not in a very good shape and has quite a number of bugs). > > Recently I have been trying to make it running and seems like we have a very > good chance to have it working nicely. It is also interesting, that the > linux-omap guys seem to be developing a new driver [3] for AIC23 which may > eventually become a better alternative. > > Kernel patch is attached. It enables AIC32 driver, adds a hack to > power on/off code so that audio codec is permanently powered on (power > on/off code is not reliable and needs to be reworked). Also it fixes a > problem with audio stuttering on video playback in mplayer (the driver > had broken position reporting which is critical for proper audio/video > synchronization). > > Here is some usage instruction (beware that standard disclaimer applies: > you can use this patch at your own risk, this code is quite untested. If it > somehow manages to fry your device, you have been warned and I'm not > responsible for any breakages): > > 1. Disable esd daemon and DSP stuff in order to move it out of the way > (temporarily rename '/usr/bin/esd' and '/usr/sbin/dsp_dld' to something else) > 2. Apply the attached patch to OS2006 kernel, compile and flash it to the > device > 3. Compile and install alsa userspace library, I used alsa-lib-1.0.11.tar.bz2 > 4. Put attached 'asound.conf' into '/etc' directory on the device, it enables > dmix plugin for audio mixing and resampling > 5. Compile and try some applications which use ALSA, I tested 'aplay' > and 'mplayer' > > The driver is semi-usable now, but a lot still needs to be done: > * proper power management to avoid excessive battery drain > * audio volume control > * switch between speaker/headphone > * audio quality is a bit crappy now, this needs to be fixed > * maybe some more fixes for bugs that are yet to be discovered... > > DMA code is quite suspicious (especially the way it does channels linking) and > might be responsible for audio quality issues. Also sofware mixing/resampling > code in dmix plugin can benefit from ARM optimizations. > > > Now regarding why we may want it. Once if we get a good, low latency, fully > functional and reliable ALSA sound driver running on ARM, it gives maemo > community a nice possibility to scrap all the proprietary DSP binaries. This > provides us with a new and shiny 252MHz C55x DSP core ready to be used by > something else :) > > Free linux DSP toolchain from TI [4] supports generation of both DSP kernel > and DSP tasks for OMAP1 based devices which is sufficient for DSP development. > The toolchain license was supposed to permit open source development (with > noncommercial restriction), though the license text itself is a bit > questionable [5]. > > With DSP avalable for use and having no need to spend efforts on ensuring > compatibility and peaceful coexistence with proprietary binary codecs (free > and proprietary code does not mix well), it should be possible to turn > Nokia 770 into quite a powerful media player. Great stuff! Do you plan to use the dsp-gateway or dsp-bridge? -- Felipe Contreras
- Previous message: ALSA sound driver for Nokia 770 and DSP programming
- Next message: ALSA sound driver for Nokia 770 and DSP programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]