[Sound-open-firmware] [PATCH] core: comp: Add component trigger API call.
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Wed Mar 28 21:12:19 CEST 2018
On 3/28/18 9:54 AM, Liam Girdwood wrote:
> Add a new component API for performing atomic stream state change
> operations. This leave the cmd API for non atomic usage.
>
> This patch also does some renaming to use _trigger() instead of _cmd().
>
> Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
> ---
>
> If no objections, I'll push to a topic branch for full testing prior to
> merge with 1.1-stable.
The only unexpected change is this one:
> diff --git a/src/audio/dai.c b/src/audio/dai.c
> index 53536ed3..e20283dd 100644
> --- a/src/audio/dai.c
> +++ b/src/audio/dai.c
> @@ -72,8 +72,6 @@ struct dai_data {
> uint64_t wallclock; /* wall clock at stream start */
> };
>
> -static int dai_cmd(struct comp_dev *dev, int cmd, void *data);
> -
> /* this is called by DMA driver every time descriptor has completed */
> static void dai_dma_cb(void *data, uint32_t type, struct dma_sg_elem *next)
> {
> @@ -88,13 +86,15 @@ static void dai_dma_cb(void *data, uint32_t type, struct dma_sg_elem *next)
> if (dev->state != COMP_STATE_ACTIVE && dd->xrun == 0) {
>
> /* stop the DAI */
> - dai_trigger(dd->dai, COMP_CMD_STOP, dev->params.direction);
> + dai_trigger(dd->dai, COMP_TRIGGER_STOP, dev->params.direction);
>
> /* tell DMA not to reload */
> next->size = DMA_RELOAD_END;
>
> /* inform waiters */
> wait_completed(&dd->complete);
> +
> + return;
looks like a change that isn't related to this patch and should be added
regardless?
> }
>
> /* is our pipeline handling an XRUN ? */
> @@ -435,7 +435,7 @@ static int dai_prepare(struct comp_dev *dev)
>
> trace_dai("pre");
>
> - ret = comp_set_state(dev, COMP_CMD_PREPARE);
> + ret = comp_set_state(dev, COMP_TRIGGER_PREPARE);
> if (ret < 0)
> return ret;
>
>
More information about the Sound-open-firmware
mailing list