From: "Rajwa, Marcin" <marcin.rajwa@linux.intel.com>
To: marcin.rajwa@intel.com, Keyon Jie <yang.jie@linux.intel.com>,
ranjani.sridharan@linux.intel.com,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
kai.vehmanen@linux.intel.com, alsa-devel@alsa-project.org
Subject: [PATCH v4 1/2] ASoC: SOF: introduce no_stream_position so host_period_bytes preserves its data
Date: Tue, 30 Jul 2019 12:16:22 +0200 [thread overview]
Message-ID: <9d92551a-fa10-4ecd-47f1-5b3b67824a12@linux.intel.com> (raw)
From: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Change the use of host_period_bytes. So far this field was used
as an bool value indicating whether FW should send stream position
update. With this patch we use host_period_bytes to provide firmware
information about the frequency of host interrupts aimed to read
its input buffer. This is accoring to ALSA definition of 'FramePeriod'.
Knowing this firmware can safely copy large/irregular chunks of data
(like data comming from i.e draining task) without the risk of buffer
overflow.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
include/sound/sof/stream.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/sound/sof/stream.h b/include/sound/sof/stream.h
index 643f175cb479..06af4ecb2584 100644
--- a/include/sound/sof/stream.h
+++ b/include/sound/sof/stream.h
@@ -83,10 +83,10 @@ struct sof_ipc_stream_params {
uint16_t sample_valid_bytes;
uint16_t sample_container_bytes;
- /* for notifying host period has completed - 0 means no period IRQ */
uint32_t host_period_bytes;
+ uint16_t no_stream_position; /* 1 means no IPC for position update */
- uint32_t reserved[2];
+ uint16_t reserved[3];
uint16_t chmap[SOF_IPC_MAX_CHANNELS]; /**< channel map -
SOF_CHMAP_ */
} __packed;
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next reply other threads:[~2019-07-30 10:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 10:16 Rajwa, Marcin [this message]
2019-07-30 10:22 ` [PATCH v4 2/2] ASoC: SOF: Intel: fix reset of host_period_bytes Rajwa, Marcin
2019-07-30 12:51 ` [PATCH v4 1/2] ASoC: SOF: introduce no_stream_position so host_period_bytes preserves its data Pierre-Louis Bossart
2019-07-30 21:50 ` Rajwa, Marcin
2019-07-30 23:03 ` Pierre-Louis Bossart
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=9d92551a-fa10-4ecd-47f1-5b3b67824a12@linux.intel.com \
--to=marcin.rajwa@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=kai.vehmanen@linux.intel.com \
--cc=marcin.rajwa@intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=yang.jie@linux.intel.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;
as well as URLs for NNTP newsgroup(s).