2007-09-03 10:25:28

by Abhijit Bhopatkar

[permalink] [raw]
Subject: [PATCH] [ALSA] Added new pin config for first gen macbook.

commit 5d5d3bc3eddf2ad97b2cb090b92580e7fed6cee1 changed all
pin configs for intel macs, but it breaks sound on
Macbook first generation.

Readded a known working pin config for first gen macbooks.

Signed-off-by: Abhijit Bhopatkar <[email protected]>
---
sound/pci/hda/patch_sigmatel.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 3f25de7..a2b0422 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -585,6 +585,12 @@ static unsigned int intel_mac_v5_pin_configs[10] = {
0x400000fc, 0x400000fb,
};

+static unsigned int intel_macbook_first_gen_pin_configs[10] = {
+ 0x0321e230, 0x03a1e020, 0x9017e110, 0x01014010,
+ 0x01a19021, 0x0381e021, 0x1345e240, 0x13c5e22e,
+ 0x02a19320, 0x400000fb,
+};
+
static unsigned int stac922x_dell_pin_configs[10] = {
0x0221121e, 0x408103ff, 0x02a1123e, 0x90100310,
0x408003f1, 0x0221122f, 0x03451340, 0x40c003f2,
@@ -603,7 +609,7 @@ static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
[STAC_INTEL_MAC_V5] = intel_mac_v5_pin_configs,
/* for backward compitability */
[STAC_MACMINI] = intel_mac_v3_pin_configs,
- [STAC_MACBOOK] = intel_mac_v5_pin_configs,
+ [STAC_MACBOOK] = intel_macbook_first_gen_pin_configs,
[STAC_MACBOOK_PRO_V1] = intel_mac_v3_pin_configs,
[STAC_MACBOOK_PRO_V2] = intel_mac_v3_pin_configs,
[STAC_IMAC_INTEL] = intel_mac_v2_pin_configs,
@@ -2132,6 +2138,8 @@ static int patch_stac922x(struct hda_codec *codec)
spec->board_config = STAC_INTEL_MAC_V4;
break;
case 0x106b0a00:
+ spec->board_config = STAC_MACBOOK;
+ break;
case 0x106b2200:
spec->board_config = STAC_INTEL_MAC_V5;
break;
--
1.5.2.4


2007-09-03 10:36:33

by Takashi Iwai

[permalink] [raw]
Subject: Re: [PATCH] [ALSA] Added new pin config for first gen macbook.

At Mon, 3 Sep 2007 15:55:18 +0530,
Abhijit Bhopatkar wrote:
>
> commit 5d5d3bc3eddf2ad97b2cb090b92580e7fed6cee1 changed all
> pin configs for intel macs, but it breaks sound on
> Macbook first generation.

Please elaborate how does it break. "it breaks sound" is too
ambigious like the most popular bug reports "sound doesn't work" :)


Takashi

2007-09-03 11:07:47

by Ivan N. Zlatev

[permalink] [raw]
Subject: Re: [PATCH] [ALSA] Added new pin config for first gen macbook.

On 9/3/07, Takashi Iwai <[email protected]> wrote:
> At Mon, 3 Sep 2007 15:55:18 +0530,
> Abhijit Bhopatkar wrote:
> >
> > commit 5d5d3bc3eddf2ad97b2cb090b92580e7fed6cee1 changed all
> > pin configs for intel macs, but it breaks sound on
> > Macbook first generation.
>

For the record I have just verified that according to Apple the
pinconfigs for your codec match the ones in alsa and are as follows. I
believe those were extracted from Boot Camp 1.2. I will check with
version 1.4 in few hours.

[0A]
CfgDflt = 0x0321E21F
Action = 01,0A,81,0C,81,0D,81,10,85,51,05,21
[0B]
CfgDflt = 0x03A1E02E
FF,04
[0C]
CfgDflt = 0x9017E110
[0D]
CfgDflt = 0x9017E11F
[0E]
CfgDflt = 0x400000FE
Action = hex: 01,10,81,0A,81,0C,81,0D
[0F]
CfgDflt = 0x0381E020
Action = 09,0F
[10]
CfgDflt = 0x1345E230
[11]
CfgDflt = 0x13C5E240
[15]
CfgDflt = 0x400000FC
[1B]
CfgDflt = 0x400000FB
--
Ivan N. Zlatev

