All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Julian Sikorski <belegdol@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: model needed for Clevo P150HM (Realtek ALC892)
Date: Thu, 30 Jun 2011 08:54:20 +0200	[thread overview]
Message-ID: <s5hzkkzreqr.wl%tiwai@suse.de> (raw)
In-Reply-To: <4E0C17F2.5070704@gmail.com>

At Thu, 30 Jun 2011 08:30:10 +0200,
Julian Sikorski wrote:
> 
> W dniu 30.06.2011 07:26, Takashi Iwai pisze:
> > At Wed, 29 Jun 2011 21:29:38 +0200,
> > Julian Sikorski wrote:
> >>
> >> I also tried merging sound-2.6/master with Linus's tree, but this also
> >> did not help.
> > 
> > It's really strange.  Are you sure that this is the kernel you
> > modified properly?  Before further debugging, check two things:
> > 
> > - Run "git log sound/pci/hda/patch_realtek.c" and the first few
> >   entries, whether they come from sound git tree.  For example,
> >   check the commit below is contained:
> > 
> >   commit 7ec9c6ccc6007b14a916021d4ba7ffbcc7822ae3
> >   Author: Takashi Iwai <tiwai@suse.de>
> >   Date:   Mon Jun 27 15:53:38 2011 +0200
> > 
> >     ALSA: hda - Fix volume-init for ALC259 with invalid widget caps
> 
> commit 0b0c8490670a77b937f502491ae9d5236aa4054a
> Author: Takashi Iwai <tiwai@suse.de>
> Date:   Tue Jun 28 12:45:47 2011 +0200
> 
>     ALSA: hda - Create snd_hda_get_conn_index() helper function
> 
>     Create snd_hda_get_conn_index() helper function for obtaining the
>     connection index of the widget.  Replaced the similar codes used in
>     several codec-drivers with this common helper.
> 
>     Signed-off-by: Takashi Iwai <tiwai@suse.de>
> 
> commit 4f574b7b1a1cc8aac617e938459e8f03a641e678
> Author: Takashi Iwai <tiwai@suse.de>
> Date:   Mon Jun 27 16:17:07 2011 +0200
> 
>     ALSA: hda - More volume-init fixes for ALC267 codec
> 
>     More similar fixes like previous commits: handle the exceptional case
>     like ALC267 where no volume amp is found in ADC widget but in the
>     capsrc widget instead.
> 
>     Also minor checks for avoiding possible erros: no connection-select
>     when the pin has a single selection, and add beep verbs only when the
>     0x1d is used for beep.
> 
>     Signed-off-by: Takashi Iwai <tiwai@suse.de>
> 
> To be even more sure, I re-synced your branch again and built a new
> kernel. I am attaching patch_realtek.c file being built. Fresh
> alsa-info.sh is here:
> http://www.alsa-project.org/db/?f=5051b2cb788b1db4273e06e98a78783dd0ec679f

OK, then it's correct.

> >     
> > - Confirm the running kernel is what you really built and installed.
> >   You can modify the suffix via $CONFIG_LOCALVERSION in .config file.
> >   Name it uniquely, rebuild, re-install and reboot.  The new suffix
> >   should appear in the output of "uname -r".
> 
> belegdol4 is the suffix I added:
> $ uname -r
> 3.0-0.rc5.git0.1.belegdol4.fc15.x86_64
> 
> > - Once when these are correct, check /proc/asound/card0/codec#0:
> >   the widget NID 0x02 should contain "Speaker Playback Volume" instead
> >   of "Headphone Playback Volume" with the latest driver.
> 
> Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
>   Control: name="Headphone Playback Volume", index=0, device=0
> 
> Perhaps I need to specify a correct model to enable this code?

No, you shouldn't pass any model option.

Could you apply the patch below to add some debug prints, and give
the relevant kernel messages you get?  Just grep lines with 'XXX'.


Takashi

---
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7b96dce..3134555 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -18770,8 +18770,10 @@ static hda_nid_t alc_auto_look_for_dac(struct hda_codec *codec, hda_nid_t pin)
 static hda_nid_t get_dac_if_single(struct hda_codec *codec, hda_nid_t pin)
 {
 	hda_nid_t sel = alc_go_down_to_selector(codec, pin);
-	if (snd_hda_get_conn_list(codec, sel, NULL) == 1)
+	if (snd_hda_get_conn_list(codec, sel, NULL) == 1) {
+		printk(KERN_DEBUG "XXX pin %x coupled with a single DAC\n", pin);
 		return alc_auto_look_for_dac(codec, pin);
+	}
 	return 0;
 }
 
@@ -18783,6 +18785,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec)
 	bool redone;
 	int i;
 
+	printk(KERN_DEBUG "XXX alc662_auto_fill_dac_nids called\n");
  again:
 	spec->multiout.num_dacs = 0;
 	spec->multiout.hp_nid = 0;
@@ -18813,6 +18816,7 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec)
 			 * checking the hard-wired DACs
 			 */
 			redone = true;
+			printk(KERN_DEBUG "XXX redoing...\n");
 			goto again;
 		}
 	}
@@ -18826,6 +18830,17 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec)
 				sizeof(hda_nid_t) * (cfg->line_outs - i - 1));
 	}
 
+	printk(KERN_DEBUG "XXX filled dacs: %x/%x/%x/%x/%x, hp %x, ext %x/%x/%x\n",
+	       spec->private_dac_nids[0],
+	       spec->private_dac_nids[1],
+	       spec->private_dac_nids[2],
+	       spec->private_dac_nids[3],
+	       spec->private_dac_nids[4],
+	       spec->multiout.hp_nid,
+	       spec->multiout.extra_out_nid[0],
+	       spec->multiout.extra_out_nid[1],
+	       spec->multiout.extra_out_nid[2]);
+
 	return 0;
 }
 
@@ -18877,6 +18892,7 @@ static int alc662_auto_create_multi_out_ctls(struct hda_codec *codec,
 		mix = alc_auto_dac_to_mix(codec, pin, nid);
 		if (!mix)
 			continue;
+		printk(KERN_DEBUG "XXX create mixer ch %d pin %x dac %x mix %x\n", i, pin, nid, mix);
 		name = alc_get_line_out_pfx(spec, i, true, &index);
 		if (!name) {
 			/* Center/LFE */
@@ -19026,6 +19042,7 @@ static int alc_auto_fill_multi_ios(struct hda_codec *codec,
 			dac = alc_auto_look_for_dac(codec, nid);
 			if (!dac)
 				continue;
+			printk(KERN_DEBUG "XXX added multi-io pin %x, dac %x\n", nid, dac);
 			spec->multi_io[num_pins].pin = nid;
 			spec->multi_io[num_pins].dac = dac;
 			num_pins++;
@@ -19128,6 +19145,7 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec,
 
 	if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT && cfg->hp_outs == 1) {
 		/* use HP as primary out */
+		printk(KERN_DEBUG "XXX swap primary out to HP\n");
 		cfg->speaker_outs = cfg->line_outs;
 		memcpy(cfg->speaker_pins, cfg->line_out_pins,
 		       sizeof(cfg->speaker_pins));

  parent reply	other threads:[~2011-06-30  6:54 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23  6:36 model needed for Clevo P150HM (Realtek ALC892) Julian Sikorski
2011-06-23 12:41 ` Takashi Iwai
2011-06-23 16:40   ` Julian Sikorski
2011-06-24  8:34     ` Takashi Iwai
2011-06-24  9:12       ` Takashi Iwai
2011-06-24 11:25         ` Julian Sikorski
2011-06-25  7:11           ` Takashi Iwai
2011-06-25  9:22             ` Julian Sikorski
2011-06-25 11:08             ` Julian Sikorski
2011-06-25 11:31               ` Julian Sikorski
2011-06-25 12:01                 ` Julian Sikorski
2011-06-27  6:04                   ` Takashi Iwai
2011-06-27  6:21                     ` Julian Sikorski
2011-06-27  9:19                       ` Takashi Iwai
2011-06-27 12:32                         ` Takashi Iwai
2011-06-27 12:42                           ` Julian Sikorski
2011-06-27 12:46                             ` Takashi Iwai
2011-06-27 12:55                               ` Julian Sikorski
2011-06-27 16:12                                 ` Takashi Iwai
2011-06-27 20:08                           ` Julian Sikorski
2011-06-28  7:12                             ` Takashi Iwai
2011-06-28  8:03                               ` Julian Sikorski
2011-06-28  9:05                                 ` Takashi Iwai
2011-06-28 10:36                                   ` Julian Sikorski
2011-06-28 12:40                                     ` Takashi Iwai
2011-06-29 17:36                               ` Julian Sikorski
2011-06-29 18:16                                 ` Julian Sikorski
2011-06-29 19:29                                   ` Julian Sikorski
2011-06-30  5:26                                     ` Takashi Iwai
2011-06-30  6:33                                       ` Julian Sikorski
     [not found]                                       ` <4E0C17F2.5070704@gmail.com>
2011-06-30  6:54                                         ` Takashi Iwai [this message]
2011-06-30 17:00                                           ` Julian Sikorski
2011-06-30 17:41                                             ` Takashi Iwai
2011-06-30 18:09                                               ` Julian Sikorski
2011-06-30 19:28                                                 ` Takashi Iwai
2011-06-30 20:16                                                   ` Julian Sikorski
2011-07-01  5:21                                                     ` Takashi Iwai
2011-07-01  6:14                                                       ` Julian Sikorski
2011-07-01  6:24                                                         ` Takashi Iwai
2011-07-01  6:27                                                           ` Julian Sikorski
2011-07-01  7:07                                                             ` Julian Sikorski
2011-07-01  7:14                                                               ` Takashi Iwai
2011-07-01 11:18                                                                 ` Julian Sikorski
2011-07-01 22:09                                                                 ` Julian Sikorski
2011-07-01 22:37                                                                   ` Julian Sikorski
2011-07-04 20:47                                                                     ` Julian Sikorski
2011-07-05  8:16                                                           ` Julian Sikorski
2011-07-01  7:32                                                       ` Takashi Iwai
2011-07-01 18:57                                                         ` Julian Sikorski
2011-07-01 19:25                                                           ` Takashi Iwai
2011-07-01 19:35                                                             ` Julian Sikorski
2011-07-03 11:22                                                       ` Julian Sikorski
2011-07-04 22:50                                                       ` Julian Sikorski
2011-07-05  1:31                                                         ` Raymond Yau
2011-07-05  7:45                                                           ` Julian Sikorski
2011-07-17 11:55                                                           ` Julian Sikorski
2011-07-17 12:17                                                             ` Julian Sikorski
2011-07-18  7:35                                                               ` Takashi Iwai
2011-07-18  8:52                                                                 ` Takashi Iwai
2011-07-18 11:15                                                                   ` Julian Sikorski
2011-07-18 11:18                                                                     ` Julian Sikorski
2011-07-18 11:19                                                                     ` Takashi Iwai
2011-07-18 11:42                                                                       ` Julian Sikorski
2011-07-18 12:16                                                                         ` Takashi Iwai
2011-07-18 12:42                                                                           ` Julian Sikorski
2011-07-18 13:23                                                                             ` Takashi Iwai
2011-07-18 13:36                                                                               ` Julian Sikorski
2011-07-05  5:32                                                         ` Takashi Iwai
2011-06-23  6:40 Julian Sikorski

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=s5hzkkzreqr.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=belegdol@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.