Left speaker doesn't work, controls mixed up on Apple MacBook[Pro] (5,1)

Bug #337314 reported by Ricky Campbell
68
This bug affects 9 people
Affects Status Importance Assigned to Milestone
ALSA driver
New
Unknown
Mactel Support
Confirmed
Medium
Unassigned
alsa-driver (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Reporting this bug for another user...

In MacBook and MacBookPro 5,1 (aluminium, late 2008) the soundcard works out of the box only with headphones, and to turn speakers on it is necessary to manually set the 6 channels. In that case, sound is heard both on headphones and right and center speaker; the left speaker doesn't work yet.

This bug is confirmed by several users, see the additional information attached.

della@raker:~$ lspci | grep -i audio
00:08.0 Audio device: nVidia Corporation MCP79 High Definition Audio (rev b1)
della@raker:~$ grep Codec /proc/asound/card0/codec#*
Codec: Realtek ALC889A

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 337314] [NEW] Left speaker doesn't work, controls mixed up on Apple MacBook[Pro] (5, 1)

To solve this bug requires knowledge of how the hda chip in these notebooks is connected. From what I've been told, it is possible to find out this information by looking at the .inf files for the audio drivers for Windows. Are you able to possibly obtain this file and put it up somewhere? This bug may not be the best place, but if you have nowhere else, you can always zip it I suppose.

If you are not sure where to find the .inf file, you could have alook on your OS X CD, for bootcamp related executable files. I think these files can be extracted, and the necessary files obtained that way.

Hope this helps

Luke

Revision history for this message
Alex Karpenko (alexkarpenko) wrote :

I believe the relevant information may also be found in Apple's fdi file for the HDA chip. It's located for me on my OSX drive at:
/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAPlatformDriver.kext/Contents/Info.plist

Revision history for this message
Alex Karpenko (alexkarpenko) wrote :

Err, meant to say Info.plist file not fdi file :)

Revision history for this message
buntuLo (buntulo) wrote :

I report the same problem with (K)ubuntu 8.10 on MacBookPro 5.1. The only difference is that here just the right channel works, while both left and central do not. Moreover the volume mixer has some more oddities, basically channels switched between them.
I attach my MacOS Info.plist file for the HDA chip, hope it helps. Thanks! Lo.

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 337314] Re: Left speaker doesn't work, controls mixed up on Apple MacBook[Pro] (5, 1)

Unfortunately the plist file is no use to me until I have some information given from ALSA. Can you all please run http://www.alsa-project.org/alsa-info.sh and post the URL you receive for your hardware?

Thanks

Revision history for this message
Alex Murray (alexmurray) wrote :

Output from alsa-info.sh script run on my MacBook Pro 5,1 running Ubuntu 8.10 Intrepid:

http://www.alsa-project.org/db/?f=247450a1667370684d30c31008d124f15c8f3a19

Note: Under Intrepid ONLY the headphones work, I cannot get any sound output from the speakers at all.

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

At some point my eye catched a thread warning about possible security issues when it is about to provide information collected by scripts. Could you please ensure us that the information collected by this script is ok to be published? Then I'll post right-away the relevant info.

Kind regards, Nikos

Revision history for this message
Daniel T Chen (crimsun) wrote :

Nikos, the source of the script is available for inspection and modification at http://www.alsa-project.org/alsa-info.sh

The script simply collects system information such as one's Linux distribution, versions of necessary debugging information (alsa-lib, alsa-utils, alsa-kernel/linux), mixer volume settings, ownership and modes of /dev/snd/*, and contents of AC'97/HDA codec spew.

If you feel hesitant in any fashion regarding providing the above debugging information to help developers resolve driver bugs, please don't download, and don't run the script. Your bug reports, of course, will receive little attention due to the lack of necessary debugging information.

With respect to the revision history of the script itself, several insecure temporary file uses have been corrected. The above URL always redirects to the most current (git HEAD) version of the script. Of course, run the script as an unprivileged user.

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

Daniel,

