From: Peter Zaitcev <zaitcev@redhat.com>
To: alan@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: Patch to ymfpci from ALSA 0.99
Date: Mon, 5 Mar 2001 19:25:24 -0500 [thread overview]
Message-ID: <20010305192524.A19811@devserv.devel.redhat.com> (raw)
Hello:
the patch does not fix the buzzing, but it does not hurt either.
And the way we loaded the microcode before was seriously wrong.
Please look.
-- Pete
diff -ur -X dontdiff linux-2.4.2/drivers/sound/ymfpci.c linux-2.4.2-p3/drivers/sound/ymfpci.c
--- linux-2.4.2/drivers/sound/ymfpci.c Fri Feb 16 16:02:37 2001
+++ linux-2.4.2-p3/drivers/sound/ymfpci.c Mon Feb 26 23:56:53 2001
@@ -2185,8 +2149,8 @@
ymfpci_writew(codec, YDSXGR_GLOBALCTRL, ctrl & ~0x0007);
/* setup DSP instruction code */
- for (i = 0; i < YDSXG_DSPLENGTH; i++)
- ymfpci_writel(codec, YDSXGR_DSPINSTRAM + i, DspInst[i >> 2]);
+ for (i = 0; i < YDSXG_DSPLENGTH / 4; i++)
+ ymfpci_writel(codec, YDSXGR_DSPINSTRAM + (i << 2), DspInst[i]);
switch (codec->pci->device) {
case PCI_DEVICE_ID_YAMAHA_724F:
@@ -2201,11 +2165,11 @@
if (ver_1e) {
/* setup control instruction code */
- for (i = 0; i < YDSXG_CTRLLENGTH; i++)
- ymfpci_writel(codec, YDSXGR_CTRLINSTRAM + i, CntrlInst1E[i >> 2]);
+ for (i = 0; i < YDSXG_CTRLLENGTH / 4; i++)
+ ymfpci_writel(codec, YDSXGR_CTRLINSTRAM + (i << 2), CntrlInst1E[i]);
} else {
- for (i = 0; i < YDSXG_CTRLLENGTH; i++)
- ymfpci_writel(codec, YDSXGR_CTRLINSTRAM + i, CntrlInst[i >> 2]);
+ for (i = 0; i < YDSXG_CTRLLENGTH / 4; i++)
+ ymfpci_writel(codec, YDSXGR_CTRLINSTRAM + (i << 2), CntrlInst[i]);
}
ymfpci_enable_dsp(codec);
diff -ur -X dontdiff linux-2.4.2/drivers/sound/ymfpci_image.h linux-2.4.2-p3/drivers/sound/ymfpci_image.h
--- linux-2.4.2/drivers/sound/ymfpci_image.h Sun Dec 3 23:58:10 2000
+++ linux-2.4.2-p3/drivers/sound/ymfpci_image.h Mon Feb 26 23:44:52 2001
@@ -1,7 +1,7 @@
#ifndef _HWMCODE_
#define _HWMCODE_
-static unsigned long int DspInst[] = {
+static unsigned long DspInst[YDSXG_DSPLENGTH / 4] = {
0x00000081, 0x000001a4, 0x0000000a, 0x0000002f,
0x00080253, 0x01800317, 0x0000407b, 0x0000843f,
0x0001483c, 0x0001943c, 0x0005d83c, 0x00001c3c,
@@ -12,7 +12,7 @@
0x00000000, 0x00000000, 0x00000000, 0x00000000
};
-static unsigned long int CntrlInst[] = {
+static unsigned long CntrlInst[YDSXG_CTRLLENGTH / 4] = {
0x000007, 0x240007, 0x0C0007, 0x1C0007,
0x060007, 0x700002, 0x000020, 0x030040,
0x007104, 0x004286, 0x030040, 0x000F0D,
@@ -791,7 +791,7 @@
// 04/09 creat
// 04/12 stop nise fix
// 06/21 WorkingOff timming
-static unsigned long int CntrlInst1E[] = {
+static unsigned long CntrlInst1E[YDSXG_CTRLLENGTH / 4] = {
0x000007, 0x240007, 0x0C0007, 0x1C0007,
0x060007, 0x700002, 0x000020, 0x030040,
0x007104, 0x004286, 0x030040, 0x000F0D,
next reply other threads:[~2001-03-06 0:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-06 0:25 Peter Zaitcev [this message]
2001-03-06 1:46 ` Patch to ymfpci from ALSA 0.99 Alan Cox
2001-03-06 1:51 ` Peter Zaitcev
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=20010305192524.A19811@devserv.devel.redhat.com \
--to=zaitcev@redhat.com \
--cc=alan@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