* Kernel sound problems (and misc)
[not found] <kara.5052-0.989768459@kara.hadess.net>
@ 2001-05-13 15:40 ` Bastien Nocera
2001-05-13 17:05 ` Benjamin Herrenschmidt
2001-05-13 19:37 ` Jörn Nettingsmeier
2001-05-13 22:39 ` Anton Blanchard
1 sibling, 2 replies; 6+ messages in thread
From: Bastien Nocera @ 2001-05-13 15:40 UTC (permalink / raw)
To: LinuxPPC Dev
Hi gang,
I updated my kernel today, trying out BenH's tree and Paulus' off
PenguinPPC's rsync services.
Ben's tree seems to already include Iain's dmasound patches, and showed
the same problem as when I applied the patches on an older kernel: when
booting (ie. when the sound is activated), the speakers are "hissing"
until I play something and stop it. Then it behaves correctly (ie.
there's no sound when I'm not playing any :P)
OK, there goes the main problem: mixer problems. There are 3 ways to
output sound on this iMac DV summer 2000 (OF tree still available from
tidbit.org).
- the front speakers: the preferred way obviously. Main volume is of no
use (doesn't do anything), the speakers volume goes from mute, or loud
to very loud.
- the front audio sockets: there aren't independant of the front
speakers, doesn't really matter, but that means it's not possible to
shut the sound of the speakers and listen to the music with a headphone.
It might be a hardware problem.
- the audio socket for external speakers on the left handside of the
machine: there's no volume control for them. Bringing down all the
volume controls shut off the front speakers (good), but there's no way
to raise or lower the sound on this output either.
So, to sum it up, the main volume control does absolutely nothing on
this machine, and the speaker volume control is either mute, loud, or
very loud. I'd be glad to help on finding out the problem.
The misc problem is, while trying to compile paulus' kernel, the vmlinux
target fails to link with rwsem_down_write_failed and rwsem_wake
undefined references.
I hope somebody can help me tackle these.
Cheers
--
/Bastien Nocera
http://hadess.net
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Kernel sound problems (and misc)
2001-05-13 15:40 ` Kernel sound problems (and misc) Bastien Nocera
@ 2001-05-13 17:05 ` Benjamin Herrenschmidt
2001-05-13 19:37 ` Jörn Nettingsmeier
1 sibling, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2001-05-13 17:05 UTC (permalink / raw)
To: Bastien Nocera, LinuxPPC Dev
>
>OK, there goes the main problem: mixer problems. There are 3 ways to
>output sound on this iMac DV summer 2000 (OF tree still available from
>tidbit.org).
>- the front speakers: the preferred way obviously. Main volume is of no
>use (doesn't do anything), the speakers volume goes from mute, or loud
>to very loud.
I think on those models, we must set the sound chip volume to a fixed
value and control the "SRS" amplifier using I2C. I don't have all the
details in mind yet however.
>- the front audio sockets: there aren't independant of the front
>speakers, doesn't really matter, but that means it's not possible to
>shut the sound of the speakers and listen to the music with a headphone.
>It might be a hardware problem.
Probably related to the above problem.
>- the audio socket for external speakers on the left handside of the
>machine: there's no volume control for them. Bringing down all the
>volume controls shut off the front speakers (good), but there's no way
>to raise or lower the sound on this output either.
Well, if it's a "line" output, it can be considered normal. (the line
output of a portable CD player has no volume control for example). You
should look at what happens with MacOS.
>So, to sum it up, the main volume control does absolutely nothing on
>this machine, and the speaker volume control is either mute, loud, or
>very loud. I'd be glad to help on finding out the problem.
>
>The misc problem is, while trying to compile paulus' kernel, the vmlinux
>target fails to link with rwsem_down_write_failed and rwsem_wake
>undefined references.
Use my tree for pmac.
>I hope somebody can help me tackle these.
The main issue is that almost each Apple motherboard has a different
wiring of the sound chips. Some of them (the newer ones) seem to
describe things in the OF tree, older ones need us to hard code
the layout. Our current driver doesn't cope with that very well
yet. Also, some boards have external hardware (like amplifiers,
SRS module, ...) that need to be controlled with the I2C bus, for
which we don't have drivers for all machines.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Kernel sound problems (and misc)
2001-05-13 15:40 ` Kernel sound problems (and misc) Bastien Nocera
2001-05-13 17:05 ` Benjamin Herrenschmidt
@ 2001-05-13 19:37 ` Jörn Nettingsmeier
1 sibling, 0 replies; 6+ messages in thread
From: Jörn Nettingsmeier @ 2001-05-13 19:37 UTC (permalink / raw)
To: Bastien Nocera; +Cc: LinuxPPC Dev
Bastien Nocera wrote:
> The misc problem is, while trying to compile paulus' kernel, the vmlinux
> target fails to link with rwsem_down_write_failed and rwsem_wake
> undefined references.
>
> I hope somebody can help me tackle these.
>
i ran into a similar problem last week trying to build an ia32
kernel.
seems it was due to some fundamental changes to semaphore stuff and
a some compiler instructions i don't wuite understand.
someone sent me a patch, i've added it below. (part of it is
alpha-specific and irrelevant, but the last part seems interesting.)
might give you an idea, but might also be that you have a different
problem.
search the lkml archive for rwsem_, there were quite a few posts.
good luck,
jörn
This patch fixes the __builtin_expect compile problem in 2.4.4-pre6
by
moving the definition of __builtin_expect from
include/asm-alpha/compiler.h to include/linux/compiler.h and
including
this file where needed. I haven't touched the ia64 files that uses
__builtin_expect. Does any pre-2.96 compilers have support for ia64?
--
Niels Kristian Bech Jensen -- nkbj@image.dk --
http://www.image.dk/~nkbj/
----------->> Stop software piracy --- use free software!
<<-----------
diff -u --recursive --new-file
v2.4.4-pre6/linux/include/asm-alpha/compiler.h
linux/include/asm-alpha/compiler.h
--- v2.4.4-pre6/linux/include/asm-alpha/compiler.h Mon Nov 13
04:27:11 2000
+++ linux/include/asm-alpha/compiler.h Sun Apr 22 08:28:07 2001
@@ -72,13 +72,4 @@
__asm__("stw %1,%0" : "=m"(mem) : "r"(val))
#endif
-/* Somewhere in the middle of the GCC 2.96 development cycle, we
implemented
- a mechanism by which the user can annotate likely branch
directions and
- expect the blocks to be reordered appropriately. Define
__builtin_expect
- to nothing for earlier compilers. */
-
-#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
-#define __builtin_expect(x, expected_value) (x)
-#endif
-
#endif /* __ALPHA_COMPILER_H */
diff -u --recursive --new-file
v2.4.4-pre6/linux/include/asm-alpha/semaphore.h
linux/include/asm-alpha/semaphore.h
--- v2.4.4-pre6/linux/include/asm-alpha/semaphore.h Sun Apr 22
08:18:53 2001
+++ linux/include/asm-alpha/semaphore.h Sun Apr 22 08:28:29 2001
@@ -11,7 +11,7 @@
#include <asm/current.h>
#include <asm/system.h>
#include <asm/atomic.h>
-#include <asm/compiler.h> /* __builtin_expect */
+#include <linux/compiler.h>
#include <linux/wait.h>
#include <linux/rwsem.h>
diff -u --recursive --new-file
v2.4.4-pre6/linux/include/linux/compiler.h
linux/include/linux/compiler.h
--- v2.4.4-pre6/linux/include/linux/compiler.h Thu Jan 1 01:00:00
1970
+++ linux/include/linux/compiler.h Sun Apr 22 08:29:12 2001
@@ -0,0 +1,13 @@
+#ifndef __LINUX_COMPILER_H
+#define __LINUX_COMPILER_H
+
+/* Somewhere in the middle of the GCC 2.96 development cycle, we
implemented
+ a mechanism by which the user can annotate likely branch
directions and
+ expect the blocks to be reordered appropriately. Define
__builtin_expect
+ to nothing for earlier compilers. */
+
+#if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#define __builtin_expect(x, expected_value) (x)
+#endif
+
+#endif /* __LINUX_COMPILER_H */
diff -u --recursive --new-file v2.4.4-pre6/linux/lib/rwsem.c
linux/lib/rwsem.c
--- v2.4.4-pre6/linux/lib/rwsem.c Sun Apr 22 08:19:11 2001
+++ linux/lib/rwsem.c Sun Apr 22 08:29:37 2001
@@ -6,6 +6,7 @@
#include <linux/rwsem.h>
#include <linux/sched.h>
#include <linux/module.h>
+#include <linux/compiler.h>
struct rwsem_waiter {
struct rwsem_waiter *next;
--
Jörn Nettingsmeier
home://Kurfürstenstr.49.45138.Essen.Germany
phone://+49.201.491621
http://icem-www.folkwang-hochschule.de/~nettings/
http://www.linuxdj.com/audio/lad/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Kernel sound problems (and misc)
[not found] <kara.5052-0.989768459@kara.hadess.net>
2001-05-13 15:40 ` Kernel sound problems (and misc) Bastien Nocera
@ 2001-05-13 22:39 ` Anton Blanchard
[not found] ` <kara.18908-0.989794453@kara.hadess.net>
1 sibling, 1 reply; 6+ messages in thread
From: Anton Blanchard @ 2001-05-13 22:39 UTC (permalink / raw)
To: Bastien Nocera; +Cc: LinuxPPC Dev
> The misc problem is, while trying to compile paulus' kernel, the vmlinux
> target fails to link with rwsem_down_write_failed and rwsem_wake
> undefined references.
Did you make oldconfig? You should this in your .config:
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
Anton
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Kernel sound problems (and misc)
@ 2001-05-13 16:03 Iain Sandoe
0 siblings, 0 replies; 6+ messages in thread
From: Iain Sandoe @ 2001-05-13 16:03 UTC (permalink / raw)
To: Bastien Nocera, LinuxPPC Dev
Hi Bastien,
> Ben's tree seems to already include Iain's dmasound patches, and showed
> the same problem as when I applied the patches on an older kernel: when
> booting (ie. when the sound is activated), the speakers are "hissing"
> until I play something and stop it. Then it behaves correctly (ie.
> there's no sound when I'm not playing any :P)
Hmmm. I've obviously done something that means that dma is *not* halted on
your machine at startup. This should be fairly easy to fix (but I'm away
for a week - so next weekend). It doesn't happen on any of my machines - so
perhaps something specific to burgundy.
I don't know why this didn't make sense to me before ...
I will look at this next w/e and send you a patch to test (unless someone
else does it first ;-)
> OK, there goes the main problem: mixer problems. There are 3 ways to
> output sound on this iMac DV summer 2000 (OF tree still available from
> tidbit.org).
> - the front speakers: the preferred way obviously. Main volume is of no
> use (doesn't do anything), the speakers volume goes from mute, or loud
> to very loud.
> - the front audio sockets: there aren't independant of the front
> speakers, doesn't really matter, but that means it's not possible to
> shut the sound of the speakers and listen to the music with a headphone.
> It might be a hardware problem.
> - the audio socket for external speakers on the left handside of the
> machine: there's no volume control for them. Bringing down all the
> volume controls shut off the front speakers (good), but there's no way
> to raise or lower the sound on this output either.
>
> So, to sum it up, the main volume control does absolutely nothing on
> this machine, and the speaker volume control is either mute, loud, or
> very loud. I'd be glad to help on finding out the problem.
This is, presumably, no change from the 'standard' version.
This because there is still quite a lot of work to do on the iMac stuff -
and we've only had the Darwin info for a little while ... I can only offer
two solutions:
1. patience ...
2. send me a patch that fixes it ;-)))
ciao,
Iain.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-05-13 22:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <kara.5052-0.989768459@kara.hadess.net>
2001-05-13 15:40 ` Kernel sound problems (and misc) Bastien Nocera
2001-05-13 17:05 ` Benjamin Herrenschmidt
2001-05-13 19:37 ` Jörn Nettingsmeier
2001-05-13 22:39 ` Anton Blanchard
[not found] ` <kara.18908-0.989794453@kara.hadess.net>
2001-05-13 22:54 ` Bastien Nocera
2001-05-13 16:03 Iain Sandoe
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).