Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5430241iob; Mon, 9 May 2022 16:34:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPaTbLkZF79TLfqoSV5NEN/pyF0axOIUyPVAkvnUHgy2Ohuv085rnZ++JLGOzCKuvvSylH X-Received: by 2002:ac8:7f13:0:b0:2f3:b3d2:2b1f with SMTP id f19-20020ac87f13000000b002f3b3d22b1fmr17582708qtk.504.1652139296506; Mon, 09 May 2022 16:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652139296; cv=none; d=google.com; s=arc-20160816; b=jSt5XfIPkjxd4Ggau4HOBC4JjO97WeztYqJfjTUdAjGcSdDtx4gbPIEmsyvBk9Wpfz O+4n6v2PK4OXtq1a5RXImdUdFaagHkwviajScbwF+MrvNdhgeKafcHkpMit8brpvqjO4 DfFha1oGcMVeuIZNm0wpoBklMqrMMlUaq7cql/NsWTni/ln/5GvTfRChYNNcYbMlE8sl hIZM7fQy2zDfYSYJ8OKi/bK1goIp90JnTtq4prB3J0Kr1DFp/CmTl3Wgl7nDs+ymungU ojUnq+ZPzODX56ZoaQoM9HxMEohHpilgFW6EJuoH4nrVWmQkOxRO87qKJGi1oEGL7wuK dsgA== 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=g5bGeQ1rPHq2n/rp9Q48HoKggmDHiEnLITCCdTT4iWo=; b=WAef70pYiRElldVclSz6vrhs21lK4wCvlco7Ohelr7p3BhKRlt6zmGW54rBP2iWKE6 qD3u0DXiYTH2VD7bB4jIzwsiO1516rM9AjelMmqlx46nZVPF+1A5fgFuNt6MI/HU9Ijl ZlafUHD3h0y2FiOvYe6y1bt7prqQ3d5OgVX8ZxEC/y1AymzQI3vhj7j/pYfN8rIlF4et l4QMfnXmlb2buYCxrK+UUY2A6uAm6VYHVkPlckDYF0k91/49aH59vzwBb0I8t1Zjbj8w 0Ss0x8m/PB1kaBw4J/cWUq8ygOBpkKnANgE7A2lTQ4pJt/lY4r9Z+CC4wuL362+oObup 4zAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=k2YYmBZq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i5-20020a056214020500b0045aefd28749si6056618qvt.280.2022.05.09.16.34.41; Mon, 09 May 2022 16:34:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=k2YYmBZq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231210AbiEIVyM (ORCPT + 99 others); Mon, 9 May 2022 17:54:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbiEIVvU (ORCPT ); Mon, 9 May 2022 17:51:20 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51AAE2725C0 for ; Mon, 9 May 2022 14:47:25 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 249BF6xi021606; Mon, 9 May 2022 16:47:15 -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=g5bGeQ1rPHq2n/rp9Q48HoKggmDHiEnLITCCdTT4iWo=; b=k2YYmBZqGz/fDYjV5OclsTXPto5Kb6Vc1sbnD1GJRmUcBaDY1xOza3Uqh44scQcHm0tc 3G9Sep0i7LT8fWflNsigQJWiTingfoNq2rq2mLivKLl4NLlEK1ramTeVRfJKJN2pyv7e 091sWwbiSjL7ALXwl2nGQIP4p+YjdEqAkzSjx6w9Cs2o51oqBvVSjSo/+rTSCqEZEquf O/PjhgmhUCwrfhjU3TzMN2ZnA3sIIV7M+ZJ9li06IPTpw1aUrlToecE8mGTrWgmMjHhB VjmrTWdnrqZbK34lM9ZTXARzduSs2yFbFSqjPhxQnCRj0cBnK7lTn86l11qYGp/YuSdc QQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3fwp613jer-13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 09 May 2022 16:47:15 -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.2375.24; Mon, 9 May 2022 22:47:13 +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; Mon, 9 May 2022 22:47:13 +0100 Received: from vitaly-Legion-7-16ACHg6.ad.cirrus.com (unknown [198.90.238.55]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 9A16711D3; Mon, 9 May 2022 21:47:13 +0000 (UTC) From: Vitaly Rodionov To: Jaroslav Kysela , Takashi Iwai , Mark Brown CC: , , , Stefan Binding Subject: [PATCH v2 24/26] ALSA: hda: cs35l41: Add defaulted values into dsp bypass config sequence Date: Mon, 9 May 2022 22:47:01 +0100 Message-ID: <20220509214703.4482-25-vitalyr@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509214703.4482-1-vitalyr@opensource.cirrus.com> References: <20220509214703.4482-1-vitalyr@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: im2-oD9-T5zpqbtRUoJxV6bi-EpJRO-- X-Proofpoint-ORIG-GUID: im2-oD9-T5zpqbtRUoJxV6bi-EpJRO-- X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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.34.1