Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions include/sound/sof/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,21 +218,25 @@ struct sof_ipc_comp_reply {
* Pipeline
*/

@dbaluta dbaluta Mar 27, 2019 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tlauda,

Sorry for being late. One minor comment here. Please use a more specific subject line. "Update" is just too generic.

For example, you can say ASoC: SOF: Align sof_ipc_pipe_new with FW code

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbaluta Thanks for the suggestion. I'll try to do better next time.

/** \brief Types of pipeline scheduling time domains */
enum sof_ipc_pipe_sched_time_domain {
SOF_TIME_DOMAIN_DMA = 0, /**< DMA interrupt */
SOF_TIME_DOMAIN_TIMER, /**< Timer interrupt */
};

/* new pipeline - SOF_IPC_TPLG_PIPE_NEW */
struct sof_ipc_pipe_new {
struct sof_ipc_cmd_hdr hdr;
uint32_t comp_id; /**< component id for pipeline */
uint32_t pipeline_id; /**< pipeline id */
uint32_t sched_id; /**< Scheduling component id */
uint32_t core; /**< core we run on */
uint32_t deadline; /**< execution completion deadline in us*/
uint32_t period; /**< execution period in us*/
uint32_t priority; /**< priority level 0 (low) to 10 (max) */
uint32_t period_mips; /**< worst case instruction count per period */
uint32_t frames_per_sched;/**< output frames of pipeline, 0 is variable */
uint32_t xrun_limit_usecs; /**< report xruns greater than limit */

/* non zero if timer scheduled, otherwise DAI DMA irq scheduled */
uint32_t timer_delay;
uint32_t time_domain; /**< scheduling time domain */
} __packed;

/* pipeline construction complete - SOF_IPC_TPLG_PIPE_COMPLETE */
Expand Down
4 changes: 2 additions & 2 deletions include/uapi/sound/sof/tokens.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
#define SOF_TKN_DAI_DIRECTION 156

/* scheduling */
#define SOF_TKN_SCHED_DEADLINE 200
#define SOF_TKN_SCHED_PERIOD 200
#define SOF_TKN_SCHED_PRIORITY 201
#define SOF_TKN_SCHED_MIPS 202
#define SOF_TKN_SCHED_CORE 203
#define SOF_TKN_SCHED_FRAMES 204
#define SOF_TKN_SCHED_TIMER 205
#define SOF_TKN_SCHED_TIME_DOMAIN 205

/* volume */
#define SOF_TKN_VOLUME_RAMP_STEP_TYPE 250
Expand Down
12 changes: 6 additions & 6 deletions sound/soc/sof/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ static const struct sof_topology_token dai_link_tokens[] = {

/* scheduling */
static const struct sof_topology_token sched_tokens[] = {
{SOF_TKN_SCHED_DEADLINE, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
offsetof(struct sof_ipc_pipe_new, deadline), 0},
{SOF_TKN_SCHED_PERIOD, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
offsetof(struct sof_ipc_pipe_new, period), 0},
{SOF_TKN_SCHED_PRIORITY, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
offsetof(struct sof_ipc_pipe_new, priority), 0},
{SOF_TKN_SCHED_MIPS, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
Expand All @@ -510,8 +510,8 @@ static const struct sof_topology_token sched_tokens[] = {
offsetof(struct sof_ipc_pipe_new, core), 0},
{SOF_TKN_SCHED_FRAMES, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
offsetof(struct sof_ipc_pipe_new, frames_per_sched), 0},
{SOF_TKN_SCHED_TIMER, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
offsetof(struct sof_ipc_pipe_new, timer_delay), 0},
{SOF_TKN_SCHED_TIME_DOMAIN, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
offsetof(struct sof_ipc_pipe_new, time_domain), 0},
};

/* volume */
Expand Down Expand Up @@ -1266,8 +1266,8 @@ static int sof_widget_load_pipeline(struct snd_soc_component *scomp,
goto err;
}

dev_dbg(sdev->dev, "pipeline %s: deadline %d pri %d mips %d core %d frames %d\n",
swidget->widget->name, pipeline->deadline, pipeline->priority,
dev_dbg(sdev->dev, "pipeline %s: period %d pri %d mips %d core %d frames %d\n",
swidget->widget->name, pipeline->period, pipeline->priority,
pipeline->period_mips, pipeline->core, pipeline->frames_per_sched);

swidget->private = (void *)pipeline;
Expand Down