Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp721766lqc; Fri, 8 Mar 2024 09:43:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWfr/Fbdq6cLfP1oHhXAT7slFQyZmE3uyqfHtlelxOx0DGifFWwcUQ/WqxbGghcVUDA+PkpnsBHZpZmjrhXg+m6yJwrwwDN8rN9dQE+Xw== X-Google-Smtp-Source: AGHT+IE/QXAYYNNplXP8UgEOMJnujQJSPDE4siWKfVRP4LoGsCMe3fj8WVVxSRZ7t0V2+Zgl2e7w X-Received: by 2002:a0c:e9d0:0:b0:690:bd1e:6962 with SMTP id q16-20020a0ce9d0000000b00690bd1e6962mr418123qvo.57.1709919790661; Fri, 08 Mar 2024 09:43:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709919790; cv=pass; d=google.com; s=arc-20160816; b=yrdiq5DBCpNjlIV6hbOg7udGt+0cnejpP1xRhh8u1vW0lKJKZksb7S2osl1xbFdiJY Vzcop0PdYdpKl9o7B2mSrQxzsK7dpq4QrtGxUFTIBldYHmqvNGoMRXjtsPk/4Zc3uGQe Omz+zzkaTHZWEobMr3XRFcy75x4kp4zh4tLVbfWXLc1FqRVV4Vfgk0+uH352XMEqC7iz XRR1ndaDSi9CTLkG+bCCiu7BjuCuRPvukOV5RDvnRS9P2GaKQh2S4bESAW8ictu3GFLK 7rmOAsAnGop+DoeTZNhONow5H1frI0neXAb2fxRQo3JMUEzXCTAYByE50pJZ/EePYmWl 1deg== 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=DZWdfeHCBa4j6zIlIL7BOFwmnOsfHM4NHahebVZztwE=; fh=Kvgp4oGHUVFqEnpVKMdjH17DHHYx2Zy3W6/0u2/j+pM=; b=lDzQYJa3Ndbu0KCU2Io04dO8smFg69EnUXVFQpHVkYGkH0l6988qWO19zA16TJVEXu 1Ps9XmBWAcrohiDkzcuGJgV0ydsCVNynL4Zo9GLq07kWUFJU1z0+oVHOlb7G80rLNZwC MtLCUj8z5oSWKw6kW5wIvSAzyueUeqN0rHkDKSRKyEPizpLgTbEsV60701Jk7s7xunTb 4vLjanOjfldO/A96IsZZEtf6oVKQv2CjUyfw4v2kOqTqNA1Jg7O7Mo3N6rjubLJSD/5e pvxFqA9eAuueF6SXi50CV1/AWZ4YmwiATZn2yEvoFm9OZcTuGWKMzy/10hInpQYaV+L8 Z7Tw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-97410-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iv5-20020ad45ce5000000b006909599ce30si6381017qvb.240.2024.03.08.09.43.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 09:43:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97410-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-97410-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 62CEB1C20BD0 for ; Fri, 8 Mar 2024 17:43:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58F9B5A7A2; Fri, 8 Mar 2024 17:42:19 +0000 (UTC) Received: from irl.hu (irl.hu [95.85.9.111]) (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 32FF540861; Fri, 8 Mar 2024 17:42:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.85.9.111 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709919738; cv=none; b=GRqWiTe4cs2MeJgz5oFd8br/77itwfKBMK84bpCwMKzvBmwbYg6MTmu1n6iEUExoVHjl+Tsb6BF4jO5hvCJRjBXofL7mSJPZk02xgPgUHreLFTWhrnNPKeQSpxCM+oZ1MczRPVhvN49ubhvfdy8+ZpDP305p5Vie91JV+ggCmso= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709919738; c=relaxed/simple; bh=O2CrALeJMZN9i7u3qt4or2kEq0HlxKtNqWa/kAbEuNM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Mime-Version:Content-Type; b=srGqW/mspf0AFu1grvyQbCxJjBeYvo+qdbpCA/vJAhrPtL0oRF88AZsrjGBSBOJITvKdlI1P4rjPPpFjWwfSoIadDcbiqR7qoY/Fvyte2jqTkp9rrHaL7e45zks0/8vlkenmaBacqv89T01YnA+41SWABMKhnGOIv7f1uD7f5r8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu; spf=pass smtp.mailfrom=irl.hu; arc=none smtp.client-ip=95.85.9.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=irl.hu Received: from fedori.lan (51b693e7.dsl.pool.telekom.hu [::ffff:81.182.147.231]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 0000000000076814.0000000065EB4DF1.0020A5D8; Fri, 08 Mar 2024 18:42:08 +0100 From: Gergo Koteles To: Shenghao Ding , Kevin Lu , Baojun Xu , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Gergo Koteles Subject: [PATCH 4/5] ALSA: hda/tas2781: do not call pm_runtime_force_* in system_resume/suspend Date: Fri, 8 Mar 2024 18:41:43 +0100 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 The runtime_resume function calls prmg_load and apply_calibration functions, but system_resume also calls them, so calling pm_runtime_force_resume before reset is unnecessary. For consistency, do not call the pm_runtime_force_suspend in system_suspend, as runtime_suspend does the same. Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Signed-off-by: Gergo Koteles --- sound/pci/hda/tas2781_hda_i2c.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 0e61e872bb71..a99f490c6a23 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -870,14 +870,9 @@ static int tas2781_runtime_resume(struct device *dev) static int tas2781_system_suspend(struct device *dev) { struct tas2781_hda *tas_hda = dev_get_drvdata(dev); - int ret; dev_dbg(tas_hda->priv->dev, "System Suspend\n"); - ret = pm_runtime_force_suspend(dev); - if (ret) - return ret; - mutex_lock(&tas_hda->priv->codec_lock); /* Shutdown chip before system suspend */ @@ -895,14 +890,10 @@ static int tas2781_system_suspend(struct device *dev) static int tas2781_system_resume(struct device *dev) { struct tas2781_hda *tas_hda = dev_get_drvdata(dev); - int i, ret; + int i; dev_dbg(tas_hda->priv->dev, "System Resume\n"); - ret = pm_runtime_force_resume(dev); - if (ret) - return ret; - mutex_lock(&tas_hda->priv->codec_lock); for (i = 0; i < tas_hda->priv->ndev; i++) { -- 2.44.0