* [PATCH] tas3004_tables.c off-by-one
@ 2003-12-20 16:58 Colin Leroy
2003-12-20 23:26 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 5+ messages in thread
From: Colin Leroy @ 2003-12-20 16:58 UTC (permalink / raw)
To: linuxppc-dev list, benh
[-- Attachment #1: Type: text/plain, Size: 329 bytes --]
Hi,
I noticed that when pushed to the upper limits, the mixer channels on my
ibook G4 just went silent (tested with master, bass, treble).
I found out this was due to too short (by one item) arrays in
tas3004_tables.c. This patch fixes it. I just copied over the last entry
of each array.
HTH,
--
Colin
http://www.colino.net/
[-- Attachment #2: tas3004_tables.diff --]
[-- Type: text/plain, Size: 1155 bytes --]
--- drivers/sound/dmasound/tas3004_tables.c.orig 2003-12-20 17:53:45.000000000 +0100
+++ drivers/sound/dmasound/tas3004_tables.c 2003-12-20 17:53:57.000000000 +0100
@@ -195,7 +195,7 @@
0x1577b, 0x16a37, 0x17df5, 0x192bd,
0x1a890, 0x1bf7b, 0x1d78d, 0x1f0d1,
0x20b55, 0x22727, 0x24456, 0x262f2,
- 0x2830b
+ 0x2830b, 0x2830b
};
static uint tas3004_mixer_tab[]={
@@ -224,7 +224,7 @@
0x1577ac, 0x16a370, 0x17df51, 0x192bc2,
0x1a88f8, 0x1bf7b7, 0x1d78c9, 0x1f0d04,
0x20b542, 0x227268, 0x244564, 0x262f26,
- 0x2830af
+ 0x2830af, 0x2830af
};
static uint tas3004_treble_tab[]={
@@ -253,7 +253,7 @@
0x2f, 0x2c, 0x27, 0x23,
0x1f, 0x1a, 0x15, 0xf,
0x8, 0x5, 0x2, 0x1,
- 0x1
+ 0x1, 0x1
};
static uint tas3004_bass_tab[]={
@@ -282,7 +282,7 @@
0x36, 0x33, 0x2f, 0x2b,
0x28, 0x24, 0x20, 0x1c,
0x17, 0x12, 0xd, 0x7,
- 0x1
+ 0x1, 0x1
};
struct tas_gain_t tas3004_gain={
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tas3004_tables.c off-by-one
2003-12-20 16:58 [PATCH] tas3004_tables.c off-by-one Colin Leroy
@ 2003-12-20 23:26 ` Benjamin Herrenschmidt
2003-12-21 11:23 ` Colin Leroy
2004-01-09 22:33 ` Segher Boessenkool
0 siblings, 2 replies; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2003-12-20 23:26 UTC (permalink / raw)
To: Colin Leroy; +Cc: linuxppc-dev list
On Sun, 2003-12-21 at 03:58, Colin Leroy wrote:
> Hi,
>
> I noticed that when pushed to the upper limits, the mixer channels on my
> ibook G4 just went silent (tested with master, bass, treble).
>
> I found out this was due to too short (by one item) arrays in
> tas3004_tables.c. This patch fixes it. I just copied over the last entry
> of each array.
Interesting, my understanding is that those values were taken
from Darwin ;) I'll look at this too along with your fan stuff
and merge, thanks.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tas3004_tables.c off-by-one
2003-12-20 23:26 ` Benjamin Herrenschmidt
@ 2003-12-21 11:23 ` Colin Leroy
2004-01-09 22:33 ` Segher Boessenkool
1 sibling, 0 replies; 5+ messages in thread
From: Colin Leroy @ 2003-12-21 11:23 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list
On 21 Dec 2003 at 10h12, Benjamin Herrenschmidt wrote:
Hi,
> > I found out this was due to too short (by one item) arrays in
> > tas3004_tables.c. This patch fixes it. I just copied over the last entry
> > of each array.
>
> Interesting, my understanding is that those values were taken
> from Darwin ;)
That's what I thought too; that's a bit odd. debug printk()s clearly told me
that the kernel was trying to get array[101] of the 101 elements arrays :-)
Maybe Darwin doesn't allow the mixers to get to 100% ?
--
Colin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tas3004_tables.c off-by-one
2003-12-20 23:26 ` Benjamin Herrenschmidt
2003-12-21 11:23 ` Colin Leroy
@ 2004-01-09 22:33 ` Segher Boessenkool
2004-01-12 11:45 ` Colin Leroy
1 sibling, 1 reply; 5+ messages in thread
From: Segher Boessenkool @ 2004-01-09 22:33 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, Colin Leroy
>> I found out this was due to too short (by one item) arrays in
>> tas3004_tables.c. This patch fixes it. I just copied over the last
>> entry
>> of each array.
>
> Interesting, my understanding is that those values were taken
> from Darwin ;) I'll look at this too along with your fan stuff
> and merge, thanks.
It could be these tables are taken from Darwin, but there is no need
for that; the chip manual contains those tables, too (but for a bigger
range of values).
Segher
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tas3004_tables.c off-by-one
2004-01-09 22:33 ` Segher Boessenkool
@ 2004-01-12 11:45 ` Colin Leroy
0 siblings, 0 replies; 5+ messages in thread
From: Colin Leroy @ 2004-01-12 11:45 UTC (permalink / raw)
To: linuxppc-dev list
On 09 Jan 2004 at 23h01, Segher Boessenkool wrote:
Hi,
> It could be these tables are taken from Darwin, but there is no need
> for that; the chip manual contains those tables, too (but for a bigger
> range of values).
By the way, this was for kernel 2.4 and dmasound. Alsa drivers in 2.6
work fine.
--
Colin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-01-12 11:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-20 16:58 [PATCH] tas3004_tables.c off-by-one Colin Leroy
2003-12-20 23:26 ` Benjamin Herrenschmidt
2003-12-21 11:23 ` Colin Leroy
2004-01-09 22:33 ` Segher Boessenkool
2004-01-12 11:45 ` Colin Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).