Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4671179ioa; Wed, 27 Apr 2022 08:37:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlVFB5Hz26OTxI/1Bc6RdFxKl3kC2GiQd9p6c2GzPlkMz+pM6q6ZQtnyXGoecm5uCTaS6b X-Received: by 2002:a17:902:7795:b0:158:def5:526 with SMTP id o21-20020a170902779500b00158def50526mr29560143pll.0.1651073849673; Wed, 27 Apr 2022 08:37:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651073849; cv=none; d=google.com; s=arc-20160816; b=zO6CPwpMrdxVq+S+NCWYhXT82znAEJ+otA8qbs5eLjSFxH0grNMl5rTo8ULQCs/HkK yzJH8WQG9Bps6VzNrKCFDH/DPl2k0o4GChaPf9M4F7YXgmfsUnATag+4Ls/4tgeoQUij OgAkMOD+SENwMQQ7t2WWlLmTSUoHINxnMNrf9PAkDvQRpIlPBxne1C3Mjo8NG30aWDLt kuTz1EqGj4yd2jBQvD0K+vRu2wyfxr1FurzmzR96p9rcRGngfbK5Yyokte/CsN7vO9wL 9EsgejCsxPpMVBdvUDnmATEAIoq6mGfpEl7oil3C9Mbo63ogW9lkNIHO3oSOwaT3AY5b Zwvw== 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=f4Qm4l3DggEGqF7/yrbHCzC0xl3bpwYTloUS2yRU4Ik=; b=07/M9R58sR+YKBTL/SLS+qDkkkHHieKL3G676blgy2YDBUwRAWazQantKXx+6mv6cX jG4z93kME8iUO8aQr36qwk/JZNzhhc/c+9nHzJUbt2EZKdTGnV+VqSsY4ewilHidAdSb eV2qU4CWo+JFwsE6p5Pj+RWXmdBtSAtvc/2tsCT4WsjF2byKdFOixwOvyNIx17Uddsop zfjMAKO6kPnucQJouQ7Mz5LnlJ6mDegmlISFsauLeJV+GBlHVlhelSNGqFwEZy2H1hrf /V0bhN24t+2hWypExcoSpsI8dTfXvqA9W4YUfjmn201jAFBmLPvrZqETeJr+tBCML5Vf PKSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=iYOQvP6d; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r26-20020a63a55a000000b003ab1d15be01si1949304pgu.51.2022.04.27.08.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 08:37:29 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=iYOQvP6d; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E76F32D2E86; Wed, 27 Apr 2022 08:09:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239451AbiD0PMd (ORCPT + 99 others); Wed, 27 Apr 2022 11:12:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239214AbiD0PLn (ORCPT ); Wed, 27 Apr 2022 11:11:43 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D9FF1AFF77 for ; Wed, 27 Apr 2022 08:08:24 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23RBg6qL022428; Wed, 27 Apr 2022 10:07:43 -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=f4Qm4l3DggEGqF7/yrbHCzC0xl3bpwYTloUS2yRU4Ik=; b=iYOQvP6d1WIYkC4kyS/tK6L5AVq6JABbEsPnxdSxM0RFMKPW2Gh+UWV8x2dh1RFDVRGJ NQdzFgNB6bUVwI+6Nh0U1vVtaAkewHaN5imrjV967ZC4xOkkGhxmqvjqbiEv+2jKvAHy 378+BBp2KQ00aZfT+HQ5P67fz1HWuS+tP9JdgqaZ+3UG6DTx4hYKpQ82iw+/WNVk39r6 SQxHC5h3icLrR+vDtrd0+ai/yd/gZCovkrDq5ATi63WsuBlSM3keOuF28m4YQaEiu7iW sPXgX9MBX8HHcFpEbhkQowGhFtR6EJcS3c70x+kwcpREu33krn9OcO8tnIREqBHYbwdo 9Q== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3fprt60xte-14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 27 Apr 2022 10:07:42 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 27 Apr 2022 16:07:33 +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.2375.24 via Frontend Transport; Wed, 27 Apr 2022 16:07:33 +0100 Received: from vitaly-Legion-7-16ACHg6.ad.cirrus.com (unknown [198.90.238.170]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id D3BBB478; Wed, 27 Apr 2022 15:07:32 +0000 (UTC) From: Vitaly Rodionov To: Jaroslav Kysela , Takashi Iwai , Mark Brown CC: , , , Stefan Binding Subject: [PATCH 24/26] ALSA: hda: cs35l41: Add defaulted values into dsp bypass config sequence Date: Wed, 27 Apr 2022 16:07:18 +0100 Message-ID: <20220427150720.9194-25-vitalyr@opensource.cirrus.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220427150720.9194-1-vitalyr@opensource.cirrus.com> References: <20220427150720.9194-1-vitalyr@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: wNa6Duazn5yzbUKN4oExVIoVithNY1dr X-Proofpoint-ORIG-GUID: wNa6Duazn5yzbUKN4oExVIoVithNY1dr X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Binding The config sequences for running with and without firmware and DSP are different. The original behavior assumed that we would only run without DSP only in the case where firmware load failed. This meant the non-firmware sequence was written with the assumtion that various registers would be set to their default value. However, to support the ability to unload the firmware, the non-firmware register sequence must be updated to update all required registers, including values that would be defaulted, in case the firmware sequence, which could have already run, has changed their value. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov --- sound/pci/hda/cs35l41_hda.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index 7e87b355b369..0eca85f3c80e 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -37,11 +37,24 @@ static efi_guid_t efi_guid = CIRRUS_EFI_GUID; static const struct reg_sequence cs35l41_hda_config[] = { { CS35L41_PLL_CLK_CTRL, 0x00000430 }, // 3072000Hz, BCLK Input, PLL_REFCLK_EN = 1 + { CS35L41_DSP_CLK_CTRL, 0x00000003 }, // DSP CLK EN { CS35L41_GLOBAL_CLK_CTRL, 0x00000003 }, // GLOBAL_FS = 48 kHz { CS35L41_SP_ENABLES, 0x00010000 }, // ASP_RX1_EN = 1 { CS35L41_SP_RATE_CTRL, 0x00000021 }, // ASP_BCLK_FREQ = 3.072 MHz { CS35L41_SP_FORMAT, 0x20200200 }, // 32 bits RX/TX slots, I2S, clk consumer + { CS35L41_SP_HIZ_CTRL, 0x00000002 }, // Hi-Z unused + { CS35L41_SP_TX_WL, 0x00000018 }, // 24 cycles/slot + { CS35L41_SP_RX_WL, 0x00000018 }, // 24 cycles/slot { CS35L41_DAC_PCM1_SRC, 0x00000008 }, // DACPCM1_SRC = ASPRX1 + { CS35L41_ASP_TX1_SRC, 0x00000018 }, // ASPTX1 SRC = VMON + { CS35L41_ASP_TX2_SRC, 0x00000019 }, // ASPTX2 SRC = IMON + { CS35L41_ASP_TX3_SRC, 0x00000032 }, // ASPTX3 SRC = ERRVOL + { CS35L41_ASP_TX4_SRC, 0x00000033 }, // ASPTX4 SRC = CLASSH_TGT + { CS35L41_DSP1_RX1_SRC, 0x00000008 }, // DSP1RX1 SRC = ASPRX1 + { CS35L41_DSP1_RX2_SRC, 0x00000009 }, // DSP1RX2 SRC = ASPRX2 + { CS35L41_DSP1_RX3_SRC, 0x00000018 }, // DSP1RX3 SRC = VMON + { CS35L41_DSP1_RX4_SRC, 0x00000019 }, // DSP1RX4 SRC = IMON + { CS35L41_DSP1_RX5_SRC, 0x00000020 }, // DSP1RX5 SRC = ERRVOL { CS35L41_AMP_DIG_VOL_CTRL, 0x00000000 }, // AMP_VOL_PCM 0.0 dB { CS35L41_AMP_GAIN_CTRL, 0x00000084 }, // AMP_GAIN_PCM 4.5 dB }; -- 2.32.0