Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5254331pxv; Wed, 28 Jul 2021 06:48:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjdFDyVIVxQdeGxKU9WGQK8dEGDhuW0ndTm95ANZvD1iGMxHeLXdUal3sKlOK40ALX8Heh X-Received: by 2002:a02:620a:: with SMTP id d10mr94678jac.22.1627480098923; Wed, 28 Jul 2021 06:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627480098; cv=none; d=google.com; s=arc-20160816; b=qP732OO+LGNv6Vx5LMfLQo2Gvba7lw4kUtrTI9+EahduY8wRcMGGB9w/M4PMyNkQGR WfDSl7qdy2g2MrU9gAd8GbXqsa6ddDKQJT0Wn9glaRqwrUiW1QCDE6IWj6HTqWWE2zvp r+bzPJHvyYiWU1wUcbqmtJcan77B7idbBYrCTnQE4cUt8l1Hn5VYAb2hHcIK6n4GAJH5 pg6NEMemKBePP4h5tC++Y8qbMUeJ+Uq91+UQ7KLlT4x61X/cqowfN9fhxOkSxgCK5h1v qWcj9OQAGZAOEiyWN1rfbdiYHobPAe4yw4eI4ap/q/RmG7FkPBLNKczY8YMBal3HW1Cq odDQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=i4REo5301mPGc2B6d399nXL2kSmD25xO2mx4FFL4BOs=; b=HaMuc3Qlml/uXTvHgF0cFvXnvX1Btt2CNJKreWHMOhh2U/8FREaBsvnlKgzvhgfdBm PDeeH0TxbpaBmypzUiBhKqvXkcumX4qzlx2l/pI5/LyO4Sj1mv0rg13n22re486tR7M/ jOVa/fDLFLN2yID+sxkbbewhqzA7duME/pfsJft929cg6Vstu8qvmeYbiyq5b9PgAUEx pLvEu8xeTMaoGJezYuQ7vTfFs1IuvCxPklVDZ+sUZq5jUBrk9IPa//qmohSZ4Ub9z9Qe Ccjris0M1BCYViAlbyyzHstcaPgqzKTLu/7a0Y0eRhzRzv2GtL1fyYUDUbFjUrRAHGvt +HOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=IrQEGJ5y; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t26si6809924ioj.103.2021.07.28.06.48.07; Wed, 28 Jul 2021 06:48:18 -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=@cirrus.com header.s=PODMain02222019 header.b=IrQEGJ5y; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236694AbhG1NpR (ORCPT + 99 others); Wed, 28 Jul 2021 09:45:17 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:36870 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236488AbhG1Not (ORCPT ); Wed, 28 Jul 2021 09:44:49 -0400 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 16S5XUqi014335; Wed, 28 Jul 2021 08:44:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=i4REo5301mPGc2B6d399nXL2kSmD25xO2mx4FFL4BOs=; b=IrQEGJ5yM6BlvlPIqJQxUkyyP0QV+62kEtStMTp7AwOnqFyl0qimREaVfrc/TuIFeLgG kMD3R1UaVinLeNpqW+P2zz3rRrYhshEknELwVrVpEUIOP6qHE7GFPozoScKppgCPKqVN njOMfNQGf5nHw1vBDL4WGjCKwVQY7QajEQS0Fa7LSYDY0oaDGgNUQ10Qpl6kG0DhZ7eM GWp2uAWuV+RWqwCn2yIC32B/6FK+k2kxuMVxmYy171M6BQhWHu57rfBylrRhaKqkjUox mZBaRmREAXk/MPTCk+fdpF7AKWcz0L2bsdv/oI60c6di/7U6jJwCl0DAvgs367eQl5x5 Rw== Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0b-001ae601.pphosted.com with ESMTP id 3a30q20fxa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 28 Jul 2021 08:44:32 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 28 Jul 2021 14:44:31 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2242.4 via Frontend Transport; Wed, 28 Jul 2021 14:44:31 +0100 Received: from vitaly-Inspiron-5415.ad.cirrus.com (unknown [198.90.238.32]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 17F3046E; Wed, 28 Jul 2021 13:44:31 +0000 (UTC) From: Vitaly Rodionov To: Jaroslav Kysela , Takashi Iwai CC: , , , Stefan Binding Subject: [PATCH v2 05/27] ALSA: hda/cs8409: Reduce HS pops/clicks for Cyborg Date: Wed, 28 Jul 2021 14:43:46 +0100 Message-ID: <20210728134408.369396-6-vitalyr@opensource.cirrus.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728134408.369396-1-vitalyr@opensource.cirrus.com> References: <20210728134408.369396-1-vitalyr@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: QNDrlpy1X4csPBuyfwwXU6oX_lzIWr70 X-Proofpoint-GUID: QNDrlpy1X4csPBuyfwwXU6oX_lzIWr70 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 adultscore=0 clxscore=1015 spamscore=0 mlxlogscore=956 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2107280077 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Binding Enable HSBIAS_SENSE_EN for Cyborg during jack detect to reduce pops and clicks. Do not enable this for Warlock/Bullseye, as it causes ESD issues. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Changes in v2: - No changes --- sound/pci/hda/patch_cs8409.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/patch_cs8409.c b/sound/pci/hda/patch_cs8409.c index e4319a0b9cf6..1745f8b188c6 100644 --- a/sound/pci/hda/patch_cs8409.c +++ b/sound/pci/hda/patch_cs8409.c @@ -390,8 +390,14 @@ static void cs8409_cs42l42_enable_jack_detect(struct hda_codec *codec) mutex_lock(&spec->cs8409_i2c_mux); - /* Set TIP_SENSE_EN for analog front-end of tip sense. */ - cs8409_i2c_write(codec, CS42L42_I2C_ADDR, 0x1b70, 0x0020, 1); + /* Set TIP_SENSE_EN for analog front-end of tip sense. + * Additionally set HSBIAS_SENSE_EN for some variants. + */ + if (codec->fixup_id == CS8409_WARLOCK || codec->fixup_id == CS8409_BULLSEYE) + cs8409_i2c_write(codec, CS42L42_I2C_ADDR, 0x1b70, 0x0020, 1); + else + cs8409_i2c_write(codec, CS42L42_I2C_ADDR, 0x1b70, 0x00a0, 1); + /* Clear WAKE# */ cs8409_i2c_write(codec, CS42L42_I2C_ADDR, 0x1b71, 0x0001, 1); /* Wait ~2.5ms */ -- 2.25.1