From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5CA6112BEA0; Sun, 24 Mar 2024 22:56:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320997; cv=none; b=W8y8vE7lyow8oUoAHOgqi94SU4u382hXYcKjul6ayI7ZWpCPO2lbCkvIK1/bCDJYkelLbSFmHWoNzc9shbkbBLnlIYpoUWgCSGbAeRbJpUbLiidoS9vbSe12g7vZnD43+NFYov8grjbpRhk4e6+0ZlglsBvQkPcYdw+EuJMX5v4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320997; c=relaxed/simple; bh=fB2nfPMH+KLTxl+hhss0EaTEKIN5o3V9KbVoZ8TJfL8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RFUZ2KvJK8mIkr8FrdNFXKFYrmyFNGvQ6x4VRaO8j2gzz8RWQ+SHGZNddFScrmSY5jI88jOphIIMsQHHR1A5i029d7137Y0Q8O57+m0xcDFNE1gQxDbl9v9Kvx/w0rc9DfcmhGbntUExZXaIz5dHCKPh0zGYpmD5Uei2j7Yk6wY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gnbeueR6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gnbeueR6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D239C43399; Sun, 24 Mar 2024 22:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320996; bh=fB2nfPMH+KLTxl+hhss0EaTEKIN5o3V9KbVoZ8TJfL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gnbeueR6csObj9ukHhp+TIwSqbajjbVY1kyzAxQVkrBE9238P6lvC+2/U41Bb/dBs 2BgJAFLlClCr84m6O8jeW0eJpe+2rafRSu+Q+CdhHgJTzqDcH2z+wnf97CCRuWxHtB 7H42xEhyaIiP+CmVga82fcaK35zELOYxt7FuFjVzW0mDF99jjP/p9gfaekRo+SIW9H J00d8VhwhYrwNGYu7kMxy0hncIihgn9nDJa+RkTC/E1NojGyHR1DXM8qf4984I68NB 5jrfXb8x1EWYryz+EhCiUNipGwU0iGKF2z+g0GOrVwaYIdwDHxbv0AtYe/vB4y18aX 8gGYHyLOFW1rA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Gergo Koteles , Takashi Iwai , Sasha Levin Subject: [PATCH 6.7 558/713] ALSA: hda/tas2781: do not reset cur_* values in runtime_suspend Date: Sun, 24 Mar 2024 18:44:44 -0400 Message-ID: <20240324224720.1345309-559-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324224720.1345309-1-sashal@kernel.org> References: <20240324224720.1345309-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Gergo Koteles [ Upstream commit bec7760a6c5fa59593dac264fa0c628e46815986 ] The amplifier doesn't loose register state in software shutdown mode, so there is no need to reset the cur_* values. Without these resets, the amplifier can be turned on after runtime_suspend without waiting for the program and profile to be restored. Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Signed-off-by: Gergo Koteles Signed-off-by: Takashi Iwai Message-ID: Signed-off-by: Sasha Levin --- sound/pci/hda/tas2781_hda_i2c.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 10b5624b1f1f0..04539abf9e716 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -740,7 +740,6 @@ static void tas2781_hda_i2c_remove(struct i2c_client *clt) static int tas2781_runtime_suspend(struct device *dev) { struct tas2781_hda *tas_hda = dev_get_drvdata(dev); - int i; dev_dbg(tas_hda->dev, "Runtime Suspend\n"); @@ -751,12 +750,6 @@ static int tas2781_runtime_suspend(struct device *dev) tas_hda->priv->playback_started = false; } - for (i = 0; i < tas_hda->priv->ndev; i++) { - tas_hda->priv->tasdevice[i].cur_book = -1; - tas_hda->priv->tasdevice[i].cur_prog = -1; - tas_hda->priv->tasdevice[i].cur_conf = -1; - } - mutex_unlock(&tas_hda->priv->codec_lock); return 0; -- 2.43.0