2009-04-20 18:40:34

by Tino Keitel

[permalink] [raw]
Subject: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

Hi,

since 2.6.29 and also with 2.6.29.1 the left audio channel of the
digital output of my Mac mini Core 2 Duo is noisy. This didn't happen
with 2.6.28. Unloading snd-hda-intel and reloading it does fix the
noisy sound.

This happened with some older versions of the Linux kernel (with an
older Mac mini Core Duo, I don't remeber which kernel version), but got
fixed at some point. Now it happens again with 2.6.29.

Here is the dmesg output for the sound hardware:

HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
HDA Intel 0000:00:1b.0: setting latency timer to 64
hda_codec: STAC922x, Apple subsys_id=100
input: HDA Intel Line In at Ext Left Jack as /class/input/input18
input: HDA Intel Mic at Ext Left Jack as /class/input/input19
input: HDA Intel HP Out at Ext Left Jack as /class/input/input20

Any hints what I could try to fix this, maybe some commit that I should
try to revert?

Regards,
Tino


2009-04-20 19:30:15

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

On Monday 20 April 2009, Tino Keitel wrote:
> Hi,
>
> since 2.6.29 and also with 2.6.29.1 the left audio channel of the
> digital output of my Mac mini Core 2 Duo is noisy. This didn't happen
> with 2.6.28. Unloading snd-hda-intel and reloading it does fix the
> noisy sound.
>
> This happened with some older versions of the Linux kernel (with an
> older Mac mini Core Duo, I don't remeber which kernel version), but got
> fixed at some point. Now it happens again with 2.6.29.
>
> Here is the dmesg output for the sound hardware:
>
> HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
> HDA Intel 0000:00:1b.0: setting latency timer to 64
> hda_codec: STAC922x, Apple subsys_id=100
> input: HDA Intel Line In at Ext Left Jack as /class/input/input18
> input: HDA Intel Mic at Ext Left Jack as /class/input/input19
> input: HDA Intel HP Out at Ext Left Jack as /class/input/input20
>
> Any hints what I could try to fix this, maybe some commit that I should
> try to revert?

Well, no.

Still, you might try the current Linus' tree.

Best,
Rafael

2009-04-20 19:41:19

by Takashi Iwai

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

At Mon, 20 Apr 2009 20:40:24 +0200,
Tino Keitel wrote:
>
> Hi,
>
> since 2.6.29 and also with 2.6.29.1 the left audio channel of the
> digital output of my Mac mini Core 2 Duo is noisy. This didn't happen
> with 2.6.28. Unloading snd-hda-intel and reloading it does fix the
> noisy sound.
>
> This happened with some older versions of the Linux kernel (with an
> older Mac mini Core Duo, I don't remeber which kernel version), but got
> fixed at some point. Now it happens again with 2.6.29.

Could you try the latest Linus git tree? A fix patch was merged
after 2.6.30-rc2. The patch will be merged to later stable kernel, too.


Takashi

2009-04-20 19:47:17

by Tino Keitel

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

On Mon, Apr 20, 2009 at 21:41:06 +0200, Takashi Iwai wrote:

[...]

> Could you try the latest Linus git tree? A fix patch was merged
> after 2.6.30-rc2. The patch will be merged to later stable kernel, too.

What commit is this? Can it be applied to 2.6.29? As it isn't perfectly
reproducable, I'd like to run 2.6.29 with the patch applied and see if
the problem disappears.

Regards,
Tino

2009-04-21 05:24:52

by Takashi Iwai

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

At Mon, 20 Apr 2009 21:46:59 +0200,
Tino Keitel wrote:
>
> On Mon, Apr 20, 2009 at 21:41:06 +0200, Takashi Iwai wrote:
>
> [...]
>
> > Could you try the latest Linus git tree? A fix patch was merged
> > after 2.6.30-rc2. The patch will be merged to later stable kernel, too.
>
> What commit is this? Can it be applied to 2.6.29? As it isn't perfectly
> reproducable, I'd like to run 2.6.29 with the patch applied and see if
> the problem disappears.

The commit is fcad94a4c71c36a05f4d5c6dcb174534b4e0b136:
ALSA: hda - Fix the cmd cache keys for amp verbs


Takashi

2009-04-21 07:32:31

by Tino Keitel

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

On Tue, Apr 21, 2009 at 07:24:40 +0200, Takashi Iwai wrote:
> The commit is fcad94a4c71c36a05f4d5c6dcb174534b4e0b136:
> ALSA: hda - Fix the cmd cache keys for amp verbs

Thanks for the reply. However, the patch doesn't work. I just got
distorted sound again.

Regards,
Tino

2009-04-21 07:39:35

by Takashi Iwai

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

At Tue, 21 Apr 2009 09:32:19 +0200,
Tino Keitel wrote:
>
> On Tue, Apr 21, 2009 at 07:24:40 +0200, Takashi Iwai wrote:
> > The commit is fcad94a4c71c36a05f4d5c6dcb174534b4e0b136:
> > ALSA: hda - Fix the cmd cache keys for amp verbs
>
> Thanks for the reply. However, the patch doesn't work. I just got
> distorted sound again.

Then please run alsa-info.sh (with --no-upload option) before and
after suspend, and attach the generated files. Also, check the latest
Linus tree whether the problem still appears.


thanks,

Takashi

2009-04-21 18:40:55

by Tino Keitel

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

On Tue, Apr 21, 2009 at 09:39:13 +0200, Takashi Iwai wrote:
> At Tue, 21 Apr 2009 09:32:19 +0200,
> Tino Keitel wrote:
> >
> > On Tue, Apr 21, 2009 at 07:24:40 +0200, Takashi Iwai wrote:
> > > The commit is fcad94a4c71c36a05f4d5c6dcb174534b4e0b136:
> > > ALSA: hda - Fix the cmd cache keys for amp verbs
> >
> > Thanks for the reply. However, the patch doesn't work. I just got
> > distorted sound again.
>
> Then please run alsa-info.sh (with --no-upload option) before and
> after suspend, and attach the generated files. Also, check the latest
> Linus tree whether the problem still appears.

My first impression with suspend seems to be wrong. It also sometimes
happens just after a while, event without suspend.

Attached are 2 alsa-info.sh outputs. One was taken after I noticed the
distorted sound, one after I reloaded snd-hda-intel to fix the
distortion. The mixer seems to be quite different after module reload.

Regards,
Tino


Attachments:
(No filename) (946.00 B)
alsa-left-channel-distorted.txt (16.58 kB)
alsa-left-channel-ok.txt (16.63 kB)
Download all attachments

2009-04-24 14:01:50

by Takashi Iwai

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

At Tue, 21 Apr 2009 20:39:36 +0200,
Tino Keitel wrote:
>
> On Tue, Apr 21, 2009 at 09:39:13 +0200, Takashi Iwai wrote:
> > At Tue, 21 Apr 2009 09:32:19 +0200,
> > Tino Keitel wrote:
> > >
> > > On Tue, Apr 21, 2009 at 07:24:40 +0200, Takashi Iwai wrote:
> > > > The commit is fcad94a4c71c36a05f4d5c6dcb174534b4e0b136:
> > > > ALSA: hda - Fix the cmd cache keys for amp verbs
> > >
> > > Thanks for the reply. However, the patch doesn't work. I just got
> > > distorted sound again.
> >
> > Then please run alsa-info.sh (with --no-upload option) before and
> > after suspend, and attach the generated files. Also, check the latest
> > Linus tree whether the problem still appears.
>
> My first impression with suspend seems to be wrong. It also sometimes
> happens just after a while, event without suspend.
>
> Attached are 2 alsa-info.sh outputs. One was taken after I noticed the
> distorted sound, one after I reloaded snd-hda-intel to fix the
> distortion. The mixer seems to be quite different after module reload.

The codec communication looks a bit unstable on this device...
Does this still happen on the latest 2.6.30 version?


Takashi

2009-04-24 14:21:25

by Tino Keitel

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

On Fri, Apr 24, 2009 at 16:01:40 +0200, Takashi Iwai wrote:

[...]

> The codec communication looks a bit unstable on this device...
> Does this still happen on the latest 2.6.30 version?

Yes, at least with 2.6.30-rc3. I reloaded snd-hda-intel a few times,
and at some point /etc/init.d/alsa-utils start complained, I guess
because some index numbers in the mixer changed. Attached is an
example diff.

Regards,
Tino


Attachments:
(No filename) (419.00 B)
diff (2.70 kB)
Download all attachments

2009-04-24 14:41:36

by Takashi Iwai

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

At Fri, 24 Apr 2009 16:21:13 +0200,
Tino Keitel wrote:
>
> On Fri, Apr 24, 2009 at 16:01:40 +0200, Takashi Iwai wrote:
>
> [...]
>
> > The codec communication looks a bit unstable on this device...
> > Does this still happen on the latest 2.6.30 version?
>
> Yes, at least with 2.6.30-rc3. I reloaded snd-hda-intel a few times,
> and at some point /etc/init.d/alsa-utils start complained, I guess
> because some index numbers in the mixer changed.

And this happens because the codec doesn't respond properly any more.
So, something triggers to screw up the communication with the codec.
I have no idea right now. Possibly you can bisect the changes against
sound/pci/hda/patch_sigmatel.c...


> Attached is an example diff.

This diff looks OK. The difference is just the current PCM stream
you are playing. Others are identical.


thanks,

Takashi

2009-04-28 00:23:21

by Tino Keitel

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

On Fri, Apr 24, 2009 at 16:41:14 +0200, Takashi Iwai wrote:
> At Fri, 24 Apr 2009 16:21:13 +0200,
> Tino Keitel wrote:
> >
> > On Fri, Apr 24, 2009 at 16:01:40 +0200, Takashi Iwai wrote:
> >
> > [...]
> >
> > > The codec communication looks a bit unstable on this device...
> > > Does this still happen on the latest 2.6.30 version?
> >
> > Yes, at least with 2.6.30-rc3. I reloaded snd-hda-intel a few times,
> > and at some point /etc/init.d/alsa-utils start complained, I guess
> > because some index numbers in the mixer changed.
>
> And this happens because the codec doesn't respond properly any more.
> So, something triggers to screw up the communication with the codec.
> I have no idea right now. Possibly you can bisect the changes against
> sound/pci/hda/patch_sigmatel.c...

The problem is that I don't have a reliable way to trigger this bug. It
just happens sometimes.

I just saw another, major problem: line in doesn't work anymore with
2.6.29 and also 2.6.30-rc3 (no usable input level). It works with
2.6.27.20.

So it seems that all newer kernels are pretty broken on this hardware
regarding sound.

Regards,
Tino

2009-04-28 05:24:48

by Takashi Iwai

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

At Tue, 28 Apr 2009 02:23:09 +0200,
Tino Keitel wrote:
>
> On Fri, Apr 24, 2009 at 16:41:14 +0200, Takashi Iwai wrote:
> > At Fri, 24 Apr 2009 16:21:13 +0200,
> > Tino Keitel wrote:
> > >
> > > On Fri, Apr 24, 2009 at 16:01:40 +0200, Takashi Iwai wrote:
> > >
> > > [...]
> > >
> > > > The codec communication looks a bit unstable on this device...
> > > > Does this still happen on the latest 2.6.30 version?
> > >
> > > Yes, at least with 2.6.30-rc3. I reloaded snd-hda-intel a few times,
> > > and at some point /etc/init.d/alsa-utils start complained, I guess
> > > because some index numbers in the mixer changed.
> >
> > And this happens because the codec doesn't respond properly any more.
> > So, something triggers to screw up the communication with the codec.
> > I have no idea right now. Possibly you can bisect the changes against
> > sound/pci/hda/patch_sigmatel.c...
>
> The problem is that I don't have a reliable way to trigger this bug. It
> just happens sometimes.

That's what I'm afraid of.

> I just saw another, major problem: line in doesn't work anymore with
> 2.6.29 and also 2.6.30-rc3 (no usable input level). It works with
> 2.6.27.20.

This could be rather a mixer setup issue.
Please give alsa-info for the same setting on both kernels.


Takashi

2009-04-28 06:31:14

by Tino Keitel

[permalink] [raw]
Subject: Re: 2.6.29 regression: left audio channel broken after resume from suspend with Intel HDA

On Tue, Apr 28, 2009 at 07:24:33 +0200, Takashi Iwai wrote:

[...]

> This could be rather a mixer setup issue.

Of cause I already spent quite some time trying to get a usable line in
signal level. With 2.6.27, I just set "Capture" as the record source
and adjust its gain, where the gain level is already sufficent at
10-20. With 2.6.29, I raised it to 100 but didn't get a usable line in
level.

> Please give alsa-info for the same setting on both kernels.

Attached.

Regards,
Tino


Attachments:
(No filename) (489.00 B)
alsa-info-2.6.27.txt (17.99 kB)
alsa-info-2.6.29.txt (16.90 kB)
Download all attachments