Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp721568lqc; Fri, 8 Mar 2024 09:42:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUZrvtZkt6OIFYW13yF8i6qfH606diTri5TJkleM85qAWFC32SGET7j5KNa40RymPoiiM83XTI83FgztJ7LEG3pwhz/bRSQJotklOdFig== X-Google-Smtp-Source: AGHT+IHQo1lwjSvCBcVg5Svd9O3t0M0bD/isc1oM1wbOPuJKHBeSVXqpdKPRGKbrJrWcaVqiIgha X-Received: by 2002:a05:6a00:3a22:b0:6e5:44c2:6f41 with SMTP id fj34-20020a056a003a2200b006e544c26f41mr25995314pfb.18.1709919772562; Fri, 08 Mar 2024 09:42:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709919772; cv=pass; d=google.com; s=arc-20160816; b=cISq4WNPrq5qGgkN2TZuEKGeRNu5I6AyKrbS9tEdCFPOTP1MuF/FghF3KBOe0dz33i f+K2tFW6lFLa9Mdqw+JaPD6dl+QuPPEY8dZ6O7ctqAPaOJoZB4sBGp+6zhH2N1ZkBOUs RP/ceXSoJlQ2PVvrtUOuCOZRKpHA3EEJahSlz866yiPzHnHcjb3aMtOvUQYeBCFOqM+t FccWl3WHtAK0KC36OK2siasXcJcvqkeLA1cW16aKzKwQKYt7l94u+SXdnN9Sl3+um5Gv kNgm+4diAyIm90fwgTogfPE7qaw+O+3GWjRTd47xCmi3rSaVslPQSBtf1lBcPaOwszLO prQQ== 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=JXxwtoTfEzzWFRGwW6M6mzN8eraieKUG6taYhb2VSvw=; fh=Kvgp4oGHUVFqEnpVKMdjH17DHHYx2Zy3W6/0u2/j+pM=; b=bUJMpeIn3mf/oh//rOgB/Qs09gIkQcCFU7vK+qkm2eDPq8+z0yzHC0VWS+52jdOZfZ yqUG3s+cqVb4Q+kwOXLECCyXwizVtc3Bx9bZrrJkciBNLl5Bopk0p7MlhG5xI5EDj6al kw5EA/IO+M8IXRtZ8uUzU+6+9ffnV4aA+9YeCXI2zn21a2AbayZ4YpglfDMXjhP5Zgga wR/VhBmESQ9BEVTX2QhZR9V23SwezIBOGt+4ZoTHsyRCsP6mGF44x09IqverYGDac/vX ufGZrIpBy+qgP2fn63bifJPGuuCbtaTJSbeOgwIQ0Vlj8PvpHEMNnK8JMvkaHtSKn4Fi pqgQ==; 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-97408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97408-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.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 09:42:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97408-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-97408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97408-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 CCCA6281951 for ; Fri, 8 Mar 2024 17:42:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 37F1A57322; 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 115AF3FBB9; Fri, 8 Mar 2024 17:42:15 +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=1709919737; cv=none; b=TcIqi76Duk9shKgUyQZnZ9vWi9U1UkJ/0gnQGuUl7smI39Jg3cIUziecm6LrsqTFP0YyP3Mb47xuAz4fNQdMe4/Bp+Vs/mGzOLtPbXlkkn/kx+TU84M+hLDxMMeQvCUeqWIJ/5XPTo+jt/oZ4+v7f18oRE7z/0NjA3qywHkovWk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709919737; c=relaxed/simple; bh=Jw6H/X0CX/61elARNUFXKlsTxT779kTCRm/xhTeM5I8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Mime-Version:Content-Type; b=iUPQvX3JcYQNzI49bTpKblIPQe//lbm//G4Mg8FGVrfXpF0G83vyzU2UJnvqBqR/4DezVNhxEg7Qtbt2BnyVovt8o2Ih1gUJqzhbcEr3PyW9NPBXyPbxxWLBDO9Yy2ERSiwxRnFcBg/Rd1CB5JNkPGRc5ORXJu+ZP0yZ35F79CI= 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 000000000007680E.0000000065EB4DEF.0020A5B8; 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 2/5] ALSA: hda/tas2781: add lock to system_suspend Date: Fri, 8 Mar 2024 18:41:41 +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 Add the missing lock around tasdevice_tuning_switch(). Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Signed-off-by: Gergo Koteles --- sound/pci/hda/tas2781_hda_i2c.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index ee3e0afc9b31..750e49fbb91e 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -885,9 +885,13 @@ static int tas2781_system_suspend(struct device *dev) if (ret) return ret; + mutex_lock(&tas_hda->priv->codec_lock); + /* Shutdown chip before system suspend */ tasdevice_tuning_switch(tas_hda->priv, 1); + mutex_unlock(&tas_hda->priv->codec_lock); + /* * Reset GPIO may be shared, so cannot reset here. * However beyond this point, amps may be powered down. -- 2.44.0