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 A79822571A1; Thu, 17 Apr 2025 18:51:22 +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=1744915882; cv=none; b=RX0r+dJUsOniDKtmfs8ULSNx3rCZQymCV8pDH7ozRFogC8t3xovDXxmJsfHHwQ/eLcRIvh9y/0EqbfHrS9y915di6asXW4DKmgm5SgjWsH39naAxxcYbJ40cqjMkGA6AghpSrQ2xq6MjSx/r/DeF9yYZFUNfVAx+1oo90rEpl6Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744915882; c=relaxed/simple; bh=vwSushnc2LJXyU4LluxoboyZyvLOc+MQrh+YkeX36O8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ld0EsZTSXyisMkTxLswKduiIgfOsrsIEUSp9ErQSb+9SWV3yGFZXtBQVxDi/XjxdNlePkrZ8oz39UsGGAL50h8ao8wvvQdOlPO4XlLb1MdvFi3x/3YLVffUjTnyad8fal2dOYO9c+TR5M68uVPo6G3Q+rbx3v2PWj1hCEQrbTHI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CUFtGTHc; 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="CUFtGTHc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA97AC4CEE4; Thu, 17 Apr 2025 18:51:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744915882; bh=vwSushnc2LJXyU4LluxoboyZyvLOc+MQrh+YkeX36O8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CUFtGTHc45lmxT0iaLF9bJ7lA0ivmNoy9UMmyYdTIJG/s3vVwL5wOL6+FsMjXpTT+ xkGrcivXT76qEjDDqevgdZuoMC/l3ODHom1A0K3Uq6VWnja5Ko5IHmb1BG31EHIWCD M4yKZIiwP98+I0rKvPNG1B4i1deR6H0LgQSK5/uI= 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.12 253/393] ASoC: qdsp6: q6apm-dai: set 10 ms period and buffer alignment. Date: Thu, 17 Apr 2025 19:51:02 +0200 Message-ID: <20250417175117.764631357@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250417175107.546547190@linuxfoundation.org> References: <20250417175107.546547190@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.12-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 @@ -385,13 +385,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;