* PATCH 2.4.21-pre: sb_mixer fix
@ 2003-01-11 1:23 Jeff Garzik
0 siblings, 0 replies; only message in thread
From: Jeff Garzik @ 2003-01-11 1:23 UTC (permalink / raw)
To: Alan Cox, arjanv; +Cc: linux-kernel
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-01-11 1:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-11 1:23 PATCH 2.4.21-pre: sb_mixer fix Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox