[alsa-devel] [v3 05/11] ASoC: Intel: sst: add stream operations
Mark Brown
broonie at kernel.org
Wed Aug 27 22:41:47 CEST 2014
On Thu, Aug 21, 2014 at 06:20:44PM +0530, Subhransu S. Prusty wrote:
> + /*allocate device type context*/
> + sst_init_stream(&sst_drv_ctx->streams[str_id], alloc_param.codec_type,
> + str_id, alloc_param.operation, 0);
> + /* send msg to FW to allocate a stream */
/*spaces around the edge of comments like the second not the first*/
This is an issue in quite a lot of places.
> +
> +/**
> +* sst_start_stream - Send msg for a starting stream
/*
*
> + sst_fill_header_mrfld(&msg->mrfld_header, IPC_CMD,
> + str_info->task_id, 1, pvt_id);
> + msg->mrfld_header.p.header_high.part.res_rqd = 1;
> + len = sizeof(dsp_hdr);
> + msg->mrfld_header.p.header_low_payload = len;
> + sst_fill_header_dsp(&dsp_hdr,
> + IPC_IA_RESUME_STREAM_MRFLD,
> + str_info->pipe_id, 0);
> + memcpy(msg->mailbox_data, &dsp_hdr, sizeof(dsp_hdr));
> + sst_add_to_dispatch_list_and_post(sst_drv_ctx, msg);
> + retval = sst_wait_timeout(sst_drv_ctx, block);
> + sst_free_block(sst_drv_ctx, block);
Can any of this be factored out? Seems like a lot of duplication in
these operations.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140827/36c0436c/attachment.sig>
More information about the Alsa-devel
mailing list