Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp5487751rwb; Wed, 21 Sep 2022 08:26:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5FRI7oDRBRcL0Bj/egF5xffCEpJ9Es+uiuPZIHGaVgYi0l6u+KPrKN74kxA0EBpRJp2rYz X-Received: by 2002:a63:5a44:0:b0:431:fa3a:f92c with SMTP id k4-20020a635a44000000b00431fa3af92cmr25648796pgm.471.1663774019538; Wed, 21 Sep 2022 08:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663774019; cv=none; d=google.com; s=arc-20160816; b=sBKAKkvbdaL0Qaz2qo628OxxI3Zh6Tm7b+e37payw1JDZqrG2Wu7kWqpVeMa7lZl1m 7SHZ0VJotJuDdZnkG0oWKbKYnwM6fO3E1UEoqNhNYCQOJxC/KWP3sYY8ra/XXeSelTZA Ix1zHVI5zaUWb2BLKoy8iiCBVtnREND+Pcja2+9h4IT0Dm1tHnf06gfp3hiX+kmF+PBw 3gdR9yIU9QLkLGrFuGd9C0JX8Ie7pP8k6DGm3HRpkmmyt0tACqdup186/ySn1GPd3a5X tvlElhzh3s/yMaMvUrwMxXig9Qun1FN+FelgKsE+XV3zwK+MprXWfXYOoC2RchgUvA/z GA6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=CS6PUZe/7E0GPiw13E62Crtyrp1hiuZogl2ZIyknUoU=; b=FLj26igF257hFQJD2mcLcom2fNIsonyYS7Z22dpUfXtKcp5QayLhKt8HqomT6RbfXT g1hQ330K/qxxEvVS898t0HbUpAD0VXtsLgdAy8yDDvsXA3tv1rl22e31xWlBwrz4NOPg Ei9ZAoDfC/cao6DPBXCpplargFU1VsIyS9UED1ekLTRdiF0fd7KsbXz2FuUuGvguap3Z bUtJPtqzjll8J2JjSidfMhSJ26ddllNpZ41JWNrtLP3orhkvy+jH14sToMHJ86Qr+4RE 2JJQmeksQI6q0Pj7IaFrl/bJQ29cR4U7KOeVNS/L8T7L8BgzBzfhHuF4FBdndWB5vIt1 Fb9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MK9OczHj; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a63cd0a000000b0043542246596si3034594pgg.196.2022.09.21.08.26.47; Wed, 21 Sep 2022 08:26:59 -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=@intel.com header.s=Intel header.b=MK9OczHj; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230206AbiIUPFe (ORCPT + 99 others); Wed, 21 Sep 2022 11:05:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229997AbiIUPFU (ORCPT ); Wed, 21 Sep 2022 11:05:20 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE84448E93; Wed, 21 Sep 2022 08:05:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663772718; x=1695308718; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Ivbh6ZGqsRC20s9vn6y6NPd6czEHxqm4rOtV1lbpFnc=; b=MK9OczHjmaMeyUXAYKW6qlCGRVgEilY44R9w67NtTGDN84bUo8drgwLW PraKVff6/mn0CZoTmuRYBt0vwB20GHQ+JpzxYm7qNX93WW6aIMflxveCQ uWHeqrgMtREwu1wdW6NefYS+xwFg0GMRcQ2NhltPrCbbSs/XmtNDCmWBE nKGMpWMNnXN17SX/XoF0oM+Tl8BI3H6HDOYxCwFwWhUk+7sQGctqLsYuL 2AhBXTxT69YECDZVzbt96OvuInBxPfVfXVHPyAFe4EX+Us34Oh4ag13sF y0PS1TJLDRLn4JSrgFg+YyiqoR/fzEHcB+XnS4jSJAHck1A7uO1zi63kw g==; X-IronPort-AV: E=McAfee;i="6500,9779,10477"; a="280398523" X-IronPort-AV: E=Sophos;i="5.93,333,1654585200"; d="scan'208";a="280398523" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 08:05:18 -0700 X-IronPort-AV: E=Sophos;i="5.93,333,1654585200"; d="scan'208";a="948187784" Received: from johannes-mobl1.ger.corp.intel.com (HELO [10.249.46.195]) ([10.249.46.195]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 08:05:11 -0700 Message-ID: <20916c9d-3598-7c40-ee77-1148c3d2e4b1@linux.intel.com> Date: Wed, 21 Sep 2022 17:05:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.11.0 Subject: Re: [PATCH 1/2] ASoC: wcd9335: fix order of Slimbus unprepare/disable Content-Language: en-US To: Krzysztof Kozlowski , Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vinod Koul , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org References: <20220921145354.1683791-1-krzysztof.kozlowski@linaro.org> From: Pierre-Louis Bossart In-Reply-To: <20220921145354.1683791-1-krzysztof.kozlowski@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 On 9/21/22 16:53, Krzysztof Kozlowski wrote: > 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 > --- > sound/soc/codecs/wcd9335.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c > index 06c6adbe5920..d2548fdf9ae5 100644 > --- a/sound/soc/codecs/wcd9335.c > +++ b/sound/soc/codecs/wcd9335.c > @@ -1972,8 +1972,8 @@ static int wcd9335_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); This looks logical but different from what the kernel doc says: /** * slim_stream_disable() - Disable a SLIMbus Stream * * @stream: instance of slim stream runtime to disable * * This API will disable all the ports and channels associated with * SLIMbus stream * * Return: zero on success and error code on failure. From ASoC DPCM framework, * this state is linked to trigger() pause operation. */ /** * slim_stream_unprepare() - Un-prepare a SLIMbus Stream * * @stream: instance of slim stream runtime to unprepare * * This API will un allocate all the ports and channels associated with * SLIMbus stream * * Return: zero on success and error code on failure. From ASoC DPCM framework, * this state is linked to trigger() stop operation. */ I would bet the documentation is incorrect? > break; > default: > break;