From patchwork Wed Oct 19 08:22:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4534 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp203776wrs; Wed, 19 Oct 2022 01:44:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4E0eI7YIMtaVbj+/076SNTURkeS+hzqv/YD6e515/58r5TdFO6ZUJz30kj3Ibk51wIeIRw X-Received: by 2002:a05:6a00:1309:b0:535:d421:1347 with SMTP id j9-20020a056a00130900b00535d4211347mr7371314pfu.5.1666169042283; Wed, 19 Oct 2022 01:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666169042; cv=none; d=google.com; s=arc-20160816; b=PX6JcMu+f4TBFPq6fZKr7KrtFjdAzQ/myF8ENMedDGYBcqRzq48J3zhfMn5mSkuSQm dOz+8eskZ5Lzzyv36njnQ+nsGsgr1BXvvEGvfRXsWblRXJdf7tkP+N2wGkBiMHAXB3GS tyRu3q0byuBLG3H56gHP9ZEpW+YMG1GuNrxAfetNiHmzvR63mAj3RYZRDJelZDeTnvNj bAHodtcML9hAcJhsrNpNYp4g9Vu7D388igWvRq5zUWSxEzKll0d4ZABuqW+2pfOae6PD YvCIsG5LtOWc5sMgWrxwU8by0x3lMWR1/ItlBqJg9a6eRZDF2jIcdQ9mPLcBXbzaVXrB kLmw== 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=DYFMkEqEuQPqiZTlOVkacocWot7TykaL0hyRUIMhThw=; b=oPRvpmR8ytTFSrKu3yHt6yabgIv4onUz0HmRN96p0zvCaRDRC4cGFw8PwWmZipsSZz bdlcrHfLgBrrmn5haL4Ms5CD8RhR4S7IQdz6p1SCC+FUVFicCL8x97C+tCS57Q4FnJOK W7lUKpps0ScwYw72B6MYFdAdkJvnttspY3fKTor2QF1GHOCStyEYRqA0E0QNsXsqU+8w SQUBzovQBeF9obOFJEetTfAQYRFDS1BylaukAR/LC9le0wVsuChLdNfGraekR32F2PPs lx9TiE+Evvr1FuHDbXU/JmnYJMPNKYfIkhSHzcpUV86QOeU5qYWGVt96FgH/OxU8aQZg u0Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rsPDkM93; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f22-20020a17090ace1600b0020038eb8b5asi16359162pju.21.2022.10.19.01.43.49; Wed, 19 Oct 2022 01:44:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rsPDkM93; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231252AbiJSInL (ORCPT + 99 others); Wed, 19 Oct 2022 04:43:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231139AbiJSImC (ORCPT ); Wed, 19 Oct 2022 04:42:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CEF924943; Wed, 19 Oct 2022 01:39:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BB79E617D7; Wed, 19 Oct 2022 08:39:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC540C433D6; Wed, 19 Oct 2022 08:39:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666168781; bh=QISEug/oQPt/cNqoDbsduIJCybvN/wr90v+7N9BYJUc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rsPDkM93qZp/xDFKL5QyEAqHE8v+axbnpH6XWVWWMxf2fbuITtVf/JQWUh+fx3gKL WJO3KLO5M4Y6VtL6JNhyLv9nNCSfWlrpPd6NlmZyBBGWBimbZ8zJKCZXpQMYrO0j2d 1HcCRHjTiZkiKHETj9yN4/ymrsk+DZgQoTCAdA+o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Srinivas Kandagatla , Mark Brown Subject: [PATCH 6.0 051/862] ASoC: wcd934x: fix order of Slimbus unprepare/disable Date: Wed, 19 Oct 2022 10:22:18 +0200 Message-Id: <20221019083252.248252349@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747104869563990488?= X-GMAIL-MSGID: =?utf-8?q?1747104869563990488?= From: Krzysztof Kozlowski commit e96bca7eaa5747633ec638b065630ff83728982a upstream. Slimbus streams are first prepared and then enabled, so the cleanup path should reverse it. The unprepare sets stream->num_ports to 0 and frees the stream->ports. Calling disable after unprepare was not really effective (channels was not deactivated) and could lead to further issues due to making transfers on unprepared stream. Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220921145354.1683791-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/codecs/wcd934x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -1913,8 +1913,8 @@ static int wcd934x_trigger(struct snd_pc case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - slim_stream_unprepare(dai_data->sruntime); slim_stream_disable(dai_data->sruntime); + slim_stream_unprepare(dai_data->sruntime); break; default: break;