Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to change volume using alsamixer on a Mac Mini
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
lifeless
n00b
n00b


Joined: 31 Aug 2004
Posts: 43

PostPosted: Fri Mar 24, 2006 10:53 am    Post subject: Unable to change volume using alsamixer on a Mac Mini Reply with quote

I've got a console-based Gentoo installation working OK on a Mac Mini (waiting for modular X to hit ~ppc before going there) - apart from changing the volume.

Playing an MP3 file with mp3blaster works OK, but the default volume is intolerably high. Running alsamixer is practically useless, since it only allows me to change the "beep" volume. For comparison's sake, I booted into Ubuntu's 5.10 PPC livecd. In there, alsamixer has a PCM volume control not present in Gentoo, and setting the volume works perfectly. I tried to look for differences in configuration, but I couldn't find out what it is that creates the PCM entry. Some tips around the forums have suggested using ~/.asoundrc, but the Ubuntu setup worked without one (and aplay -L there said nothing about 'softvol', which is sometimes referred to in various tips).

As for the Gentoo setup, I'm running gentoo-sources 2.6.15-r1, with ALSA as a module. I've configured /etc/modules.d/alsa as follows (taken from this wiki page):

Code:
(snip)
alias snd-card-0 snd-powermac
alias sound-slot-0 snd-card-0
(snip)


... and I've ran modules-update afterwards. The version of alsa-utils I'm running is 1.0.10.

All help greatly appreciated.

EDIT: for completeness' sake, here are a couple of /etc/asound.conf (or ~/.asoundrc) setups I've tried:

http://lkml.org/lkml/2005/3/29/129
http://lists.debian.org/debian-powerpc/2005/09/msg00387.html

Interestingly, running "alsamixer -D softvol" after either of these setups produces the following error message:

Code:
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL softvol

alsamixer: function snd_ctl_open failed for softvol: No such file or directory


Something stinks.
Back to top
View user's profile Send private message
lifeless
n00b
n00b


Joined: 31 Aug 2004
Posts: 43

PostPosted: Fri Mar 24, 2006 11:50 am    Post subject: Reply with quote

Some more debugging info... this is the result of running the aadebug script, provided by the nice folks at alsaopensrc.org:

Code:
Kernel ----------------------------------------------------
Linux LifelessMacMini 2.6.15-gentoo-r1 #2 Fri Mar 24 12:24:32 EET 2006 ppc 7447A, altivec supported PowerMac10,2 GNU/Linux

Loaded Modules --------------------------------------------
snd_seq                61976  0
snd_seq_device         10124  1 snd_seq
snd_pcm_oss            62784  0
snd_mixer_oss          21472  1 snd_pcm_oss
snd_powermac           49184  0
snd_pcm               103044  2 snd_pcm_oss,snd_powermac
snd_timer              27460  2 snd_seq,snd_pcm
snd                    67604  7 snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_powermac,snd_pcm,snd_timer
snd_page_alloc         11720  1 snd_pcm

Proc Config -----------------------------------------------
CONFIG_SOUND=y
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_SEQUENCER=m
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
# CONFIG_SND_SEQUENCER_OSS is not set
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
CONFIG_SND_GENERIC_DRIVER=y
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_VIRMIDI is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_HDA_INTEL is not set
CONFIG_SND_POWERMAC=m
# CONFIG_SND_POWERMAC_AUTO_DRC is not set
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_USX2Y is not set
# CONFIG_SOUND_PRIME is not set

Modprobe Conf ---------------------------------------------
alias char-major-10-116 snd
alias char-major-14-* soundcore
alias char-major-116-* snd
alias snd-card-0 snd-powermac
alias sound-slot-0 snd-powermac
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 /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
options snd cards_limit=1

Proc Asound -----------------------------------------------
Advanced Linux Sound Architecture Driver Version 1.0.10rc3 (Mon Nov 07 13:30:21                2005 UTC).
0 [Toonie         ]: PMac Toonie - PowerMac Toonie
                     PowerMac Toonie
 16: [0- 0]: digital audio playback
 24: [0- 0]: digital audio capture
  0: [0- 0]: ctl
  1:       : sequencer
 33:       : timer
cat: /proc/asound/hwdep: No such file or directory
00-00: PMac Toonie : PowerMac Toonie : playback 1 : capture 1
Client info
  cur  clients : 1
  peak clients : 1
  max  clients : 192

Client   0 : "System" [Kernel]
  Port   0 : "Timer" (Rwe-)
  Port   1 : "Announce" (R-e-)

Dev Snd ---------------------------------------------------
controlC0  pcmC0D0c  pcmC0D0p  seq  timer

CPU -------------------------------------------------------

RAM -------------------------------------------------------
MemTotal:      1031492 kB
SwapTotal:      524280 kB

Hardware --------------------------------------------------
00:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 AGP
0001:10:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 PCI
0002:20:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 Internal PCI
Back to top
View user's profile Send private message
SnEptUne
l33t
l33t


Joined: 23 Aug 2004
Posts: 656

PostPosted: Fri Mar 24, 2006 10:14 pm    Post subject: Reply with quote

What is the output of amixer?

Can you set the volume with the following?
Code:

amixer set Master 50 unmute
amixer set PCM 68 unmute

_________________
"There will be more joy in heaven over the tear-bathed face of a repentant sinner than over the white robes of a hundred just men." (LM, 114)
Back to top
View user's profile Send private message
micmac
l33t
l33t


Joined: 28 Nov 2003
Posts: 996

PostPosted: Fri Mar 24, 2006 10:21 pm    Post subject: Reply with quote

You can put this in ~/.asoundrc:

Code:

pcm.softvol {
        type softvol
        slave {
           pcm "plughw:0,0"
           }
        control {
           name PCM
           card 0
           }
}


Edit: Restart your app, point it to softvol and you should be fine. The Mac Mini onoard sound doesn't provide volume control so ALSA has to do it in software. Ubuntu probably set softvol up automatically. You can check on the Ubuntu box with 'aplay -L| grep softvol'.

mic
Back to top
View user's profile Send private message
lifeless
n00b
n00b


Joined: 31 Aug 2004
Posts: 43

PostPosted: Fri Mar 24, 2006 11:11 pm    Post subject: Reply with quote

Quote:
What is the output of amixer?


Code:
Simple mixer control 'Headphone',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Headphone Detection',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'PC Speaker',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Auto Mute',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Beep',0
  Capabilities: pvolume pvolume-joined
  Playback channels: Mono
  Limits: Playback 0 - 100
  Mono: Playback 4 [4%]


Nothing there. amixer -D softvol returns the same error message that alsamixer did (see original post).
Quote:

Can you set the volume with the following?
Code:

amixer set Master 50 unmute
amixer set PCM 68 unmute


No, the error message returned is:

Code:
amixer: Unable to find simple control 'Master',0


...and the same message for 'PCM'.
Back to top
View user's profile Send private message
lifeless
n00b
n00b


Joined: 31 Aug 2004
Posts: 43

PostPosted: Fri Mar 24, 2006 11:24 pm    Post subject: Reply with quote

micmac wrote:
You can put this in ~/.asoundrc:


Unfortunately, that didn't work. The PCM control didn't appear.

Quote:
Edit: Restart your app, point it to softvol and you should be fine. The Mac Mini onoard sound doesn't provide volume control so ALSA has to do it in software. Ubuntu probably set
softvol up automatically. You can check on the Ubuntu box with 'aplay -L| grep softvol'.


How do I "point" an app to softvol? I'm working inside the console currently, without X. Not that I'd be that far yet :-).

As I mentioned in the original post, aplay -L didn't mention softvol inside Ubuntu (I eyeballed it through instead of grepping, but I'm pretty sure of its absence since it was what I was looking for). It booted into Gnome there, though, I don't know if that makes a difference.

But thinking about the amixer/alsamixer error message with the -D softvol parameter that I mentioned earlier... it just shouldn't happen according to any instructions I've seen. Can the
softvol ALSA plugin simply be missing? That would explain why none of the softvol config attempts seem to have any effect. I'm using the bundled ALSA drivers of 2.6.15-r1, and I don't think I missed any compile options. Strange :-|.

I truly don't know where to go from here.
Back to top
View user's profile Send private message
micmac
l33t
l33t


Joined: 28 Nov 2003
Posts: 996

PostPosted: Fri Mar 24, 2006 11:40 pm    Post subject: Reply with quote

I think softvol is included in alsalib since 1.0.10 or even 1.0.9 so you should have it.

Try 'mplayer -ao alsa:device=softvol some.mp3'. If there's something wrong with your asoundrc alsalib should throw an error.

