From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C7B3284663; Wed, 23 Apr 2025 15:13:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745421210; cv=none; b=oIxclIYSLmQfbzjXhWcqDrt4FYD2uOyC6AZzT9D7BIqToHX93ffuWZ+eIqyVAZFraUNSpFmHQH0IqblW70SzHhuRt76P0dmDe7t4H2WUZEZeiIi5GxoSegsvx454AOv1R2y0OINeHGk4Ce7HQzmhVSqH5nmnMsUPSNhybRFXRig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745421210; c=relaxed/simple; bh=ZA83VlfZMZLe7WgOcvQOD6j5Ym2PBY+YBdLJR9NQtrA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SOulp8Jk1eEkmgPgzlMOFJjGYDabgQ+/WvWb2+pjuJaXlaHxN7Q1eRaoKPt5hhG3Q+0pSr9IzRcZhhKMh9a01MjtEz81UgaZarPqLgAXhX4wrUz3bWrB4OXkXmzR39qYT/Zz0xWdWWDHWLDX/LTyGD3+wQ03jy3BKvny+XvY2pY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=aFLg1iOZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="aFLg1iOZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65DB4C4CEE2; Wed, 23 Apr 2025 15:13:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745421209; bh=ZA83VlfZMZLe7WgOcvQOD6j5Ym2PBY+YBdLJR9NQtrA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aFLg1iOZNgaXWfOXFL6r0u0VndfTB5u2B6huq3DibZh8CugySpVNsjSKa/h8xjEZf usBlTQiR0b3bpVzNNlO4DNgenNVzO0rCL1h8nPjupvqhncsF1suCkBQb/mzB3tEC0m oi+NVTbDdIFbOA7i2uTe9zUn07kYcxgA5zbk4u1g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Srinivas Kandagatla , Johan Hovold , Mark Brown Subject: [PATCH 6.6 156/393] ASoC: qdsp6: q6apm-dai: set 10 ms period and buffer alignment. Date: Wed, 23 Apr 2025 16:40:52 +0200 Message-ID: <20250423142649.821139588@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250423142643.246005366@linuxfoundation.org> References: <20250423142643.246005366@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Srinivas Kandagatla commit 3107019501842c27334554ba9d6583b1f200f61f upstream. DSP expects the periods to be aligned to fragment sizes, currently setting up to hw constriants on periods bytes is not going to work correctly as we can endup with periods sizes aligned to 32 bytes however not aligned to fragment size. Update the constriants to use fragment size, and also set at step of 10ms for period size to accommodate DSP requirements of 10ms latency. Fixes: 9b4fe0f1cd79 ("ASoC: qdsp6: audioreach: add q6apm-dai support") Cc: stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla Tested-by: Johan Hovold Link: https://patch.msgid.link/20250314174800.10142-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/qcom/qdsp6/q6apm-dai.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/sound/soc/qcom/qdsp6/q6apm-dai.c +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c @@ -380,13 +380,14 @@ static int q6apm_dai_open(struct snd_soc } } - ret = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 32); + /* setup 10ms latency to accommodate DSP restrictions */ + ret = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 480); if (ret < 0) { dev_err(dev, "constraint for period bytes step ret = %d\n", ret); goto err; } - ret = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 32); + ret = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 480); if (ret < 0) { dev_err(dev, "constraint for buffer bytes step ret = %d\n", ret); goto err;