lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5hzlu6tnl0.wl%tiwai@suse.de>
Date:	Tue, 12 Feb 2008 12:34:51 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	Matej Laitl <strohel@...il.com>
Cc:	Jaroslav Kysela <perex@...ex.cz>,
	alsa-devel <alsa-devel@...a-project.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [ALSA] HDA: no sound in headphone-out caused by commit f889fa91ad47e (2.6.25-rc1 regression)

At Tue, 12 Feb 2008 12:02:16 +0100,
I wrote:
> 
> At Tue, 12 Feb 2008 11:50:36 +0100,
> Matej Laitl wrote:
> > 
> > Takashi Iwai wrote:
> > > Matej Laitl wrote:
> > > > after upgrading from 2.6.24 to 2.6.25-rc1, I lost headphone-out sound
> > > > output of my Intel HDA card - it is quiet no matter what the mixer
> > > > settings are.
> > > >
> > > > (...)
> > > >
> > > > The box is Fujitsu-Siemens Esprimo Mobile M9400 laptop.
> > >
> > > Could you give the output of alsa-info.sh for both working and
> > > non-working kernels?
> > 
> > The locations of alsa-info.sh outputs:
> > no sound in headphones: http://pastebin.ca/901022
> > sound ok: http://pastebin.ca/901016
> > 
> > Both kernels are Linus' tree snapshots as of commit cc13e442952a347f7, the one 
> > with working sound has just the f889fa91ad47e commit reverted.
> 
> Thanks.  It seems that your device has two headphone jacks according
> to the BIOS setup, and this seems to be the problem.
> 
> Could you show the kernel messages like "autoconfig: line_outs..." for
> both cases?  This appears when build with CONFIG_SND_DEBUG=y.

And the patch below may fix your problem.  Give it a try.


Takashi

---

diff -r e84ee72676f0 sound/pci/hda/hda_codec.c
--- a/sound/pci/hda/hda_codec.c	Tue Feb 12 12:11:36 2008 +0100
+++ b/sound/pci/hda/hda_codec.c	Tue Feb 12 12:31:37 2008 +0100
@@ -2821,6 +2821,30 @@ int snd_hda_parse_pin_def_config(struct 
 		}
 	}
 
+	/* FIX-UP:
+	 * If no line-out is defined but multiple HPs are found,
+	 * some of them might be the real line-outs.
+	 */
+	if (!cfg->line_outs && cfg->hp_outs > 1) {
+		int i = 0;
+		while (i < cfg->hp_outs) {
+			/* The real HPs should have the sequence 0x0f */
+			if ((sequences_hp[i] & 0x0f) == 0x0f) {
+				i++;
+				continue;
+			}
+			/* Move it to the line-out table */
+			cfg->line_out_pins[cfg->line_outs] = cfg->hp_pins[i];
+			sequences_line_out[cfg->line_outs] = sequences_hp[i];
+			cfg->line_outs++;
+			cfg->hp_outs--;
+			memmove(cfg->hp_pins + i, cfg->hp_pins + i + 1,
+				sizeof(cfg->hp_pins[0]) * (cfg->hp_outs - i));
+			memmove(sequences_hp + i - 1, sequences_hp + i,
+				sizeof(sequences_hp[0]) * (cfg->hp_outs - i));
+		}
+	}
+
 	/* sort by sequence */
 	sort_pins_by_sequence(cfg->line_out_pins, sequences_line_out,
 			      cfg->line_outs);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