Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp34248pja; Fri, 22 Nov 2019 03:06:24 -0800 (PST) X-Google-Smtp-Source: APXvYqw1+pcfiR5n7ELS6agqg7ky5yMa1foxu/RxAweTMA/BVZcydYt2NuCDB2ZlBO/zzOm3x5lz X-Received: by 2002:aa7:d6cf:: with SMTP id x15mr322897edr.202.1574420783792; Fri, 22 Nov 2019 03:06:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420783; cv=none; d=google.com; s=arc-20160816; b=w6PgnHyfwIzpADdmpi2TLRVnLeMJXKbC/5XFOIzmdo5t+dCgoejyGi5BZ1lmcgMkQU 3zLXur8jibXxKLDh5CtUoXDlOt/C5m5pmVLYCEmLLE2mwdEZG6CI0MNYrbP7gCLjxeGx yNfeoJ2MJ4lI082EGMnexZ4MoQoRSNgK+itSnKxxdaNdbA8ais+i3X+r9pteHh12VXN9 96oFBDQ7qaN9zJun+VuzjUa0W7g8/KyV5qMbbE3n6wzAFCCa4HRy02kCxRzEt2Kgq9T/ W4H7nDjqSYeKZytLpTxi0r+Ok5/NK5FBILUoGu4hB5j23oWhBCUle2DZZ8QGwyrhcCDJ GukA== 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=BmsLJrG6ok9/VVgmw2Ryb1EwRKkK/iq6X1ZqKNxBSFM=; b=sBTO+FXSBIWrd5SGDi765fLNDjs2222p3ZcGOXRf8TzI5z79RZ5orpFecX0TU7jCQw zZc15eT21EXZTi8k+bVnhBlpG+N4JD3iDc1RRTYh72Xzvd/q+iAxpImV5DrNTglwxK1z HEJ8aF1bYo7sKSirUobtw+ahUOFuxIUUCN5wZwK/XwgD5lGO02hHsH72Fvg0HTSNvTDU CveBojQO1oRKv2PlUq4RRMv12bkZ6XJpugbDB+c7DBo8OdMa+NgIacwZD5xhEjkJHs3M GPZo0b5jYtO/WL6oTm7qSNX5irxKMOoRKXf+mQ2ZqjTHTkbW8JWIoIk0I/vsp1VmWnF/ 323g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="mC/pRhoR"; 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 r12si472887ejx.217.2019.11.22.03.05.59; Fri, 22 Nov 2019 03:06:23 -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="mC/pRhoR"; 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 S1731511AbfKVLEI (ORCPT + 99 others); Fri, 22 Nov 2019 06:04:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:58706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730859AbfKVLEE (ORCPT ); Fri, 22 Nov 2019 06:04:04 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 99D692084D; Fri, 22 Nov 2019 11:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420644; bh=UrD8YiwKxXaJ/kMLAEuxrBkiQf0urUIp4Z3Wm6yFIqQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mC/pRhoRje24QTG1xbrP/Jr3aOg/rnuHAbrwQDbzMbZ9iJ2y9wGM9HPtfG8ztE3JU 6HCjpSERA6D6/dJWXwQBy2D4cR8Co9vDJMcRm7SRsFtbwvlzX3zkbvWIRKbx3c9S3P rBhUWEOr7oQMShRTO0Ifmyg2L+teEn1yMdqkE/Co= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Connor McAdams , Takashi Sakamoto , Takashi Iwai , Sasha Levin Subject: [PATCH 4.19 178/220] ALSA: hda/ca0132 - Fix input effect controls for desktop cards Date: Fri, 22 Nov 2019 11:29:03 +0100 Message-Id: <20191122100925.648885708@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Connor McAdams [ Upstream commit 7a2dc84fc480aec4f8f96e152327423014edf668 ] This patch removes the echo cancellation control for desktop cards, and makes use of the special 0x47 SCP command for noise reduction. Signed-off-by: Connor McAdams Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/hda/patch_ca0132.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index f2cabfdced05c..6a9b89e05daea 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -4521,7 +4521,7 @@ static int ca0132_effects_set(struct hda_codec *codec, hda_nid_t nid, long val) val = 0; /* If Voice Focus on SBZ, set to two channel. */ - if ((nid == VOICE_FOCUS) && (spec->quirk == QUIRK_SBZ) + if ((nid == VOICE_FOCUS) && (spec->use_pci_mmio) && (spec->cur_mic_type != REAR_LINE_IN)) { if (spec->effects_switch[CRYSTAL_VOICE - EFFECT_START_NID]) { @@ -4540,7 +4540,7 @@ static int ca0132_effects_set(struct hda_codec *codec, hda_nid_t nid, long val) * For SBZ noise reduction, there's an extra command * to module ID 0x47. No clue why. */ - if ((nid == NOISE_REDUCTION) && (spec->quirk == QUIRK_SBZ) + if ((nid == NOISE_REDUCTION) && (spec->use_pci_mmio) && (spec->cur_mic_type != REAR_LINE_IN)) { if (spec->effects_switch[CRYSTAL_VOICE - EFFECT_START_NID]) { @@ -5856,8 +5856,8 @@ static int ca0132_build_controls(struct hda_codec *codec) */ num_fx = OUT_EFFECTS_COUNT + IN_EFFECTS_COUNT; for (i = 0; i < num_fx; i++) { - /* SBZ and R3D break if Echo Cancellation is used. */ - if (spec->quirk == QUIRK_SBZ || spec->quirk == QUIRK_R3D) { + /* Desktop cards break if Echo Cancellation is used. */ + if (spec->use_pci_mmio) { if (i == (ECHO_CANCELLATION - IN_EFFECT_START_NID + OUT_EFFECTS_COUNT)) continue; -- 2.20.1