From patchwork Wed Jan 9 09:31:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kailang X-Patchwork-Id: 10753729 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 23D9914E5 for ; Wed, 9 Jan 2019 09:31:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1308328D96 for ; Wed, 9 Jan 2019 09:31:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0797B28D9F; Wed, 9 Jan 2019 09:31:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 112D028D96 for ; Wed, 9 Jan 2019 09:31:48 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0D15A26732F; Wed, 9 Jan 2019 10:31:47 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6D97B267343; Wed, 9 Jan 2019 10:31:44 +0100 (CET) Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by alsa0.perex.cz (Postfix) with ESMTP id 0FA7B2665E5 for ; Wed, 9 Jan 2019 10:31:39 +0100 (CET) Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x099Vbpd018807, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtitcasv02.realtek.com.tw[172.21.6.19]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x099Vbpd018807 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 9 Jan 2019 17:31:38 +0800 Received: from RTITMBSV02.realtek.com.tw ([fe80::cc0e:6d5f:56d7:c15f]) by RTITCASV02.realtek.com.tw ([::1]) with mapi id 14.03.0415.000; Wed, 9 Jan 2019 17:31:37 +0800 From: Kailang To: "Takashi Iwai (tiwai@suse.de)" Thread-Topic: hp_pin was NULL value Thread-Index: AdSn/QryJOBoz3PdTxaHkTy2XwSoeg== Date: Wed, 9 Jan 2019 09:31:33 +0000 Message-ID: <6FAB7C47BCF00940BB0999A99BE3547A18420E8B@RTITMBSV02.realtek.com.tw> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.22.105.152] MIME-Version: 1.0 Cc: " \(alsa-devel@alsa-project.org\)" Subject: [alsa-devel] hp_pin was NULL value X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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)