Web: http://www.i-nZ.net
"It's all some kind of whacked out conspiracy."

2007-09-03 12:06:43

by Ivan N. Zlatev

[permalink] [raw]
Subject: Re: [PATCH] [ALSA] Added new pin config for first gen macbook.

On 9/3/07, Ivan N. Zlatev <[email protected]> wrote:
> On 9/3/07, Takashi Iwai <[email protected]> wrote:
> > At Mon, 3 Sep 2007 15:55:18 +0530,
> > Abhijit Bhopatkar wrote:
> > >
> > > commit 5d5d3bc3eddf2ad97b2cb090b92580e7fed6cee1 changed all
> > > pin configs for intel macs, but it breaks sound on
> > > Macbook first generation.
> >
>
> For the record I have just verified that according to Apple the
> pinconfigs for your codec match the ones in alsa and are as follows. I
> believe those were extracted from Boot Camp 1.2. I will check with
> version 1.4 in few hours.

Nope, no change since 1.2.

>
> [0A]
> CfgDflt = 0x0321E21F
> Action = 01,0A,81,0C,81,0D,81,10,85,51,05,21
> [0B]
> CfgDflt = 0x03A1E02E
> FF,04
> [0C]
> CfgDflt = 0x9017E110
> [0D]
> CfgDflt = 0x9017E11F
> [0E]
> CfgDflt = 0x400000FE
> Action = hex: 01,10,81,0A,81,0C,81,0D
> [0F]
> CfgDflt = 0x0381E020
> Action = 09,0F
> [10]
> CfgDflt = 0x1345E230
> [11]
> CfgDflt = 0x13C5E240
> [15]
> CfgDflt = 0x400000FC
> [1B]
> CfgDflt = 0x400000FB
> --
> Ivan N. Zlatev
>
> Web: http://www.i-nZ.net
> "It's all some kind of whacked out conspiracy."
>


--
Ivan N. Zlatev

Web: http://www.i-nZ.net
"It's all some kind of whacked out conspiracy."

2007-09-04 03:42:41

by Abhijit Bhopatkar

[permalink] [raw]
Subject: Re: [PATCH] [ALSA] Added new pin config for first gen macbook.

On 9/3/07, Ivan N. Zlatev <[email protected]> wrote:
> On 9/3/07, Ivan N. Zlatev <[email protected]> wrote:
> > On 9/3/07, Takashi Iwai <[email protected]> wrote:
> > > At Mon, 3 Sep 2007 15:55:18 +0530,
> > > Abhijit Bhopatkar wrote:
> > > >
> > > > commit 5d5d3bc3eddf2ad97b2cb090b92580e7fed6cee1 changed all
> > > > pin configs for intel macs, but it breaks sound on
> > > > Macbook first
> > >
> > > Please elaborate how does it break. "it breaks sound" is too
> > > ambigious like the most popular bug reports "sound doesn't work" :)

Apologies for the terse report,

On my macbook with latest kernels

1. Alsamixer is showing only three controlls in total,
Master PCM and Digital.
2. There is absolutely no output sound what so ever.
3. There is no capture sound being captured either.

Reverting back the pin config to the one in previous kernels is
working (although not perfect e.g. to enable input sound we need to
toggle the capture device to mic and linein atlease once, no idea
whats the deal with that)

I am willing to do whatever test you people want, though I do not know
where to look for more info at this point. So please feel free direct
me to arrive at a better soultion or better info.

Thanks

Abhijit

PS:
lspci -v shows

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High
Definition Audio Controller (rev 02)
Subsystem: Unknown device 8384:7680
Flags: us master, fast devsel, latency 0, IRQ 21
Memory at 90440000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+
Queue=0/0 Enable-
Capabilities: [70] Express Unknown type IRQ 0

Let me know if you need output dump of other stuff.

2007-09-04 12:56:32

by Takashi Iwai

[permalink] [raw]
Subject: Re: [PATCH] [ALSA] Added new pin config for first gen macbook.

