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 B3CF53590C4; Fri, 9 Jan 2026 12:44:25 +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=1767962665; cv=none; b=hakUJBNMJQqpU/2fm1AQqcDDlz06KJlc/rO/9KgsdzcsiedRmSn1m0q0UJlQZ18c07HBIsRB1SjVzg3uBgQMNVx0e43nkJCksr+JmDhxF2MWEzhrWB0VXuz9bv8vqx3KrZ0g69wlsH43xuWyFQFX4fWaBOqH5aA1QpD8uW3jwNg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767962665; c=relaxed/simple; bh=+oWiy4JT5rtsGwFhypmu3LRp61YBcf9MX3nXtis62o4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QOEYfSnbNJh7z24sTgMdVw03h6pMrNDPGMabynYiz3LPkRMd63R/UJXUtpzFOVggNgDFuGWzzpya979uTQtVdOmAB/QDIo0Cw97xJbRQ7+GCXQ84qwqc00iunWsEPdE5ZPKmqn4rGfO8lwB4I9W1N1ZR6kk/mfnsV5ZcTDqNwyI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sGWZhaBu; 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="sGWZhaBu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 379E6C4CEF1; Fri, 9 Jan 2026 12:44:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767962665; bh=+oWiy4JT5rtsGwFhypmu3LRp61YBcf9MX3nXtis62o4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sGWZhaBuwX9+cGRz97bXnE5Z3UdnWV8ZgnYgvXtHxkWI27RFMq44tdHcQqZ/DoTQg wkbJMMBMaAEk73LANgOTgLu/PSTj4bdtA8mrHvQVXnA4z6KDGkvn/P5YVKTIktUVAh oetfFy2J/2q7tp/v04otpv64FquHxtpJZIq4/Zqo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Stable@vger.kernel.org, Srinivas Kandagatla , Mark Brown , Alexey Klimov Subject: [PATCH 6.1 445/634] ASoC: qcom: q6apm-dai: set flags to reflect correct operation of appl_ptr Date: Fri, 9 Jan 2026 12:42:03 +0100 Message-ID: <20260109112134.282965889@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260109112117.407257400@linuxfoundation.org> References: <20260109112117.407257400@linuxfoundation.org> User-Agent: quilt/0.69 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.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Srinivas Kandagatla commit 950a4e5788fc7dc6e8e93614a7d4d0449c39fb8d upstream. Driver does not expect the appl_ptr to move backward and requires explict sync. Make sure that the userspace does not do appl_ptr rewinds by specifying the correct flags in pcm_info. Without this patch, the result could be a forever loop as current logic assumes that appl_ptr can only move forward. Fixes: 3d4a4411aa8b ("ASoC: q6apm-dai: schedule all available frames to avoid dsp under-runs") Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla Tested-by: Alexey Klimov # RB5, RB3 Link: https://patch.msgid.link/20251023102444.88158-2-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/qcom/qdsp6/q6apm-dai.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/soc/qcom/qdsp6/q6apm-dai.c +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c @@ -66,6 +66,7 @@ static struct snd_pcm_hardware q6apm_dai .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME | + SNDRV_PCM_INFO_NO_REWINDS | SNDRV_PCM_INFO_SYNC_APPLPTR | SNDRV_PCM_INFO_BATCH), .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE), .rates = SNDRV_PCM_RATE_8000_48000, @@ -85,6 +86,7 @@ static struct snd_pcm_hardware q6apm_dai .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME | + SNDRV_PCM_INFO_NO_REWINDS | SNDRV_PCM_INFO_SYNC_APPLPTR | SNDRV_PCM_INFO_BATCH), .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE), .rates = SNDRV_PCM_RATE_8000_192000,