Re: [PATCH 2/5] [RFC] ALSA ASOC Support for 5912 osk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 29 Sep 2008 15:18:32 +0530
"ext Arun KS" <arunks@xxxxxxxxxxxxxxxxxxxx> wrote:

> Adding ASOC machine driver for osk
> 
> Signed-off-by: Arun KS <arunks@xxxxxxxxxxxxxxxxxxxx>
> ---
>  sound/soc/omap/Kconfig  |    8 ++
>  sound/soc/omap/Makefile |    3 +-
>  sound/soc/omap/osk.c    |  230 +++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 240 insertions(+), 1 deletions(-)
>  create mode 100644 sound/soc/omap/osk.c
> 
> diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
> index d7b8939..f2e6d01 100644
> --- a/sound/soc/omap/Kconfig
> +++ b/sound/soc/omap/Kconfig
> @@ -22,3 +22,11 @@ config SND_OMAP_SOC_OVERO
>  	help
>  	  Say Y if you want to add support for SoC audio on the Gumstix Overo.
> 
> +config SND_OMAP_SOC_OSK
> +	tristate "SoC Audio support for 5912 OSK"
> +	depends on SND_OMAP_SOC && MACH_OMAP_OSK
> +	select SND_OMAP_SOC_MCBSP
> +	select SND_SOC_TLV320AIC23
> +	help
> +	  Say Y if you want to add support for SoC audio on 5912 OSK.
> +
>
This is generated against linux-omap. Generate it against a tree used in
alsa-devel (ASoC dev or Takashi's) since this ASoC for OSK5912 can go
directly there. Overo and Beagle are stalled until remaining McBSP
updates, OMAP3 and TWL4030 related patches are upstream from linux-omap.

> +static int osk_hw_params(struct snd_pcm_substream *substream,
> +			 struct snd_pcm_hw_params *params)
> +{
...
> +	/* Set the codec system clock for DAC and ADC */
> +	err = snd_soc_dai_set_sysclk(codec_dai, 0, 12000000, SND_SOC_CLOCK_IN);
...
> +#define CODEC_CLOCK 	12000000

Use this definition also above.

> +	aic23_mclk = clk_get(dev, "mclk");
> +	if (IS_ERR(aic23_mclk)) {
> +		printk(KERN_ERR "Could not get mclk clock\n");
> +		return -ENODEV;
> +	}
> +
...
> +	curRate = (uint) clk_get_rate(aic23_mclk);
> +	if (curRate != CODEC_CLOCK) {
> +		if (clk_set_rate(aic23_mclk, CODEC_CLOCK)) {
> +			printk(KERN_ERR "Cannot set MCLK for AIC23 CODEC\n");
> +			return -ECANCELED;
>
aic23_mclk is not released in this error path so set the err variable
and do goto err1 instead of returning.


Jarkko
--
To unsubscribe from this list: send the line "unsubscribe alsa-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux