Re: Linux 2.6.10-ac8

From: Jules Villard
Date: Sun Jan 09 2005 - 12:19:23 EST


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: config.gz
Description: GNU Zip compressed data