Skip to content

Commit b0d16e5

Browse files
crojewsk-intelbroonie
authored andcommitted
ASoC: Intel: Skylake: Remove skl_tplg_is_multi_fmt()
Rather than forcing userspace to select proper format with enumerable kcontrols, select it ourselves based on provided hw_params. Signed-off-by: Cezary Rojewski <[email protected]> Tested-by: Lukasz Majczak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 72d9a54 commit b0d16e5

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

sound/soc/intel/skylake/skl-topology.c

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -582,38 +582,6 @@ static int skl_tplg_unload_pipe_modules(struct skl_dev *skl,
582582
return ret;
583583
}
584584

585-
static bool skl_tplg_is_multi_fmt(struct skl_dev *skl, struct skl_pipe *pipe)
586-
{
587-
struct skl_pipe_fmt *cur_fmt;
588-
struct skl_pipe_fmt *next_fmt;
589-
int i;
590-
591-
if (pipe->nr_cfgs <= 1)
592-
return false;
593-
594-
if (pipe->conn_type != SKL_PIPE_CONN_TYPE_FE)
595-
return true;
596-
597-
for (i = 0; i < pipe->nr_cfgs - 1; i++) {
598-
if (pipe->direction == SNDRV_PCM_STREAM_PLAYBACK) {
599-
cur_fmt = &pipe->configs[i].out_fmt;
600-
next_fmt = &pipe->configs[i + 1].out_fmt;
601-
} else {
602-
cur_fmt = &pipe->configs[i].in_fmt;
603-
next_fmt = &pipe->configs[i + 1].in_fmt;
604-
}
605-
606-
if (!CHECK_HW_PARAMS(cur_fmt->channels, cur_fmt->freq,
607-
cur_fmt->bps,
608-
next_fmt->channels,
609-
next_fmt->freq,
610-
next_fmt->bps))
611-
return true;
612-
}
613-
614-
return false;
615-
}
616-
617585
/*
618586
* Here, we select pipe format based on the pipe type and pipe
619587
* direction to determine the current config index for the pipeline.
@@ -636,14 +604,6 @@ skl_tplg_get_pipe_config(struct skl_dev *skl, struct skl_module_cfg *mconfig)
636604
return 0;
637605
}
638606

639-
if (skl_tplg_is_multi_fmt(skl, pipe)) {
640-
pipe->cur_config_idx = pipe->pipe_config_idx;
641-
pipe->memory_pages = pconfig->mem_pages;
642-
dev_dbg(skl->dev, "found pipe config idx:%d\n",
643-
pipe->cur_config_idx);
644-
return 0;
645-
}
646-
647607
if (pipe->conn_type == SKL_PIPE_CONN_TYPE_NONE || pipe->nr_cfgs == 1) {
648608
dev_dbg(skl->dev, "No conn_type or just 1 pathcfg, taking 0th for %d\n",
649609
pipe->ppl_id);

0 commit comments

Comments
 (0)