All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kailang <kailang@realtek.com>
To: "Takashi Iwai (tiwai@suse.de)" <tiwai@suse.de>
Cc: " (alsa-devel@alsa-project.org)" <alsa-devel@alsa-project.org>
Subject: hp_pin was NULL value
Date: Wed, 9 Jan 2019 09:31:33 +0000	[thread overview]
Message-ID: <6FAB7C47BCF00940BB0999A99BE3547A18420E8B@RTITMBSV02.realtek.com.tw> (raw)

Hi Takashi,

Could I move the alc294_hp_init(codec) to below line.
Because hp_pin = spec->gen.autocfg.hp_pins[0] was null value when alc294_hp_init(codec) at original line.
Or move alc269_parse_auto_config() upward.

BR,
Kailang
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7514,7 +7514,6 @@ static int patch_alc269(struct hda_codec *codec)
 		spec->codec_variant = ALC269_TYPE_ALC294;
 		spec->gen.mixer_nid = 0; /* ALC2x4 does not have any loopback mixer path */
 		alc_update_coef_idx(codec, 0x6b, 0x0018, (1<<4) | (1<<3)); /* UAJ MIC Vref control by verb */
-		alc294_hp_init(codec);
 		break;
 	case 0x10ec0300:
 		spec->codec_variant = ALC269_TYPE_ALC300;
@@ -7526,7 +7525,6 @@ static int patch_alc269(struct hda_codec *codec)
 		spec->codec_variant = ALC269_TYPE_ALC700;
 		spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
 		alc_update_coef_idx(codec, 0x4a, 1 << 15, 0); /* Combo jack auto trigger control */
-		alc294_hp_init(codec);
 		break;
 
 	}
@@ -7553,6 +7551,16 @@ static int patch_alc269(struct hda_codec *codec)
 	if (err < 0)
 		goto error;
 
+	switch (codec->core.vendor_id) {
+	case 0x10ec0234:
+	case 0x10ec0274:
+	case 0x10ec0294:
+	case 0x10ec0700:
+	case 0x10ec0701:
+	case 0x10ec0703:
+		alc294_hp_init(codec);
+		break;
+	}
 	if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid) {
 		err = set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
 		if (err < 0)

             reply	other threads:[~2019-01-09  9:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09  9:31 Kailang [this message]
2019-01-09  9:42 ` hp_pin was NULL value Takashi Iwai
2019-01-09  9:45   ` Kailang
2019-01-09  9:56     ` Takashi Iwai
     [not found]     ` <6FAB7C47BCF00940BB0999A99BE3547A18420EE6@RTITMBSV02.realtek.com.tw>
2019-01-09 11:29       ` Takashi Iwai
     [not found]     ` <6FAB7C47BCF00940BB0999A99BE3547A18420F05@RTITMBSV02.realtek.com.tw>
2019-01-09 13:00       ` Takashi Iwai
2019-01-10  3:14         ` Kailang
2019-01-15  2:31         ` Kailang
2019-01-15  6:36           ` Takashi Iwai
2019-01-15  7:43             ` Kailang
2019-01-15  7:53               ` Takashi Iwai
2019-01-15  8:17                 ` Kailang
2019-01-15  8:57                   ` Takashi Iwai
2019-01-15  9:06                     ` Kailang
2019-01-15  9:16                       ` Takashi Iwai
2019-01-15  9:25                         ` Kailang
2019-01-29  8:05                         ` Kailang
2019-01-29  8:28                           ` Takashi Iwai
2019-01-29  8:32                             ` Kailang
2019-01-29  9:11                               ` Takashi Iwai
2019-01-29  8:39                             ` Kailang
2019-01-29 13:22                               ` Takashi Iwai
2019-01-29 15:37                                 ` Takashi Iwai
2019-01-30  6:26                                   ` Kailang

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=6FAB7C47BCF00940BB0999A99BE3547A18420E8B@RTITMBSV02.realtek.com.tw \
    --to=kailang@realtek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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.