Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mac Mini with sound
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
shelljunkie
n00b
n00b


Joined: 18 Feb 2005
Posts: 2

PostPosted: Fri Feb 18, 2005 8:20 pm    Post subject: Mac Mini with sound Reply with quote

as i write this i listen to some mp3s on my mac mini.

just found this information:
http://www.ubuntuforums.org/showthread.php?t=12748

some folks at yellowdog linux found out a way to get sound out of the little box. the mixer is not working but i think this will be fixed soon.

i use kernel 2.6.10 and changed the following code:

in the kernel source file "linux-2.6.10/sound/ppc/pmac.c" at line 961 are the lines
Code:

        if (device_is_compatible(sound, "AOAKeylargo")) {
                /* Seems to support the stock AWACS frequencies, but has
                   a snapper mixer */
                chip->model = PMAC_SNAPPER;
                // chip->can_byte_swap = 0; /* FIXME: check this */
                chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */
        }

i changed them to:
Code:

        if (device_is_compatible(sound, "AOAKeylargo")) {
                /* Seems to support the stock AWACS frequencies, but has
                   a snapper mixer */
                //chip->model = PMAC_SNAPPER;                                               COMMENT OUT THIS LINE
                // chip->can_byte_swap = 0; /* FIXME: check this */
                chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */
        }


compile the modules and install them.

my kernel config:
http://shelljunkie.com/macmini_kernel-2.6.10.config

if somebody knows how to get xorg or the framebuffer to work with a resolution of 1600x1200. please let me know. xorg does not work at all and the framebuffer shows only noise and flicker.
i have no problem at 1280x1024.


have fun.
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Sat Feb 19, 2005 6:11 pm    Post subject: Reply with quote

Interesting. Any stuttering in the sound, weird tics/squeals or short system freezes?

chip->model = PMAC_SNAPPER (=default): no sound at all
chip->model = PMAC_SCREAMER: sound works, but laggy and freezes system for short periods (2 sec freezes)
chip->model = PMAC_AWACS: sound works, but jittery until I read this. But I've had some weird compiler errors while playing music. And some funny tics in the music, so I'd say AWACS is not the magic bullet.
Haven't tried commenting out the line entirely yet.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
morfic
Retired Dev
Retired Dev


Joined: 28 Jul 2004
Posts: 31

PostPosted: Sun Feb 20, 2005 9:07 am    Post subject: Reply with quote

thanks shelljunkie, just got this link from JoseJX to this, and seems to work fine here, i will have to hook up better speakers tomorrow though

if there are problems with this i could easily miss it with these speakers

in anyway this is a step forward

thanks
Back to top
View user's profile Send private message
morfic
Retired Dev
Retired Dev


Joined: 28 Jul 2004
Posts: 31

PostPosted: Sun Feb 20, 2005 3:44 pm    Post subject: Reply with quote

Very choppy sound, but sound at least
at least we have something to tinker with now

actually it sounds like audio is played ontop of something that loops and causes an opveral choppy appearance
you cant notice it as much on loud parts as mich and it would go under as tiny tics, on quieter passages it is easier to recognize as an underlying endless loop
Back to top
View user's profile Send private message
morfic
Retired Dev
Retired Dev


Joined: 28 Jul 2004
Posts: 31

PostPosted: Sun Feb 20, 2005 4:06 pm    Post subject: Reply with quote

master.dmixer {
type dmix
ipc_key 1024
slave {
master "hw:0,0"
period_time 100
period_size 1024
buffer_size 8192
periods 128
rate 44100
}
bindings {
0 0
1 1
}
}




put this in .asounrc, i found a thread thanks to nixnut where 100ms period time in xmms does gie me clear sound
mplayer doesnt have that setting, this .asoundrc did give me clear sound in mplayer too

let me know if this helps anyone else
Back to top
View user's profile Send private message
morfic
Retired Dev
Retired Dev


Joined: 28 Jul 2004
Posts: 31

PostPosted: Thu Feb 24, 2005 1:32 am    Post subject: Reply with quote

no false alarm, whatever caused it to play fine is not related to that .asoundrc, but switching from alsa output to oss output plugin in mplayer changes things, sounds almost fine, just some slight metallic sound on certain frequencies, , since this is only alsa's oss, keeps me wondering, at least no choppy loop under sound anymore :)
Back to top
View user's profile Send private message
Achille
n00b
n00b


Joined: 04 Jan 2005
Posts: 74

PostPosted: Fri Mar 04, 2005 8:25 pm    Post subject: Reply with quote

