From patchwork Sat Oct 22 07:18:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7166 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1088366wrr; Sat, 22 Oct 2022 00:39:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7BR0XPxPxg8Z63HoJSYVF/pj5UI8dz4s1Aw8+jEHOtERgYE5AZKLW1pJ980IYQG5jTsdlN X-Received: by 2002:a05:6a00:228f:b0:566:6ecd:29d9 with SMTP id f15-20020a056a00228f00b005666ecd29d9mr23642226pfe.62.1666424388904; Sat, 22 Oct 2022 00:39:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424388; cv=none; d=google.com; s=arc-20160816; b=s/ECOutH9YmCgBWwIKCU+EsIRifh6XtzqDO/ICwEKsip0MwYN4vHmiMiVO0RYsfb/m SbwagUS7PfcoNEYXqdtIfKccvSpyOhSftWvRc1m5dSDiSnsmVzFiTJAqRzRrGOth7+W5 3pzl8G5n/Y1lx6zLTbLnJ2pDH8ceOwLgwYm5M5U+KupHendjDC0bY17jALHZbA5ZAbbv 1YzBnTVQoh1ijsoKKniTEqeW4gYlsThI1FnX9r0/sr3ESsq+ZoKuofLHDyQrZS4O31bQ pF0jnSbbcDTNARMvebLtu/0StqaawJ9dNn1iHh3qS2sTeTM+TUR7yJlJm5CFJz9frAt+ HYdg== 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=dxaQSstO+KqlCGQz+IEzLAKaj0MOwMp6aNlz86ofY1PWP79+nN+36+R7cSABYe3EmI ftrtvkfA+9YG+ZFGi+16cp+tYQ4WuJ8vUyrvpF7jB1e37hpw+CxEbALa+l0ecpsFfV8d cE/vL3wIpJkBHh3Ub/0FTyov8zDeaFuKMP0vjrHlOcI1eAkZjH9jN0CIsF7Kcmq6Rgyg oKm3kv+F24hmJ6X6xZM9NUoT/JvzCu7GAIZxa4slvgmmgS5I5/KhyjGVbQ+q6fjZKl3w ZiDMJJUzQxo8GGyXi0Kq3CEbzHT6fjdjuuUlS5OJGyNgS8I638OgXcmDIIW70ZMWzalN 4LhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WESiwq55; 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 z12-20020a1709028f8c00b00178a33faa42si24124670plo.66.2022.10.22.00.39.36; Sat, 22 Oct 2022 00:39:48 -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=WESiwq55; 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 S230157AbiJVHjJ (ORCPT + 99 others); Sat, 22 Oct 2022 03:39:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230408AbiJVHhk (ORCPT ); Sat, 22 Oct 2022 03:37:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC35E29069E; Sat, 22 Oct 2022 00:35:56 -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 13F0860AC7; Sat, 22 Oct 2022 07:35:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1230AC433D6; Sat, 22 Oct 2022 07:35:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424155; bh=QISEug/oQPt/cNqoDbsduIJCybvN/wr90v+7N9BYJUc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WESiwq55m6nj8Oqn9HRSQdbaclo19Patq9zf+6FehdbT+LA+IzE5QVbvawAfv7fOO hjHoSOtdm6JGIdjN8OpbW/M8AcOOHFxSL2jhTNDZRzub/u6w971XJ5MpJRufPb6eP3 14Dg6cYy1SJDksy96phoekwdcjpvvc6V6nFKewM0= 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 045/717] ASoC: wcd934x: fix order of Slimbus unprepare/disable Date: Sat, 22 Oct 2022 09:18:44 +0200 Message-Id: <20221022072423.054476624@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?1747372619715123970?= X-GMAIL-MSGID: =?utf-8?q?1747372619715123970?= 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;