thanks for the feedback. I know I can study the code on my own. But
(1) it takes time,
(2) asking about security issues is nothing bad, in fact I recommend it all the time to: better be on the green-zone :-),
(3) it wouldn't hurt anybody to inform within 2-3 lines of text, withing the script or as a separate README text file, that this script is not dangerous.

So, I'll post my alsa-info output in a while.

Cheers, Nikos

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :
Revision history for this message
buntuLo (buntulo) wrote :

and here's my output for alsa-info.sh on MBP5.1. Lo.

http://www.alsa-project.org/db/?f=d126369b6ec632c9cab572e2aa616fc3dc8a0ab7

Revision history for this message
Matteo Dell'Amico (della) wrote :

This is mine (MPB 5.1). I got the speakers working by compiling alsa 1.0.18 from the jaunty sources.

http://www.alsa-project.org/db/?f=419d89d4ec9c0ab8a636c3cf56b094afb6e28213

Revision history for this message
Matteo Dell'Amico (della) wrote :

To avoid misunderstandings: the speakers I got working were center and right, as usual.

Changed in mactel-support:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Walter Cheuk (wwycheuk) wrote :

Hi, don't know if this is the right place to post:

I got a MacBook (late 2006, C2D) and have no sound when running Xubuntu 9.04 beta. I ran the script mentioned above the report sent to http://www.alsa-project.org/db/?f=19ad60fa195ed8bc8e08c903cc6d9490b426d20c

Thank you.

Revision history for this message
Alex Murray (alexmurray) wrote :

@Luke (themuso) - is the provided output's from alsa-info.sh enough or do you need more info? I am relatively comfortable hacking on kernel stuff (although have never really played with audio drivers) so if there is anything you want me to try, let me know as it would be great to try and get this fixed. Also any ideas you have as to how to go about fixing this would be great as I can try and implement any possible solution that you might think of, but I don't have any real experience with the linux sound system (let alone the hda driver) to even know where to begin looking to try and solve this so any pointers / hints you could give would be greatly appreciated.

Revision history for this message
Walter Cheuk (wwycheuk) wrote :

This is a regression since sounds work out of the box in 8.04 on my Macbook. In 8.04.2 I have to open the mixer, move the levels to 'trigger start' the sound.

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

Hi Walter!

Which Macbook do you have? Do you hear sound from all speakers after "trigger start the sound"?

This bug report refers to:

1. Macbook[Pro] 5,1, that is, the new Unibody or Aluminum or you name it... but it's the 5,1.

2. the left speaker being "muted"

Kind regards, Nikos

Revision history for this message
Ricky Campbell (cyberdork33) wrote :

I believe this also affects the 5,2 models.

Revision history for this message
Alex Murray (alexmurray) wrote :

Since I have upgraded to Jaunty I thought I should post the output of running alsa-info.sh here (since previously I had only run it under Intrepid) on my MacBook Pro 5,1.

http://www.alsa-project.org/db/?f=7676cad3f19446207d351db82e5ef324fcb615e8

Revision history for this message
Walter Cheuk (wwycheuk) wrote :

Hi, my macbook is the late 2006 (core 2 duo) model. just check the docs and found that I should go elsewhere for support. Thank you.

Revision history for this message
P. Dunbar (vigilcode) wrote :

I'm on a 5,2 but I do get sound from both speakers. I played this:
http://www.youtube.com/watch?v=JG3VhmKfWf8&NR=1

I get sound from both right and left when the video plays sound from right and left front speakers. Whent the video plays sound from the rear speakers I hear it from the left only. I get no sound when the video is playing from the subwoofer. I've tried this with various similar videos with the same results.

Revision history for this message
Alex Murray (alexmurray) wrote :

