All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miguel Aguilar <miguel.aguilar@ridgerun.com>
To: davinci-linux-open-source@linux.davincidsp.com,
	alsa-devel@alsa-project.org
Cc: todd.fischer@ridgerun.com, diego.dompe@ridgerun.com,
	clark.becker@ridgerun.com
Subject: Re: [PATCH 2/2] ASoC: Davinci: Add audio codec support for DM365 EVM
Date: Fri, 28 Aug 2009 14:55:28 -0600	[thread overview]
Message-ID: <4A984440.5010302@ridgerun.com> (raw)
In-Reply-To: <1251489336-23882-1-git-send-email-miguel.aguilar@ridgerun.com>

Hi,

See the comment below:

miguel.aguilar@ridgerun.com wrote:
> From: Miguel Aguilar <miguel.aguilar@ridgerun.com>
> 
> 1) Enables tlv320aic3101 support on DM365 EVM.
> 2) Set tlv320aic3x i2c setup into DM365 EVM board file.
> 
> This patch was tested on DM365 EVM rev c.
> 
> Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
> ---
>  arch/arm/mach-davinci/board-dm365-evm.c |    3 +++
>  sound/soc/davinci/Kconfig               |    9 +++++++++
>  sound/soc/davinci/Makefile              |    1 +
>  sound/soc/davinci/davinci-evm.c         |   29 +++++++++++++++++++++++++++--
>  4 files changed, 40 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
> index fd2db78..cff68e1 100644
> --- a/arch/arm/mach-davinci/board-dm365-evm.c
> +++ b/arch/arm/mach-davinci/board-dm365-evm.c
> @@ -187,6 +187,9 @@ static struct i2c_board_info i2c_info[] = {
>  		I2C_BOARD_INFO("24c256", 0x50),
>  		.platform_data	= &eeprom_info,
>  	},
> +	{tlv320aic3x
> +		I2C_BOARD_INFO("tlv320aic3x", 0x18),
> +	},
>  };
I just found that by adding the tlv320aic3x address in the DM365 EVM board file 
the AIC is not being registered properly over I2C, so I need to resend this 
patch without the AIC info in i2c_info[].

>  
>  static struct davinci_i2c_platform_data i2c_pdata = {
> diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig
> index 6802dd5..b78b882 100644
> --- a/sound/soc/davinci/Kconfig
> +++ b/sound/soc/davinci/Kconfig
> @@ -32,6 +32,15 @@ config  SND_DM6467_SOC_EVM
>  	help
>  	  Say Y if you want to add support for SoC audio on TI
>  
> +config  SND_DM365_SOC_EVM
> +	tristate "SoC Audio support for DaVinci DM365 EVM"
> +	depends on SND_DAVINCI_SOC && MACH_DAVINCI_DM365_EVM
> +	select SND_DAVINCI_SOC_I2S
> +	select SND_SOC_TLV320AIC3X
> +
> +	help
> +	  Say Y if you want to add support for SoC audio on TI
> +
>  config SND_DAVINCI_SOC_SFFSDR
>  	tristate "SoC Audio support for SFFSDR"
>  	depends on SND_DAVINCI_SOC && MACH_SFFSDR
> diff --git a/sound/soc/davinci/Makefile b/sound/soc/davinci/Makefile
> index 67be54f..8238612 100644
> --- a/sound/soc/davinci/Makefile
> +++ b/sound/soc/davinci/Makefile
> @@ -13,4 +13,5 @@ snd-soc-sffsdr-objs := davinci-sffsdr.o
>  
>  obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o
>  obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o
> +obj-$(CONFIG_SND_DM365_SOC_EVM) += snd-soc-evm.o
>  obj-$(CONFIG_SND_DAVINCI_SOC_SFFSDR) += snd-soc-sffsdr.o
> diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
> index f3bb6f6..a859208 100644
> --- a/sound/soc/davinci/davinci-evm.c
> +++ b/sound/soc/davinci/davinci-evm.c
> @@ -44,7 +44,8 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
>  	unsigned sysclk;
>  
>  	/* ASP1 on DM355 EVM is clocked by an external oscillator */
> -	if (machine_is_davinci_dm355_evm() || machine_is_davinci_dm6467_evm())
> +	if (machine_is_davinci_dm355_evm() || machine_is_davinci_dm6467_evm()
> +	    || machine_is_davinci_dm365_evm())
>  		sysclk = 27000000;
>  
>  	/* ASP0 in DM6446 EVM is clocked by U55, as configured by
> @@ -179,6 +180,14 @@ static struct snd_soc_card dm6467_snd_soc_card_evm = {
>  	.num_links = ARRAY_SIZE(dm6467_evm_dai),
>  };
>  
> +/* davinci dm365 evm audio machine driver */
> +static struct snd_soc_card dm365_snd_soc_card_evm = {
> +	.name = "DaVinci DM365 EVM",
> +	.platform = &davinci_soc_platform,
> +	.dai_link = &evm_dai,
> +	.num_links = 1,
> +};
> +
>  /* evm audio private data */
>  static struct aic3x_setup_data evm_aic3x_setup = {
>  	.i2c_bus = 1,
> @@ -191,6 +200,12 @@ static struct aic3x_setup_data dm6467_evm_aic3x_setup = {
>         .i2c_address = 0x18,
>  };
>  
> +/* dm365 evm audio private data */
> +static struct aic3x_setup_data dm365_evm_aic3x_setup = {
> +       .i2c_bus = 1,
> +       .i2c_address = 0x18,
> +};
> +
>  /* evm audio subsystem */
>  static struct snd_soc_device evm_snd_devdata = {
>  	.card = &snd_soc_card_evm,
> @@ -198,13 +213,20 @@ static struct snd_soc_device evm_snd_devdata = {
>  	.codec_data = &evm_aic3x_setup,
>  };
>  
> -/* evm audio subsystem */
> +/* dm6467 evm audio subsystem */
>  static struct snd_soc_device dm6467_evm_snd_devdata = {
>  	.card = &dm6467_snd_soc_card_evm,
>  	.codec_dev = &soc_codec_dev_aic3x,
>  	.codec_data = &dm6467_evm_aic3x_setup,
>  };
>  
> +/* dm365 evm audio subsystem */
> +static struct snd_soc_device dm365_evm_snd_devdata = {
> +	.card = &dm365_snd_soc_card_evm,
> +	.codec_dev = &soc_codec_dev_aic3x,
> +	.codec_data = &dm365_evm_aic3x_setup,
> +};
> +
>  static struct platform_device *evm_snd_device;
>  
>  static int __init evm_init(void)
> @@ -222,6 +244,9 @@ static int __init evm_init(void)
>  	} else if (machine_is_davinci_dm6467_evm()) {
>  		evm_snd_dev_data = &dm6467_evm_snd_devdata;
>  		index = 0;
> +	}else if (machine_is_davinci_dm365_evm()) {
> +		evm_snd_dev_data = &dm365_evm_snd_devdata;
> +		index = 0;
>  	} else
>  		return -EINVAL;
>  

      reply	other threads:[~2009-08-28 20:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-28 19:55 [PATCH 2/2] ASoC: Davinci: Add audio codec support for DM365 EVM miguel.aguilar
2009-08-28 20:55 ` Miguel Aguilar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A984440.5010302@ridgerun.com \
    --to=miguel.aguilar@ridgerun.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=clark.becker@ridgerun.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=diego.dompe@ridgerun.com \
    --cc=todd.fischer@ridgerun.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.