mic
Back to top
View user's profile Send private message
lifeless
n00b
n00b


Joined: 31 Aug 2004
Posts: 43

PostPosted: Mon Apr 03, 2006 5:39 pm    Post subject: Reply with quote

According to the comments here, the default behaviour of the PMac Toonie device present in the Mac Mini is to use softvol, starting from ALSA 1.0.9. I've got version 1.0.11_rc4 of alsa_utils and the in-kernel version of the driver itself that's included in 2.6.16.

If the softvol defaulting is indeed true, why isn't the PCM volume control slider visible in alsamixer? Am I missing an option here? -D softvol shouldn't be necessary if it's already the default, and it does return an error message after all.
Back to top
View user's profile Send private message
SnEptUne
l33t
l33t


Joined: 23 Aug 2004
Posts: 656

PostPosted: Tue Apr 04, 2006 2:33 am    Post subject: Reply with quote

It seems like driver problem no matter how I look at it. If soft_vol is the default control, there should be a soft_vol control in alsamixer. Have you tried another alsa driver?
_________________
"There will be more joy in heaven over the tear-bathed face of a repentant sinner than over the white robes of a hundred just men." (LM, 114)
Back to top
View user's profile Send private message
lifeless
n00b
n00b


Joined: 31 Aug 2004
Posts: 43

PostPosted: Tue Apr 04, 2006 6:48 pm    Post subject: Reply with quote

Toonie is the correct driver. Just burnt and booted Ubuntu Dapper Drake Flight 6 PPC livecd, the PCM control is present and accounted for, working fine. Damn my inadequate linux fu for not being able to comprehend what it is that I'm missing :-(.

I guess I'll try copying every alsa-related config file to Gentoo and improvising from there. Probably won't work, though - the configs seem to rely on variables like $CARD (edit: possibly in an init script, it seems, but this didn't clarify much) etc. of which I have no idea where they're set, and @func declarations which I simply don't understand.

Looks like Ubuntu's default setup doesn't have the sequencer module active while mine does, I guess I'll try and disable that in my kernel.

Softvol is referenced in a file called PMacToonie.conf, which looks to be dynamically included somewhere in the process. It looks like this:

Code:
<confdir:pcm/front.conf>

PMacToonie.pcm.front.0 {
        @args [ CARD ]
        @args.CARD {
                type string
        }
        type softvol
        slave.pcm {
                type hw
                card $CARD
                device 0
        }
        control {
                name "PCM Playback Volume"
                card $CARD
        }
}

# default with dmix+softvol & dsnoop
PMacToonie.pcm.default {
        @args [ CARD ]
        @args.CARD {
                type string
        }
        type asym
        playback.pcm {
                type plug
                slave.pcm {
                        type softvol
                        slave.pcm {
                                @func concat
                                strings [ "dmix:CARD=" $CARD ",FORMAT=S16" ]
                        }
                        control {
                                name "PCM Playback Volume"
                                card $CARD
                        }
                }
        }
        capture.pcm {
                type plug
                slave.pcm {
                        @func concat
                        strings [ "dsnoop:CARD=" $CARD ",FORMAT=S16" ]
                }
        }


I'll build from that, though I doubt the success. Could some kind soul with a Mac Mini and a working volume control please post his asound.conf, ~/.asoundrc, the output of aplay -L, the output of the previously mentioned aadebug script, or anything of the sort? I'm tired of blindly fumbling around randomly trying things, a copy-paste solution would really hit the spot right about now.
Back to top
View user's profile Send private message
SnEptUne
l33t
l33t


Joined: 23 Aug 2004
Posts: 656

PostPosted: Tue Apr 04, 2006 10:18 pm    Post subject: Reply with quote

Are you using the same kernel as Ubuntu Dapper? Are you using the same version of ALSA driver? If they are the same, then I guess you can try to use the configuration file. However, I don't think the asound configuration files determine what controls shows up on the mixer.
_________________
"There will be more joy in heaven over the tear-bathed face of a repentant sinner than over the white robes of a hundred just men." (LM, 114)
Back to top
View user's profile Send private message
projectle
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jan 2005
Posts: 90

PostPosted: Sun May 14, 2006 4:48 am    Post subject: Reply with quote

Same issue, however I would recommend reposting or having this moved over to the PPC forum. JoseX is very helpful and is using a Powerbook with the same Toonie soundcard. If anyone can solve this, he can.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia 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