Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: AT73C213: Rectify misleading comments.
@ 2010-11-15 11:29 Peter Rosin
  2010-11-15 14:50 ` Hans-Christian Egtvedt
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Rosin @ 2010-11-15 11:29 UTC (permalink / raw)
  To: alsa-devel; +Cc: Peter Rosin, Hans-Christian Egtvedt

The Atmel SSC can divide by even numbers, not only powers of two and
the given values are binary, not hexadecimal.

Signed-off-by: Peter Rosin <peda@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. */
 	ssc_div = (ssc_div + 1) & ~1UL;
 
 	if ((ssc_rate / (ssc_div * 2 * 16)) < BITRATE_MIN) {
@@ -621,7 +621,7 @@ static int snd_at73c213_line_capture_volume_info(
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 2;
-	/* When inverted will give values 0x10001 => 0. */
+	/* When inverted will give values 10001b => 0. */
 	uinfo->value.integer.min = 14;
 	uinfo->value.integer.max = 31;
 
@@ -634,7 +634,7 @@ static int snd_at73c213_aux_capture_volume_info(
 {
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->count = 1;
-	/* When inverted will give values 0x10001 => 0. */
+	/* When inverted will give values 10001b => 0. */
 	uinfo->value.integer.min = 14;
 	uinfo->value.integer.max = 31;
 
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-15 19:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-15 11:29 [PATCH] ALSA: AT73C213: Rectify misleading comments Peter Rosin
2010-11-15 14:50 ` Hans-Christian Egtvedt
2010-11-15 18:52   ` Peter Rosin
2010-11-15 19:16     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox