From patchwork Mon Oct 24 11:26:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9272 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp462470wru; Mon, 24 Oct 2022 06:46:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7JUDNtixXBY9qUikCeEnFli5jF9qGz5Wd8NTKgVESYprUUJIzkSYPwNQT8QsAhgQI06pXH X-Received: by 2002:a17:90b:f06:b0:212:cb07:fb82 with SMTP id br6-20020a17090b0f0600b00212cb07fb82mr20844179pjb.221.1666619152706; Mon, 24 Oct 2022 06:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666619152; cv=none; d=google.com; s=arc-20160816; b=vFG3ApAVFWDk6b/Hd9gzzFzLxQEZ6a3VCHJHHFqoGVhc7V5OYSwbOhm6AJzN/iyPiO EwHx66iWtkzUxAMu0HabCAYrM1FUxEv0X+uwAZrmK/YGYtF5XVWKWlyUcK/Jn+tN59Qh tvcc+wmuEAZP7gxQR1FkFcxitGDnP2ukdKo5c3cahKf5h22P2RKNoAeudSuYxQFtLATN NoxKKhjionFm9gED4FJrxsSkPdqr9r7BoPbVNMe4A49uuD7FFhozxLvHSBAfF1fpXKAP OeMpshbVvyadMD7cxcDigJLPE+P736EjVM69/WPWFLhuQ5IuCxEVLrobWV49eDUJPYIG x1AA== 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=qzxNbJx9KiVaNcJQVjkKor7+4pBBt7SIG7rWiHYF0o7HKCUC2d8BykMtG062Jumob/ R/MmGltT3zMFggKeP+ZO+iawIrusonGsZv1HhPZLUKpKXZnKCyDtmZzrW++P/aqkRVPT qelQ9EOgTJroGR15FYfueRNW4GtUQOqp+D+enDZMUodFQDaek7w3pnZTzikIe83QGCTW YbRU5NY1iVCYZ/t9ThhK/+zb5D88uYL122VRx5Sgzyo2KHQKR16gVNBIFEsjIqhgun3m 1T5HV/K70uDKdbf/3CPeMRWWkJLGddp3+gpwQwV/X3sBhlNKl2gWcq8keqznmUdcwm6Q yJVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="qEe/7Fob"; 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 jl3-20020a170903134300b0017f77d19d92si31349754plb.127.2022.10.24.06.45.39; Mon, 24 Oct 2022 06:45:52 -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="qEe/7Fob"; 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 S236408AbiJXNoK (ORCPT + 99 others); Mon, 24 Oct 2022 09:44:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236450AbiJXNkL (ORCPT ); Mon, 24 Oct 2022 09:40:11 -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 27413B2D8B; Mon, 24 Oct 2022 05:37:22 -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 62164612F4; Mon, 24 Oct 2022 12:35:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7282EC433D6; Mon, 24 Oct 2022 12:35:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614938; bh=qpkhbREp+upQTVqTctmEWCOKn9PVcpaTOkNdIdq7NqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qEe/7FobSx7v6sC9ZKoBwYFE4fFO1d2OR1jBnkd2diarqGcXIFYxjb25B4Esp91hE kRtWD95UJuemv4BQGW9Pwzumhuj6ffhVBj6roRWsjfM2zDltn3trEkka/LSwpeBpwG BFWTQP00y/ToUB9JM9xhPTC8BGOu4MlQI9qlVul8= 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.15 033/530] ASoC: wcd9335: fix order of Slimbus unprepare/disable Date: Mon, 24 Oct 2022 13:26:17 +0200 Message-Id: <20221024113046.491452343@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@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?1747576844705502413?= X-GMAIL-MSGID: =?utf-8?q?1747576844705502413?= 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;