I just noticed the following patch on the Ubuntu wiki for MBP5,1/5,2 (https://help.ubuntu.com/community/MacBookPro5-1_5-2/Jaunty)

http://qwe.pl/~kacper/alsa-driver-1.0.19-mb51.patch

which adds a new model mbp5,1 to the intel hda audio driver in alsa 1.0.19 - will try and test it tonight and see how it goes...if anyone else has tried it can you provide any feedback whether it works or not?

Revision history for this message
Robynhub (robynhub) wrote :

For Alex.

I report that this patch not work with my mbp5,1 and jaunty 9.04.

Just no sound at all.

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

Hi all.

There seems to be a typo in the patch, line 120:

+ case 0x106b3f00: /* Macvook 5,1 */

Kindest regards, Nikos

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

(
I don't know whether this typo (look previous comment) is of minor importance.
)

Anyhow, there is no "mbp" string in the patch (only "mb5").

Nikos

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

(
I don't know whether this typo (look previous comment) is of minor importance.
)

Anyhow, there is no "mbp5,1" string in the patch (only "mb5").

Nikos

Revision history for this message
Kacper (kacper3-14) wrote :

Hi, I'm the author of this patch. 'Macvook' was just a typo in a _comment_ so it doesn't affect anything. It was developed on MacBook 5.1 and it works without any module options on MacBook 5.1 (not pro).

I suppose it should also work on Pro but you may need to add module option:
model=mb5 (not mbp5!).
It would be useful if someone paste output of 'cat /proc/asound/card0/codec#*' from MacBookPro.

kacper

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

Here you go...

# cat-ing
cat /proc/asound/card0/codec#* > mbp5,1.codec
# file attached

Nikos

Revision history for this message
Kacper (kacper3-14) wrote :

Node configuration seems to be identical but subsystem id is different. So for sure you need to add
model=mb5 parameter. Again, if set up correctly it _should_ work also on Pro model. I'll try to find one to test it.

kacper

Revision history for this message
Alex Murray (alexmurray) wrote :

I'm currently rebuilding alsa-driver-1.0.18 in jaunty with this patch - applied relatively cleanly - to test on my mbp51 so will let you know how it goes shortly...

Revision history for this message
Jim Rorie (jfrorie) wrote :

Verified working on MBP5,1 The community documentation has been updated,.

https://help.ubuntu.com/community/MacBookPro5-1_5-2/Jaunty

Revision history for this message
Alex Murray (alexmurray) wrote :

I can also confirm that it pretty much works - in that I now get sound from the left speaker finally but overall the sound seems more tinny - ie. has a lot less bass and is more treble-y - is there some difference between what the new mb5 model uses and the old mbp3 model which may have affected this? Does anyone else also think this is the case or is it just me?

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

Just booted after compiling alsa-source + patch and confirming:
+ left-speaker speaking
- less bass

Nikos

Revision history for this message
Robynhub (robynhub) wrote :

Good work guys! Thanks so much for this patch!

Good luck for the bass problem...

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

Also, under the "Option" tab [in Volume Control: HDA NVidia (Alsa mixer)] there is no "Channel Mode" anymore.

Revision history for this message
P. Dunbar (vigilcode) wrote :

I used this as a test: http://www.youtube.com/watch?v=6H6a-qN9fYk
 I had surround sound before on the stock version from jaunty with model=mpb3

after upgrading to this following the jauntymbp5_1-5_2 wiki I still have the sound but think it is a bit more "tinny". Just to test I can still set the model to mbp3 and test it out.

I use a MacBookPro5,2 just for an fyi.

Revision history for this message
Ricky Campbell (cyberdork33) wrote :

We have had the discussion before about some of these machines having "subwoofers" . Might need to look at the difference between the mbp and the new mb5 options.

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

FWIW,

I can hear the subwoofer and all channels playing correctly via Headphone plug on an external Stereo (2 spekaers + Woofer) System.

Nikos

Revision history for this message
Kacper (kacper3-14) wrote :

Activating woofer should be very easy now. My MacBook (not pro) seems not to have a woofer because sound is ok. I'll try to find someone with a Pro to improve the patch.

btw it is now in alsa git tree

kacper

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

Many thanks for your efforts Kacper :-)
Cheers, Nikos

75 comments hidden view all 155 comments
Revision history for this message
Alper KANAT (tunix-raptiye) wrote :

Hey There,

I'm using Arch Linux but following this thread for any upcoming patches/solutions.

$ sudo dmidecode -s system-product-name
MacBookPro5,1

My microphone works fine. I'm currently developing a software that uses Flash to communicate and I can use my internal mic with it without any problems.

