* [PATCH 1/2] ASoC: SOF: ipc: update sof_ipc_stream_params
@ 2019-07-02 12:11 Keyon Jie
2019-07-02 12:11 ` [PATCH 2/2] ASoC: SOF: Intel: fix reset of host_period_bytes Keyon Jie
2019-07-02 23:29 ` [PATCH 1/2] ASoC: SOF: ipc: update sof_ipc_stream_params Ranjani Sridharan
0 siblings, 2 replies; 4+ messages in thread
From: Keyon Jie @ 2019-07-02 12:11 UTC (permalink / raw)
To: alsa-devel
Cc: marcin.rajwa, Keyon Jie, ranjani.sridharan, Marcin Rajwa,
pierre-louis.bossart
From: Marcin Rajwa <marcin.rajwa@linux.intel.com>
The host period bytes needs to be passed to firmware.
Currently this field is used as notification for host
about period copy completion. Therefore we need to split these
two informations.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@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..44acfa62fa69 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_period_irq; /* 1 means period IRQ mode OFF */
- uint32_t reserved[2];
+ uint16_t reserved[3];
uint16_t chmap[SOF_IPC_MAX_CHANNELS]; /**< channel map - SOF_CHMAP_ */
} __packed;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ASoC: SOF: Intel: fix reset of host_period_bytes
2019-07-02 12:11 [PATCH 1/2] ASoC: SOF: ipc: update sof_ipc_stream_params Keyon Jie
@ 2019-07-02 12:11 ` Keyon Jie
2019-07-02 23:29 ` [PATCH 1/2] ASoC: SOF: ipc: update sof_ipc_stream_params Ranjani Sridharan
1 sibling, 0 replies; 4+ messages in thread
From: Keyon Jie @ 2019-07-02 12:11 UTC (permalink / raw)
To: alsa-devel
Cc: marcin.rajwa, Keyon Jie, ranjani.sridharan, Marcin Rajwa,
pierre-louis.bossart
From: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This patch prevents the reset of host period bytes.
The parameter has been used to keep information about
completion of period copy. Right now we keep this
information in period_irq.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
---
sound/soc/sof/intel/hda-pcm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sof/intel/hda-pcm.c b/sound/soc/sof/intel/hda-pcm.c
index 9b730f183529..c7022346aba0 100644
--- a/sound/soc/sof/intel/hda-pcm.c
+++ b/sound/soc/sof/intel/hda-pcm.c
@@ -116,9 +116,9 @@ int hda_dsp_pcm_hw_params(struct snd_sof_dev *sdev,
/* disable SPIB, to enable buffer wrap for stream */
hda_dsp_stream_spib_config(sdev, stream, HDA_DSP_SPIB_DISABLE, 0);
- /* set host_period_bytes to 0 if no IPC position */
+ /* update no_period_irq flag for ipc params */
if (hda && hda->no_ipc_position)
- ipc_params->host_period_bytes = 0;
+ ipc_params->no_period_irq = 1;
ipc_params->stream_tag = hstream->stream_tag;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ASoC: SOF: ipc: update sof_ipc_stream_params
2019-07-02 12:11 [PATCH 1/2] ASoC: SOF: ipc: update sof_ipc_stream_params Keyon Jie
2019-07-02 12:11 ` [PATCH 2/2] ASoC: SOF: Intel: fix reset of host_period_bytes Keyon Jie
@ 2019-07-02 23:29 ` Ranjani Sridharan
2019-07-03 1:52 ` Keyon Jie
1 sibling, 1 reply; 4+ messages in thread
From: Ranjani Sridharan @ 2019-07-02 23:29 UTC (permalink / raw)
To: Keyon Jie, alsa-devel; +Cc: marcin.rajwa, pierre-louis.bossart, Marcin Rajwa
On Tue, 2019-07-02 at 20:11 +0800, Keyon Jie wrote:
> From: Marcin Rajwa <marcin.rajwa@linux.intel.com>
>
> The host period bytes needs to be passed to firmware.
> Currently this field is used as notification for host
> about period copy completion. Therefore we need to split these
> two informations.
Keyon/Marcin,
Could you please add a bit more context in the commit message on the
need to split these two fields ie.. what usecases need this?
Thanks,
Ranjani
>
> Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
> Signed-off-by: Keyon Jie <yang.jie@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..44acfa62fa69 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_period_irq; /* 1 means period IRQ mode OFF */
>
> - uint32_t reserved[2];
> + uint16_t reserved[3];
> uint16_t chmap[SOF_IPC_MAX_CHANNELS]; /**< channel map -
> SOF_CHMAP_ */
> } __packed;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ASoC: SOF: ipc: update sof_ipc_stream_params
2019-07-02 23:29 ` [PATCH 1/2] ASoC: SOF: ipc: update sof_ipc_stream_params Ranjani Sridharan
@ 2019-07-03 1:52 ` Keyon Jie
0 siblings, 0 replies; 4+ messages in thread
From: Keyon Jie @ 2019-07-03 1:52 UTC (permalink / raw)
To: Ranjani Sridharan, alsa-devel
Cc: marcin.rajwa, Lin, Mengdong, pierre-louis.bossart, Marcin Rajwa
On 2019/7/3 上午7:29, Ranjani Sridharan wrote:
> On Tue, 2019-07-02 at 20:11 +0800, Keyon Jie wrote:
>> From: Marcin Rajwa <marcin.rajwa@linux.intel.com>
>>
>> The host period bytes needs to be passed to firmware.
>> Currently this field is used as notification for host
>> about period copy completion. Therefore we need to split these
>> two informations.
> Keyon/Marcin,
>
> Could you please add a bit more context in the commit message on the
> need to split these two fields ie.. what usecases need this?
Sure, previously I wrote the commit message like this:
ASoC: SOF: add flag for position update ipc
In some cases, FW might need use the host_period_bytes even no position
update ipc reqiured from driver, here add another flag for position update,
and preserve host_period_bytes for FW to use.
This might require corresponding FW change and ABI alignment.
Thanks,
~Keyon
>
> Thanks,
> Ranjani
>>
>> Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
>> Signed-off-by: Keyon Jie <yang.jie@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..44acfa62fa69 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_period_irq; /* 1 means period IRQ mode OFF */
>>
>> - 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-03 1:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-02 12:11 [PATCH 1/2] ASoC: SOF: ipc: update sof_ipc_stream_params Keyon Jie
2019-07-02 12:11 ` [PATCH 2/2] ASoC: SOF: Intel: fix reset of host_period_bytes Keyon Jie
2019-07-02 23:29 ` [PATCH 1/2] ASoC: SOF: ipc: update sof_ipc_stream_params Ranjani Sridharan
2019-07-03 1:52 ` Keyon Jie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox