[Sound-open-firmware] [PATCH v2] ipc: skip host page table set up for hostless tone pipeline

Liam Girdwood liam.r.girdwood at linux.intel.com
Sun Jun 10 22:05:28 CEST 2018


On Fri, 2018-06-08 at 23:28 -0700, Ranjani Sridharan wrote:
> Hostless pipelines such as the tone pipeline do not need
> host page table while setting up pcm params.
> 
> Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
> ---
>  src/ipc/handler.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/ipc/handler.c b/src/ipc/handler.c
> index 581ce9e..92aa846 100644
> --- a/src/ipc/handler.c
> +++ b/src/ipc/handler.c
> @@ -125,8 +125,11 @@ static int ipc_stream_pcm_params(uint32_t stream)
>  	cd = pcm_dev->cd;
>  	cd->params = pcm_params->params;
>  
> -#ifdef CONFIG_HOST_PTABLE
> +	/* no need to set up host page table for hostless pipelines */
> +	if (cd->comp.type == SOF_COMP_TONE)
> +		goto pipe_params;


I think it's better to check the pipeline does not terminate with a host
endpoint as this means we will need to keep adding new hostless types here when
a new hostless component is added. You can walk the graph in both directions and
look for HOST type in another func.

Liam

>  
> +#ifdef CONFIG_HOST_PTABLE
>  	list_init(&elem_list);
>  
>  	/* use DMA to read in compressed page table ringbuffer from host */
> @@ -163,6 +166,8 @@ static int ipc_stream_pcm_params(uint32_t stream)
>  	}
>  #endif
>  
> +pipe_params:
> +
>  	/* configure pipeline audio params */
>  	err = pipeline_params(pcm_dev->cd->pipeline, pcm_dev->cd,
> pcm_params);
>  	if (err < 0) {


More information about the Sound-open-firmware mailing list