I have some low noise when I plugin earphones. But as others have said, it's masked when I higher the music volume.

I currently have the following problems:

* Mixer controls acts strange. GNOME lowers/raises the Master and PCM levels despite I selected only one.

* When I plugin my earphones, I've to lower the volume to something around 10-15% because the volume is too high.

I only use ALSA.. I don't have OSS or PulseAudio..

Revision history for this message
Kacper (kacper3-14) wrote : Re: [Bug 337314] Re: Left speaker doesn't work, controls mixed up on Apple MacBook[Pro] (5, 1)

> Perhaps the better question is, can a workaround be written, in the
> event the chipset is of this design, rather than the design of yours? I
> would presume Apple didn't single me out, and that there must be other
> MacBooks (5.1) out there with the same hardware as mine.
Mine is non-pro 5.1 too... it's strange because even P.Dunbar's Pro
5.2 has similar layout to mine.
We need to create another model to cover your configuration. The
problem is that you've got the
same Subsystem Id as we do. So it can't be auto-detected. I can try to
blindly code it during the
weekend but it'll be hard to debug... Do you have sound output? Is mic
your only problem?

kacper

Revision history for this message
Chris Lasher (chris.lasher) wrote :

> Do you have sound output? Is mic your only problem?

I do have sound output, although sometimes it gets "stuck" off until I twiddle with the volume controls (usually needing to crank the volume up until it crackles on). The two more important issues are no mic and noise in the headphone channel (confirmed by Nikos and Matteo above).

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

Chris:
> I do have sound output, although sometimes it gets "stuck" off until I twiddle with the volume controls (usually needing to crank the volume up until it crackles on).

Yep, I have experienced that two but not anymore. I did use "skype" and "Cheese" successfully (sound is transmitted/recorded). But no way to use at the same time "skype" with "Totem Movie Player". I guess this is a job for Pulse Audio which I can't get it working.

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

(
sorry for the, perhaps, misleading typo: "...that too..." I wanted to write
)

Revision history for this message
Chris Lasher (chris.lasher) wrote :

So typically on most laptops, when the headphone plug is inserted into the headphone jack, sound to the internal speakers is cut off and plays through only the headphones. (This is the behavior in OS X, for example, and I believe it was also the 8.10 behavior.) I thought this was implemented in hardware, but apparently it's implemented by the sound driver, as Kacper's patch demonstrates. I think someone else already requested this above, but would it be possible to have a patch that mutes the internal speakers when headphones are inserted?

Also, and I believe this was also mentioned above, could we have a patch where Master controls the volume of the headphone output, too? Of course, this would only be useful if the above muting of speakers was implemented, as well.

Kacper, are you the only developer working on this? Is anyone else involved with the ALSA project looking into this?

Revision history for this message
Gagi (dragoljub) wrote :

Hi Everyone!

I'm running a MacBook Pro 17" 5.2

I have used the latest patch with both the -p1 and -p2 options and in both cases no sound comes out of the computer speakers. I do however have full 5.1 sound as played by this video http://www.youtube.com/watch?v=6H6a-qN9fYk coming from the headphone jack.

Any idea why my speakers are not working at all?

Thanks!

Revision history for this message
Gagi (dragoljub) wrote :

Just thought I would respond with my status.

Currently I have both speakers working on my MacBook Pro 17" 5.2!

The problem for me was that LINE OUT volume had to be maximized!

I ended up running alsamixer, tabbing through until I was viewing all options and maximized line out.

After checking with 5.1 surround sound tests My speakers are displaying correctly, however the alsa speaker test has them only producing output on rear left and rear right.

The sound is also quite low, requiring almost full volume and allowing very little useful adjustment range.

But bottom line 5.2 MBP 17" speakers work, although not perfectly!

Revision history for this message
P. Dunbar (vigilcode) wrote :

Someone had asked if there was a difference between the alsa-driver 1.0.19 patch and using the 1.0.18 alsa-base that's in the repositories with the mbp3 set as model in /etc/modprobe.d/?
I'm not sure if sound quality or anything improved. Was it supposed to?

