jump to navigation

24″ iMac ALSA configuration June 23, 2008

Posted by idebian in Debian, GNU/Linux, Hardware.
Tags:
trackback

Now that the nVIDIA video driver has been set-up let’s give our iMAC a voice (the stereo speakers) and a pair of ears (the stereo mic) 🙂
We will go briefly in the Linux’s ALSA configuration of the integrated iMac sound card.

The hardware

The iMAC’s sound card is built on top of the Realtek ALC885 chipset driven by the Intel ICH8 HD Audio controller.

The Realtek chipset is capable of 7.1 channel even if we just have a stereo speakers system. The headphone plug can be also used as AC3 pass-through in case you have an external AC3 decoder.

ALSA support

The sound card is well supported in ALSA (1.0.16) once you set a proper option to define the specific 24″ iMac implementation for the snd-hda-intel module, which is the ALSA module that manage the Intel audio controller.

For my 24″ iMac – early 2008 – I found that the most appropriate model is mbp3 (which stands for MacBook Pro rev3); this gives me total access to the internal microphone also, while the imac24 model didn’t allow me this.

I usually define all my custom kernel modules options within a file named local in the /etc/modprobe.d directory. So let’s type:

$ echo "options snd-hda-intel model=mbp3" >> /etc/modprobe.d/local

and that’s it! reboot to make the changes effective.

First tests

alsamixer

Once system has rebooted you should be able to listen audio from your iMAC.

First of all launch alsamixer at the terminal prompt and adjust Master, PCM and Front outputs volume as represented in the post’s top picture:

$ alsamixer

  1. move between the input with the ‘<-‘ and ‘->’ keys
  2. change the volume with the ‘UP’ and ‘DOWN’ arrow keys
  3. unmute with ‘M’ key

speakertest

To test the speaker we use of the ALSA’s speakertest utility. Open a terminal and type:

$ speakertest -c 2
speaker-test 1.0.16
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 8192
Period size range from 1024 to 1024
Using max buffer size 8192
Periods = 4
was set period_size = 1024
was set buffer_size = 8192
0 - Front Left
1 - Front Right

where -c 2 specify a two channels output.
Interrupt with CTRL-C.

If everything is properly set you should have listened white noise coming alternatively from the two speakers 😉

GNOME’s Volume Control

Now that the raw audio functionality has been verified let’s pass to the fine tuning.
To properly set-up the sound card in GNOME double click on the speaker icon in the GNOME notification area; the graphical mixer should came up.

Go to Edit -> Preferences and enable all the items.

This is mine Playback Tab:

Gnome Volume Control - Playback Tab

and the Recording Tab:

Gnome Volume Control - Recording Tab

In the Switches Tab just set the Speaker check-box.

In the Options Tab settings set the Channel Mode to ‘2 ch’ and ‘Mic’ as the Input Source.

We can now close the Volume Control and jump to the final step to set-up the Master control for the toolbar icon: right click on the speaker icon, select ‘Preferences’ and then choose ‘Master’ as the device to control.

MIC test

Once you set-up the GNOME’s mixer you should be able to record from the integrated MIC using the Sound Recorder application in the Sound menu.

Gnome Sound Recorder

For those of you who do everything within a terminal (as I do) we can also use arecord/aplay:

$ arecord test.wav
$ aplay test.wav

AC3 pass-through

From the Apple manual it seems that the 3.5mm output jack can be used either as Sound output or digital audio output. When no device is connected to the output jack, the internal speakers are selected, otherwise audio output port selection is automatic:

The S/PDIF (Sony/Philips Digital Interface Format) optical digital output is automatically selected when an S/PDIF optical digital output device is detected on the external combination audio port.

From [1] it seems that:

The name of the connector is “Mini-TOSlink”, usually you can find optical cables which have a Mini-TOSlink plug on one end and a TOSlink plug on the other end, or you can use a plain TOSlink cable in combination with a TOSlink to Mini-TOSlink converter (the L71BA one, TOS [F] – 3.5mm [M]), or similar.

References

  1. Apple iMac24 on penlug.org
Advertisements

Comments»

1. exculgelitle - August 3, 2008

Very nice!!

2. Sam - September 15, 2008

Works Great. Thanks!

3. Carl - October 14, 2008

I recently setup my iMac just like this. One thing I noticed though is it gives the internal speakers the volume output of a MacBook Pro (i.e. way too quite). The internal iMac speakers can really crank and aren’t half bad. Its a shame the imac24 driver isn’t correct.

4. Jesus Ramirez - February 4, 2009

Muy buena ayuda,
Es lo unico que me faltaba para tener configurado Ubuntu Intrepid en mi iMac.

Gracias.

Saludos desde Tepic, Mexico

5. Quentin - July 30, 2009

hi,

I followed your steps, but I only get mono sound through the speakers.

1 channel (0) only. I can’t get the front right working. Any ideas?

6. Sergio - September 24, 2009

In Ubuntu 9.10 ,

sudo gedit /etc/modprobe.d/options

Adding the line “options snd-hda-intel model=mbp3″

On an Imac aluminium 20” the Headphone and the internal Microphone now works!

Thank you for your Configuration Tips.

7. Adam - November 11, 2009

This works on Fedora 11 too. I tried so many alsa modprobe options that I gave up until I found your blog.
Thank you so much!

-Adam

8. Tony Stauber - January 28, 2010

After days of googling, hours of trial and error, and even changing distributions, your solution ‘mbp3’ instead of ‘imac24’ has at last got my microphone to work and I can skype again. Many, many thanks!

I have a triple boot -Leopard,XP and Mint 8 on my late 2008 24″Mac.

9. santi - May 1, 2011

Hi,

Just tried this and didn’t work on a fedora 14 Imac.
No way to make it sound properly.

Sorry…

10. binary options trading signals - April 10, 2013

Great article! We are linking to this particularly great content on our
website. Keep up the great writing.

11. Binary Options Trading - January 7, 2014

This is exactly what we were looking for and the content is awesome.Keep up the good work.Cheers!!

12. priligy cialis - August 22, 2014

trackback

I truly appreciate this post. I’ve been looking all over for this! Thank goodness I found it on Bing. You have made my day! Thx again


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: