From patchwork Wed Oct 19 08:22: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: 4528 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp203629wrs; Wed, 19 Oct 2022 01:43:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5VE7FYJ0Kpi/fFH0TuyYRSrchoaUCLoq3MvidZkVqdl3ExqL/ctXtoyn2z6qj1N43T3g2B X-Received: by 2002:a63:86c7:0:b0:459:437c:ca90 with SMTP id x190-20020a6386c7000000b00459437cca90mr6400280pgd.33.1666169017766; Wed, 19 Oct 2022 01:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666169017; cv=none; d=google.com; s=arc-20160816; b=B9X5YlTtMbEnUsTJpUH7X8rpX7iIt4Ug68/maAYWJPgYWNQpR9XOmY4COwNgwmuofs sfrraKB8GIRew3jqVIDD3vUoZAIVL3wVNLAMIaJwTPJzvHpPEVXaMvxBqHv96wZGDG/t tX0ypR6lCW6XbJu51LIm9kF9QzcorfV89lGVHE67oK1chwEbht0lcH7AL/CkOBzZuXbk zEUwJNX5OJi8BbMXNBaat8Zb7MPfEF2PlfuwNtLJJicCzmueI6rdAGeYdx5pCyg2BzFS /8ee1LI3SUgd+PIyHgsbkeb/ycwnXGhCFb6wTo+0Fq0M3ZuIvkGkqxpR3kQOtRk6bKU6 DlGw== 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=V5IJaSimAjUncqQve6FnR+B5Lloz0VUcaMiFlpZvaC0=; b=EoWGrSiYk94f4T+kExTvTDJkPfK0zN/5OTYYheGT2yPCy6CI/h0fCkXCCANqbViAr4 lu1veKaU4ic6AbVfsyiNLt70X/chWOY1pQbng8cvSsFkpjKVJR0a4wuj8ST/yRT7sqDv Cl//uPdwx50I2UDe1VOlfjduER2zDqgXSPkkoIYJSkzOOQOj2c2CKHSaQrW5kTmfo4b7 d1ktQrM7iNBY7qsTiaLMZ11F/XXLCglY0j3Jq7JsPqZGtPusIE0NWU6jNPlWWQv7PnHD jKU/lYGYWCdsOAc22nXFi1LkF4smNyp12evXhYKJ2dzj3Ug2/fFtz8myMdCw3ewbq+DR IDkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=M93bjaLU; 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 m4-20020a170902768400b00176db49b734si15928338pll.283.2022.10.19.01.43.23; Wed, 19 Oct 2022 01:43:37 -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=M93bjaLU; 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 S230461AbiJSIm7 (ORCPT + 99 others); Wed, 19 Oct 2022 04:42:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230447AbiJSIlr (ORCPT ); Wed, 19 Oct 2022 04:41:47 -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 936E62314C; Wed, 19 Oct 2022 01:39:41 -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 5223CB82256; Wed, 19 Oct 2022 08:39:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 810C0C433D6; Wed, 19 Oct 2022 08:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666168778; bh=obwycopaJ/uBms9NswMDeNgX5qTwLCACrJks60hkFjk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M93bjaLUzqS/IT7Ve9sJL0rl5pAiNcmW0jLk4cXow7yIdp5jCKF8Q8DVnm8vNkBQ8 As1dJ8B0HGfN0fMavLu7cXUB7CVvklXmyzXVYz3O+DVNij/2wIQ5n9q0NyalN+4vTO GGBldte3P/8QPfwHp0AmTIrVxjH6lhj7aH5fepQc= 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 6.0 050/862] ASoC: wcd9335: fix order of Slimbus unprepare/disable Date: Wed, 19 Oct 2022 10:22:17 +0200 Message-Id: <20221019083252.209705544@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747104843747421369?= X-GMAIL-MSGID: =?utf-8?q?1747104843747421369?= 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 @@ -1974,8 +1974,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;