[alsa-devel] CS4270 supported?
I've never worked with ALSA before, but I'm about to start developing on an ALSA driver for our hardware, which has a CS4270 on it attached via an I2S interface. After scanning the source code and mailing lists, I see no mention of the CS4270. So does that mean I would need to write an ASoC codec driver for the CS4270? If so, does the data sheet (http://www.cirrus.com/en/pubs/proDatasheet/CS4270_PP1.pdf) contain enough information?
Hi Timur,
On Tue, 2007-04-17 at 16:01 -0500, Timur Tabi wrote:
I've never worked with ALSA before, but I'm about to start developing on an ALSA driver for our hardware, which has a CS4270 on it attached via an I2S interface. After scanning the source code and mailing lists, I see no mention of the CS4270. So does that mean I would need to write an ASoC codec driver for the CS4270?
You will need to write a codec driver for the CS4270 and a small machine driver for your board (there are lots of examples in my git tree). The codec driver will export mixers, configure the digital audio interface, setup any codec PLL's etc. The machine driver glues the codec to your platform and does any machine specific configuration e.g. gpio, clocks, audio mux (on i.MXxx)
I assume your either targeting the i.MX21/27 or i.MX31 ?
Fwiw, I've made a start to i.MX31 ASoC DMA (based on the Freescale BSP) and I'm actively working on this atm. dev branch is here :-
http://opensource.wolfsonmicro.com/cgi-bin/gitweb/gitweb.cgi?p=linux-2.6-aso...
However, I don't have any bandwidth atm to work on i.MX21.
If so, does the data sheet (http://www.cirrus.com/en/pubs/proDatasheet/CS4270_PP1.pdf) contain enough information?
I've had a quick look and I think you have all the information that will be required for your driver.
More docs can be found here (must add to new ALSA Wiki) :-
http://opensource.wolfsonmicro.com/cgi-bin/gitweb/gitweb.cgi?p=linux-2.6-aso...
Liam
Liam Girdwood wrote:
You will need to write a codec driver for the CS4270 and a small machine driver for your board (there are lots of examples in my git tree). The codec driver will export mixers, configure the digital audio interface, setup any codec PLL's etc. The machine driver glues the codec to your platform and does any machine specific configuration e.g. gpio, clocks, audio mux (on i.MXxx)
Thanks, that's very helpful. I assume the codec driver will be like all the others in the sound/soc/codecs/ directory, and that my codec driver will also go there?
I assume your either targeting the i.MX21/27 or i.MX31 ?
Actually, I'm not allowed to say. :-)
Fwiw, I've made a start to i.MX31 ASoC DMA (based on the Freescale BSP) and I'm actively working on this atm. dev branch is here :-
http://opensource.wolfsonmicro.com/cgi-bin/gitweb/gitweb.cgi?p=linux-2.6-aso...
However, I don't have any bandwidth atm to work on i.MX21.
I may be able to help you with this after I'm done with my current project. By then, I should know enough about ALSA.
If so, does the data sheet (http://www.cirrus.com/en/pubs/proDatasheet/CS4270_PP1.pdf) contain enough information?
I've had a quick look and I think you have all the information that will be required for your driver.
More docs can be found here (must add to new ALSA Wiki) :-
http://opensource.wolfsonmicro.com/cgi-bin/gitweb/gitweb.cgi?p=linux-2.6-aso...
Thanks a bunch. I'll check it out today.
On Wed, 2007-04-18 at 10:46 -0500, Timur Tabi wrote:
Liam Girdwood wrote:
You will need to write a codec driver for the CS4270 and a small machine driver for your board (there are lots of examples in my git tree). The codec driver will export mixers, configure the digital audio interface, setup any codec PLL's etc. The machine driver glues the codec to your platform and does any machine specific configuration e.g. gpio, clocks, audio mux (on i.MXxx)
Thanks, that's very helpful. I assume the codec driver will be like all the others in the sound/soc/codecs/ directory, and that my codec driver will also go there?
Yes.
I assume your either targeting the i.MX21/27 or i.MX31 ?
Actually, I'm not allowed to say. :-)
Fwiw, I've made a start to i.MX31 ASoC DMA (based on the Freescale BSP) and I'm actively working on this atm. dev branch is here :-
http://opensource.wolfsonmicro.com/cgi-bin/gitweb/gitweb.cgi?p=linux-2.6-aso...
However, I don't have any bandwidth atm to work on i.MX21.
I may be able to help you with this after I'm done with my current project. By then, I should know enough about ALSA.
Cool. :)
Liam
Liam Girdwood wrote:
Yes.
Ok, great. Thanks.
Now I have a stupid question. I may need to write an ALSA driver for the 2.6.20 kernel, which doesn't have ASoC. Can you (or someone) give me a summary of much more work that would be for me, vs. an ASoC driver?
On 4/18/07, Timur Tabi timur@freescale.com wrote:
Liam Girdwood wrote:
Yes.
Ok, great. Thanks.
Now I have a stupid question. I may need to write an ALSA driver for the 2.6.20 kernel, which doesn't have ASoC. Can you (or someone) give me a summary of much more work that would be for me, vs. an ASoC driver?
You can install the current ALSA version against any kernel.
Lee
On Wed, 2007-04-18 at 12:56 -0500, Timur Tabi wrote:
Liam Girdwood wrote:
Now I have a stupid question. I may need to write an ALSA driver for the 2.6.20 kernel, which doesn't have ASoC. Can you (or someone) give me a summary of much more work that would be for me, vs. an ASoC driver?
This really depends on your platform atm. It's pretty much the same work if your platform and codec is not currently supported.
However, if your platform is supported (i.e. pxa2xx, AR91xxxx, S3C24xx & i.MX31) then adding a codec driver is trivial (probably 1 weeks effort for your codec). Alternatively, if only the codec is supported then you have to add the platform code (i.e. audio DMA, I2S, etc).
If your platform and codec are both supported then it's only a day or two to write a machine driver to glue both together.
Liam
On Thu, 2007-04-19 at 11:54 +0100, Liam Girdwood wrote:
On Wed, 2007-04-18 at 12:56 -0500, Timur Tabi wrote:
Liam Girdwood wrote:
Now I have a stupid question. I may need to write an ALSA driver for the 2.6.20 kernel, which doesn't have ASoC. Can you (or someone) give me a summary of much more work that would be for me, vs. an ASoC driver?
This really depends on your platform atm. It's pretty much the same work if your platform and codec is not currently supported.
Just to clarify, a non ASoC ALSA driver would consist of roughly the same code, but more tightly coupled to your platform and machine (probably consisting a single source file). ASoC basically separates out your ALSA driver code into codec, platform and machine drivers. This allows others to reuse your platform code with other codecs or reuse your codec code with other platforms.
ASoC does a few other things as well (e.g. DAPM) but this is optional.
Liam
Privacy & Confidentiality Notice ------------------------------------------------- This message and any attachments contain privileged and confidential information that is intended solely for the person(s) to whom it is addressed. If you are not an intended recipient you must not: read; copy; distribute; discuss; take any action in or make any reliance upon the contents of this message; nor open or read any attachment. If you have received this message in error, please notify us as soon as possible on the following telephone number and destroy this message including any attachments. Thank you. ------------------------------------------------- Wolfson Microelectronics plc Tel: +44 (0)131 272 7000 Fax: +44 (0)131 272 7001 Web: www.wolfsonmicro.com
Registered in Scotland
Company number SC089839
Registered office:
Westfield House, 26 Westfield Road, Edinburgh, EH11 2QB, UK
participants (4)
-
Lee Revell
-
Liam Girdwood
-
Liam Girdwood
-
Timur Tabi