Re: [RFC] [PATCH 2/2] ASoC sound support for SMDK2440 boards: board driver

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

 



On Thu, 2007-05-24 at 16:38 +0200, Zoltan Devai wrote:

> +
> +static int smdk2440_hw_params(struct snd_pcm_substream *substream,
> +					struct snd_pcm_hw_params *params)
> +{
> +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> +	struct snd_soc_codec_dai *codec_dai = rtd->dai->codec_dai;
> +	struct snd_soc_cpu_dai *cpu_dai = rtd->dai->cpu_dai;
> +	unsigned int clk = 0;
> +	unsigned int div = 0;
> +	int ret = 0;
> +
> +	switch (params_rate(params)) {
> +		case 11025:
> +			div = 16;
> +			clk = 4233600;
> +			break;
> +		case 22050:
> +			div = 8;
> +			clk = 8467200;
> +			break;
> +		case 44100:
> +			div = 4;
> +			clk = 16934400;
> +			break;
> +		default:
> +			return -EINVAL;
> +	}
> +

case keyword should start on same column as the switch.

e.g.

	switch (x) {
	case y: 
		do_that();

Cheers

Liam

_______________________________________________
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