linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [ANN] Dmasound backport to 2.2.17pre7/10 patch
@ 2000-07-07 22:31 Iain Sandoe
  0 siblings, 0 replies; 11+ messages in thread
From: Iain Sandoe @ 2000-07-07 22:31 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Lars Magne Ingebrigtsen


Hi List,

Thanks to Lars (just the first to reply - no other selection process ;-)

Here it is:

> <URL: http://quimby.gnus.org/circus/dmasound_backport.patch.bz2>

enjoy...

original post:

hello all,

This may/may not help those who are experiencing X lock-up with sound
(although I've never had the problem myself).

I have done a backport of Geert's split-up dmasound stuff to 2.2.17pre7.
Thanks to Geert for helpful suggestions in doing this.

The problem is that the patch is **too big** to put as an attachment to the
list....

Anyone able to provide a place for it? [50-ish kb as bz2]....
If anyone's desperate (i.e. those having actual real-now-problems) I can
e-mail.


It is against linuxcare linux-pmac-stable and OK against linux-pmac-benh as
well.

WHAT IT DOES:

there's a new drivers/sound/dmasound this contains a split-up version of
the multi-platform dmasound.c

It *should* add sound input to the Pmac - but that doesn't work reliably yet
(I suspect weirdness with the mixer abstraction - see below).  No crash but,
then, no recorded sound either.  I'll be on this a bit later on.

WHAT I'VE TESTED:

G3 AWACS Rev 3 with/without build as modules.
I will do G3/Lombard (IIRC has the burgundy AWACS).
I will do G4 just as soon as I get to setting it up :-)

WHAT I DIDN'T DO:

The other platforms - if it is not obvious what is needed - (add call to
dmasound_???_init() into drivers/char/mem.c and fix up the module/no module
stuff in drivers/sound/dmasound_????.c) then e-mail me off list and I'll
have a go.  BUT I've got no h'ware other than Pmac to test on.

TO DO:

Sort out mixer abstraction weirdness - there's definitely some funny
behaviour using kmixer - sometimes the stereo attribute is recognised -
sometimes not.

Sort out what is slowing things down when the buffer size is reduced:

we should be able to achieve 11ms output latency with AWACS.

Please test & comment (but send flames to /dev/null - this is my first
backport ;-)

ciao,
Iain.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] Dmasound backport to 2.2.17pre7/10 patch
       [not found] <200007080459.XAA32335@lists.linuxppc.org>
@ 2000-07-11 15:15 ` Derek Homeier
  0 siblings, 0 replies; 11+ messages in thread
From: Derek Homeier @ 2000-07-11 15:15 UTC (permalink / raw)
  To: linuxppc-dev


On Fri, 07 Jul 2000 17:11:38 +0100, "Iain Sandoe" <iain@sandoe.co.uk> wrote:
>
> Hi again...
>
> Well, it seems that one the list has bounced a message with a title - it
> bounces it agin even if the new version fits within the rules...
>
> Here's what I wanted to send:
>
> hello all,
>
> This may/may not help those who are experiencing X lock-up with sound
> (although I've never had the problem myself).
>
> I have done a backport of Geert's split-up dmasound stuff to 2.2.17pre7.
> Thanks to Geert for helpful suggestions in doing this.
>
I'd like to try the patch, though I didn't see a locked up X either
(probably atyfb64 isn't affected?), but the CPU usage of xmms is also
outrageously high on my Lombard, and there seem to be occasional drop-outs
in the sound (as if the processor can't even always keep up with decoding
the mp3s).
My problem is that my kernel compiled from the rsynced 2.2.17pre10-ben1
sources won't even boot beyond the first stages, to starting up the swapper
- xmon reports

vector: 300 at pc=c00f7854, msr=9032, cp=cp03fb820 [c03fb770]
dar=c8001304, dsisr=42000000
current=c03fa000, pid=1, comm=swapper

without the patch as well as with it. The precompiled 2.2.17pre9-ben1 runs
without significant problems (other than the sound one).

What's more strange, the crashes even seem to affect OF, especially when
I tried to boot with yaboot. Afterwards, I noticed the Mac didn't find
the boot volume and searched for a while til it found my MacOS system
folder. I discovered that all OF boot vars had been set back to defaults,
maybe PRAM had been zapped completely, because also the function keys had been
set back to Brightness/Volume keys etc.
This happened several times after a crash, does anyone know how to avoid
this?

Greetings,
							Derek


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] Dmasound backport to 2.2.17pre7/10 patch
       [not found] <20000711165125.12731@mailhost.mipsys.com>
@ 2000-07-12 10:21 ` Derek Homeier
  0 siblings, 0 replies; 11+ messages in thread
