[alsa-devel] [PATCH v4 1/2] ASoC: SOF: introduce no_stream_position so host_period_bytes preserves its data

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Tue Jul 30 14:51:43 CEST 2019



On 7/30/19 5:16 AM, Rajwa, Marcin wrote:
> From: Marcin Rajwa <marcin.rajwa at 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'.

according to the

> Knowing this firmware can safely copy large/irregular chunks of data

why irregular? ALSA periods are pretty regular and predictable.

> (like data comming from i.e draining task) without the risk of buffer

coming

Please proof-read your commit messages (and use an editor which 
spell-checks for you), typos and misleading information don't exactly 
boost trust in the suggested patch, regardless of its merits.

> overflow.
> 
> Signed-off-by: Marcin Rajwa <marcin.rajwa at linux.intel.com>
> Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
> Reviewed-by: Ranjani Sridharan <ranjani.sridharan at 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;
> 
> 


More information about the Alsa-devel mailing list