Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7883804rwl; Thu, 23 Mar 2023 09:46:47 -0700 (PDT) X-Google-Smtp-Source: AK7set+I3jG53+jU8cR2z/4bGa3gWOMJcXJewFwrlSmHLE/CXKj024HX6iJKNUlPIR8b9KTzWKDP X-Received: by 2002:a17:906:b45:b0:926:8f9:735c with SMTP id v5-20020a1709060b4500b0092608f9735cmr6312709ejg.32.1679590007079; Thu, 23 Mar 2023 09:46:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679590007; cv=none; d=google.com; s=arc-20160816; b=sasJjbO8fA2OjBiGAfZbEzk7fJBGDuaq4Iie5ia++yUAItyurz3IMo/EeUUCiMAgYE fB+qQEzrzRNLMMFmrquv0nuu2IJQ6uJmSeGvnXXx1LNvCD0ckK9J5bws79MHqTDtlMJO wJcIOhBeFRhxW56h2KZGYqZugA/m0rY0ehJKeiaZwVcphCwZv/S+/bZEH3CLII1Ll6bP A0Uxu4SvJkHYx0UJs+f88jUXoAcG2SnE0WHqo0xt4qXzS/k6R4ZdVp98cqlXHwMJEPef uOtkPJE99x4tTHtIFrcYRnNoSGBY7Pvs9XJmMTmeMKVPCM9Hni7BcgEgeBmd3ypT81EM roCg== 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=V9hR2ta52bACZknOtBgzAtIQixsM2cnIaeXyomXOX0M=; b=OoTNAtbQh5940o7ClZkiMlAQ3IreIz7yLyKTj9fHsXUbrii95FmB7Lhg9YZzVGge3f x+2QKPkrCrRoYTRBuDwdOTI8Yj8b3KHFHjadVpB+N4GxOAIXeCBZgcsRmyGhs4JvyXln YywEsYpHcDeAuJ6ecUX7MryLjcTssmJKjrYX8pFdr05xU5q4fobbg/LCGLwHsDygCbBO 7sKNMXeKtjvAHj4l8mVQLiTHBpZWFhgmb23B52O4lR+iPJWMXIRZUx53sFsZlUKgN17l bHmfp10EZWiWNKL2dVP8pHkrKCmuix3OILsumxADD18Wz1j9e4fKt5TYiCD3AT0XMLuR yNgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hsU07gcm; 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 a12-20020a17090640cc00b009333329da75si3787905ejk.100.2023.03.23.09.46.22; Thu, 23 Mar 2023 09:46:47 -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=hsU07gcm; 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 S232439AbjCWQp3 (ORCPT + 99 others); Thu, 23 Mar 2023 12:45:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231603AbjCWQpC (ORCPT ); Thu, 23 Mar 2023 12:45:02 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 787D2BDD7 for ; Thu, 23 Mar 2023 09:44:16 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id eg48so89398381edb.13 for ; Thu, 23 Mar 2023 09:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679589855; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=V9hR2ta52bACZknOtBgzAtIQixsM2cnIaeXyomXOX0M=; b=hsU07gcm4byF9ZYlXK1WlYHz20he7E5os8F7BoiRYFqBoQ2LrF2tAJIR9eVB89B8Uy HJA8JeTi7FwzRJ9QxYCsEuIBXYiMTMb1rDVSxF4Q/n0XMr/M4RFU6tkGTphQfVx4uG71 l5UlNqW7RwV16UokCSfFHyRmu8oAgTKWjS8tWQtIe5h/PGz52NnEbauFdC0hY47EMOgS SOTX0YK+AtNfFB4fQyOEqxMCyZHkHGoA+mSLPFbuU4KUzJ7iT2zGM9o8cDWy0W066NRI FquE+gLVNO9wbeZ7aJh0yrRbmLCExY1uQ7JeyDp7ZrXtcJ+GS4EGqeX6jb6AUxU2ZUqV I1Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679589855; 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:message-id:reply-to; bh=V9hR2ta52bACZknOtBgzAtIQixsM2cnIaeXyomXOX0M=; b=nx/5fLIpVGGYbaYvz61zzhZwtBN+uvNV9i6aRqL5yk7J6jvs6WAYkKy6gDsiaR7JOW 0f/hrXPEMczjAz0qiflCstkcmgLjdH9RNre1Gu7/0yTxo9Byw1a96qVlvLbbY5UgmIxr 4bIKYRbUbvyXW8wdWzqZI7gFyqWepTuIQBOcTwdxYI1ZG6oaERTegNcKrl89YWSlcRxG 0ZVdzI+rXzciJMjIC7Nj28Un72zxEPMXrNizfegnAA9FxBd2/v4gxvdj+U+OZrZb/MLn aBa5FZNczfMUPdTs4EsdxS8e/YA8maMv8dbxttyHxOwLZc9yvabdiNOGRIBH3y4PIrIr 53VQ== X-Gm-Message-State: AO0yUKVn33iGaHOPOKrAsDqp0ZYOlVu8eTWsJQzCsW/uqd+Kun6yGbC3 EFcAtu/lnGCm9lgNLXXypOsxsQ== X-Received: by 2002:a50:e619:0:b0:4fd:298a:62cb with SMTP id y25-20020a50e619000000b004fd298a62cbmr6183375edm.21.1679589854783; Thu, 23 Mar 2023 09:44:14 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id m10-20020a50998a000000b004e48f8df7e2sm9542187edb.72.2023.03.23.09.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 09:44:13 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Cc: perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, johan+linaro@kernel.org, steev@kali.org, dmitry.baryshkov@linaro.org, Srinivas Kandagatla Subject: [PATCH 1/4] ASoC: qcom: q6apm-lpass-dai: close graphs before opening a new one Date: Thu, 23 Mar 2023 16:44:00 +0000 Message-Id: <20230323164403.6654-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230323164403.6654-1-srinivas.kandagatla@linaro.org> References: <20230323164403.6654-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 multiple prepare calls, its possible that the playback graphs are not unloaded from the DSP, which can have some wierd side-effects, one of them is that the data not consumed without any errors. Fixes: c2ac3aec474d("ASoC: qcom: q6apm-lpass-dai: unprepare stream if its already prepared") Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c index 23d23bc6fbaa..420e8aa11f42 100644 --- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c @@ -130,6 +130,9 @@ static int q6apm_lpass_dai_prepare(struct snd_pcm_substream *substream, struct s if (dai_data->is_port_started[dai->id]) { q6apm_graph_stop(dai_data->graph[dai->id]); dai_data->is_port_started[dai->id] = false; + + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + q6apm_graph_close(dai_data->graph[dai->id]); } /** -- 2.21.0