Can you explain all the procedure to get sound with Mac Mini, since I can't get it. I followed the howto for alsa in the doc, but the compilation of alsa-driver failed.

So it would be very nice to write a howto, step by step. Thank you.
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Sat Mar 05, 2005 11:02 am    Post subject: Reply with quote

Step 1: emerge kernel 2.6.10:
#emerge gentoo-sources
#rm /usr/src/linux
#ln -sf /usr/src/linux-2.6.10-gentoo-r6 /usr/src/linux
#cd /usr/src/linux

Step 2: edit the kernel sources:
#nano -w /usr/src/linux/sound/ppc/pmac.c
In the kernel source file "linux-2.6.10/sound/ppc/pmac.c" at line 961 are the lines
Code:
        if (device_is_compatible(sound, "AOAKeylargo")) {
                /* Seems to support the stock AWACS frequencies, but has
                   a snapper mixer */
                chip->model = PMAC_SNAPPER;
                // chip->can_byte_swap = 0; /* FIXME: check this */
                chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */
        }

Change them to:
Code:
        if (device_is_compatible(sound, "AOAKeylargo")) {
                /* Seems to support the stock AWACS frequencies, but has
                   a snapper mixer */
                //chip->model = PMAC_SNAPPER;                                               COMMENT OUT THIS LINE
                // chip->can_byte_swap = 0; /* FIXME: check this */
                chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */
        }

Step 3: configure the kernel:
#make menuconfig
Select the settings for sound as shown below (some of those may actually be unnecessay, works for me though :wink: )
Code:

Device Drivers  ---> 
    Sound  --->
        <*> Sound card support                                 
        <M>   PowerMac DMA sound support
                 Advanced Linux Sound Architecture  --->
                     <M> Advanced Linux Sound Architecture
                     <M> Sequencer support
                     < >   Sequencer dummy client
                     <M> OSS Mixer API               
                     <M> OSS PCM (digital audio) API
                      [*] OSS Sequencer API             
                          ALSA PowerMac devices  --->
                              <M> PowerMac (AWACS, DACA, Burgundy, Tumbler, Keywest)   

Step 4: build the kernel:
#make
#make install_modules
#cp vmlinux /boot/kernel-2.6.10-r6-new
#cp System.map /boot/System.map

Step 5: add the new kernel to the bootloader:
#nano -w /etc/yaboot.conf
Add
Code:
image=/boot/kernel-2.6.10-r6-new
        label=gentoo-2.6.10-r6-new
        root=/dev/hda5
        read-only

*Note: change "root=/dev/hda5" to reflect your situation. My root partition happens to be on /dev/hda5, yours could well be on another partition.

Write the new boot configuration to the boot partition
#ybin -v

Step 6: update config files to auto-load the sound module after booting:
#nano -w /etc/modules.autoload.d/kernel-2.6
Add "snd-powermac"

Update the module loading config file
#modules-update

Step 7: reboot:
#/sbin/shutdown -r now

Step 8: xmms:
Emerge xmms
#emerge xmms

Configure xmms
#/usr/bin/xmms
Open the preferences dialog (ctrl+p)
The ALSA output plugin should be selected already
Click on the "Configure" button
Click on the tab "Advanced settings"
Change the value for "Period time (ms)" from 50 to 100
Click "Ok" to save this setting
Click "Ok" to close the preferences dialog

Step 9: play music:
Open a music file with xmms and play it.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Achille
n00b
n00b


Joined: 04 Jan 2005
Posts: 74

PostPosted: Sat Mar 05, 2005 1:09 pm    Post subject: Reply with quote

Thank you very much for your very detailed explanations.

Unfortunately, it still doesn't work. But there is some progress, since now I can increase the volume under Gnome (before it always came back to 0). However, there is still no sound.

Any other clue? Should I unmerge alsa-utils or disable alsa in USE option?
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Sat Mar 05, 2005 2:56 pm    Post subject: Reply with quote

I do have alsa in my use flags, but I don't have alsa-utils installed. Sounds just seems to work at a nice volume.
I don't use gnome, so I don't know if that could be a cause of your sound problems. You could try emerging a command line music player and test from the command line.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Achille
n00b
n00b


Joined: 04 Jan 2005
Posts: 74

PostPosted: Sat Mar 05, 2005 3:47 pm    Post subject: Reply with quote

I have unmerged alsa-utils and there is still no sound.

What do you have in /dev/sound? For me, the result of ls /dev/sound is just
mixer. Should I have something like dsp too?
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Sat Mar 05, 2005 4:41 pm    Post subject: Reply with quote

