Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp5442745rwb; Wed, 21 Sep 2022 07:56:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Dln4K+cSbd3c48lYlKRJ7mkoB2zWPOJzhyomn+e0tzwrqaBkr0SK9/BH3j7Em/sCrMQMP X-Received: by 2002:a17:902:c949:b0:178:323f:6184 with SMTP id i9-20020a170902c94900b00178323f6184mr5386618pla.130.1663772165992; Wed, 21 Sep 2022 07:56:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663772165; cv=none; d=google.com; s=arc-20160816; b=ITYu/7msNpnp/diKAW31I9VsnAjfsJnC0iR1/eCBZPWMDHKcmdzBHes/tl6cIrLZyQ I2HngnF/TM9NznEyz5X8H35+K1Az+XMVsrnsECp4jJfjVNd6wgqIIwtea+ZITu/kq7Ml IvPDdgC0B8aNQq4LXyCvl/jq6bY1B3DbaJchppw6DMQJet2YWbkGCFLGBt+8HpXwnj4k eoJ08xBQbaj2+yZJkT20uPzJm1UvXAmX5+2hp6UtfRKZ+LWRDUK9W3j5DRlmje+wZxNC n6yqKG0L7cD1H5m+6RgZ/QBoF6eeMeo2CDSV4YSQtBVwt6nKT5/l/hM65LrpnAid5etg FxLg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3xh6qSfnk72aIq5PPq1PboXWTaapoBlxdPaCgFLtKR4=; b=u1ua9DYIzs5c4Wph8l4bW9n7mDsOZmLcz11E4N4h6v7rc2TaTCZeQzQ5u7y+p2bkoU 2Py3xrsiCeFWRG6RZFpsxqEp3gfb75h1fP9BBOVVqKoAlLRIx0GBq4nQIaaPt2gvKdR+ Atl0Jw5B/900A0u3IcUecS+XCnhZmUuRrmpcSoNsr8ui4WeCIj7MNxm1SS9EjVq6trSy Hn0H/P4v4oEm5RKZTxx9dPY8m2KdIZx1jQJmqzzxgvXAOntoYBbXPNvi77HaTtPKU73n kSTNMLPSxD5CxxGSOyANEpjitVjyY3gn4iYIoji8Rex37Z0Ay1gaqcbe6BMHbGzdCV1t LckQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="lgpK/4Ou"; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020aa79115000000b0052c78eecaffsi2871194pfh.174.2022.09.21.07.55.54; Wed, 21 Sep 2022 07:56:05 -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=@linaro.org header.s=google header.b="lgpK/4Ou"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229910AbiIUOyI (ORCPT + 99 others); Wed, 21 Sep 2022 10:54:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbiIUOyG (ORCPT ); Wed, 21 Sep 2022 10:54:06 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BFFC5EDD1 for ; Wed, 21 Sep 2022 07:54:05 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id u18so9631809lfo.8 for ; Wed, 21 Sep 2022 07:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=3xh6qSfnk72aIq5PPq1PboXWTaapoBlxdPaCgFLtKR4=; b=lgpK/4OuqSfkaiYhGhtq2E2966wSCB2Sl2SOz4WjFcJb/C/JO5oJjSqfOEpeVKbt80 WMtMs7hpEeXbSI2tLBpX9gEofcY7LnfnaHatInklDKx0rzBRb8U2Lh9G6s42p5b6XlXz sh4HkV+KPh1sJNaVQhH5/YZypLKXpnyEgqEVYoLlaTHDTZG48XyUKLcxdlhBO13Ljpuo gt4WXXyALNuQzPooN06izrjfYigYAhusPXz6Ro2cLW2vYRqYrBmP9ReGcDEQnqeez05U Lt4MpKtRCB2laihvVk1I4z9xhVeh96q5jh67AOkyjFGbqB/6o8m6BVQDq2O8+juUJbR4 rqsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=3xh6qSfnk72aIq5PPq1PboXWTaapoBlxdPaCgFLtKR4=; b=KlsA+6jfc1oMMmsgqjIna50l+a3MbhxejSkS2IVAUYMEPZaNroXqNO2EfRwKEEp1Vb UjyG9fcXWd2xw0Piejoit+LEADhk5/7UJpNNjeIpklRA3v4Gaqg/x69NqYiZt9sbmH2m 3ajYzt2r7ma8Sx4R/6uZ16aU1Usd8HMuxicpFpcElHvtJopopmw5MJwWsy91kHH8QxCh opDI8qfgFDxc/SPDQT0nr9HrcjDYBt9541IPhxcPlYAHnzC2No13EgtOyJ2uFPfukffL 8jKugLwGpfyfftyAZn0n7moGScZmmo8Ch8ShASNhy+M08CcdMqVutWbA2e0NH8hBWYz6 WeWQ== X-Gm-Message-State: ACrzQf2u82/P3QbMETUlDWk11QKLhSmpWXv9m2WSVTfpdxhJKJL/qhne UNT8zjJGwerwltGpuGpZlssaXA== X-Received: by 2002:ac2:53a1:0:b0:49f:6086:4868 with SMTP id j1-20020ac253a1000000b0049f60864868mr8245124lfh.518.1663772043369; Wed, 21 Sep 2022 07:54:03 -0700 (PDT) Received: from krzk-bin.. (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id c24-20020a056512075800b00494a1e875a9sm461981lfs.191.2022.09.21.07.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 07:54:02 -0700 (PDT) From: Krzysztof Kozlowski To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vinod Koul , Pierre-Louis Bossart , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , stable@vger.kernel.org Subject: [PATCH 2/2] ASoC: wcd934x: fix order of Slimbus unprepare/disable Date: Wed, 21 Sep 2022 16:53:54 +0200 Message-Id: <20220921145354.1683791-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220921145354.1683791-1-krzysztof.kozlowski@linaro.org> References: <20220921145354.1683791-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 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 --- sound/soc/codecs/wcd934x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index f56907d0942d..28175c746b9a 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -1913,8 +1913,8 @@ static int wcd934x_trigger(struct snd_pcm_substream *substream, int cmd, 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; -- 2.34.1