[alsa-devel] [PATCH] ALSA: AT73C213: Rectify misleading comments.

Hans-Christian Egtvedt hans-christian.egtvedt at atmel.com
Mon Nov 15 15:50:34 CET 2010


On Mon, 2010-11-15 at 12:29 +0100, Peter Rosin wrote: 
> The Atmel SSC can divide by even numbers, not only powers of two and
> the given values are binary, not hexadecimal.

IIRC the divide by power of two is more related to the generic clocks in
the device thatn the SSC module itself.

> Signed-off-by: Peter Rosin <peda at axentia.se>
> ---
>  sound/spi/at73c213.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> I'm working on a driver based on AT73C213 and have had to look up
> if the below nits were code problems or comment problems.  The Atmel
> specs tells me that the comments are wrong and this patch fixes
> those comments.
> 
> Cheers and thanks,
> Peter
> 
> diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c
> index 1bc56b2..548e17a 100644
> --- a/sound/spi/at73c213.c
> +++ b/sound/spi/at73c213.c
> @@ -155,7 +155,7 @@ static int snd_at73c213_set_bitrate(struct snd_at73c213 *chip)
>  	if (max_tries < 1)
>  		max_tries = 1;
>  
> -	/* ssc_div must be a power of 2. */
> +	/* ssc_div must be even. */

IIRC the bitrate is controlled by a generic clock, and it has a power of
two divider possibility. Hence the comment about power of two.

<snipp other two changes that looked fine>

-- 
Hans-Christian Egtvedt



More information about the Alsa-devel mailing list