From: Derek Homeier @ 2000-07-12 10:21 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Iain Sandoe, linuxppc-dev


On Tue, 11 Jul 2000, Benjamin Herrenschmidt wrote:

> >
> >What's more strange, the crashes even seem to affect OF, especially when
> >I tried to boot with yaboot. Afterwards, I noticed the Mac didn't find
> >the boot volume and searched for a while til it found my MacOS system
> >folder. I discovered that all OF boot vars had been set back to defaults,
> >maybe PRAM had been zapped completely, because also the function keys
> had been
> >set back to Brightness/Volume keys etc.
> >This happened several times after a crash, does anyone know how to avoid
> >this?
>
> Can you resync and tell me what's up ?
>
> If you still get the crash, then copy me the xmon report again and send
> me the System.map of the kernel you compiled.
>
No crash on startup with yesterday's rsync, neither with mol- nor with
dma-patch. The dma-patch indeed seems to help with xmms, I didn't notice
any drop-outs this time.

_But_ after some hours of sleep, the machine would not wake up properly.
First, the backlight didn't switch on. I tried the usual tricks of playing
with the brightness control, but to no effect. The machine was running at
first, as I could tell from the usual disk activity caused by slocate.
I also could dimly see the desktop, but at that point it finally seemed
to be frozen, because console switching didn't do anything.
I then shut the lid to put it to sleep again -- successfully, but when I
tried to wake it up once more, it immediately switched off.
After the restart, same symptoms: my ofboot script did not work, it searched
for a bootable volume for a while and rebooted into MacOS.
I have to add that I experienced something similar once with the precompiled
2.2.17pre9-benh1 kernel. In that case, there seemed to be problems with
the pmu while the machine was still running, because wmapm and gkrell
would not start up. I issued a snooze to check if pmud was running, with
basically the same effects: sleep, no wakeup, power-off.
That time, I tried to boot back into linux with yaboot by setting back
the OF variables first, but the kernel failed to boot, immediately shutting
off the power again. I just could see a message about something like
"PMU not properly initialized with this kernel..." briefly flashing up.
After rebooting into MacOS, everything seemed to be back in a proper
state.
I did not extensively test all kernel versions yet, but I put the PB
to sleep very briefly with the 2.2.17pre10-benh1+mol-patch yesterday,
and had no problems then. The kernel that would not wake up to day
was 2.2.17pre10-benh1 + mol-patch + dma-patch, but as I said, it was
after a much longer period of sleep. The battery was fully charged
however.
I am a bit worried if this might rather be a hardware problem, but I've
never seen anything like this in MacOS (I've put it to sleep from MacOS
this morning, to check this out again).

Thanks,
							Derek


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] Dmasound backport to 2.2.17pre7/10 patch
@ 2000-07-12 11:12 Iain Sandoe
  2000-07-12 11:27 ` Derek Homeier
  0 siblings, 1 reply; 11+ messages in thread
From: Iain Sandoe @ 2000-07-12 11:12 UTC (permalink / raw)
  To: Derek Homeier, Benjamin Herrenschmidt; +Cc: linuxppc-dev


On Wed, Jul 12, 2000, Derek Homeier wrote:
> On Tue, 11 Jul 2000, Benjamin Herrenschmidt wrote:
>
[...]
>
> _But_ after some hours of sleep, the machine would not wake up properly.
> First, the backlight didn't switch on. I tried the usual tricks of playing
> with the brightness control, but to no effect. The machine was running at
> first, as I could tell from the usual disk activity caused by slocate.

are you using the sound stuff as modules? If so does the effect manifest
without sound loaded?  There is code in the sound stuff that talks to the
PMU...

which PB (if Lombard - I'll see if I can replicate the effect here).

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] Dmasound backport to 2.2.17pre7/10 patch
  2000-07-12 11:12 [ANN] Dmasound backport to 2.2.17pre7/10 patch Iain Sandoe
@ 2000-07-12 11:27 ` Derek Homeier
  2000-07-12 11:40   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 11+ messages in thread