Also I've had my sound muted for the past 2 weeks or so and now when I unmute it I still have zero sound. I was going to re-follow the wiki to patch alsa 1.0.19 and see if just re doing it got sound working again but does anyone see any benefit in just trying the already patched 1.0.20?

Alper KANAT wrote on 2009-05-17: (permalink)

I've applied it to 1.0.20 tree btw.. It works fine on Arch Linux with a few exceptions I've mentioned 2 comments earlier..

So if I can/should try 1.0.20 where is the already patched download for it?

Also if this new version is in Karmic will it make its way to Jaunty backports? I wonder if my sound broke because of some repo update while I had the patched version of alsa.

Revision history for this message
Jim Rorie (jfrorie) wrote :

>Also I've had my sound muted for the past 2 weeks or so and now when I unmute it I still have zero sound. I was going >to re-follow the wiki to patch alsa 1.0.19 and see if just re doing it got sound working again but does anyone see any >benefit in just trying the already patched 1.0.20?

I thought I was the only one. I'm completely broken too. The headphones don't even work. I didn't change anything, I just installed updates. I'm thinking something came down the pipe that knocked us out.

Revision history for this message
Chris Lasher (chris.lasher) wrote :

If you updated your kernel in Jaunty, you will have to re-install the ALSA modules with another round of `sudo make install`. Also, see my note above that I have to move the "Master" channel up until sound finally crackles on for the rest of the system, including the headphones.

Note that this patch still doesn't work perfectly for me, since apparently my soundcard has "a different PIN assignment"; e.g., I'm getting noise in the headphones and my internal mic doesn't work.

Revision history for this message
Jim Rorie (jfrorie) wrote :

Got it working again. I don't think the kernel got updated. Were any alsa patches pushed out?

FYI, I needed to:

make clean
./configure
make
sudo make install

The "sudo make install" by itself didn't work. Apparently, I was all boogered up. =0

Revision history for this message
P. Dunbar (vigilcode) wrote :

yea redid and its working again.
I have every vol. slider at max. The master then adjusts the vol but from about half way down the vol is too low to hear. it really is just from halfway up that is adjustable.

Also where could I try 1.0.20 with what patch?

any chance of this getting into a package so other updates like to the kernel don't keep making us have to re build this and install it.

Revision history for this message
Chris Lasher (chris.lasher) wrote :

Would someone who has a patched version of this driver installed and working (e.g., the internal mic works) please post the output of

cat /proc/asound/card0/codec#0

for me? I need to see how my sound card model differs in terms of pins, as Kacper suggested.

Revision history for this message
Alper KANAT (tunix-raptiye) wrote :
Download full text (11.2 KiB)

Hey There Chris,

I'm on Arch Linux with the patched driver, here is my output of that command:

Codec: Realtek ALC889A
Address: 0
Function Id: 0x1
Vendor Id: 0x10ec0885
Subsystem Id: 0x106b4000
Revision Id: 0x100103
No Modem Function Group found
Default PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=2, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=1, dir=1, wake=0, sticky=0, data=1, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=5, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x03 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=5, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x04 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=5, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x05 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=5, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
  Converter: stream=0, channel=0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0x1e]: 16 20 24 32
    formats [0x1]: PCM
Node 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
  Amp-In vals: [0x2e 0x2e]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Connection: 1
     0x24
Node 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
  Amp-In vals: [0xae 0xae]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Connection: 1
     0x23
Node 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
  Amp-In vals: [0xae 0xae]
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Connection: 1
     0x22
Node 0x0a [Audio Input] wcaps 0x100391: Stereo Digital
  Converter: stream=0, channel=0
  SDI-Select: 0
  Digital:
  Digital category: 0x0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0x1e]: 16 20 24 32
    formats [0x1]: PCM
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x1f
Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals: [0x97 0x97] [0x80 0x80] [0x1f 0x1f] [0x97 0x97] [0x97 0x97] [0x9f 0x9f] [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97]
  Connection: 10
     0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17
