Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5243607imu; Tue, 15 Jan 2019 13:57:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN444UEUlOH7J4q6Wn/2STN+9QydIZU4vgvtFWWeoQ0SzWTSwUmTyzhxr+Ga23zQpW+rFCvH X-Received: by 2002:a62:528e:: with SMTP id g136mr6456805pfb.111.1547589461733; Tue, 15 Jan 2019 13:57:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547589461; cv=none; d=google.com; s=arc-20160816; b=oR7167CCSjwbRVgZ9Grye7iEIrGPA7Zbe3UhUv8WFIGf6Cjm8kVKrIVLut1MCtcbdD R/0bzS5WetTzlAcgYGRrIZuOwuauvMxtDUQG3Ua3CsZDYIMaHpn4g4yNOuY0erHjo2cs IuCpp/ywosJGAJQrHjvpLKVYL2h/5lNge6sc5NBYjZwriSUXks6zWmFojnQ88NwJY3Tj kfw/+TJ8B1huk4An6fI+823s5b4SSKwnLkhjb//vt9SE1FBovqdbrNwuoAysAjM0DHKY Mov+Y8qpLB1WXjQLB2FJEv/VZdDaTS0YBhqXF0NQbvjolauHH96sSGW73GxQzaywfCG/ lJhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=w2D2809X28xrh81Dj5W5ngwJ7FvKloypDlYMWHkdkTY=; b=CYXVBWMP+XZ98xY+BW7H0WPUNUQWDz31bNK3zhS/FYfzXwP/rOMkOHRPM2cO1E1tUP QOqXRa3WVOELL5ufOaU3iGNIhDtrrqIf8oRfjU2RJa8zxpK4revp81xQA0zWsCAXNSqX tcRHEr0S3qcZ76UQaz5LF86kwc98hLWdK7XgzsHT+oENICV5W4wgMaNuYTb668lSvJxy NlGcFyODI+cUEw6ym+CQsRlHf2FmZvXrdq9OZseuEO83ZMll7v6c/5DX2XyMT8gow4ye REfikmLTP5F7d3/FJD5tP0/7oAirwEBQ6qF2WcVWIR7v9Zcgl0RzyIfZedXYJ1TPt5+W ciIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FQdoGnCw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y18si4047634plp.269.2019.01.15.13.57.22; Tue, 15 Jan 2019 13:57:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FQdoGnCw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731668AbfAOQnn (ORCPT + 99 others); Tue, 15 Jan 2019 11:43:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:33206 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733302AbfAOQnk (ORCPT ); Tue, 15 Jan 2019 11:43:40 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DA82120645; Tue, 15 Jan 2019 16:43:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547570620; bh=7D/W5gU3PwDy7ONzcFUfj39WhL44yYAhB4kOb4G+gG4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FQdoGnCwF/OJKme9EjwJUjFdQZ78fvx8T3SI2e+ebZPxK9q6+J2QfGvZeR22Ekljp GaAYD9lUATi979yCoeD2s2qF9S2BSki+ox46OdlVfB0+JCIYIPnVR9FSsHyzY3S+3f lkShC7d6auFA1mVFGhHDNGcv/98ofvoxVRdObEpY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kailang Yang , Takashi Iwai Subject: [PATCH 4.20 11/57] ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225 Date: Tue, 15 Jan 2019 17:35:52 +0100 Message-Id: <20190115154911.350511313@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190115154910.734892368@linuxfoundation.org> References: <20190115154910.734892368@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kailang Yang commit d1dd42110d2727e81b9265841a62bc84c454c3a2 upstream. Disable Headset Mic VREF for headset mode of ALC225. This will be controlled by coef bits of headset mode functions. [ Fixed a compile warning and code simplification -- tiwai ] Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -5381,6 +5381,13 @@ static void alc285_fixup_invalidate_dacs snd_hda_override_wcaps(codec, 0x03, 0); } +static void alc_fixup_disable_mic_vref(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + if (action == HDA_FIXUP_ACT_PRE_PROBE) + snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); +} + /* for hda_fixup_thinkpad_acpi() */ #include "thinkpad_helper.c" @@ -5493,6 +5500,7 @@ enum { ALC293_FIXUP_LENOVO_SPK_NOISE, ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, ALC255_FIXUP_DELL_SPK_NOISE, + ALC225_FIXUP_DISABLE_MIC_VREF, ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, ALC295_FIXUP_DISABLE_DAC3, ALC280_FIXUP_HP_HEADSET_MIC, @@ -6192,6 +6200,12 @@ static const struct hda_fixup alc269_fix .chained = true, .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE }, + [ALC225_FIXUP_DISABLE_MIC_VREF] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc_fixup_disable_mic_vref, + .chained = true, + .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE + }, [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = { .type = HDA_FIXUP_VERBS, .v.verbs = (const struct hda_verb[]) { @@ -6201,7 +6215,7 @@ static const struct hda_fixup alc269_fix {} }, .chained = true, - .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE + .chain_id = ALC225_FIXUP_DISABLE_MIC_VREF }, [ALC280_FIXUP_HP_HEADSET_MIC] = { .type = HDA_FIXUP_FUNC,