* [PATCH] Alsa modularisations and support for tsc2101 0/7
@ 2006-02-20 17:33 Daniel Petrini
2006-02-20 19:45 ` Dirk Behme
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Daniel Petrini @ 2006-02-20 17:33 UTC (permalink / raw)
To: OMAP-Linux
HI,
This series of patches adds modularisation in alsa files for omap so that
makes possible to use the same alsa omap core files for different boards.
Regarding the original omap alsa support, the codec specific functions
were removed from file omap-aic23.c (which now is called omap-alsa.c)
and inserted in a specific file for this codec. Similar action was made
for tsc2101 codec, based in former oss drivers.
With this series of patches omap now have support for osk and H2 boards.
Besides codec files, the mixer file has its support added for H2.
This work was developed by me and Mika Laitio.
Summary:
-New architecture: extraction of codec dependent code from main alsa file
-Support for board H2
-Creation of codec alsa file for codec aic23 (from existing alsa work)
-Creation of codec alsa file for codec tsc2101 from oss
-Migration of specific codec configuration to platform_data
-Improvement of function probe in omap-alsa driver
-Creation of the mixer for tsc2101
Some issues where we would like to hear also others opinions
1) Codecs (omap-alsa-tsc2101.c and omap-alsa-aic23.c) from the alsa
drivers are now put to arch/arm/mach-omap1 directory to allow board
specific configuration.
Advantages
- codecs are now configurable in the board-code (board-h2, board-osk)
which specifies the codecs specific function pointers.
- board can now configure even multible different alsa-codecs if there
exist need for that. (one for mcbsp1, another for mcbsp2)
Disadvantages
-codecs part of the alsa drivers are now always linked to the Image even
if the driver itself is selected to be build as a module.
When codec is changed, you need to replace the Image and that forces you
to reboot instead of simply using "rmmod" and "modprobe" commands.
2) If it is acceptable to put the codecs under arch directory, would
plat-omap be better location than arch-omap1, for mcbsp supported
codecs? (Are there any omap2 boards with aic23 or tsc2101 codecs?)
Comments and tests are welcome.
Cheers,
Daniel
--
INdT - Manaus - Brazil
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Alsa modularisations and support for tsc2101 0/7
2006-02-20 17:33 [PATCH] Alsa modularisations and support for tsc2101 0/7 Daniel Petrini
@ 2006-02-20 19:45 ` Dirk Behme
2006-02-20 20:33 ` Komal Shah
2006-02-21 13:22 ` Menon, Nishanth
2 siblings, 0 replies; 10+ messages in thread
From: Dirk Behme @ 2006-02-20 19:45 UTC (permalink / raw)
To: Daniel Petrini, lamikr; +Cc: OMAP-Linux
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
Daniel Petrini wrote:
> This series of patches adds modularisation in alsa files for omap
> Comments and tests are welcome.
Module configuration seems to be missing in two files.
Dirk
[-- Attachment #2: alsa_module_patch.txt --]
[-- Type: text/plain, Size: 811 bytes --]
--- ./arch/arm/mach-omap1/omap-alsa-aic23.c_orig 2006-02-20 20:35:45.000000000 +0100
+++ ./arch/arm/mach-omap1/omap-alsa-aic23.c 2006-02-20 20:36:26.000000000 +0100
@@ -22,7 +22,7 @@
* are now in the aic23_samplerate_reg_info structure.
*/
-#ifdef CONFIG_SND
+#if defined( CONFIG_SND) || defined(CONFIG_SND_MODULE)
#include <sound/driver.h>
#include <sound/core.h>
--- ./arch/arm/mach-omap1/omap-alsa-tsc2101.c_orig 2006-02-20 20:40:17.000000000 +0100
+++ ./arch/arm/mach-omap1/omap-alsa-tsc2101.c 2006-02-20 20:40:51.000000000 +0100
@@ -28,7 +28,7 @@
/* routines extracted from file oss/omap-audio-tsc2101.c
* or called from drivers/ssi/omap-tsc2101.c */
-#ifdef CONFIG_SND
+#if defined( CONFIG_SND) || defined(CONFIG_SND_MODULE)
#include <linux/delay.h>
#include <linux/soundcard.h>
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Alsa modularisations and support for tsc2101 0/7
2006-02-20 17:33 [PATCH] Alsa modularisations and support for tsc2101 0/7 Daniel Petrini
2006-02-20 19:45 ` Dirk Behme
@ 2006-02-20 20:33 ` Komal Shah
2006-02-20 20:35 ` Daniel Petrini
2006-02-21 13:22 ` Menon, Nishanth
2 siblings, 1 reply; 10+ messages in thread
From: Komal Shah @ 2006-02-20 20:33 UTC (permalink / raw)
To: Daniel Petrini, OMAP-Linux
--- Daniel Petrini <d.pensator@gmail.com> wrote:
>
> 2) If it is acceptable to put the codecs under arch directory, would
> plat-omap be better location than arch-omap1, for mcbsp supported
> codecs? (Are there any omap2 boards with aic23 or tsc2101 codecs?)
Yes my custom board (Tsunami) based on OMAP2 has AIC23 and H4 TI EVM is
having tsc2101 audio codec chip.
---Komal Shah
http://komalshah.blogspot.com/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Alsa modularisations and support for tsc2101 0/7
2006-02-20 20:33 ` Komal Shah
@ 2006-02-20 20:35 ` Daniel Petrini
2006-02-20 20:58 ` Komal Shah
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Petrini @ 2006-02-20 20:35 UTC (permalink / raw)
To: Komal Shah; +Cc: OMAP-Linux
Hi,
On 2/20/06, Komal Shah <komal_shah802003@yahoo.com> wrote:
> --- Daniel Petrini <d.pensator@gmail.com> wrote:
>
> >
> > 2) If it is acceptable to put the codecs under arch directory, would
> > plat-omap be better location than arch-omap1, for mcbsp supported
> > codecs? (Are there any omap2 boards with aic23 or tsc2101 codecs?)
>
> Yes my custom board (Tsunami) based on OMAP2 has AIC23 and H4 TI EVM is
> having tsc2101 audio codec chip.
And BTW, are these codecs connected to McBSP or other serial peripheral?
> ---Komal Shah
> http://komalshah.blogspot.com/
>
Daniel
--
INdT - Manaus - Brazil
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Alsa modularisations and support for tsc2101 0/7
2006-02-20 20:35 ` Daniel Petrini
@ 2006-02-20 20:58 ` Komal Shah
[not found] ` <9268368b0602201316q4533a165p75a4bd0ab489681d@mail.gmail.com>
2006-02-20 22:35 ` lamikr
0 siblings, 2 replies; 10+ messages in thread
From: Komal Shah @ 2006-02-20 20:58 UTC (permalink / raw)
To: Daniel Petrini; +Cc: OMAP-Linux
--- Daniel Petrini <d.pensator@gmail.com> wrote:
>
> And BTW, are these codecs connected to McBSP or other serial
> peripheral?
Yes it is connected to McBSP. McBSP1 in Tsunami board and McBSP2 in
case of H4. (So more #ifders to select AUDIO_MCBSP :) ).
---Komal Shah
http://komalshah.blogspot.com/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] Alsa modularisations and support for tsc2101 0/7
[not found] ` <9268368b0602201316q4533a165p75a4bd0ab489681d@mail.gmail.com>
@ 2006-02-20 21:20 ` Daniel Petrini
2006-02-20 21:25 ` Komal Shah
1 sibling, 0 replies; 10+ messages in thread
From: Daniel Petrini @ 2006-02-20 21:20 UTC (permalink / raw)
To: OMAP-Linux
Ops, copying to list.
---------- Forwarded message ----------
From: Daniel Petrini <d.pensator@gmail.com>
Date: Feb 20, 2006 5:16 PM
Subject: Re: [PATCH] Alsa modularisations and support for tsc2101 0/7
To: Komal Shah <komal_shah802003@yahoo.com>
Humm,
On 2/20/06, Komal Shah <komal_shah802003@yahoo.com> wrote:
> --- Daniel Petrini <d.pensator@gmail.com> wrote:
>
> >
> > And BTW, are these codecs connected to McBSP or other serial
> > peripheral?
>
> Yes it is connected to McBSP. McBSP1 in Tsunami board and McBSP2 in
> case of H4. (So more #ifders to select AUDIO_MCBSP :) ).
That is actually good news. This means that with this proposed
modularisation, alsa can easily work in these platforms, unless the
2420 dma for audio be quite different.
Regarding the #ifdefs, one can always (carefully) insert a field in
the new omap_alsa_codec_config and pass the architecture difference in
the board* files.
Cheers,
Daniel
--
INdT - Manaus - Brazil
--
INdT - Manaus - Brazil
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Alsa modularisations and support for tsc2101 0/7
[not found] ` <9268368b0602201316q4533a165p75a4bd0ab489681d@mail.gmail.com>
2006-02-20 21:20 ` Daniel Petrini
@ 2006-02-20 21:25 ` Komal Shah
1 sibling, 0 replies; 10+ messages in thread
From: Komal Shah @ 2006-02-20 21:25 UTC (permalink / raw)
To: Daniel Petrini; +Cc: linux-omap-open-source
--- Daniel Petrini <d.pensator@gmail.com> wrote:
>
> That is actually good news. This means that with this proposed
> modularisation, alsa can easily work in these platforms, unless the
> 2420 dma for audio be quite different.
> Regarding the #ifdefs, one can always (carefully) insert a field in
> the new omap_alsa_codec_config and pass the architecture difference
> in
> the board* files.
Yes, it is true, being careful is good, but I think it is better to
write down a thin mcbsp framework, which does expose the apis like
mcbsp.c is doing, but the as we know that same codec chip can be
connected to different mcbsps for the same OMAP chip, which can be
passed from board-* files, also which will reduce lots of #ifders of
arch selection in mcbsp.c itself.
I think it can be derived somewhat from the existing SPI framework, but
the difference will be no real protocol drivers, and only one master
driver (as McBSP functionality remained same irrespective of OMAP1/2
series...and I hope same for DaVinci and OMAP3, and OMAP2430 is having
5 McBSPs :)). Protocol driver can be thought of as actual codec chip,
which calls the apis exposed by McBSP fwk and gets terminated at Master driver.
---Komal Shah
http://komalshah.blogspot.com/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Alsa modularisations and support for tsc2101 0/7
2006-02-20 20:58 ` Komal Shah
[not found] ` <9268368b0602201316q4533a165p75a4bd0ab489681d@mail.gmail.com>
@ 2006-02-20 22:35 ` lamikr
1 sibling, 0 replies; 10+ messages in thread
From: lamikr @ 2006-02-20 22:35 UTC (permalink / raw)
To: Komal Shah; +Cc: OMAP-Linux
>Yes it is connected to McBSP. McBSP1 in Tsunami board and McBSP2 in
>case of H4. (So more #ifders to select AUDIO_MCBSP :) ).
>
>
Nice to hear! Can you get some smoke out from the tsc2101 codec and
mixer after adding these extra ifdefs? :-)
Mika
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] Alsa modularisations and support for tsc2101 0/7
2006-02-20 17:33 [PATCH] Alsa modularisations and support for tsc2101 0/7 Daniel Petrini
2006-02-20 19:45 ` Dirk Behme
2006-02-20 20:33 ` Komal Shah
@ 2006-02-21 13:22 ` Menon, Nishanth
2006-02-21 13:49 ` Daniel Petrini
2 siblings, 1 reply; 10+ messages in thread
From: Menon, Nishanth @ 2006-02-21 13:22 UTC (permalink / raw)
To: Daniel Petrini, OMAP-Linux
Hi Daniel,
Glad to see a clean organization coming in for the code :).
>2) If it is acceptable to put the codecs under arch directory, would
>plat-omap be better location than arch-omap1, for mcbsp supported
>codecs? (Are there any omap2 boards with aic23 or tsc2101 codecs?)
Yes, There are omap2 boards with tsc2101, and omap2 boards which can have pluggable codecs. some interesting observations I have seen so far (it will be a small set compared to what others could add):
Control paths:
McSPI, uWire, I2C
Data transfer paths:
codecs with mcbsp/EAC on 2420
codecs with mcbsp/mcbsplp(on2430)
codecs on mcbsp1,2
Data formats:
PCM,I2S,TDM
could have supported uLaw data formats too
Codecs:
tsc2101, aic, others such as twl4030(http://focus.ti.com/general/docs/wtbu/wtbugencontent.tsp?templateId=6123&path=templatedata/cm/general/data/wtbmiddl/twl4030&DCMP=WTBU&HQS=ProductBulletin+OT+twl4030) <http://focus.ti.com/general/docs/wtbu/wtbugencontent.tsp?templateId=6123&path=templatedata/cm/general/data/wtbmiddl/twl4030&DCMP=WTBU&HQS=ProductBulletin+OT+twl4030)other> codecs which are far more complex than these two, including data mixing, mono/stereo input/output capabilities.
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Alsa modularisations and support for tsc2101 0/7
2006-02-21 13:22 ` Menon, Nishanth
@ 2006-02-21 13:49 ` Daniel Petrini
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Petrini @ 2006-02-21 13:49 UTC (permalink / raw)
To: Menon, Nishanth; +Cc: OMAP-Linux
Hi Nishanth,
On 2/21/06, Menon, Nishanth <x0nishan@ti.com> wrote:
>
>
> Hi Daniel,
> Glad to see a clean organization coming in for the code :).
> >2) If it is acceptable to put the codecs under arch directory, would
> >plat-omap be better location than arch-omap1, for mcbsp supported
> >codecs? (Are there any omap2 boards with aic23 or tsc2101 codecs?)
> Yes, There are omap2 boards with tsc2101, and omap2 boards which can have
> pluggable codecs.
Yes, we can put that files in plat-omap instead.
>some interesting observations I have seen so far (it will
> be a small set compared to what others could add):
Good separation of functionalities it is more or less what we are
thinking about.
> Control paths:
> McSPI, uWire, I2C
This control path are mainly used by the codec file
> Data transfer paths:
> codecs with mcbsp/EAC on 2420
> codecs with mcbsp/mcbsplp(on2430)
> codecs on mcbsp1,2
Yes, they act as "bridges" between the main processor and the codec.
Maybe a future version of the modularisation will be responsible to
remove the dependence of mcbsp.
> Data formats:
> PCM,I2S,TDM
> could have supported uLaw data formats too
> Codecs:
> tsc2101, aic, others such as
> twl4030(http://focus.ti.com/general/docs/wtbu/wtbugencontent.tsp?templateId=6123&path=templatedata/cm/general/data/wtbmiddl/twl4030&DCMP=WTBU&HQS=ProductBulletin+OT+twl4030)codecs
> which are far more complex than these two, including data mixing,
> mono/stereo input/output capabilities.
Yes, isolating they from alsa is the first step.
> Regards,
> Nishanth Menon
Regards,
Daniel
--
INdT - Manaus - Brazil
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-02-21 13:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-20 17:33 [PATCH] Alsa modularisations and support for tsc2101 0/7 Daniel Petrini
2006-02-20 19:45 ` Dirk Behme
2006-02-20 20:33 ` Komal Shah
2006-02-20 20:35 ` Daniel Petrini
2006-02-20 20:58 ` Komal Shah
[not found] ` <9268368b0602201316q4533a165p75a4bd0ab489681d@mail.gmail.com>
2006-02-20 21:20 ` Daniel Petrini
2006-02-20 21:25 ` Komal Shah
2006-02-20 22:35 ` lamikr
2006-02-21 13:22 ` Menon, Nishanth
2006-02-21 13:49 ` Daniel Petrini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox