[alsa-devel] How to start with a driver for custom hardware?
I am trying to develop an ALSA compatible driver for a custom hardware.
The situation is the following: We are using a Cyclone II FPGA with a nommu NiosII processor and uClinux. We have an external TLV320AIC110 codec with I2C control interface and PCM audio interface. Into the FPGA we have a hardware module which controls both interfaces and basically copies x amount of data into a given memory position and vice versa.
I have been looking at the documentation (which in my honest opinion is scarce) and many doubts have arisen.
For example, should I used alsa or asoc? In my opinion, alsa documentation is more clear than asoc, but it is highlt oriented to pci drivers.
As you can see it is a simple hardware which control registers are mapped into memory. Which part of the alsa driver takes care of accesing these hardware dependent registers?
Maybe we should use some other standard hardware module into the FPGA to get better alsa compliance?
I know these are very generic and begginer questions but, anyway, any help will be welcome.
Thank you.
Javier Martín
On Wed, Oct 01, 2008 at 05:43:36PM +0200, javier.martinc@alumnos.unican.es wrote:
The situation is the following: We are using a Cyclone II FPGA with a nommu NiosII processor and uClinux. We have an external TLV320AIC110 codec with I2C control interface and PCM audio interface.
For example, should I used alsa or asoc? In my opinion, alsa documentation is more clear than asoc, but it is highlt oriented to pci drivers.
This sounds like a good fit for ASoC - you've got a system with separate codec and interface/DMA drivers.
Most of the standard ALSA documentation also applies to ASoC, especially for platform drivers which essentially just get passed through the standard ALSA operations. The vast majority of the ASoC specific stuff is in the codec drivers. If you have questions then hopefully people here can help out.
As you can see it is a simple hardware which control registers are mapped into memory. Which part of the alsa driver takes care of accesing these hardware dependent registers?
If it were done using ASoC then you'd write ASoC platform drivers which would do this.
Respuesta a Mark Brown broonie@sirena.org.uk:
As you can see it is a simple hardware which control registers are mapped into memory. Which part of the alsa driver takes care of accesing these hardware dependent registers?
If it were done using ASoC then you'd write ASoC platform drivers which would do this.
What example or documentation could I check to see how the hardware dependent code is integrated into the platform driver?
Thanks
On Thu, Oct 02, 2008 at 11:02:33AM +0200, javier.martinc@alumnos.unican.es wrote:
What example or documentation could I check to see how the hardware dependent code is integrated into the platform driver?
All of the subdirectories of sound/soc contain platform and machine drivers which you can use as references for writing new ones. Normally it's the files with the directory name in them which provide the platform support.
participants (2)
-
javier.martinc@alumnos.unican.es
-
Mark Brown