Ah, now that you mention it, I did add something to a udev config file.
Specifically, I added the lines below to /etc/udev/permissions.d/50-udev.permissions
Code:
KERNEL="controlC[0-9]*", NAME="snd/%k", GROUP="audio"
KERNEL="hw[CD0-9]*", NAME="snd/%k", GROUP="audio"
KERNEL="pcm[CD0-9cp]*", NAME="snd/%k", GROUP="audio"
KERNEL="midiC[D0-9]*", NAME="snd/%k", GROUP="audio"
KERNEL="timer", NAME="snd/%k", GROUP="audio"
KERNEL="seq", NAME="snd/%k", GROUP="audio"

Let me know if that helps.

My audio related devices in /dev look like this:
Code:

lrwxrwxrwx   1 root   root          11 Mar  5 09:51 audio -> sound/audio
crw-------   1 nixnut audio    14,  20 Sep 26 17:50 audio1
crw-------   1 nixnut audio    14,  36 Sep 26 17:50 audio2
crw-------   1 nixnut audio    14,  52 Sep 26 17:50 audio3
crw-------   1 nixnut audio    14,   7 Sep 26 17:50 audioctl

lrwxrwxrwx  1 root   root       9 Mar  5 09:51 /dev/dsp -> sound/dsp
crw-------  1 nixnut audio 14, 19 Sep 26 17:50 /dev/dsp1
crw-------  1 nixnut audio 14, 35 Sep 26 17:50 /dev/dsp2
crw-------  1 nixnut audio 14, 51 Sep 26 17:50 /dev/dsp3

crw-------   1 nixnut audio    35,   0 Sep 26 17:50 midi0
crw-------   1 nixnut audio    14,   2 Sep 26 17:50 midi00
crw-------   1 nixnut audio    14,  18 Sep 26 17:50 midi01
crw-------   1 nixnut audio    14,  34 Sep 26 17:50 midi02
crw-------   1 nixnut audio    14,  50 Sep 26 17:50 midi03
crw-------   1 nixnut audio    35,   1 Sep 26 17:50 midi1
crw-------   1 nixnut audio    35,   2 Sep 26 17:50 midi2
crw-------   1 nixnut audio    35,   3 Sep 26 17:50 midi3
lrwxrwxrwx   1 root   root          11 Mar  5 09:51 mixer -> sound/mixer
crw-------   1 nixnut audio    14,  16 Sep 26 17:50 mixer1
crw-------   1 nixnut audio    14,  32 Sep 26 17:50 mixer2
crw-------   1 nixnut audio    14,  48 Sep 26 17:50 mixer3
crw-rw----   1 root   audio    31,   0 Sep 26 17:50 mpu401data
crw-rw----   1 root   audio    31,   1 Sep 26 17:50 mpu401stat

crw-rw----   1 root   audio    35,  64 Sep 26 17:50 rmidi0
crw-rw----   1 root   audio    35,  65 Sep 26 17:50 rmidi1
crw-rw----   1 root   audio    35,  66 Sep 26 17:50 rmidi2
crw-rw----   1 root   audio    35,  67 Sep 26 17:50 rmidi3

crw-------  1 nixnut audio   14,   1 Sep 26 17:50 /dev/sequencer
crw-rw----  1 root   audio   35, 128 Sep 26 17:50 /dev/smpte0
crw-rw----  1 root   audio   35, 129 Sep 26 17:50 /dev/smpte1
crw-rw----  1 root   audio   35, 130 Sep 26 17:50 /dev/smpte2
crw-rw----  1 root   audio   35, 131 Sep 26 17:50 /dev/smpte3
lrwxrwxrwx  1 root   root         24 Mar  5 09:51 /dev/sndstat -> /proc/asound/oss/sndstat

/dev/snd:
total 0
drwxr-xr-x   2 root audio       0 Feb 16 16:37 .
drwxr-xr-x  17 root root        0 Mar  5 08:52 ..
crw-rw----   1 root audio 116,  0 Feb 16 16:37 controlC0
crw-rw----   1 root audio 116, 24 Feb 16 16:37 pcmC0D0c
crw-rw----   1 root audio 116, 16 Feb 16 16:37 pcmC0D0p
crw-rw----   1 root audio 116, 33 Feb 16 16:37 timer