From: Derek Homeier @ 2000-07-12 11:27 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: Benjamin Herrenschmidt, linuxppc-dev


On Wed, 12 Jul 2000, Iain Sandoe wrote:

>
> On Wed, Jul 12, 2000, Derek Homeier wrote:
> > On Tue, 11 Jul 2000, Benjamin Herrenschmidt wrote:
> >
> [...]
> >
> > _But_ after some hours of sleep, the machine would not wake up properly.
> > First, the backlight didn't switch on. I tried the usual tricks of playing
> > with the brightness control, but to no effect. The machine was running at
> > first, as I could tell from the usual disk activity caused by slocate.
>
> are you using the sound stuff as modules? If so does the effect manifest
> without sound loaded?  There is code in the sound stuff that talks to the
> PMU...
>
> which PB (if Lombard - I'll see if I can replicate the effect here).
>
Yes, Lombard 333 MHz standard configuration.

I did compile dmasound as module (I noticed that after applyiing your patch,
dmasound was unselected in .config - is there a reason for this?).
I will test this, though I'm not sure if it's easy to reproduce -
if it takes a prolonged time of sleep for the effect to come up...

Thanks,
							Derek


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] Dmasound backport to 2.2.17pre7/10 patch
@ 2000-07-12 11:37 Iain Sandoe
  2000-07-12 12:36 ` Derek Homeier
  2000-07-12 12:37 ` Geert Uytterhoeven
  0 siblings, 2 replies; 11+ messages in thread
From: Iain Sandoe @ 2000-07-12 11:37 UTC (permalink / raw)
  To: Derek Homeier; +Cc: linuxppc-dev


----------
>From: Derek Homeier <supas100@astrophysik.uni-kiel.de>
>To: Iain Sandoe <iain@sandoe.co.uk>
>Subject: Re: [ANN] Dmasound backport to 2.2.17pre7/10 patch
>Date: Wed, Jul 12, 2000, 12:27
>
ON Wed, Jul 12, 2000, Derek Homeier wrote:
> On Wed, 12 Jul 2000, Iain Sandoe wrote:
[...]
>>
>> which PB (if Lombard - I'll see if I can replicate the effect here).
>>
> Yes, Lombard 333 MHz standard configuration.

OK - I'll get to this later - wrestling with 2.4.0 right now...

> I did compile dmasound as module (I noticed that after applyiing your patch,
> dmasound was unselected in .config - is there a reason for this?).

Yes, the CONFIG_DMASOUND changed to a set of CONFIG_DMASOUND_XXXX for the
various different platforms.  Note there is no such thing as 'dmasound.o'
any more :-)

you have to modprobe:
soundcore
dmasound_core <params>
dmasound_awacs

> I will test this, though I'm not sure if it's easy to reproduce -
> if it takes a prolonged time of sleep for the effect to come up...

well, it would be nice to narrow down where it lies...
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] Dmasound backport to 2.2.17pre7/10 patch
  2000-07-12 11:27 ` Derek Homeier
@ 2000-07-12 11:40   ` Benjamin Herrenschmidt
  2000-07-12 15:40     ` Derek Homeier
  2000-07-13 18:40     ` Derek Homeier
  0 siblings, 2 replies; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2000-07-12 11:40 UTC (permalink / raw)
  To: Derek Homeier, linuxppc-dev


>Yes, Lombard 333 MHz standard configuration.
>
>I did compile dmasound as module (I noticed that after applyiing your patch,
>dmasound was unselected in .config - is there a reason for this?).
>I will test this, though I'm not sure if it's easy to reproduce -
>if it takes a prolonged time of sleep for the effect to come up...

Did you experience this problem at all with previous kernel ? I'm
wondering if it would be good to leave the powerbook a bit more time when
coming out of sleep before turning back on the various parts.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] Dmasound backport to 2.2.17pre7/10 patch
  2000-07-12 11:37 Iain Sandoe
@ 2000-07-12 12:36 ` Derek Homeier
  2000-07-12 12:37 ` Geert Uytterhoeven
  1 sibling, 0 replies; 11+ messages in thread
From: Derek Homeier @ 2000-07-12 12:36 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: linuxppc-dev


On Wed, 12 Jul 2000, Iain Sandoe wrote:
>
> > I did compile dmasound as module (I noticed that after applyiing your patch,
> > dmasound was unselected in .config - is there a reason for this?).
>
> Yes, the CONFIG_DMASOUND changed to a set of CONFIG_DMASOUND_XXXX for the
> various different platforms.  Note there is no such thing as 'dmasound.o'
> any more :-)
>
> you have to modprobe:
> soundcore
> dmasound_core <params>
> dmasound_awacs
>
Ay, that may be the rub! I think I've still seen 'dmasound.o' when I did
a lsmod. I did not change conf.modules, that's for sure.
I have no idea, though, where I might have got the old dmasound.o from,
because I made a 'mrproper' before the last compiles. I can imagine that
would have messed up everything a bit, though I'm wondering how the
module got loaded with the wrong kernel version at all...
I noted some failed module dependencies, but none with the sound stuff
AFAIKT. I'll sort this out when I'm back at my machine.

Thanks,
							Derek


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] Dmasound backport to 2.2.17pre7/10 patch
  2000-07-12 11:37 Iain Sandoe
  2000-07-12 12:36 ` Derek Homeier
@ 2000-07-12 12:37 ` Geert Uytterhoeven
  1 sibling, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2000-07-12 12:37 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: Derek Homeier, linuxppc-dev


On Wed, 12 Jul 2000, Iain Sandoe wrote:
> you have to modprobe:
> soundcore
> dmasound_core <params>
> dmasound_awacs

Or you can use the module dependency system if you don't need <params>:

    modprobe dmasound_awacs

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] Dmasound backport to 2.2.17pre7/10 patch
  2000-07-12 11:40   ` Benjamin Herrenschmidt
@ 2000-07-12 15:40     ` Derek Homeier
  2000-07-13 18:40     ` Derek Homeier
  1 sibling, 0 replies; 11+ messages in thread
From: Derek Homeier @ 2000-07-12 15:40 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev


On Wed, 12 Jul 2000, Benjamin Herrenschmidt wrote:

> >Yes, Lombard 333 MHz standard configuration.
> >
> >I did compile dmasound as module (I noticed that after applyiing your patch,
> >dmasound was unselected in .config - is there a reason for this?).
> >I will test this, though I'm not sure if it's easy to reproduce -
> >if it takes a prolonged time of sleep for the effect to come up...
>
> Did you experience this problem at all with previous kernel ? I'm
> wondering if it would be good to leave the powerbook a bit more time when
> coming out of sleep before turning back on the various parts.
>
Nothing quite like this with anything before 2.2.17pre9, but slowing down
things a bit might certainly be good idea. As I mentioned, when I leave
it sleeping overnight, about the first thing that comes up is cron.daily
with all its updates, and I have noticed before that the powerbook is
quite sensitive in that stage, read: if I start right then to work
and put too much additional load it is quite prone to freezes.

						Derek


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] Dmasound backport to 2.2.17pre7/10 patch
  2000-07-12 11:40   ` Benjamin Herrenschmidt
  2000-07-12 15:40     ` Derek Homeier
@ 2000-07-13 18:40     ` Derek Homeier
  1 sibling, 0 replies; 11+ messages in thread
From: Derek Homeier @ 2000-07-13 18:40 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev


On Wed, 12 Jul 2000, Benjamin Herrenschmidt wrote:

> >Yes, Lombard 333 MHz standard configuration.
> >
> >I did compile dmasound as module (I noticed that after applyiing your patch,
> >dmasound was unselected in .config - is there a reason for this?).
> >I will test this, though I'm not sure if it's easy to reproduce -
> >if it takes a prolonged time of sleep for the effect to come up...
>
> Did you experience this problem at all with previous kernel ? I'm
> wondering if it would be good to leave the powerbook a bit more time when
> coming out of sleep before turning back on the various parts.
>
Well, I tested a couple of configurations, and it seems to appear with
all varieties of 2.2.17pre10. I tried the following:

  dmasound- and mol-patched kernel with old dmasound module loaded
  ditto                            with sound module unloaded
  ditto                            with dmasound_awacs (+_core) loaded

  mol-patched kernel
  kernel as rsynced from linuxcare.com.au::linux-pmac-benh

The symptoms are basically always the same:
  When trying to wake sleeping PB, disk spins up, but backlight is
  not switched on (in some configurations, especially the first one,
  it powers off right then, but usually it wakes up the first time).
  I could verify that the PowerBook is indeed fully operative at this
  point, apart from the light -- I found out a strong light source placed
  behind the monitor makes a good substitute -- after all, the transparent
  apple on the lid has its practical use!
  It is even possible to do a regular shutdown from there. If you don't,
  and if you put it back to sleep, it immediately switches off when you
  try to awake it once more.
  When this has happened, all boot variables are set back to defaults and
  a few other PRAM settings seem to have been resetted, in particular
  the settings of the F1-12 keys are set back to brightness control etc.
  PRAM does not seem to be zapped completely, though, because my timezone
  e.g. is still set correctly (though the city had once switched to
  Stockholm).
  Trying to boot with yaboot right after resetting the boot vars
  (think I can type "setenv boot-device hd:7,\\ofboot.b" in my
  sleep by now ;-) immediately leads to crash and summary power-off again.
  After booting MacOS, Linux will boot from BootX.

  When I switched back to 2.2.17pre9, convinced that none of the pre10-
  versions would work properly, I seemed to have even worse luck:
  It also crashed with a power-off (booted w/ BootX) twice in a row.
  Ask me why I bothered to try a third time, I hoped I could glimpse at
  some of the xmon messages before it died, but that time it booted,
  and now all is working again -- so far at least, I have brought it
  back from sleep three times, once after several hours, and battery
  discharge is normal.

I can send you the System.map for the 2.2.17pre10 kernel, but since I could
never read much of xmon's output, it's probably of little use.
The startup crashes all seemed to occur at PID 1, swapper.

Another observation I made with the pre10-kernels is that the keys F1-12
seemed to work very badly when I had not set them as function key primary in
MacOS, i.e. when I had to press Fn-F1 etc. to make them function as F1.
I had to hit Cmd-Ctrl-Fn-F1 several times to get back to the first virtual
console.
The brightness regulation with these keys _did_not_work_at_all_ with pre10,
regardless of the setting chosen in MacOS. Of course this would make
clear why there was no chance to bring the display back by turning up
brightness, but I don't know if it is related to the general PMU problems.

Hope this sheds some light on the problem, I'll stay with 2.2.17pre9 for
a while.

Thanks,
								Derek


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2000-07-13 18:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-07-12 11:12 [ANN] Dmasound backport to 2.2.17pre7/10 patch Iain Sandoe
2000-07-12 11:27 ` Derek Homeier
2000-07-12 11:40   ` Benjamin Herrenschmidt
2000-07-12 15:40     ` Derek Homeier
2000-07-13 18:40     ` Derek Homeier
  -- strict thread matches above, loose matches on Subject: below --
2000-07-12 11:37 Iain Sandoe
2000-07-12 12:36 ` Derek Homeier
2000-07-12 12:37 ` Geert Uytterhoeven
     [not found] <20000711165125.12731@mailhost.mipsys.com>
2000-07-12 10:21 ` Derek Homeier
     [not found] <200007080459.XAA32335@lists.linuxppc.org>
2000-07-11 15:15 ` Derek Homeier
2000-07-07 22:31 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).