lkml.org 
[lkml]   [2003]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPATCH 2.4.21-pre: sb_mixer fix
While writing als4000.c (SB16++ on PCI), I was using sb_mixer.c
[now... don't laugh]. I found what I think is a silly.

When building the recmask, the code loops from zero to
SOUND_MIXER_NRDEVICES, building up a bitmask to then write to the card.
Due to what I feel is an obvious scoping error, the present[buggy] code
writes the left and right recmask SOUND_MIXER_NRDEVICES times! And with
an ever-changing bitmask, too...

Since the bitmask is eventually correct, this code works, but is really
stupid. This patch corrects the scoping error. Completely untested.


===== drivers/sound/sb_mixer.c 1.3 vs edited =====
--- 1.3/drivers/sound/sb_mixer.c Tue Feb 5 02:49:26 2002
+++ edited/drivers/sound/sb_mixer.c Wed Jan 8 17:31:25 2003
@@ -479,9 +479,9 @@
regimageL |= sb16_recmasks_L[i];
regimageR |= sb16_recmasks_R[i];
}
- sb_setmixer (devc, SB16_IMASK_L, regimageL);
- sb_setmixer (devc, SB16_IMASK_R, regimageR);
}
+ sb_setmixer (devc, SB16_IMASK_L, regimageL);
+ sb_setmixer (devc, SB16_IMASK_R, regimageR);
}
break;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.022 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site