Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pbbuttonsd sound & eject problems with ALSA and 2.6.7 ke
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Sat Jul 03, 2004 1:22 am    Post subject: Pbbuttonsd sound & eject problems with ALSA and 2.6.7 ke Reply with quote

Hello.

I'm using an Ibook 1Ghz with the 2.6.7-gentoo-development kernel. Currently ppbuttonsd isn't correctly using the F3-F5 keys for sound modification. The eject button also doesn't work correctly. I'm using the canned configuration file from the PPC config database. Here's the relevent section:
Code:

# [MODULE OSSMIXER]
dev_mixer               = "/dev/mixer"
volume          = 50       ; initial volume level
speakers_muted  = no       ; mute after startup?
volumeupkey             = 63
volumedownkey   = 62
mutekey         = 61
mixerinitdelay          = no


I compiled the device drivers recommended in the 'Installing Gentoo on a 1Ghz Powerbook" post. I've tested sound and it seems to work except that I can't use alsamixer or the volume bar in xmms to adjust volume or balance. I used showkey -k and it seems the configuration file is mapping the correct keys. I think that this is either a kernel mis-configuation problem or a permission issue with /dev/mixer (see output below).

Code:

bash-2.05b$ ls -la /dev/mixer
lr-xr-xr-x  1 root root 11 Jul  2 09:03 /dev/mixer -> sound/mixer
bash-2.05b$ ls -la /dev/sound/mixer
crw-------  1 loki audio 14, 0 Dec 31  1969 /dev/sound/mixer
bash-2.05b$


Does anyone know if the sound modules for alsa are different for the IBook? Are my permissions for /dev/mixer correct (They look okay to me). I also might add that eject button doesn't work either.

Code:

# [MODULE CDROM]
dev_cdrom               = "/dev/sr0"
ejectcdkey              = 88
ejectcddelay            = no


/dev/sr0 doesn't exist. Should I change that line to read /dev/cdrom to /dev/hdc? Is /dev/sr0 for scsi-emulation for cd-burning? Any input?

Thank you.


Last edited by woolsherpahat on Sat Jul 03, 2004 7:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
Immortal Q
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 241
Location: Silicone Valley

PostPosted: Sat Jul 03, 2004 1:38 am    Post subject: Reply with quote

On my powerbook, I needed a different keycode for eject, at least. I used the keycodes from the Aluminum PB installation sticky (PPC forum - look up). I'm not sure of the keyboards differences betweeen the PBs and the iBooks, so I'm not really sure what advice to offer.
_________________
Osmos.org
Now with 20% fewer rabid primates.
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Sat Jul 03, 2004 1:49 am    Post subject: Reply with quote

Okay, things are getting weird. Apparently pbbuttonsd wasn't actually starting. Doing and /etc/init.d/pbbuttonsd start returned okay status but then it crashed in the background because of the error about /dev/sr0 not exisitng. However Fn + F1/F2 would dim or brighten the LCD! Even without pbbuttonsd! Must be controled by the kernel.

With the section about eject commented out ppbuttonsd starts and runs but I can no longer dim the LCD!

AHH!
Back to top
View user's profile Send private message
Immortal Q
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 241
Location: Silicone Valley

PostPosted: Sat Jul 03, 2004 2:58 am    Post subject: Reply with quote

Hmmm - do you have all the i2c-related stuff, as well - as the "Mac device drivers" stuff enabled in your kernel?
_________________
Osmos.org
Now with 20% fewer rabid primates.
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Sat Jul 03, 2004 9:23 am    Post subject: Reply with quote

My configuration for my kernel of the Mac hardware driver section and the i2c section look pretty good compared to other people's kernel configs. I still think it's ALSA problem.

Code:

Audio jack unplugged, enabling speakers.
AE-Init snapper mixer
PowerMac Snapper  DMA sound driver rev 016 installed
Core driver edition 01.06 : PowerMac Built-in Sound driver edition 00.07
Write will use    4 fragments of   32768 bytes as default
Read  will use    4 fragments of   32768 bytes as default
Advanced Linux Sound Architecture Driver Version 1.0.4 (Mon May 17 14:31:44 2004
 UTC).
specify port
pmac: can't request resource 0!
usbcore: registered new driver snd-usb-audio
ALSA device list:
  No soundcards found.


It looks like ALSA isn't configured correctly?
Back to top
View user's profile Send private message
Immortal Q
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 241
Location: Silicone Valley

PostPosted: Sat Jul 03, 2004 8:19 pm    Post subject: Reply with quote

