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

ALSA Problem solved! (Was Re: ALSA problem)



Hi guys

Eventually, I figured it out (with a whole lotta help from google - and
y'all!)

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

[/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

[/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

[end]

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.

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.

Chris





Reply to: