Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp252290lqo; Thu, 9 May 2024 20:43:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV6ECCA2gcrSn2v80FGDYXSUoK7QPXAYVDvDeOwkULkmGG2MqCrOcO7vni6ijO7J4Le7dWypACiETDLZUH7cU6z7GL1ntWAFnwp5MXEHQ== X-Google-Smtp-Source: AGHT+IFdhh1JK/3b16zNA50gp0Iswako82MPZPmJdrtT8tUgPK5XR13BikVqD6JAMvkVfJcm0uv2 X-Received: by 2002:a05:6808:6290:b0:3c9:91e8:53a8 with SMTP id 5614622812f47-3c9970d1de5mr1583071b6e.54.1715312605594; Thu, 09 May 2024 20:43:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715312605; cv=pass; d=google.com; s=arc-20160816; b=NQivkjqyaGwY2/1T/npPvqltei/7OPzNdpbf0kjH2VmJ78lfbl973+TM0p3wheyADT hz2Bxbjqf5mDztsPXdaE1d/KS9ENeYStQGOZwjK/G6eE6oqMAYwMC77A7pgl+Ne7/i+w VMLPX9Kn9O/D8LSWyNp283zzXwy0yZB/tuTXXn56ClqZcM0DZVWtgtlzh6iTFK2OL1T5 JhEX0+vUiY75snNGQWVgsEVJbkjtRlPidXbiO926SFpQnxr9TO337QzKUDtAelez4+B4 F8cCSZvlwFL4hDAENVQcmgWb/ZAE7SM7cNH+VjeFAghvLTXEI9rPw02A8Qcm6XeEaV9x czNA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ePKK2zPryndYkv7XmifCJAxCubJ5BMU9tcPAaWiyu/U=; fh=ABd84OJQRUrD+A12QMz3wVb/zHQYobBaZgm1K44zlcc=; b=cI6TT5acmQxcevSqQr/5qExgegXHcKx1S4Xd8YqYBswEL+vf5g6ua8Q8K0A3mhXtT3 Raw0ss7JpDr6fZaPtmSgxy5kU3lqq9ngOH4QmLeKCpb0r+uMOaKHuNCLHdKRFflls5l0 8YqimqAC8bN0K2dNtxN4eEQkWWhflRyUn/cjtC8MXsC8hK0UicMKxkARIyVEMFL5C4dQ yXMO2MOeoBYL0RM4GP5a+EekvaG8vjA4mFEe1RJDa+AqrW9TI7cyyz1bAxRE5tG4XECd J3eG4zwttv7DBAtCLvLbR5bCW2dh9aZFmiWrc5MwuxZh0gO8pF+MZm5z1VzDJqwBlN7V Qtaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=R0gEPi0s; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-175261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-634133dec6esi2789380a12.788.2024.05.09.20.43.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 20:43:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=R0gEPi0s; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-175261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B7E39B227DA for ; Fri, 10 May 2024 03:43:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F690149E07; Fri, 10 May 2024 03:42:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="R0gEPi0s" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 860691494DE for ; Fri, 10 May 2024 03:42:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715312574; cv=none; b=SsOq2AlpAHUgLYn9pfIjYIGABXvxucmSq+TGVsl1bynPghMXBHV6FInmFqqr8ePVJsXJJkFPh2O2o5MzU51SjA7nSoJMYJlpn8mZoQH9hN8dX8XirDH1fX9z/1x3kKDQ/f5fSN/GIFRPRxnS3kxkhYMllw9TGml5LrHI3mxZYZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715312574; c=relaxed/simple; bh=hluzFYdNftixgqYYd+oYVF/QqyvWXjGtaUfIDEEzD8k=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=H+cw4JWigr5eDQ9PPfpqd9COMx1b8IGP12hWq0oy5rkyPOV3thiKdOnGON12XfSvsigV5P1flRLYlVUi5Pg8WjzDT2jLk9raCco5S3dbeytLVuuuPyFQXhGIJS61EmkxPD78JNgPvX9SjZDmFXSmVA0hlETs2rpXZ6dKQtfqK1M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=R0gEPi0s; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44A3faVK101052; Thu, 9 May 2024 22:41:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1715312496; bh=ePKK2zPryndYkv7XmifCJAxCubJ5BMU9tcPAaWiyu/U=; h=From:To:CC:Subject:Date; b=R0gEPi0s0YDt/MQVPupXMncG8m3Vse0txidFe6GWu41FfEEosmF3YeqNgdssp5auI EAVPDPM2uLU+P6sAsoBRm/PGNj+8AZsVFX/gVk+/VXkcXC8NLnQQxUrHsvLkeUU8bx zSg7UI+Os8JJJ6LdKPj/uNte1GYy9eGC0J8jQ5O8= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44A3faUG027531 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 9 May 2024 22:41:36 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 9 May 2024 22:41:35 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 9 May 2024 22:41:35 -0500 Received: from LT5CG31242FY.dhcp.ti.com ([10.250.160.109]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44A3fSBL116558; Thu, 9 May 2024 22:41:29 -0500 From: Shenghao Ding To: CC: , , , , <13916275206@139.com>, , , , , , , , , , , , Shenghao Ding Subject: [PATCH v4 1/3] ALSA: ASoc/tas2781: Fix wrong loading calibrated data sequence Date: Fri, 10 May 2024 11:41:19 +0800 Message-ID: <20240510034123.1181-1-shenghao-ding@ti.com> X-Mailer: git-send-email 2.33.0.windows.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Calibrated data will be set to default after loading DSP config params, which will cause speaker protection work abnormally. Reload calibrated data after loading DSP config params. Fixes: ef3bcde75d06 ("ASoc: tas2781: Add tas2781 driver") Signed-off-by: Shenghao Ding --- v4: - Use the the culprit of the bug itself as the fixes tag v3: - No changes. v2: - In the Subject, fixed --> Fix - Add Fixes tag - Changed the copyright year to 2024 in the related files - In tas2781-dsp.h, __TASDEVICE_DSP_H__ --> __TAS2781_DSP_H__ v1: - Download calibrated data after loading the new DSP config params - Remove tasdevice_prmg_calibdata_load, because it is unnecessary to load calibrated data after loading DSP program. --- include/sound/tas2781-dsp.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/sound/tas2781-dsp.h b/include/sound/tas2781-dsp.h index ea9af2726a53..7fba7ea26a4b 100644 --- a/include/sound/tas2781-dsp.h +++ b/include/sound/tas2781-dsp.h @@ -2,7 +2,7 @@ // // ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier // -// Copyright (C) 2022 - 2023 Texas Instruments Incorporated +// Copyright (C) 2022 - 2024 Texas Instruments Incorporated // https://www.ti.com // // The TAS2781 driver implements a flexible and configurable @@ -13,8 +13,8 @@ // Author: Kevin Lu // -#ifndef __TASDEVICE_DSP_H__ -#define __TASDEVICE_DSP_H__ +#ifndef __TAS2781_DSP_H__ +#define __TAS2781_DSP_H__ #define MAIN_ALL_DEVICES 0x0d #define MAIN_DEVICE_A 0x01 @@ -180,7 +180,6 @@ void tasdevice_calbin_remove(void *context); int tasdevice_select_tuningprm_cfg(void *context, int prm, int cfg_no, int rca_conf_no); int tasdevice_prmg_load(void *context, int prm_no); -int tasdevice_prmg_calibdata_load(void *context, int prm_no); void tasdevice_tuning_switch(void *context, int state); int tas2781_load_calibration(void *context, char *file_name, unsigned short i); -- 2.34.1