Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762318AbYBLLfA (ORCPT ); Tue, 12 Feb 2008 06:35:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760881AbYBLLex (ORCPT ); Tue, 12 Feb 2008 06:34:53 -0500 Received: from mail.suse.de ([195.135.220.2]:36316 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760838AbYBLLew (ORCPT ); Tue, 12 Feb 2008 06:34:52 -0500 Date: Tue, 12 Feb 2008 12:34:51 +0100 Message-ID: From: Takashi Iwai To: Matej Laitl Cc: Jaroslav Kysela , alsa-devel , LKML Subject: Re: [ALSA] HDA: no sound in headphone-out caused by commit f889fa91ad47e (2.6.25-rc1 regression) In-Reply-To: References: <200802112158.41989.strohel@gmail.com> <200802121150.36743.strohel@gmail.com> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (+CVS-20070806) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2542 Lines: 78 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/