Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp721653lqc; Fri, 8 Mar 2024 09:43:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVu8OhO/SoK8/6bW7HrRLiG0e3M0JN9nTHiDjz4MYjufXKab4qbHuOjRQBOgHoKKzfopo50kuaLmS5eSy7eF+rU94fo3nZIiaUS4bvf0A== X-Google-Smtp-Source: AGHT+IHCeXH4cbrMKxhSlchRJGj+B8v9FqoCmWMzm1X6wWx93E6ZXz2apJ5gAg/IKuv0yfGLU8QL X-Received: by 2002:a05:6a00:a14:b0:6e5:345a:dcaf with SMTP id p20-20020a056a000a1400b006e5345adcafmr26948452pfh.14.1709919780136; Fri, 08 Mar 2024 09:43:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709919780; cv=pass; d=google.com; s=arc-20160816; b=mBCE46wtQDDRIaFeQgUQayztlrVGiISrJ56fuX7+tWtC7fZYa08NbCgrYiY7XBr85C 2FY79K2iJJit8US0SZy57tPTCb2r38zvBYpc7/qD5HjgJVUQaStaEm3cwejk8B3pRJt4 loQ96Qsf8/ICth0wjj59rZxqS8/j8uzJqV6BgRereaoCMsJ8d0WraO8Cp0HoWU0Otf/I 1cmKeDxOzoewae8wN5kBwY8gkwOubEgimmvTBqIu3hKoeBhCwQY7dPSCst6NzjMr5TgR bfdFmNZOKQP2O4Xxw++ANSnk6kP3ziJ972NT7mjesXZ3+U8y1PGtGwB5kOxT2hqfN8y/ DQtw== 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=l3sSoShJVJAn/RoQ647kaT2Si4Gjt2W0z0Nrk8ABaeg=; fh=Kvgp4oGHUVFqEnpVKMdjH17DHHYx2Zy3W6/0u2/j+pM=; b=yADCcWudU9ydG9aFY9YtThqX8PH1ky53YfzPiqkilmEkXd3G+fbD2qAj/r5obN4SLb FeSt4j/pr6i2+N99P5B10qsgwZ5K9Fz30qjN8Uc5VpE9oaGASuHsSiTRunWuwSfNwMOT ElrqsBRN0WRkIfd9THNCUdkdawUJ4hCDYjXYsm0r1Hxn+5a79TRWOoUwMRJ09xT8Eo9I UT3rk9fRNtOE69DtoC8ATYu752RQaXjyuxjldlOZT6Bqza5/pYFCsrhRWw4C4tH3aC1B c1yJlhIb+XmCIHdDTG+d5POfZu14MjBU8mMYQk0oA4Th5nFUm+DRMTULhJdf7nGxZVJh 8zVw==; 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-97409-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97409-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id cq5-20020a056a00330500b006e673310f97si802133pfb.115.2024.03.08.09.42.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 09:43:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97409-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::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-97409-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97409-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 229382816BD for ; Fri, 8 Mar 2024 17:42:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE31758AB6; Fri, 8 Mar 2024 17:42:18 +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 BC20E4C627; 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=WRSKOadDL8VxTLPE82s6tKZBtUQdV44rTAk6OuOeVe3t8M1933BENz4ZANdFMfoMM5fttPe+q8EqRxSYtdTdc4XmQxRBAEQoDroY0/Wh9WO+sTBpWbo9uC8W/pfmvOK6vwPCK3ziBHWkVGz6lhqfSDUfV0qFB82ZqbnjUuhCuNE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709919738; c=relaxed/simple; bh=CC0/RCTb+2f+2nhQeQ5oOucovLX12mdG/Mq7v006+JM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Mime-Version:Content-Type; b=dgFOLU/lBIVOEj24d+u8aLte768mInX4KHaPD1wVcScC0V2qAsjw8ipmQsG8dQtFQKjq/YGdDXmRzENe6PWhfnv9udqxF4fYgcqPk451e3bJfZS97j3Yy3/miL5aboZR5wGygVuGF6+bzT2NcnoL2SKtsBsgU748AZWfrtLfHOo= 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 0000000000076811.0000000065EB4DF0.0020A5CD; Fri, 08 Mar 2024 18:42:07 +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 3/5] ALSA: hda/tas2781: do not reset cur_* values in runtime_suspend Date: Fri, 8 Mar 2024 18:41:42 +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 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 --- 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 750e49fbb91e..0e61e872bb71 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -832,7 +832,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"); @@ -843,12 +842,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.44.0