From patchwork Mon Oct 24 11:28:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8864 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp433134wru; Mon, 24 Oct 2022 05:48:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Wx7MWe0JR83TVhaoMJ2cWzwS/D9FknISlKppr3nm19jQsnqWkJMLDaXBobYAdQ34z5AeP X-Received: by 2002:a63:2d81:0:b0:446:8d24:c90f with SMTP id t123-20020a632d81000000b004468d24c90fmr27592070pgt.160.1666615718160; Mon, 24 Oct 2022 05:48:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615718; cv=none; d=google.com; s=arc-20160816; b=evbh/mJCZNroJGjmssf4AQ81qA8D22sVM4QmkJhV5jk/PEcC9LtCtyfDV4OoowEeda rl3lUHpu0dNntqZU1NxqHC8BD5cu9YqPJmnwMQp8VecNAHqJxeGjFRq4LWnMdXJAWauO hSyL4x0WkOKfiaui9Tm/SDi3u3ldiRi+NFVUQqYsUa2DUij7WAgQgQsy94PdZsVVLdNs QzOJeZ2s+Sa7tbXQwGi+R+Dgxj+HRvKUe3ZZNUfy3bRnjhQfhTdef7747sFSukXfgw1w SPQdVpy8liD0pXd0mPQJJSdVBvOYRgLv+CDw4/1qMk/n46awt/hIcgGrE6cGU+Kaie+8 fMIA== 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=7aYTdLxkJfvgFXKK5jyo2Wg+8bZTYxbEYIU4B/jarto=; b=nuD4nPllp7zgmjMA2t3rKrUPtU2Z6r6GOEW4sYuzuEv7aVgP9CjI23btTWbwLkxAhD 3UNPR+z+Ps12Zl9bu42OazOmxf+edT6flCacdt6MCzyC/FKQyiHOapLFN5KEA8E3Td3b 0DKc9X08FQAsgy0PeTlktSn8XUuUxa0nbA/52pMkXQAvm9kdrahhEZjwIGuZ4Br78wmZ SB2iJVjeQP9HtjdGraFjxrQJCWJDOs5E6ZCIcMM8Jh5FelCD5F2adzw5OZ418wXwU6Jj g4SVWCU7e/tQli2lY0LGXeO2GIWdR+SITowxNVQEavgP2/W/+XXg+9AwUYpyenhuF4/Q uBbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Xefj0o5F; 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 w21-20020a634915000000b0043885b12cb8si37457574pga.272.2022.10.24.05.48.23; Mon, 24 Oct 2022 05:48:38 -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=Xefj0o5F; 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 S233979AbiJXMli (ORCPT + 99 others); Mon, 24 Oct 2022 08:41:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbiJXMiK (ORCPT ); Mon, 24 Oct 2022 08:38:10 -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 A06EE89810; Mon, 24 Oct 2022 05:06:46 -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 0A555612DB; Mon, 24 Oct 2022 12:06:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C8E7C433C1; Mon, 24 Oct 2022 12:06:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613190; bh=qpkhbREp+upQTVqTctmEWCOKn9PVcpaTOkNdIdq7NqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xefj0o5FHtjf7h7IoJBMJpb8XCAh9qCw/khE5PiVK/J+asjIxeCs6NU7+kHRLF5vC gVQxUsPScVO7QaclCUoFmviJp+iyoNGSC4n9L67ek9rpaCdajHBSn/YOdIDL3VAulR AakE6cqtRaKIVQVHKZsSdHd2DtSMR2zkbsxRt6kI= 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 5.4 025/255] ASoC: wcd9335: fix order of Slimbus unprepare/disable Date: Mon, 24 Oct 2022 13:28:55 +0200 Message-Id: <20221024113003.283413088@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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?1747573243323126949?= X-GMAIL-MSGID: =?utf-8?q?1747573243323126949?= From: Krzysztof Kozlowski commit ea8ef003aa53ad23e7705c5cab1c4e664faa6c79 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: 20aedafdf492 ("ASoC: wcd9335: add support to wcd9335 codec") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220921145354.1683791-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/codecs/wcd9335.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -1971,8 +1971,8 @@ static int wcd9335_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;