[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#658728: linux-image-3.2.0-1-amd64: No more sound



tags 658728 + patch moreinfo
quit

Takashi Iwai wrote:

> I fixed the upstream code no to create the superfluous Auto-Mute
> control.  But the change is a bit intrusive so it's targeted only for
> 3.4 kernel, as you can work around it easily by turning off Auto-Mute
> even in the current tree.

Thanks.

A. Costa, could you try the attached patches, against 3.2.y?  It works
like this:

0. Prerequisites:
	apt-get install git build-essential

1. Get linux 3.2.y:

	git clone -o stable \
	 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
	cd linux

   Or, if you already have a checkout of the kernel:

	cd linux
	git remote add -f stable \
	 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

2. Configure, build, and test:

	git checkout stable/linux-3.2.y
	cp /boot/config-$(uname -r) .config; # current configuration
	make localmodconfig; # optional: minimize configuration
	make deb-pkg; # optionally with -j<num> for parallel build
	dpkg -i ../<name of package>
	reboot

   Hopefully it reproduces the bug: the Auto-Mute control is present
   and enabling it turns off sound.

3. Apply patches and see if they work.

	git apply --index patch1
	git apply --index patch2
	make deb-pkg; # maybe with -j4
	dpkg -i ../<name of package>
	reboot
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 13 Feb 2012 11:55:02 +0100
Subject: [PATCH 1/2] ALSA: hda - Add codec->no_jack_detect flag

commit 71b1e9e43d5199f57c109e20c0f4dffc5c048130 upstream.

Add a new flag to indicate that the codec has no jack-detection cap.
This flag should be set for hardwares that have no jack-detect
implementation although the codec chip itself supports it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 sound/pci/hda/hda_codec.h |    1 +
 sound/pci/hda/hda_local.h |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 564471169cae..f4e3fbff6f94 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -855,6 +855,7 @@ struct hda_codec {
 	unsigned int pins_shutup:1;	/* pins are shut up */
 	unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */
 	unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */
+	unsigned int no_jack_detect:1;	/* Machine has no jack-detection */
 #ifdef CONFIG_SND_HDA_POWER_SAVE
 	unsigned int power_on :1;	/* current (global) power-state */
 	unsigned int power_transition :1; /* power-state in transition */
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 368f0c513819..c78b753e0fc0 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -515,6 +515,8 @@ int snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid);
 
 static inline bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid)
 {
+	if (codec->no_jack_detect)
+		return false;
 	if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT))
 		return false;
 	if (!codec->ignore_misc_bit &&
-- 
1.7.9

From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 13 Feb 2012 11:56:25 +0100
Subject: [PATCH 2/2] ALSA: hda - Suppress auto-mute feature on some machines with ALC861

commit e652f4c861fb7f1f59ff0828db0d85578471932d upstream.

A few machines with ALC861 & co are reported not to work properly with
the auto-mute feature in software.  The auto-mute feature is implemented
in the hardware level, and the jack-detection never works with them.

Also, rename the fixup index as ALC861_FIXUP_* to follow the standard.

[jn: the original rationalized the name of the fixup index, but for
 3.2.y let's not]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 sound/pci/hda/patch_realtek.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 34e5fcc3abd6..4f1f52798e61 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5235,6 +5235,8 @@ static const struct hda_amp_list alc861_loopbacks[] = {
 enum {
 	PINFIX_FSC_AMILO_PI1505,
 	PINFIX_ASUS_A6RP,
+	ALC861_FIXUP_NO_JACK_DETECT,
+	ALC861_FIXUP_ASUS_A6RP,
 };
 
 /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */
@@ -5256,6 +5258,14 @@ static void alc861_fixup_asus_amp_vref_0f(struct hda_codec *codec,
 	spec->keep_vref_in_automute = 1;
 }
 
+/* suppress the jack-detection */
+static void alc_fixup_no_jack_detect(struct hda_codec *codec,
+				     const struct alc_fixup *fix, int action)
+{
+	if (action == ALC_FIXUP_ACT_PRE_PROBE)
+		codec->no_jack_detect = 1;
+}
+
 static const struct alc_fixup alc861_fixups[] = {
 	[PINFIX_FSC_AMILO_PI1505] = {
 		.type = ALC_FIXUP_PINS,
@@ -5269,10 +5279,22 @@ static const struct alc_fixup alc861_fixups[] = {
 		.type = ALC_FIXUP_FUNC,
 		.v.func = alc861_fixup_asus_amp_vref_0f,
 	},
+	[ALC861_FIXUP_NO_JACK_DETECT] = {
+		.type = ALC_FIXUP_FUNC,
+		.v.func = alc_fixup_no_jack_detect,
+	},
+	[ALC861_FIXUP_ASUS_A6RP] = {
+		.type = ALC_FIXUP_FUNC,
+		.v.func = alc861_fixup_asus_amp_vref_0f,
+		.chained = true,
+		.chain_id = ALC861_FIXUP_NO_JACK_DETECT,
+	}
 };
 
 static const struct snd_pci_quirk alc861_fixup_tbl[] = {
+	SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP),
 	SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", PINFIX_ASUS_A6RP),
+	SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT),
 	SND_PCI_QUIRK(0x1584, 0x2b01, "Haier W18", PINFIX_ASUS_A6RP),
 	SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", PINFIX_FSC_AMILO_PI1505),
 	{}
-- 
1.7.9


Reply to: