From patchwork Mon Oct 24 11:27:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10262 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp643994wru; Mon, 24 Oct 2022 13:43:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5R31iI+LKLGwDgRZMqeU1gU9nCcYZkSaZ6N9av+bd5nGBMn0rDeCqgHu1IdEuO5PcAjixS X-Received: by 2002:a17:90b:1b47:b0:20d:cdf2:c02e with SMTP id nv7-20020a17090b1b4700b0020dcdf2c02emr40388495pjb.233.1666644214446; Mon, 24 Oct 2022 13:43:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666644214; cv=none; d=google.com; s=arc-20160816; b=rNZ681c5hBtRa+uLIdbM076L4nifuFHnt7SKQWekYYCp1rCx7EI+sUXXS/NssZWSKW x2Uip7vHKnyGPQSTlTlTz4QMCRW3KO78gwUxL7P4l1rOkYiVNpBDfJxwvPn7yPcTPVYH SzVj5c+DANo/LYsrCiYgK75k6GX/kM4oRlZBjJ/ARgOSMegMdxZMHZ0bOujBk477MnG5 6x+O8KS5jUgn1wch9JduQ60cwVCUmn1jG4aZWHF6ZssmzebOwVIvW8H2E70gzTvOyxsj KGrJDRqon3WnpN7nKfejUTKUsbVstjCBHjxHQUHCHu8UJOSjQ/PG/PzlkYT0WnYFkEJU iY2Q== 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=fxw4g8glKJ1sAMl/DwpSO0L9LhZzGqxEzRm1ghS5ZnbnbuCW6xq9m0c5pQjiiapN6W NgIwt+Qv/xK5YOD/rrRBQuy1gPxqlLiKIiC37dGzNJVEu+LSyBiT5ltnc7CgxUs8Gn/4 opVrF2vcXlXnQmq4rFfwSlCZWiDMl+fGqZfzLcdt23yhyyxxB87uO+zDRTTIbYqHcdNG 2mXk6RO3uck4U7V2wNwEcSh3U4x+SS+xx4ukSIl5reWZgNr8XKcCG0qNc2lJj7GwEIKd Re9cqnw0FO7FwUJxVwnKWs62BS7UOm9kVhqvn+uaBxj06RiwABCJR7kEZ3GnpC4wt4Hy hYzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZHSUXoJL; 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 me5-20020a17090b17c500b0020aeaa98ed4si11909170pjb.93.2022.10.24.13.43.21; Mon, 24 Oct 2022 13:43:34 -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=ZHSUXoJL; 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 S234674AbiJXUmv (ORCPT + 99 others); Mon, 24 Oct 2022 16:42:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234929AbiJXUlw (ORCPT ); Mon, 24 Oct 2022 16:41:52 -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 2EDD8199896; Mon, 24 Oct 2022 11:50: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 ams.source.kernel.org (Postfix) with ESMTPS id 20886B8159B; Mon, 24 Oct 2022 12:17:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F565C433D6; Mon, 24 Oct 2022 12:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613823; bh=qpkhbREp+upQTVqTctmEWCOKn9PVcpaTOkNdIdq7NqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZHSUXoJLLSltKgq3pfqTMAks4fjfphmYVFBtWJPSoktu1DpTskwKXzR/B6to2jhpw fdwi/JRl/7cBmJSTjyaDC0TnSLGwnfDGrwOZmDXOnvvaStC4wRmvp1CLVd+63irBZQ 3l9p/KOJenRbKR4sOjErbU+KBBx1ZPz4XGJmG0A8= 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 028/390] ASoC: wcd9335: fix order of Slimbus unprepare/disable Date: Mon, 24 Oct 2022 13:27:05 +0200 Message-Id: <20221024113023.772109112@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?1747603123776097636?= X-GMAIL-MSGID: =?utf-8?q?1747603123776097636?= 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;