Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2832114pxv; Mon, 12 Jul 2021 03:03:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPTeC3bCPMch+MUqAG2FZ7cGk4TNCl2fNi1G+hM8BX9IEMOQ6PONbecQv1K6dwpW6XBDWK X-Received: by 2002:a5d:9acb:: with SMTP id x11mr39307173ion.133.1626084201173; Mon, 12 Jul 2021 03:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626084201; cv=none; d=google.com; s=arc-20160816; b=iw1jfeF+TSnxS5J0VvWnFY1t+KBS1wfgQe13WLaC/PlSrsn5kGsdbsghaKGmMm4L/e RoBCT6ixQrRyDRjx9tEkoCo4EcFhnqWOyrIWkZCdW7y8eWewylPJiSVdICL/ZStYnISC llhLR1aElSKlScbRLDgIiIHtdN1iy5baVheiNgV1fX1A+X0ACY1LXZ49zi/fPasfHJUg xsItZ7lMz4sI0x6yGzia5+3kv0omDCpVCXTkM0e52+A/eyzGiTi9q5xuJSmGrwBkXiEo PNfvDCnDiSG0lJ0F3Y0cm76j9Z5JllytK+/0WgOhlFexmWYNyEBB5q+hwd787iGRIzaZ Bigw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g/6NwV327J0c2dVeHPOfXq0p+qOURjruI8vHTkg+b30=; b=Bv2fKSNdswwKW8WbGXly28ZZ2TXt8tSCYv/13uY61+aDvT5cmK4qZu4AMnBL2paLCm qM28mlz91mPGEfOMvf0bh6MCGq+YA+qht2mW9ttJIr/UxfpNI/ZzIo1sGgs8T9nF0Ud1 Uma2nzCXnHhrBaiayxIUotNL1HJY28CT8MxX3GW8UroYRkEyTQtL2EJMzx0dLuFE4XQU vph6zt/vnUv8dbY3kqLlNze2FbNJHXoVHp4FxopYlilDECTjYB5RJy/WUHcPDQGpZKAn 5DZDrYmpdJ7OsfT9XZQPCT8VpNGUfK5gteK/4+YBWNX6/CmH9k6vnWf2xqjajnaO9pxZ vPbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fsFr8jun; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si16998249jaj.28.2021.07.12.03.03.08; Mon, 12 Jul 2021 03:03:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fsFr8jun; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243099AbhGLHPJ (ORCPT + 99 others); Mon, 12 Jul 2021 03:15:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:50388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240098AbhGLGuq (ORCPT ); Mon, 12 Jul 2021 02:50:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7496161006; Mon, 12 Jul 2021 06:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626072465; bh=nx+CTs1gCp4wWb9O/EGCs3lNrHrVYeQ5m2jv+ueYaoc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fsFr8jun2TMtw/WQc68cGuX5RpaAZMhKJzWn24Ql48CaClo/gXZYiLEQsH5H83iJM kKMF5+DhBZr2L2yhxflQRhWIeR9zIEfdZqtghvGqmPat7tKxM4j1GVzese+n85a7Lb V4DtQ+w7kG7CNFEGPUJDoIGlh8bVBkjlrq6tUfQg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pierre-Louis Bossart , Guennadi Liakhovetski , Bard Liao , Mark Brown , Sasha Levin Subject: [PATCH 5.10 505/593] ASoC: rt711-sdw: use first_hw_init flag on resume Date: Mon, 12 Jul 2021 08:11:05 +0200 Message-Id: <20210712060947.267438157@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060843.180606720@linuxfoundation.org> References: <20210712060843.180606720@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart [ Upstream commit a0897ebca669f09a2e02206a9c48a738af655329 ] The intent of the status check on resume was to verify if a SoundWire peripheral reported ATTACHED before waiting for the initialization to complete. This is required to avoid timeouts that will happen with 'ghost' devices that are exposed in the platform firmware but are not populated in hardware. Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to another error, the resume operation never timed out, but the volume settings were not properly restored. BugLink: https://github.com/thesofproject/linux/issues/2908 BugLink: https://github.com/thesofproject/linux/issues/2637 Fixes: 320b8b0d13b81 ('ASoC: rt711: add rt711 codec driver') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20210607222239.582139-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/rt711-sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt711-sdw.c b/sound/soc/codecs/rt711-sdw.c index f0a0691bd31c..eb54e90c1c60 100644 --- a/sound/soc/codecs/rt711-sdw.c +++ b/sound/soc/codecs/rt711-sdw.c @@ -500,7 +500,7 @@ static int __maybe_unused rt711_dev_resume(struct device *dev) struct rt711_priv *rt711 = dev_get_drvdata(dev); unsigned long time; - if (!rt711->hw_init) + if (!rt711->first_hw_init) return 0; if (!slave->unattach_request) -- 2.30.2