mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Matej Laitl <strohel@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
	alsa-devel <alsa-devel@alsa-project.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [ALSA] HDA: no sound in headphone-out caused by commit f889fa91ad47e (2.6.25-rc1 regression)
Date: Tue, 12 Feb 2008 12:34:51 +0100	[thread overview]
Message-ID: <s5hzlu6tnl0.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5h7ihav3nr.wl%tiwai@suse.de>

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);

  reply	other threads:[~2008-02-12 11:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 20:58 Matej Laitl
2008-02-12 10:13 ` Takashi Iwai
2008-02-12 10:50   ` Matej Laitl
2008-02-12 11:02     ` Takashi Iwai
2008-02-12 11:34       ` Takashi Iwai [this message]
2008-02-12 12:06         ` Matej Laitl
2008-02-12 14:02           ` Takashi Iwai
2008-02-12 14:13             ` Takashi Iwai
2008-02-12 15:27               ` Matej Laitl
2008-02-12 17:14                 ` Takashi Iwai
2008-02-12 18:24                   ` Matej Laitl
2008-02-12 22:57                     ` Matej Laitl
2008-02-13 10:59                       ` Takashi Iwai
2008-02-13 12:05                         ` Matej Laitl
2008-02-13 13:06                           ` Takashi Iwai
2008-02-13 15:00                             ` Matej Laitl
2008-02-13 15:25                               ` Takashi Iwai
2008-02-13 11:01                     ` Takashi Iwai
2008-02-12 11:36       ` Matej Laitl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hzlu6tnl0.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=strohel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®