[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ALSA Problem solved! (Was Re: ALSA problem)

> In the end, what I needed was the following config lines:
> [/etc/modutils/alsa]
> alias char-major-116 snd
> alias char-major-14 soundcore
> options snd major=116 cards_limit=4
> alias sound-service-0-0 snd-mixer-oss
> alias sound-service-0-1 snd-seq-oss
> alias sound-service-0-3 snd-pcm-oss
> alias sound-service-0-8 snd-seq-oss
> alias sound-service-0-12 snd-pcm-oss
> alias snd-card-000 snd-powermac
> alias snd-slot-0 snd-card-0
> alias sound-slot-0 snd-slot-0

This is taken care of for me automatically when I put the following into 
/etc/alsa/modutils/0.9, then ran dpkg-reconfigure alsa-base:


> [/etc/modutils/sound]
> pre-install snd-powermac modprobe dmasound_pmac ; rmmod dmasound_pmac
> dmasound_core
> post-remove dmasound_pmac rmmod dmasound_pcore
> post-install snd-powermac rmmod i2c-keywest && modprobe i2c-keywest

I don't have this at all. It is wierd that you have to modprobe dmasound_pmac, 
then immediately rmmod it. I actually specifically commented out the 
dmasound_pmac line from /etc/modules.

> [/etc/power/pwrctl-local]
> case "$1" in
> minimum)
>         $logger -p daemon.info -t pwrctl-local "minimum power $2"
> ;;
> medium)
>         $logger -p daemon.info -t pwrctl-local "medium power $2"
> ;;
> maximum)
>         $logger -p daemon.info -t pwrctl-local "maximum power $2"
>         $logger -p daemon.info -t pwrctl-local "skipping pwrctl-main"
>         exit 1
> ;;
> warning)
>         /usr/bin/wall "Low battery, system going down any minute now"
> ;;
> lid-closed)
>         $logger -p daemon.info -t pwrctl-local "lid-closed $2"
>         /etc/init.d/alsa force-stop
> ;;
> lid-opened)
>         $logger -p daemon.info -t pwrctl-local "lid-opened $2"
>         /etc/init.d/alsa start
>         sh /i2c.sh
> ;;
> sleep)
>         $logger -p daemon.info -t pwrctl-local "sleep $2"
>         /etc/init.d/alsa force-stop
> ;;
> wakeup)
>         $logger -p daemon.info -t pwrctl-local "sleep $2"
>         /etc/init.d/pbbuttonsd restart
>         /etc/init.d/alsa start
>         sh /i2c.sh
> ;;
> *)
>         $logger -p daemon.error -t pwrctl-local "invalid arg $1 $2"
>         exit 2
> ;;
> esac
> exit 0
> [/i2c.sh]
> #!/bin/bash
> rmmod i2c-keywest && modprobe i2c-keywest

I got my version of powerctl-local from this list (Michael Dänzer, I beileve). 
Instead of specifically running alsa stuff, it runs all the apm power 
management scripts. So you get all the stuff that's coded for apm (like that 
wierd /i2c.sh; normally you don't put stuff into / unless you need to). 
There's lines like "run-parts --arg=suspend --arg=power /etc/apm/event.d" 
where you have your ALSA stuff. I've attached it here.

> Now, I figure that some of this hacking may not have been needed - ugly
> kludging abounds. I suspect some of the cluey-er folks on the list may be
> able to refine or refute these additions on various grounds. However, it
> works. Not only that, it goes to sleep and wakes up without a problem,
> only breaking xmms (my testbench, hehe) if put to sleep while playing,
> which rates as a minor inconvenience.

For me, xmms gracefully stops when I shut the lid, then restarts when I 
reopen. No inconvenience. :) I did have to specify 'stop-procs' when 
dpkg-reconfiguring alsa-base.

> Configuring xmms for ALSA itself was a little tricky. Initially, with a
> buffer time of 500ms and a period time of 50ms, playback was too fast, and
> very glitchy. I have achieved stabilisation at 800ms and 60ms, although
> there are some minor playback glitches which i can only describe as
> high-pitched clicks. It is entirely possible that these are artifacts from
> the mp3 or ogg compression as they are present in both file formats. No
> .wavs or other formats tested yet.
> Hope this helps someone else out.

Actually, this last paragraph really did. I was having the same problem here 
(with the speed). By increasing the period, the speed went (close) to normal. 
But I get the same "clicks" that you do (with waves, too). Running with the 
OSS emulation, it sounds fine.

So, I tried to increase the period. At 100ms, the sound is perfect. The size 
of the buffer doesn't really matter (though I can't keep it configured below 
200ms -- it keeps getting reset to 200). What really odd is that at 80 and 
90ms, the audio will skip. It gets hung up at one place and repeats a very 
short section.

I wonder if this is the ALSA drivers or XMMS. For mp3 playing, I've only tried 
it with xmms.

What's your sound chip, BTW? I have an original iBook using the powermac DACA 


Attachment: pwrctl-local
Description: application/shellscript

Reply to: