* [Fwd: Re: Linux 2.6.10-ac8] - Patch breaks audio report
@ 2005-01-10 18:28 Alan Cox
2005-01-13 17:10 ` Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Alan Cox @ 2005-01-10 18:28 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 4498 bytes --]
-----Forwarded Message-----
> From: Jules Villard <jvillard@ens-lyon.fr>
> To: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: Linux 2.6.10-ac8
> Date: Sun, 09 Jan 2005 18:16:41 +0100
>
> Hello,
>
> I'm experiencing some troubles with the patches you included in
> 2.6.10-ac5 about ALSA : the files open and play ok, but no sound is
> actually outputed...
>
> I've found that the patch sound/pci/ac97/ac97_patch.c (hereby
> attached) is responsible for that (ie when I boot with the full patch
> minus this one, the sound is ok).
>
> Nothing special is printed in dmesg, so I've only attached my lspci
> output and my .config (along with the patch).
>
> Feel free to CC me if more details are needed, for I'm not on the lkml.
>
> Regards,
>
> Jules
>
>
> ______________________________________________________________________
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.10/sound/pci/ac97/ac97_patch.c linux-2.6.10/sound/pci/ac97/ac97_patch.c
> --- linux.vanilla-2.6.10/sound/pci/ac97/ac97_patch.c 2004-12-25 21:15:54.000000000 +0000
> +++ linux-2.6.10/sound/pci/ac97/ac97_patch.c 2005-01-06 19:29:28.000000000 +0000
> @@ -1013,8 +1013,20 @@
> return patch_build_controls(ac97, &snd_ac97_ad198x_spdif_source, 1);
> }
>
> +static const snd_kcontrol_new_t snd_ac97_ad1981x_jack_sense[] = {
> + AC97_SINGLE("Headphone Jack Sense", AC97_AD_JACK_SPDIF, 11, 1, 0),
> + AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0),
> +};
> +
> +static int patch_ad1981a_specific(ac97_t * ac97)
> +{
> + return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
> + ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
> +}
> +
> static struct snd_ac97_build_ops patch_ad1981a_build_ops = {
> - .build_post_spdif = patch_ad198x_post_spdif
> + .build_post_spdif = patch_ad198x_post_spdif,
> + .build_specific = patch_ad1981a_specific
> };
>
> int patch_ad1981a(ac97_t *ac97)
> @@ -1023,6 +1035,7 @@
> ac97->build_ops = &patch_ad1981a_build_ops;
> snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD198X_MSPLT, AC97_AD198X_MSPLT);
> ac97->flags |= AC97_STEREO_MUTES;
> + snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11); /* HP jack sense */
> return 0;
> }
>
> @@ -1031,7 +1044,12 @@
>
> static int patch_ad1981b_specific(ac97_t *ac97)
> {
> - return patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1);
> + int err;
> +
> + if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0)
> + return err;
> + return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
> + ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
> }
>
> static struct snd_ac97_build_ops patch_ad1981b_build_ops = {
> @@ -1045,6 +1063,7 @@
> ac97->build_ops = &patch_ad1981b_build_ops;
> snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD198X_MSPLT, AC97_AD198X_MSPLT);
> ac97->flags |= AC97_STEREO_MUTES;
> + snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11); /* HP jack sense */
> return 0;
> }
>
>
>
> ______________________________________________________________________
> 00:00.0 Host bridge: Intel Corp. 82855PM Processor to I/O Controller (rev 03)
> 00:01.0 PCI bridge: Intel Corp. 82855PM Processor to AGP Controller (rev 03)
> 00:1d.0 USB Controller: Intel Corp. 82801DB (ICH4) USB UHCI #1 (rev 01)
> 00:1d.1 USB Controller: Intel Corp. 82801DB (ICH4) USB UHCI #2 (rev 01)
> 00:1d.2 USB Controller: Intel Corp. 82801DB (ICH4) USB UHCI #3 (rev 01)
> 00:1d.7 USB Controller: Intel Corp. 82801DB (ICH4) USB2 EHCI Controller (rev 01)
> 00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 81)
> 00:1f.0 ISA bridge: Intel Corp. 82801DBM LPC Interface Controller (rev 01)
> 00:1f.1 IDE interface: Intel Corp. 82801DBM (ICH4) Ultra ATA Storage Controller (rev 01)
> 00:1f.3 SMBus: Intel Corp. 82801DB/DBM (ICH4) SMBus Controller (rev 01)
> 00:1f.5 Multimedia audio controller: Intel Corp. 82801DB (ICH4) AC'97 Audio Controller (rev 01)
> 00:1f.6 Modem: Intel Corp. 82801DB (ICH4) AC'97 Modem Controller (rev 01)
> 01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]
> 02:00.0 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
> 02:00.1 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
> 02:01.0 Ethernet controller: Intel Corp. 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)
> 02:02.0 Network controller: Intel Corp.: Unknown device 4220 (rev 05)
[-- Attachment #2: config.gz --]
[-- Type: application/x-gzip, Size: 8192 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fwd: Re: Linux 2.6.10-ac8] - Patch breaks audio report
2005-01-13 17:10 ` Takashi Iwai
@ 2005-01-13 17:02 ` Alan Cox
2005-01-13 18:21 ` Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Alan Cox @ 2005-01-13 17:02 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Iau, 2005-01-13 at 17:10, Takashi Iwai wrote:
> He just needs to turn off "Headphone Jack Sense" mixer switch. That
> resets the bit which was turned on by the patch.
>
> The bit was set since most of machines with this codec are laptops and
> need this feature.
Are you sure - I've been _deluged_ by complaints about audio breakage
from this change ?
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fwd: Re: Linux 2.6.10-ac8] - Patch breaks audio report
2005-01-10 18:28 [Fwd: Re: Linux 2.6.10-ac8] - Patch breaks audio report Alan Cox
@ 2005-01-13 17:10 ` Takashi Iwai
2005-01-13 17:02 ` Alan Cox
0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2005-01-13 17:10 UTC (permalink / raw)
To: Alan Cox; +Cc: alsa-devel
At Mon, 10 Jan 2005 18:28:31 +0000,
Alan Cox wrote:
>
> > I'm experiencing some troubles with the patches you included in
> > 2.6.10-ac5 about ALSA : the files open and play ok, but no sound is
> > actually outputed...
> >
> > I've found that the patch sound/pci/ac97/ac97_patch.c (hereby
> > attached) is responsible for that (ie when I boot with the full patch
> > minus this one, the sound is ok).
> >
> > Nothing special is printed in dmesg, so I've only attached my lspci
> > output and my .config (along with the patch).
> >
> > Feel free to CC me if more details are needed, for I'm not on the lkml.
He just needs to turn off "Headphone Jack Sense" mixer switch. That
resets the bit which was turned on by the patch.
The bit was set since most of machines with this codec are laptops and
need this feature.
Takashi
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fwd: Re: Linux 2.6.10-ac8] - Patch breaks audio report
2005-01-13 18:21 ` Takashi Iwai
@ 2005-01-13 17:21 ` Alan Cox
2005-01-13 18:32 ` Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Alan Cox @ 2005-01-13 17:21 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Iau, 2005-01-13 at 18:21, Takashi Iwai wrote:
> Hmm, I didn't know this hits so many people. At least, didn't get
> complains on ALSA bugtracks.
I got several (mostly from IBM thinkpad owners) and a similar pattern
occurred in Red Hat bugzilla when it hit fedora testing (again mostly
Thinkpad)
Alan
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fwd: Re: Linux 2.6.10-ac8] - Patch breaks audio report
2005-01-13 17:02 ` Alan Cox
@ 2005-01-13 18:21 ` Takashi Iwai
2005-01-13 17:21 ` Alan Cox
0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2005-01-13 18:21 UTC (permalink / raw)
To: Alan Cox; +Cc: alsa-devel
At Thu, 13 Jan 2005 17:02:34 +0000,
Alan Cox wrote:
>
> On Iau, 2005-01-13 at 17:10, Takashi Iwai wrote:
> > He just needs to turn off "Headphone Jack Sense" mixer switch. That
> > resets the bit which was turned on by the patch.
> >
> > The bit was set since most of machines with this codec are laptops and
> > need this feature.
>
>
> Are you sure - I've been _deluged_ by complaints about audio breakage
> from this change ?
Hmm, I didn't know this hits so many people. At least, didn't get
complains on ALSA bugtracks.
The patch adds basically two controls to turn on/off bits 9 and 11 of
a JACK_SPDIF register on AD1981A/B. The only influenceable change is
that the bit 11 is turned on as default. Turning off via the control
must restore the same register state as previous version.
Maybe, it'd be safer not to touch this bit except for certain
machines? The additional patch is attached below.
Takashi
================================================================
Summary: [ALSA] Don't touch the HP sense bit as default
Disable the toggle of HP sense bit at the initialization since this
looks hitting many people.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
--- linux/sound/pci/ac97/ac97_patch.c 11 Jan 2005 15:28:11 -0000 1.69
+++ linux/sound/pci/ac97/ac97_patch.c 13 Jan 2005 18:17:12 -0000
@@ -1113,7 +1113,9 @@
ac97->build_ops = &patch_ad1981a_build_ops;
snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD198X_MSPLT, AC97_AD198X_MSPLT);
ac97->flags |= AC97_STEREO_MUTES;
+#if 0
snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11); /* HP jack sense */
+#endif
return 0;
}
@@ -1144,7 +1146,9 @@
ac97->build_ops = &patch_ad1981b_build_ops;
snd_ac97_update_bits(ac97, AC97_AD_MISC, AC97_AD198X_MSPLT, AC97_AD198X_MSPLT);
ac97->flags |= AC97_STEREO_MUTES;
+#if 0
snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11); /* HP jack sense */
+#endif
return 0;
}
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fwd: Re: Linux 2.6.10-ac8] - Patch breaks audio report
2005-01-13 17:21 ` Alan Cox
@ 2005-01-13 18:32 ` Takashi Iwai
2005-01-13 18:49 ` Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2005-01-13 18:32 UTC (permalink / raw)
To: Alan Cox; +Cc: alsa-devel
At Thu, 13 Jan 2005 17:21:45 +0000,
Alan Cox wrote:
>
> On Iau, 2005-01-13 at 18:21, Takashi Iwai wrote:
> > Hmm, I didn't know this hits so many people. At least, didn't get
> > complains on ALSA bugtracks.
>
> I got several (mostly from IBM thinkpad owners) and a similar pattern
> occurred in Red Hat bugzilla when it hit fedora testing (again mostly
> Thinkpad)
OK, so it'd be nice to sort out which macines need the bit on and
which need off. IIRC, HP laptops (nx9105, etc) need this bit.
Takashi
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Fwd: Re: Linux 2.6.10-ac8] - Patch breaks audio report
2005-01-13 18:32 ` Takashi Iwai
@ 2005-01-13 18:49 ` Takashi Iwai
0 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2005-01-13 18:49 UTC (permalink / raw)
To: Alan Cox; +Cc: alsa-devel
At Thu, 13 Jan 2005 19:32:32 +0100,
I wrote:
>
> At Thu, 13 Jan 2005 17:21:45 +0000,
> Alan Cox wrote:
> >
> > On Iau, 2005-01-13 at 18:21, Takashi Iwai wrote:
> > > Hmm, I didn't know this hits so many people. At least, didn't get
> > > complains on ALSA bugtracks.
> >
> > I got several (mostly from IBM thinkpad owners) and a similar pattern
> > occurred in Red Hat bugzilla when it hit fedora testing (again mostly
> > Thinkpad)
>
> OK, so it'd be nice to sort out which macines need the bit on and
> which need off. IIRC, HP laptops (nx9105, etc) need this bit.
Additional note: the codec on HP laptop is AD1981B.
Is the one on Thinkpads also AD1981B or AD1981A?
This can be found in /proc/asound/card0/codec97#0/ac97#0-0 file.
If the problematic codec is only AD1981A, we can keep bit on AD1981B
only.
Takashi
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-01-13 18:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-10 18:28 [Fwd: Re: Linux 2.6.10-ac8] - Patch breaks audio report Alan Cox
2005-01-13 17:10 ` Takashi Iwai
2005-01-13 17:02 ` Alan Cox
2005-01-13 18:21 ` Takashi Iwai
2005-01-13 17:21 ` Alan Cox
2005-01-13 18:32 ` Takashi Iwai
2005-01-13 18:49 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.