Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1329067rdb; Wed, 6 Dec 2023 16:00:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbmh2XafMGXT/uvM14LGuCoWxG+zloTn3Cj0GLAmIFyZganA0xEc1WvGw+3kmWXMgYnqUN X-Received: by 2002:a17:90a:2d82:b0:286:6cc0:cae5 with SMTP id p2-20020a17090a2d8200b002866cc0cae5mr1753122pjd.92.1701907248068; Wed, 06 Dec 2023 16:00:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701907248; cv=none; d=google.com; s=arc-20160816; b=IGrODeuUjhpEnfHXKmmHU9u1M8SqTx2iMtB1IA1M19IwXUMgibIIh+Vo8HoGfG+vXw 4alUMs3WVV5VU2h15u7AjMr/68XHddXudgwSaJ8qkpbXKlU3eUdT2ln5645F9IXad7XT ABr7soOZx0qeZpel/MUpiRdVZ6uwvz13VmXax70iRQl5Cc0jlxXqCdRTnaSwNUmpt/Se BsC3ywJd1ouJ7QRFrM44x5bUBWiXqITZnIZ5RWT3Qqi4AC3ggFqIMwxU7M2cgKlDh2I/ mh33IYtWrO0RczAx6We71Xa0iDoS7OxS5nRo9HrD/HFoQNqJ6CsXLnOVzJF0gu/N93vx Aw8w== 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; bh=ur0ncUOvCTMnTzUvdzLQzQE4aT6GZ/slWo2r77TY3EQ=; fh=zySoyVfK/7ExaDz2MWyww8poQ40q3tZak5TTvfb/Ovc=; b=WTrhKmCZRwGraoxC76k6Rt6nvdIRUtxgLc9gE7+kxnJ3sTRE0+tqbNL8bCeJ6zF+D0 4bELp/Hyq+qcdSWIHsdYQXTKjTRma9zgZDc3Fd5ZfRzihXvxckuTDV7gnJwDjQEv6kw1 eke7KFNlGmvhoVPlgsEeNRlRcu2U0nTGoIgFTOKVYoLfOrSZTwkH0e2amb/do2x0efy3 VNQ6uZI02ynMIa89eVZ5okqL+PTMZWmD2b7wL2tOWwJ2As+0ppqRSflca+CJTMQ12Xu+ UsGoX+Sx+YNTEJ93I/8gOfNIYtsnSGNkrvMPeD/a8zqqJ4awwvrikJRaZSrVfjA4osqD jqbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id z1-20020a17090abd8100b002773d013d02si24009pjr.140.2023.12.06.16.00.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 16:00:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 1835F8082047; Wed, 6 Dec 2023 16:00:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1441866AbjLGAAH (ORCPT + 99 others); Wed, 6 Dec 2023 19:00:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230452AbjLFX77 (ORCPT ); Wed, 6 Dec 2023 18:59:59 -0500 Received: from irl.hu (irl.hu [95.85.9.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7372DD44 for ; Wed, 6 Dec 2023 16:00:05 -0800 (PST) Received: from fedori.lan (51b690cd.dsl.pool.telekom.hu [::ffff:81.182.144.205]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 00000000000716E7.0000000065710B03.00119029; Thu, 07 Dec 2023 01:00:03 +0100 From: Gergo Koteles To: Shenghao Ding , Kevin Lu , Baojun Xu , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Gergo Koteles Subject: [PATCH 03/16] ASoC: tas2781: disable regmap regcache Date: Thu, 7 Dec 2023 00:59:44 +0100 Message-ID: <21a183b5a08cb23b193af78d4b1114cc59419272.1701906455.git.soyer@irl.hu> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 16:00:25 -0800 (PST) The amp has 3 level addressing (BOOK, PAGE, REG). The regcache couldn't handle it. Signed-off-by: Gergo Koteles --- sound/pci/hda/tas2781_hda_i2c.c | 17 +---------------- sound/soc/codecs/tas2781-comlib.c | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 077a01521eef..d272d3d08b29 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -717,8 +717,6 @@ static int tas2781_runtime_suspend(struct device *dev) tas_priv->tasdevice[i].cur_conf = -1; } - regcache_cache_only(tas_priv->regmap, true); - regcache_mark_dirty(tas_priv->regmap); mutex_unlock(&tas_priv->codec_lock); @@ -730,20 +728,11 @@ static int tas2781_runtime_resume(struct device *dev) struct tasdevice_priv *tas_priv = dev_get_drvdata(dev); unsigned long calib_data_sz = tas_priv->ndev * TASDEVICE_SPEAKER_CALIBRATION_SIZE; - int ret; dev_dbg(tas_priv->dev, "Runtime Resume\n"); mutex_lock(&tas_priv->codec_lock); - regcache_cache_only(tas_priv->regmap, false); - ret = regcache_sync(tas_priv->regmap); - if (ret) { - dev_err(tas_priv->dev, - "Failed to restore register cache: %d\n", ret); - goto out; - } - tasdevice_prmg_load(tas_priv, tas_priv->cur_prog); /* If calibrated data occurs error, dsp will still works with default @@ -752,10 +741,9 @@ static int tas2781_runtime_resume(struct device *dev) if (tas_priv->cali_data.total_sz > calib_data_sz) tas2781_apply_calib(tas_priv); -out: mutex_unlock(&tas_priv->codec_lock); - return ret; + return 0; } static int tas2781_system_suspend(struct device *dev) @@ -770,10 +758,7 @@ static int tas2781_system_suspend(struct device *dev) return ret; /* Shutdown chip before system suspend */ - regcache_cache_only(tas_priv->regmap, false); tasdevice_tuning_switch(tas_priv, 1); - regcache_cache_only(tas_priv->regmap, true); - regcache_mark_dirty(tas_priv->regmap); /* * Reset GPIO may be shared, so cannot reset here. diff --git a/sound/soc/codecs/tas2781-comlib.c b/sound/soc/codecs/tas2781-comlib.c index ffb26e4a7e2f..933cd008e9f5 100644 --- a/sound/soc/codecs/tas2781-comlib.c +++ b/sound/soc/codecs/tas2781-comlib.c @@ -39,7 +39,7 @@ static const struct regmap_range_cfg tasdevice_ranges[] = { static const struct regmap_config tasdevice_regmap = { .reg_bits = 8, .val_bits = 8, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_NONE, .ranges = tasdevice_ranges, .num_ranges = ARRAY_SIZE(tasdevice_ranges), .max_register = 256 * 128, -- 2.43.0