From: Pete Zaitcev <zaitcev@redhat.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: Patch for ymfpci in 2.5.x
Date: Tue, 22 Jan 2002 00:11:25 -0500 [thread overview]
Message-ID: <20020122001125.A19661@devserv.devel.redhat.com> (raw)
In-Reply-To: <20020111121431.A10147@devserv.devel.redhat.com> <Pine.LNX.4.33.0201111034070.3952-100000@penguin.transmeta.com>
In-Reply-To: <Pine.LNX.4.33.0201111034070.3952-100000@penguin.transmeta.com>; from torvalds@transmeta.com on Fri, Jan 11, 2002 at 10:36:30AM -0800
> Date: Fri, 11 Jan 2002 10:36:30 -0800 (PST)
> From: Linus Torvalds <torvalds@transmeta.com>
> It would have been even saner to give that bit some sane name, and have
> something like
>
> #define YMFPCI_XXXBIT (__constant_cpu_to_le32(0x40000000))
>
> instead of creating a totally nonsensical random number.
I think something like this would be better than one more
totally nonsesical random #define:
--- linux-2.5.2/drivers/sound/ymfpci.c Fri Jan 11 10:34:43 2002
+++ linux-2.5.2-p3/drivers/sound/ymfpci.c Mon Jan 21 21:06:48 2002
@@ -832,6 +832,13 @@
u32 lpfK = ymfpci_calc_lpfK(rate);
ymfpci_playback_bank_t *bank;
int nbank;
+
+ /*
+ * The gain is a floating point number. According to the manual,
+ * bit 31 indicates a sign bit, bit 30 indicates an integer part,
+ * and bits [29:15] indicate a decimal fraction part. Thus,
+ * for a gain of 1.0 the constant of 0x40000000 is loaded.
+ */
unsigned le_0x40000000 = cpu_to_le32(0x40000000);
format = (stereo ? 0x00010000 : 0) | (w_16 ? 0 : 0x80000000);
-- Pete
next prev parent reply other threads:[~2002-01-22 5:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20020111004423.A22316@devserv.devel.redhat.com>
2002-01-11 17:14 ` Patch for ymfpci in 2.5.x Pete Zaitcev
2002-01-11 18:36 ` Linus Torvalds
2002-01-22 5:11 ` Pete Zaitcev [this message]
2002-01-22 5:14 ` Linus Torvalds
2002-01-11 6:23 Pete 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=20020122001125.A19661@devserv.devel.redhat.com \
--to=zaitcev@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.