From patchwork Mon Oct 24 11:27:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9695 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp544114wru; Mon, 24 Oct 2022 09:31:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6mn4+yZUySY9LK9rw1MTKyFmmMBG4ndh2xZls1hGlolQRqtWHc9lmO1nJN9PmkhZq+CCZY X-Received: by 2002:a17:906:9bc4:b0:7aa:9184:d95d with SMTP id de4-20020a1709069bc400b007aa9184d95dmr2368387ejc.349.1666629083146; Mon, 24 Oct 2022 09:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666629083; cv=none; d=google.com; s=arc-20160816; b=yzBEB0uTOeZeWKjufspKZlcf6F5I+wLUIRkkxwHsmXQeSjaYwD6T/8SIDXTdJUdC/j NdXFbEZi6vUVpVDPoKxvyq1NRr1+xj6QpYGP9gmBliPpPFzFOTzM9+AOVBulijtK02HG Aj0PUccsGY/Di07hYlBCd/NbK9eOLvakS9xKVFe+u4GvuWdxksiy0D8Te33ed3qG19zB YX8Q4/sOzEKsetIiNswprgHySCGYDxTB9JbQFwPQ1wEzQItne76r1veDxQZGADkPOZtO 887tty7YKmWNlqWodftX/9Q7czZN1QeGVjjfTKsA9E4nFQnDEMY8bO0cWdnHUbWaY17+ tL4g== 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=96ZynX+/xOGPt7+NKwAQsmehrRxxvU8yP8sdO7gZBaE=; b=NiIwHyqwRbG6/e85wG/xXOaIsHeYzthS1vN6kXRMsPe+jlR342MO9WK8kzSyjBVw18 2iKJMSx1Qkq5ZGU2pfHeypS3UV5OnjM/fLWJYeKmyVD/iZ2Maxercw5O5XZe6+BPaLzC NISmyfYuxzlhnI+IxdMN7QHjfTns8DpYAM9jIlm1HkM/mdlCCoN9qQqFVj/UFZ4oMSJ2 tP61bDLhPJH7sU8BLmPURgwse4Km2lK4mtZHOPCk+BN25BRSHToOG6Dfb3IXv3Ub7Zuy rHyjdoENXSmoYjPGCL7jT6vxS2Fc2425OfJq2ilcdSS0IBA+rztoBPmzfRm7VHtsjud4 0CDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="H3Z/unaX"; 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 qa12-20020a170907868c00b0078dffe01cbesi165200ejc.4.2022.10.24.09.30.57; Mon, 24 Oct 2022 09:31:23 -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="H3Z/unaX"; 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 S234140AbiJXQQd (ORCPT + 99 others); Mon, 24 Oct 2022 12:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234533AbiJXQO5 (ORCPT ); Mon, 24 Oct 2022 12:14:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF752DF4E; Mon, 24 Oct 2022 08:02:32 -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 ams.source.kernel.org (Postfix) with ESMTPS id A60DFB81262; Mon, 24 Oct 2022 12:17:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F34EC433B5; Mon, 24 Oct 2022 12:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613826; bh=PVaDbcEgz6seddyXDXdU/WaBmcLKoTNo/6qbCXoQBPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H3Z/unaXR2i+arL2JyhzrIH7LyQcc12Wv1GoWUyST0bmKoDoOeY5XpIInZCLtibWh +W7aGsT6JogyZRFEQTIfuqQ6LKCN6bWqQzAPCb9BX6TOzrT6wZdwB3eNmZSDMe/ZjK 5lkv76fVG2RS4V/9sGnuZD3KmzArVWlkLR//vry8= 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.10 029/390] ASoC: wcd934x: fix order of Slimbus unprepare/disable Date: Mon, 24 Oct 2022 13:27:06 +0200 Message-Id: <20221024113023.823381366@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@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?1747587257076486031?= X-GMAIL-MSGID: =?utf-8?q?1747587257076486031?= 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 @@ -1829,8 +1829,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;