diff mbox series

[v2,2/2] ASoC: SOF: Intel: fix reset of host_period_bytes

Message ID 20190703151023.30313-2-yang.jie@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] ASoC: SOF: add flag for position update ipc | expand

Commit Message

Keyon Jie July 3, 2019, 3:10 p.m. UTC
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(-)

Comments

Ranjani Sridharan July 3, 2019, 7:07 p.m. UTC | #1
On Wed, 2019-07-03 at 23:10 +0800, Keyon Jie wrote:
> 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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@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;
>
Kai Vehmanen July 4, 2019, 10:05 a.m. UTC | #2
Hi,

On Wed, 3 Jul 2019, Keyon Jie wrote:

> 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>

looks good, for this patch:

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
diff mbox series

Patch

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;