From: Jeff Garzik <jgarzik@pobox.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>, arjanv@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: PATCH 2.4.21-pre: sb_mixer fix
Date: Fri, 10 Jan 2003 20:23:12 -0500 [thread overview]
Message-ID: <20030111012312.GA24847@gtf.org> (raw)
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;
}
reply other threads:[~2003-01-11 1:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030111012312.GA24847@gtf.org \
--to=jgarzik@pobox.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox