[alsa-devel] How to handle parameter variation across different boards but same platform
hi,
Currently on Davinci platform, codec system clock & snd_soc_card parameter is decided using machine_is_xxxx() api.
sound/soc/Davinci/davinci-evm.c, inside evm_hw_params() & evm_init(),
We have an upcoming board based on TI AM335x soc which has both codec system clock And the codec name (because of i2c bus difference) different from previous am335x based boards.
Using machine_is_xxx() is not sufficient because there are 2 other boards on same Platform/machine but with different values.
So, how to specify these parameters for the new board?
Regards Gururaja
On Wed, Jul 04, 2012 at 12:45:03PM +0000, Hebbar, Gururaja wrote:
You should fix your mailer to word wrap at less than 80 columns.
Using machine_is_xxx() is not sufficient because there are 2 other boards on same Platform/machine but with different values.
So, how to specify these parameters for the new board?
What do you mean by "board"? If these are plugin modules for your platform you need to either identify this at runtime and register a different machine driver or select at compile time.
On Wed, Jul 04, 2012 at 18:47:50, Mark Brown wrote:
On Wed, Jul 04, 2012 at 12:45:03PM +0000, Hebbar, Gururaja wrote:
You should fix your mailer to word wrap at less than 80 columns.
Sorry. Stupid outlook. Will take care of it manually.
Using machine_is_xxx() is not sufficient because there are 2 other boards on same Platform/machine but with different values.
So, how to specify these parameters for the new board?
What do you mean by "board"? If these are plugin modules for your platform you need to either identify this at runtime and register a different machine driver or select at compile time.
By board I mean a new development board.
New board sysclk = 24MHz codec_name = "tlv320aic3x-codec.1-001b"
Previous Board sysclk = 12MHz .codec_name = "tlv320aic3x-codec.2-001b",
Both boards share the same machine is API (machine_is_am33xx()).
So, is there any mechanism/api to differentiate these 2 boards inside Code?
Has anyone else faced such situation?
Regards, Gururaja
On Wed, Jul 04, 2012 at 01:43:12PM +0000, Hebbar, Gururaja wrote:
On Wed, Jul 04, 2012 at 18:47:50, Mark Brown wrote:
What do you mean by "board"? If these are plugin modules for your platform you need to either identify this at runtime and register a different machine driver or select at compile time.
By board I mean a new development board.
New board sysclk = 24MHz codec_name = "tlv320aic3x-codec.1-001b"
Previous Board sysclk = 12MHz .codec_name = "tlv320aic3x-codec.2-001b",
Both boards share the same machine is API (machine_is_am33xx()).
So, is there any mechanism/api to differentiate these 2 boards inside Code?
Has anyone else faced such situation?
If these are totally different boards they should have different machine IDs set so machine_is_() should identify. If that isn't there then you need to do something custom to your products to identify the boards further.
On Wed, Jul 04, 2012 at 19:31:18, Mark Brown wrote:
On Wed, Jul 04, 2012 at 01:43:12PM +0000, Hebbar, Gururaja wrote:
On Wed, Jul 04, 2012 at 18:47:50, Mark Brown wrote:
What do you mean by "board"? If these are plugin modules for your platform you need to either identify this at runtime and register a different machine driver or select at compile time.
By board I mean a new development board.
New board sysclk = 24MHz codec_name = "tlv320aic3x-codec.1-001b"
Previous Board sysclk = 12MHz .codec_name = "tlv320aic3x-codec.2-001b",
Both boards share the same machine is API (machine_is_am33xx()).
So, is there any mechanism/api to differentiate these 2 boards inside Code?
Has anyone else faced such situation?
If these are totally different boards they should have different machine IDs set so machine_is_() should identify. If that isn't there then you need to do something custom to your products to identify the boards further.
They are different boards with same SoC (AM33xx). So they both are true for machine_is_am33xx().
We have a means to detect the type of board but in arch/arm/mach-omap2/ board file. However, I believe it is not recommended to call boards api inside drivers.
Can you give me more info about the "custom option" you suggested?
Regards, Gururaja
On Wed, Jul 04, 2012 at 02:17:48PM +0000, Hebbar, Gururaja wrote:
On Wed, Jul 04, 2012 at 19:31:18, Mark Brown wrote:
If these are totally different boards they should have different machine IDs set so machine_is_() should identify. If that isn't there then you need to do something custom to your products to identify the boards further.
They are different boards with same SoC (AM33xx). So they both are true for machine_is_am33xx().
That's not how this stuff is supposed to work - machine is the board, you should have cpu_is_() for identifying the SoC.
We have a means to detect the type of board but in arch/arm/mach-omap2/ board file. However, I believe it is not recommended to call boards api inside drivers.
Only for generic drivers, board specific drivers are obviously board specific. The point is that you shouldn't make something that could run on many boards depend on an API specific to a particular board.
participants (2)
-
Hebbar, Gururaja
-
Mark Brown