From patchwork Sat Oct 22 07:18:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7163 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1088347wrr; Sat, 22 Oct 2022 00:39:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5cLuVe39Sw04rWsASZCTR/pAYnHGPNMEHzLD0Sar16ou13Af2Bb63vkobMVkgsZUFCqJDw X-Received: by 2002:a17:907:6e03:b0:78e:1c82:1f2a with SMTP id sd3-20020a1709076e0300b0078e1c821f2amr18356772ejc.611.1666424382832; Sat, 22 Oct 2022 00:39:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424382; cv=none; d=google.com; s=arc-20160816; b=kMl5LgOOl4aOKO9/ZeXAXwv64XTrNVWgS42JRfdlwJlnZZFDJTWcrAWm+sCltPwaQJ ptNqU6hTb1gFOeyHZa3y2nPVLlAaUp4OV4Zu8cA/f4IfbN13s/0M4K/UlzKTx69AL5fe w6//e/zcje9Kg7xOUsBd0I44NhUHLRGddZ/x4RuzBa6IXffbRE258FVocVV0r+qA3MAV R8vGGeQJqiR/nog3hByvgZOp1joA3wTEqakdjcA+bwLvZnXyiIQX3Lc8J3CavG2yazIV ag/CYs5oEbMFgEPskWXjCnuxeBK1P6z64SwbU+zQIr0snwDqe9dmrXfOz/pXQED2ld8f kY9w== 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=+zFa8brGdyiwgio9pC1Ae+ysVWZ8asWEUvWaf4xJCqE=; b=crHXFkfk51w/zA610GC9kLy4UTuMvz9XOYPLecsmiS6yPlFAmbAw78nex/KkIBWhcB D+Z4pb5FuTXpIGtSegR4TZBp2vfK63c+F66TPs8pU2d0SI4YCmkatcbIcF/R1ajWLyPk WN26edUiiO7ogelFSVjFaOv5kJPYYm57RYoQAwAb9bypmSeGS0idFfKqA/99ufJRwpkN cMNzWDGGQpnqRS8tSP3ESRD3DJGGkbtLIvUGxHxSIBMsPrdNYVQsKPopYGRKhLuxw2/o e/i6stC1nl3MmLiU7GDgO6WefDSMBGxBFdM1gVv+dRDwrWR4fJ23eT7yqkw23d7Coqsj jGRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HiJPfkP7; 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 dr8-20020a170907720800b0078b3edae43csi24281376ejc.37.2022.10.22.00.39.18; Sat, 22 Oct 2022 00:39:42 -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=HiJPfkP7; 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 S230404AbiJVHiu (ORCPT + 99 others); Sat, 22 Oct 2022 03:38:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230400AbiJVHhd (ORCPT ); Sat, 22 Oct 2022 03:37:33 -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 6471D25CD94; Sat, 22 Oct 2022 00:35:54 -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 192AD60ADD; Sat, 22 Oct 2022 07:35:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F629C433D6; Sat, 22 Oct 2022 07:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424152; bh=F1qb6aNL2yA+5EeMnl75jCleXjWKk7O5bQePHg9VgMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HiJPfkP7epirFt17FWUvgQZWq9k+G65nSxm9KcaDYuGZqyfOC4XqFAwJOwrITgU5q n+ajHgRKGrKO6VxOcBizG1+FrukjvqRTaePI2Mr3wCR8T8Eal1bDLCAPRvaMOmMfGV Y8e3UVfiyi1VJH+s3x+iZiko6h68UrJX9dD7GISg= 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.19 044/717] ASoC: wcd9335: fix order of Slimbus unprepare/disable Date: Sat, 22 Oct 2022 09:18:43 +0200 Message-Id: <20221022072422.871174474@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747372613750412586?= X-GMAIL-MSGID: =?utf-8?q?1747372613750412586?= 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 @@ -1983,8 +1983,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;