/dev/sound:
total 0
drwxr-xr-x   2 root   root      0 Feb 20 11:51 .
drwxr-xr-x  17 root   root      0 Mar  5 08:52 ..
crw-------   1 nixnut audio 14, 4 Feb 20 11:51 audio
crw-------   1 nixnut audio 14, 3 Feb 20 11:51 dsp
crw-------   1 nixnut audio 14, 0 Feb 20 11:51 mixer

_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Achille
n00b
n00b


Joined: 04 Jan 2005
Posts: 74

PostPosted: Sat Mar 05, 2005 4:58 pm    Post subject: Reply with quote

I realize that I don't have all that you have under /dev.

Could you please show me the content of your file /etc/modules.d/alsa?
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Sat Mar 05, 2005 5:10 pm    Post subject: Reply with quote

Achille wrote:
I realize that I don't have all that you have under /dev.

Could you please show me the content of your file /etc/modules.d/alsa?

That file does not exist on my system.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Achille
n00b
n00b


Joined: 04 Jan 2005
Posts: 74

PostPosted: Sat Mar 05, 2005 5:34 pm    Post subject: Reply with quote

So the problem remains: how can I get the missing /dev?

For example /dev/sound/dsp and so on.
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Sat Mar 05, 2005 5:56 pm    Post subject: Reply with quote

Are you using udev? If not emerge it.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Achille
n00b
n00b


Joined: 04 Jan 2005
Posts: 74

PostPosted: Sat Mar 05, 2005 6:03 pm    Post subject: Reply with quote

Yes, I use udev, version 0.30. It was already emerged since the beginning.
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Sat Mar 05, 2005 6:11 pm    Post subject: Reply with quote

And your user is in the audio group too?

Well, you've reached the bottom of my knowledge.
Maybe morphic can help you...
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Achille
n00b
n00b


Joined: 04 Jan 2005
Posts: 74

PostPosted: Sat Mar 05, 2005 6:16 pm    Post subject: Reply with quote

Yes my user is in the audio group.

Thank you very much for all your help, useful indeed.

Now I know that the problem is that I don't have all the /dev. I suppose that the problem is due to something with udev. I will inquire in this direction.
Back to top
View user's profile Send private message
Achille
n00b
n00b


Joined: 04 Jan 2005
Posts: 74

PostPosted: Sun Mar 06, 2005 8:35 am    Post subject: Reply with quote

nixnut wrote:
Achille wrote:
I realize that I don't have all that you have under /dev.

Could you please show me the content of your file /etc/modules.d/alsa?

That file does not exist on my system.

I removed the file /etc/modules.d/alsa and I got exactly the same /dev as you. So now I have /dev/dsp and so on.

But still no sound! I'm lost.
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Sun Mar 06, 2005 10:28 am    Post subject: Reply with quote

Same permissions too?
And if you start a music player as root? Still no sound?
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Achille
n00b
n00b


Joined: 04 Jan 2005
Posts: 74

PostPosted: Sun Mar 06, 2005 3:24 pm    Post subject: Reply with quote

The problem is not due to permissions, since it doesn't work with root too.

If it can help, I get this error when I configure xmms according to your explanations:

** WARNING **: alsa_setup_mixer(): Failed to find mixer element: PCM
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Sun Mar 06, 2005 4:14 pm    Post subject: Reply with quote

Achille wrote:
The problem is not due to permissions, since it doesn't work with root too.

If it can help, I get this error when I configure xmms according to your explanations:

** WARNING **: alsa_setup_mixer(): Failed to find mixer element: PCM

Yeah, I get that error too, but I get sound regardless.
Have you emerge alsa-utils? Try alsamixer to check the settings, perhaps your sound is merely muted.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
david.stevenson
n00b
n00b


Joined: 13 Nov 2004
Posts: 68
Location: Wiltshire, England

PostPosted: Fri Mar 11, 2005 8:26 pm    Post subject: Reply with quote

I just got my sound going.
The last problem was it only works with external speakers, when I run MacOS I hear sound from the box if nothing is plugged in to the socket, but the output from xmms is only via the socket.

Hope this helps someone.

David
Back to top
View user's profile Send private message
Achille
n00b
n00b


Joined: 04 Jan 2005
Posts: 74

PostPosted: Sun Mar 13, 2005 4:53 pm    Post subject: Reply with quote

Today, I connected external speakers to my Mac Mini to watch a DVD on MacOSX. When I came back to Gentoo, I suddenly realized that I could hear the sound. YES, the sound works! But it works only with external speakers and not with the internal speaker of the Mac Mini. Is it the same for you?
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
Goto page 1, 2  Next
Page 1 of 2

 
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