public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
To: Joris Verhaegen <verhaegen@google.com>,
	Vinod Koul <vkoul@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	Srinivas Kandagatla <srini@kernel.org>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	Orson Zhai <orsonzhai@gmail.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	Kunihiko Hayashi <hayashi.kunihiko@socionext.com>,
	Masami Hiramatsu <mhiramat@kernel.org>
Cc: kernel-team@android.com, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org, patches@opensource.cirrus.com,
	linux-arm-msm@vger.kernel.org,
	sound-open-firmware@alsa-project.org,
	linux-arm-kernel@lists.infradead.org,
	Miller Liang <millerliang@google.com>
Subject: Re: [PATCH v5 1/3] ALSA: compress_offload: Add 64-bit safe timestamp infrastructure
Date: Mon, 8 Sep 2025 08:30:54 +0100	[thread overview]
Message-ID: <deebd6d5-0c59-45e7-a2da-4c2c1ff6ab48@oss.qualcomm.com> (raw)
In-Reply-To: <20250905091301.2711705-2-verhaegen@google.com>



On 9/5/25 10:12 AM, Joris Verhaegen wrote:
> The copied_total field in struct snd_compr_tstamp is a 32-bit
> value that can overflow on long-running high-bitrate streams,
> leading to incorrect calculations for buffer availablility.
> 
> This patch adds a 64-bit safe timestamping mechanism.
> A new UAPI struct, snd_compr_tstamp64, is added which uses 64-bit
> types for byte counters. The relevant ops structures across the
> ASoC and core compress code are updated to use this new struct.
> ASoC drivers are updated to use u64 counters.
> 
> Internal timestamps being u64 now, a compatibility function is added
> to convert the 64-bit timestamp back to the 32-bit format for legacy
> ioctl callers.
> 
> Reviewed-by: Miller Liang <millerliang@google.com>
> Tested-by: Joris Verhaegen <verhaegen@google.com>
> Signed-off-by: Joris Verhaegen <verhaegen@google.com>
> ---
>  include/sound/compress_driver.h               |  2 +-
>  include/sound/soc-component.h                 |  4 +-
>  include/sound/soc-dai.h                       |  7 +--
>  include/uapi/sound/compress_offload.h         | 19 +++++++
>  sound/core/compress_offload.c                 | 52 +++++++++++++------
>  sound/soc/codecs/wm_adsp.c                    |  4 +-
>  sound/soc/codecs/wm_adsp.h                    |  2 +-
>  .../intel/atom/sst-mfld-platform-compress.c   | 12 +++--
>  sound/soc/intel/atom/sst-mfld-platform.h      |  2 +-
>  sound/soc/intel/atom/sst/sst_drv_interface.c  |  9 ++--
>  sound/soc/intel/avs/probes.c                  |  2 +-
>  sound/soc/qcom/qdsp6/q6apm-dai.c              | 26 ++++++----
>  sound/soc/qcom/qdsp6/q6asm-dai.c              | 26 ++++++----for qcom parts

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

--srini

  reply	other threads:[~2025-09-08  7:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05  9:12 [PATCH v5 0/3] ALSA: compress_offload: Add 64-bit safe timestamp API Joris Verhaegen
2025-09-05  9:12 ` [PATCH v5 1/3] ALSA: compress_offload: Add 64-bit safe timestamp infrastructure Joris Verhaegen
2025-09-08  7:30   ` Srinivas Kandagatla [this message]
2025-09-05  9:12 ` [PATCH v5 2/3] ALSA: compress_offload: Add SNDRV_COMPRESS_TSTAMP64 ioctl Joris Verhaegen
2025-09-05  9:12 ` [PATCH v5 3/3] ALSA: compress_offload: Add SNDRV_COMPRESS_AVAIL64 ioctl Joris Verhaegen
2025-09-05 14:54 ` [PATCH v5 0/3] ALSA: compress_offload: Add 64-bit safe timestamp API Charles Keepax
2025-09-08  5:47 ` Vinod Koul
2025-09-15  8:39   ` George Verhaegen
2025-09-08  7:34 ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=deebd6d5-0c59-45e7-a2da-4c2c1ff6ab48@oss.qualcomm.com \
    --to=srinivas.kandagatla@oss.qualcomm.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=daniel.baluta@nxp.com \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kernel-team@android.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=millerliang@google.com \
    --cc=orsonzhai@gmail.com \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.com \
    --cc=verhaegen@google.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    --cc=zhang.lyra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox