Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3291621pxk; Mon, 21 Sep 2020 09:51:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxscj5gNELuvDlmwB8zsUAM0X5pMea+Ik7swSyoOOr+IPIyA5FTY1DQXREEZcch4Mimp3gV X-Received: by 2002:a17:906:341b:: with SMTP id c27mr372067ejb.286.1600707066011; Mon, 21 Sep 2020 09:51:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707065; cv=none; d=google.com; s=arc-20160816; b=PgQkbHBPGNMual4oq3G4XHuw5lIYYEbHBzQvETJ5kfU9QGI7okCI79Ckm2YH/NWh0I GEKn/dsZtPsJzoj4wYzLN3AwWM9096nO5eeCQ0I6wZKIQS8bz5d4V3TwLdjfJIWvA4zg Nejfd7lXzcBsKDh54R5o7ch9OBzlIxjNBpYOxznVGKVDp4opEUPT02kLUO6Gwt5F/FkK EIO+IXrooawscU5ZL75V+d/BwYbsGctBznc/hgvLmSfjdG7NgVVG99EwhxyRgMllPODV gWq0TK2Cur35lJefhjxzjx2kZJPGtF5eZ6pASvkCD8QcGcEuXGMFaUGqNdpmf0XZk9uI yCZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=goibCd13v7qR/NADoP/8qQPtBwKZ3eEqmfR6+XgP3eA=; b=b256gOeR6IZtPXZL358mvKsOYMIgLy8uu2qAS8BCcSugOtTdySVREWmRLg+Z72GGmQ EIC7zZ9yg0e1eiWtEz1589pnhMy0CNwTOqhrtEMm6wUuXWlHlORIoRT3IJtck/cUX5LF QxMwVvPZPaqBMplauyrZNw2uEWLxfUAfkYaFpV2YidyMzVl5PpJcC7v+vU4mO5qygle+ cKaswY2ot/P+xVjM/BGmPhl7dAuAVI0ZfopBjFx40A3WJX2ahip31rikWVv4gzMwTrLl MDJdvQxVB7xNrSI8YCezwnuONIh3Idgp5ryfqHjrsngXJTD3TLluOJEA4hIWTxG5BuDF 2djQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Rf2yDP9L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si9409605ejx.468.2020.09.21.09.50.42; Mon, 21 Sep 2020 09:51:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Rf2yDP9L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729794AbgIUQrq (ORCPT + 99 others); Mon, 21 Sep 2020 12:47:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:54674 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729080AbgIUQrk (ORCPT ); Mon, 21 Sep 2020 12:47:40 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 28F412388B; Mon, 21 Sep 2020 16:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706859; bh=S9Rltckgd2kCsmJjdKHLsa9YQCbfkNnbJQ2DlHDG8/0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rf2yDP9LfiHcIFydCYzVF6OkOWNwg8YhBPYDjysIkkJNYaDS9CydbIG+2+pW1xOA7 HeQAa4Rt5KCm70YhLK+V54pfIZRE0i8ks2GpDzQMUemHVks3u0Yt2DONgRf7mVFgOz OmYdLwh91KVV1P+3cfVFEqlJBG8bkeJwYhCFkwyY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kailang Yang , Hui Wang , Takashi Iwai Subject: [PATCH 5.8 094/118] ALSA: hda/realtek - The Mic on a RedmiBook doesnt work Date: Mon, 21 Sep 2020 18:28:26 +0200 Message-Id: <20200921162040.726198426@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hui Wang commit fc19d559b0d31b5b831fd468b10d7dadafc0d0ec upstream. The Mic connects to the Nid 0x19, but the configuration of Nid 0x19 is not defined to Mic, and also need to set the coeff to enable the auto detection on the Nid 0x19. After this change, the Mic plugging in or plugging out could be detected and could record the sound from the Mic. And the coeff value is suggested by Kailang of Realtek. Cc: Kailang Yang Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20200909020041.8967-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6239,6 +6239,7 @@ enum { ALC269_FIXUP_LEMOTE_A1802, ALC269_FIXUP_LEMOTE_A190X, ALC256_FIXUP_INTEL_NUC8_RUGGED, + ALC255_FIXUP_XIAOMI_HEADSET_MIC, }; static const struct hda_fixup alc269_fixups[] = { @@ -7602,6 +7603,16 @@ static const struct hda_fixup alc269_fix .chained = true, .chain_id = ALC269_FIXUP_HEADSET_MODE }, + [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = { + .type = HDA_FIXUP_VERBS, + .v.verbs = (const struct hda_verb[]) { + { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, + { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, + { } + }, + .chained = true, + .chain_id = ALC289_FIXUP_ASUS_GA401 + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -7899,6 +7910,7 @@ static const struct snd_pci_quirk alc269 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI), SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101), SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ + SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC), SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE), SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802), @@ -8076,6 +8088,7 @@ static const struct hda_model_fixup alc2 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"}, {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"}, {.id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc298-samsung-headphone"}, + {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"}, {} }; #define ALC225_STANDARD_PINS \