At Tue, 4 Sep 2007 09:12:32 +0530,
Abhijit Bhopatkar wrote:
>
> On 9/3/07, Ivan N. Zlatev <[email protected]> wrote:
> > On 9/3/07, Ivan N. Zlatev <[email protected]> wrote:
> > > On 9/3/07, Takashi Iwai <[email protected]> wrote:
> > > > At Mon, 3 Sep 2007 15:55:18 +0530,
> > > > Abhijit Bhopatkar wrote:
> > > > >
> > > > > commit 5d5d3bc3eddf2ad97b2cb090b92580e7fed6cee1 changed all
> > > > > pin configs for intel macs, but it breaks sound on
> > > > > Macbook first
> > > >
> > > > Please elaborate how does it break. "it breaks sound" is too
> > > > ambigious like the most popular bug reports "sound doesn't work" :)
>
> Apologies for the terse report,
>
> On my macbook with latest kernels
>
> 1. Alsamixer is showing only three controlls in total,
> Master PCM and Digital.
> 2. There is absolutely no output sound what so ever.
> 3. There is no capture sound being captured either.

OK, these are real problems.

> Reverting back the pin config to the one in previous kernels is
> working (although not perfect e.g. to enable input sound we need to
> toggle the capture device to mic and linein atlease once, no idea
> whats the deal with that)
>
> I am willing to do whatever test you people want, though I do not know
> where to look for more info at this point. So please feel free direct
> me to arrive at a better soultion or better info.

Just to be sure, doesn't none of intel-mac-[1-5] model match with your
machine? If so, putting the pin-config back is the straightforward
solution indeed.

Anyway, it'd be helpful if someone else can check the same MacBook
(1st generation, not Pro?) whether the problem is reproducible.


thanks,

Takashi

2007-09-04 14:18:32

by Abhijit Bhopatkar

[permalink] [raw]
Subject: Re: [PATCH] [ALSA] Added new pin config for first gen macbook.

On 9/4/07, Takashi Iwai <[email protected]> wrote:
> At Tue, 4 Sep 2007 09:12:32 +0530,
> Abhijit Bhopatkar wrote:
> >
> > On 9/3/07, Ivan N. Zlatev <[email protected]> wrote:
> > > On 9/3/07, Ivan N. Zlatev <[email protected]> wrote:
> > > > On 9/3/07, Takashi Iwai <[email protected]> wrote:
> > > > > At Mon, 3 Sep 2007 15:55:18 +0530,

> OK, these are real problems.
>
> > I am willing to do whatever test you people want, though I do not know
> Just to be sure, doesn't none of intel-mac-[1-5] model match with your
> machine? If so, putting the pin-config back is the straightforward
> solution indeed.
>
> Anyway, it'd be helpful if someone else can check the same MacBook
> (1st generation, not Pro?) whether the problem is reproducible.

To be precise its Macbook 1st Generation non pro. with subsystem id 0x106b0a00

Well a friend of mine has the same model and i tried things out on his machine.
to my surprise :(, the original 2.6.23-rc5 is working fine on his machine.

So on my machine we booted to windows and tested things out. The sound
on my machine doesn't work in windows either, although its working in
OSX.

So sorry for all the noise its most likely a hardware problem after all.
Although i am baffled as to why old pin config works on this
particular broken hardware.

I hope i didn't bug you too much, i appreciate your quick responses.
Abhijit

2007-09-04 15:04:45

by Alistair John Strachan

[permalink] [raw]
Subject: Re: [PATCH] [ALSA] Added new pin config for first gen macbook.

On Tuesday 04 September 2007 15:18:23 Abhijit Bhopatkar wrote:
[snip]
> > Anyway, it'd be helpful if someone else can check the same MacBook
> > (1st generation, not Pro?) whether the problem is reproducible.
>
> To be precise its Macbook 1st Generation non pro. with subsystem id
> 0x106b0a00
>
> Well a friend of mine has the same model and i tried things out on his
> machine. to my surprise :(, the original 2.6.23-rc5 is working fine on his
> machine.
>
> So on my machine we booted to windows and tested things out. The sound
> on my machine doesn't work in windows either, although its working in
> OSX.
>
> So sorry for all the noise its most likely a hardware problem after all.
> Although i am baffled as to why old pin config works on this
> particular broken hardware.
>
> I hope i didn't bug you too much, i appreciate your quick responses.

I think the first generation macbook firmwares weren't completely other-OS
ready when they were shipped (no bootcamp in firmware, iirc). Have you
applied all available firmware updates? Do you use bootcamp?

--
Cheers,
Alistair.

137/1 Warrender Park Road, Edinburgh, UK.