[alsa-devel] [RFC] [PATCH 1/2] ASoC sound support for SMDK2440 boards: UDA1341 driver
Liam Girdwood
lg at opensource.wolfsonmicro.com
Thu May 24 19:15:55 CEST 2007
Hi Zoltan,
Many thanks for this. Looks good, with some minor style changes required
for ALSA.
On Thu, 2007-05-24 at 16:36 +0200, Zoltan Devai wrote:
> ASoC Support for the UDA1341 codec.
> Please note that until there is a final L3-bus driver, this patch won't work.
>
> ---
> +static inline void uda1341_reset(struct snd_soc_codec *codec)
> +{
> + u8 reset_reg = uda1341_read_reg_cache(codec, UDA1341_STATUS0);
> + uda1341_write(codec, UDA1341_STATUS0, reset_reg | (1<<6));
> +}
IMHO, there should be a space between the shift and it's operands.
Interestingly, the kernel coding style doc doesn't mention shifts in any
of it's spacing rules.
> +
> + /* Anything between 256fs*8Khz and 512fs*48Khz should be acceptable
> + we'll error out on set_hw_params if it's not OK */
> + if ( (freq >= (256 * 8000)) && (freq <= (512 * 48000)) ) {
> + uda1341->sysclk = freq;
> + return 0;
> + }
> +
There probably shouldn't be a space between any parenthesis openings and
closures in the if statement.
> +
> + codec->private_data = uda1341;
> +
> + codec->reg_cache = kmemdup(uda1341_reg, sizeof(uda1341_reg), \
> + GFP_KERNEL);
Indentation is off here.
Cheers
Liam
More information about the Alsa-devel
mailing list