Node 0x0c [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-...

Revision history for this message
P. Dunbar (vigilcode) wrote :

has anyone tried this here:
http://ubuntuforums.org/showpost.php?p=7627817&postcount=98

my sound still is choppy and staticy at startup and ever since i tried skype and then removed it I get a high pitched beep at startup (plus the normal startup sounds). So I keep looking for any improvements.
If i use that alsa would I then have to specify my model again cause it won't have the patch in this thread?

Revision history for this message
Chris Lasher (chris.lasher) wrote :

Dunbar, I didn't install it, but I did look through the code of that ALSA snapshot. It simply includes the patches from Kacper (they have made it into mainline code of ALSA, apparently). You will not have to manually specify your model.

Revision history for this message
pepe (sf-cbg) wrote :

Another MBP 5.2 owner here, using Debian unstable with legacy bios boot, amd64, alsa-driver 1.0.20 and patch posted above.

I did not get pulseaudio to work and I commented out the stuff in /etc/asound.conf again. My left+right HP speakers both work fine anyway. However,

- I also have the noise reported by Chris Lasher above, even though mic/line are muted and gain is minimal.
- The PCM and Master controls only work for speakers, not for HP.
- With mpd, I have to reduce the gain of the HP to about 0% to be comfortable, and 20 is pretty loud already. Using alsamixer, all other settings muted or 0%
- With mplayer, loudness-levels seem more normal. PCM mixer works. Both, mpd and mplayer are run with alsa. However, I can not unload snd_mixer_oss, that might be the culprit here..

Did you compare to PIN settings in windows?

Revision history for this message
Gionn (giovanni.toraldo) wrote :

With the latest Karmic build, both speakers works out of the box, but when I plug the headphone jack, internal speakers aren't muted and there isn't any control in alsamixer that I can mute.

Revision history for this message
Alper KANAT (tunix-raptiye) wrote :

Karmic build?

Revision history for this message
Gionn (giovanni.toraldo) wrote :
Revision history for this message
Jim Rorie (jfrorie) wrote :

Confirming Gionn's post. I can confirm that Beta has a working R,L, and LFE. HP plugin changes nothing and I'm not seeing a mixer capable of changing the various levels.

Revision history for this message
Alexey Spiridonov (snarkmaster) wrote :

Hi Kacper,

The left speaker issue is gone in Karmic (good work!), but I thought you might have some insights into the remaining jack sense, and inline microphone issues I documented here:
  https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/488103

Thanks,

Alexey

Revision history for this message
Alex Murray (alexmurray) wrote :

I've developed a patch against alsa-driver-1.0.22.1 which should fix the headphone jack sense and volume control issues (which I've attached to this bug), which you can test as follows:

First make sure you don't have any versions of linux-backports-modules-alsa installed:

apt-cache --names-only search linux-backports-modules-alsa | cut -f 1 -d ' ' | xargs sudo apt-get remove --purge

Now download alsa driver source and the patch, and compile and install a patched version of the driver:

cd ~
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.22.1.tar.bz2
wget http://dl.dropbox.com/u/174251/alsa-driver-1.0.22.1-mb5.patch
tar xjf alsa-driver-1.0.22.1.tar.bz2
patch -p0 < alsa-driver-1.0.22.1-mb5.patch
cd alsa-driver-1.0.22.1
./configure
make
sudo make install

Now you need to reboot your machine. If this works I'll push the patch upstream and hopefully we can get it applied to linux-backports-modules-alsa as well.

Revision history for this message
Alper KANAT (tunix-raptiye) wrote :

@Alex Murray: the patch seems to work which makes you the hero of the day! :) But here are some awkward things I've come up with (using Arch Linux - on Macbook Pro 5.1 - btw):

1) I don't know if this's related with the patch or not but alsaconf cannot found any sound cards, but the kernel seems to recognize and load all the necessary modules for the sound card

2) When headphones are plugged in, I've to mute and unmute the Headphone channel a few times in order to get sound from them. I don't know why this happens.

But all in all, the jack sense is working! :)

Revision history for this message
Alper KANAT (tunix-raptiye) wrote :

I needed to delete all lines inside /etc/modprobe.d/sound.conf btw because there were some error messages during boot process due to unrecognition of sound card indicating those lines.

Revision history for this message
Alex Murray (alexmurray) wrote :

Sounds like an Arch linux specific thing, worked fine for me in Ubuntu (unless anyone else can clarify)

Revision history for this message
Alper KANAT (tunix-raptiye) wrote :

@Alex Murray: do you have any specific configuration lines defined in /etc/modprobe.d/* ? have you tried muting headphone channel while headphones are plugged in? you would have to unmute and mute a few more times in order to get back the sound..

Revision history for this message
Alex Murray (alexmurray) wrote :

Muting headphones whilst plugged in works fine - ie. they unmute perfectly fine.

Ubuntu provides a /etc/modprobe.d/alsa-base.conf which I have not modified - I've attached it here.
Thanks for testing the patch, I've submitted it to alsa-devel (http://mailman.alsa-project.org/pipermail/alsa-devel/2010-January/024465.html)

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 337314] Re: Left speaker doesn't work, controls mixed up on Apple MacBook[Pro] (5, 1)

If the patch has been tested and is known to work, then I'll send this upstream, unless of course Alex has done that already...

Revision history for this message
Luke Yelavich (themuso) wrote :

Never mind, I see your patch is now in the alsa sound-2.6 git tree.

Revision history for this message
Alex Murray (alexmurray) wrote :

Thanks Luke - any chance this can get rolled into ubuntu-backports-modules-alsa? Or applied to the 2.6.32 kernel for lucid?

Revision history for this message
pepe (sf-cbg) wrote :

Thanks for the patch alex.

I appear to have a slightly different chip than most other MBP 5.2 owners but your mb5 model works quite well. Except for the background noise on the headphones, which some other guy also complained about earlier. In Windows the PINs are totally different from the alsa configuration and there is no noise. I tried to replicate this configuration in alsa but got no sound at all. Surround/LFE/Center are also dead.

Anyways, when pushing this upstream maybe you can also merge the attached patch to recognise my chip.

Its from a 17" MBP from about July 2009.

Revision history for this message
Alex Murray (alexmurray) wrote :

@pepe - have already pushed it upstream but I'll send your patch upstream as well.

Revision history for this message
Alex Murray (alexmurray) wrote :

@pepe - can you post the output from /proc/asound/card0/codec#0 since the values you've provided look a little suspect and I just want to confirm the patch it correct

Revision history for this message
pepe (sf-cbg) wrote :

Yes, there's definitly something fishy about this..

Using just your patch, it will not autodetect without reboot, even if I unload all alsa modules. So I used printk to extract the values it tries to match, patch, recompile, install, reload, and then it works. But now I noticed that without this modification, normal reloading also works after it was rebooted once. Whats that about?

Codec: Realtek ALC889A
Address: 0
Function Id: 0x1
Vendor Id: 0x10ec0885
Subsystem Id: 0x106b4600
Revision Id: 0x100103

Revision history for this message
Alex Murray (alexmurray) wrote :

Your patch is not needed as you have the same subsystem id as already exists in patch_realtek.c - not sure why it didn't work before.

Brad Figg (brad-figg)
tags: added: apple
Brad Figg (brad-figg)
tags: added: kj-triage needs-required-logs no-sound-speakers
tags: added: sound-macbook
Revision history for this message
Brad Figg (brad-figg) wrote :

Please, if you are still having issues, test with the latest development release of Ubuntu. ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p alsa-base 337314

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds .

Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

Please let us know your results.

Changed in alsa-driver (Ubuntu):
status: New → Incomplete
Revision history for this message
Alex Murray (alexmurray) wrote :

This was partially fixed in Karmic and is now fully fixed in Lucid as well as the upstream kernel.

Changed in alsa-driver (Ubuntu):
status: Incomplete → Fix Released
Changed in alsa-driver:
status: Unknown → New
Revision history for this message
Dražen Lučanin (kermit666) wrote :

I am still affected by this bug (left speaker not working) in Oneiric on a MBP 8,1. I tried unmuting channels in ALSA mixer and adding the alsa-base.conf line (options snd-hda-intel model=mbp55), but nothing helps.

Displaying first 40 and last 40 comments. View all 155 comments or add a comment.