Public bug reported:

I am using Ubuntu Edgy on an intel macbook core duo.  I found the
following on the gentoo wiki for how to make the built-in microphone
work.

Hope this helps.

cheers.
martin.

I was able to get the built-in mic working on the macbook thanks to
Jason Parekh's howto (http://www.jasonparekh.com/linux-on-
macbook#microphone).

I used the alsa-driver ebuild (version 1.0.13). If you have sound built
into your kernel you can also get it working this way too, you just need
to edit the files /usr/src/linux/patch_sigmatel.c and
/usr/src/linux/sound/pci/hda/patch_sigmatel.c instead of the ones I
mention below (and skip the ebuild commands).

Basically we just need to edit the patch_sigmatel.c file to re-map the
pins to better suit the macbook. Here's how I did it with the alsa-
driver ebuild and portage:

ebuild /usr/portage/media-sound/alsa-driver/alsa-driver-1.0.13.ebuild unpack
vim 
/var/tmp/portage/media-sound/alsa-driver-1.0.13/work/alsa-driver-1.0.13/pci/hda/patch_sigmatel.c

search for "d945gtp5_pin_configs" (line 354 for me), you should see
something like this:

static unsigned int d945gtp5_pin_configs[10] = {
        0x0221401f, 0x01011012, 0x01813024, 0x01014010,
        0x01a19021, 0x01016011, 0x01452130, 0x40000100,
        0x02a19320, 0x40000100,
};

Make a new line under this section and paste the following:

static unsigned int macbook_pin_configs[10] = {
        0x0321E230, 0x03A1E020, 0x400000FD, 0x9017E110,
        0x400000FE, 0x400000F0, 0x1345E240, 0x13C5E22E,
        0x400000FC, 0x400000FB,
};

Now we need to tell alsa to use our new macbook pin configuration, so
just a few lines down you should see:

[STAC_MACMINI] = d945gtp5_pin_configs,

Change this to:

[STAC_MACMINI] = macbook_pin_configs,

Note that the above DISABLES your line in. If you need to use your line
in AND your mic, then in the new code block replace the "0x400000F0"
value with "0x0381E021" so that it reads:

static unsigned int macbook_pin_configs[10] = {
        0x0321E230, 0x03A1E020, 0x400000FD, 0x9017E110,
        0x400000FE, 0x0381E021, 0x1345E240, 0x13C5E22E,
        0x400000FC, 0x400000FB,
};

The disadvantage is that you will need to toggle the recording device to
linein and back to mic to get it to work. Of course this could be done
easily with /etc/conf.d/local.start, something like

amixer sset 'Input Source' 'Line'
amixer sset 'Input Source' 'Mic'

Save and exit patch_sigmatel.c. Now check to make sure the other file
says the same thing. This is found under:

/var/tmp/portage/media-sound/alsa-driver-1.0.13/work/alsa-driver-1.0.13
/alsa-kernel/pci/hda/patch_sigmatel.c

When you are sure they are both as mentioned above you're ready to build
the driver. Run:

ebuild /usr/portage/media-sound/alsa-driver/alsa-driver-1.0.13.ebuild compile
ebuild /usr/portage/media-sound/alsa-driver/alsa-driver-1.0.13.ebuild install
ebuild /usr/portage/media-sound/alsa-driver/alsa-driver-1.0.13.ebuild qmerge

If you are using sound in your kernel, then re-build your kernel now. If
you have sound built statically into your kernel you'll need to rebuild
your kernel, copy it to /boot and reboot to it. If you're using sound as
modules, then you should be able to just run:

cd /usr/src/linux/
make modules modules_install

Once you have emerged the package or rebuilt your kernel update the
module deps

modules-update

I think it's a good idea to reboot at this stage, or reload your alsa
modules. You could just re-run alsaconf if you like which should do this
for you.

When you reboot you should now be able to use your microphone. Remember
to toggle the recording device to linein and back to mic if you need to.
You can toggle the mic for recording from the command line with:

amixer sset Capture '100%' toggle

Make sure it says "on" like so:

[EMAIL PROTECTED] ~ $ amixer sset Capture '100%' toggle

Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 14
Front Left: Capture 14 [100%] [21.00dB] [on]
Front Right: Capture 14 [100%] [21.00dB] [on]

Simply make sure that it is selected to record and give it a test!

** Affects: Ubuntu
     Importance: Undecided
         Status: Unconfirmed

-- 
microphone does not work on intel macbook with edgy
https://launchpad.net/bugs/82029

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to