What does your /etc/modules.d/alsa look like?
_________________
Osmos.org
Now with 20% fewer rabid primates.
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Sun Jul 04, 2004 3:25 am    Post subject: Reply with quote

My sound configuration is exactly the same as this one: http://www.desertsol.com/~kevin/ppc/ except that ALSA support is all compiled into my kernel instead of modules.
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Mon Jul 05, 2004 1:27 am    Post subject: Reply with quote

I changed to a different configuration file and I get this error when I start pbbuttons.conf:

Code:

Jul  4 09:27:48 [pbbuttonsd] ERROR: The mixer device [/dev/mixer] didn't work as expected._


Okay, so the problem is definently with ALSA. I might try re-compiling my ALSA support as modules and see if that makes a difference. Other than that I can't think of what's wrong.
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Mon Jul 05, 2004 1:47 am    Post subject: Reply with quote

Well the result of compiling ALSA support as modules is that it breaks sound support. pbbuttonsd still doesn't work.
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Mon Jul 05, 2004 4:34 am    Post subject: Reply with quote

Alright this is definetly an ALSA problem, mainly because ALSA isn't working! If I use xmms on the OSS setting I get sound if I try to use ALSA it doesn't work! My kernel configuration is exactly the same a numerious other's! Does anyone have any ideas?

Here's my kernel .config:
Code:


# Sound
#
CONFIG_SOUND=y
CONFIG_DMASOUND_PMAC=y
CONFIG_DMASOUND=y

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_SEQ_DUMMY=y
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

CONFIG_SND_POWERMAC=y


Last edited by woolsherpahat on Tue Jul 06, 2004 1:21 am; edited 1 time in total
Back to top
View user's profile Send private message
Immortal Q
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 241
Location: Silicone Valley

PostPosted: Mon Jul 05, 2004 4:44 am    Post subject: Reply with quote

Unless I'm mistaken, the OSS device will still run through ALSA, via an emulation layer, unless you specifically enable the OSS system, which is marked pretty clearly as deprecated. Which would seem to indicate that, at least on some level, ALSA is working. I've sort of run out of ideas, though - if you look through some other threads you'll see that I'm having some screwy sound issues of my own (alsa mixers being ignored, sound coming out of side jack at full volume, etc).
_________________
Osmos.org
Now with 20% fewer rabid primates.
Back to top
View user's profile Send private message
ruben
Guru
Guru


Joined: 04 Jul 2003
Posts: 462

PostPosted: Mon Jul 05, 2004 12:25 pm    Post subject: Reply with quote

10k1 wrote:
Alright this is definetly an ALSA problem, mainly because ALSA isn't working! If I use xmms on the OSS setting I get sound if I try to use ALSA it doesn't work! My kernel configuration is exactly the same a numerious other's! Does anyone have any ideas?

Here's my kernel .config:
Code:
# Sound
#
CONFIG_SOUND=y
CONFIG_DMASOUND_PMAC=y
CONFIG_DMASOUND=y

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_SEQ_DUMMY=y
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

CONFIG_SND_POWERMAC=y


I had the same problem... you have an OSS driver configured, your system is not using ALSA! You need to disable: "CONFIG_DMASOUND_PMAC=y". I believe it is right under sound support. (i think they somehow put the OSS driver in the wrong place, i think that option should be moved to under OSS support)

Here is my kernel config (with oss emulation):
Code:
#
# Sound
#
CONFIG_SOUND=y
# CONFIG_DMASOUND_PMAC is not set

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
# CONFIG_SND_SEQUENCER is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

# blablabla... all not set

#
# ALSA PowerMac devices
#
CONFIG_SND_POWERMAC=y
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Tue Jul 06, 2004 4:10 am    Post subject: Reply with quote

First off, thanks to everyone for the help.

Secondly, Ruben, what kind of kernel are you using? I get a kernel oops when I don't compile the OSS driver. Maybe this is a bug in 2.6.7?
Back to top
View user's profile Send private message
Immortal Q
Apprentice
Apprentice


Joined: 14 Sep 2003
Posts: 241
Location: Silicone Valley

PostPosted: Tue Jul 06, 2004 6:12 am    Post subject: Reply with quote

ruben wrote:
I had the same problem... you have an OSS driver configured, your system is not using ALSA! You need to disable: "CONFIG_DMASOUND_PMAC=y". I believe it is right under sound support. (i think they somehow put the OSS driver in the wrong place, i think that option should be moved to under OSS support)


Hmmm - if that's correct, then building these as modules would be a good way to check - don't record them in modules/autoload.d.kernel-2.6, just insert them after a reboot to check if that's what causes the problem. I don't think that's it - I think DMASOUND_PMAC is a driver for a different set of mac sound cards, but I'm not sure. And my sound's still b0rked, so who am I to talk. :roll:
_________________
Osmos.org
Now with 20% fewer rabid primates.
Back to top
View user's profile Send private message
ruben
Guru
Guru


Joined: 04 Jul 2003
Posts: 462

PostPosted: Tue Jul 06, 2004 7:28 am    Post subject: Reply with quote

10k1,
Weird that you get a kernel oops. My kernel is 2.6.7-r6 (gentoo-dev-sources), i recently switched from 2.4 to 2.6. I put the full config online here. Maybe it has to do with a combination of options ? I've needed to do a couple of re-configurations before i finally got a good kernel, but i never got a kernel who gave me oops though.

Immortal Q,
I came to the conclusion that this must be the OSS sound driver, since in 2.4 the config option had the same name, and in 'dmesg' it seemed that this driver claimed the sound hardware with as a result that the ALSA driver couldn't find any devices. And i was effectively only using OSS.

I re-read your first post... now i see that you have an iBook G4 (right?), while mine is a dual USB iBook G3 800Mhz. Maybe it has something to do with that?
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Wed Jul 07, 2004 4:52 am    Post subject: Reply with quote

Whew.

I upgraded from the 2.6.7 kernel to the 2.6.7-r6 kernel and got the same kernel oops. My ALSA config is exactly the same as yours. I then shameless ripped off your .config to see if I could get a booting kernel. No go. I'll see if I can capture the dmesg output and post it here tomorrow.

Has anyone been able to get ALSA to work correctly on the G4 IBook?
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Thu Jul 08, 2004 1:58 am    Post subject: Reply with quote

Naturally after the kernel oops it doesn't save the output to dmesg. Does anyone have any idea how to capture the kernel output while falls and dies during ALSA driver loading?

I assuming this is bug since no else seems to have gotten ALSA working on a G4 IBook.
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Thu Jul 08, 2004 7:09 pm    Post subject: Reply with quote

I've been using a modified version of ruben's kernel config with no luck. When I boot I get an "Unable to mount root device "hda6" or unknown block(0,0)". I have reiserfs support compiled into the kernel. Is this a yaboot configuration error?

Code:

image=/boot/kernel-2.6.7
        label=Linux
        root=/dev/hda6
        sysmap=/boot/System.map-2.6.7
        read-only

image=/boot/kernel-2.6.7-r6
        label=Linux-New
        root=/dev/hda6
        sysmap=/boot/System.map-2.6.7-r6
        read-only
Back to top
View user's profile Send private message
jonson
n00b
n00b


Joined: 29 Dec 2003
Posts: 14
Location: vancouver

PostPosted: Sun Jul 18, 2004 6:10 am    Post subject: Reply with quote

I was getting a kernel oops on my ibook too, when trying to compile alsa into the kernel... i fixed it by making sure that i had the right i2c stuff also compiled in (not module)

<*> Powermac Keywest I2C Interface

im using a ibook 500mhz, so not sure if that's what's going on with your G4's[/code]
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Sun Jul 18, 2004 7:21 am    Post subject: Reply with quote

That seems to be the going thought process right now. I think this is a G4 only problem.
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Sun Jul 18, 2004 7:44 am    Post subject: Reply with quote

Sweet! I got ALSA working! I upgraded to 2.6.7-r11 and added the i2c support you mentioned as compiled in option and it works.

Thank you. I am stoaked. 8)

iBook G4's do have ALSA support after all.
Back to top
View user's profile Send private message
ruben
Guru
Guru


Joined: 04 Jul 2003
Posts: 462

PostPosted: Sun Jul 18, 2004 9:21 pm    Post subject: Reply with quote

Glad that you finally got ALSA working :)
I just checked and it seems i also have that i2c support activated and compiled in the kernel.

Just out of curiosity... why did you get the "unable to mount root device"? and how did you solve it ?
Back to top
View user's profile Send private message
woolsherpahat
Guru
Guru


Joined: 09 Mar 2004
Posts: 347

PostPosted: Mon Jul 19, 2004 2:09 am    Post subject: Reply with quote

You know I have no idea. I was just using your .config without any modification. At first I thought it was a filesystem support issue but that wasn't it. Maybe different chipset drivers? I have no idea.

Regardless I "fixed" it by starting with my old working .config and matched the parts relating to i2c an ALSA towards yours and now it works!

8)

I'm still happy about that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum