Skip to content

Commit

Permalink
IPC: Handle ASRC as ASoC component type and not as process type
Browse files Browse the repository at this point in the history
ASRC new() receives incorrect topology tokens values before this
fix. It occurred as pipeline DAI find fail for capture direction
ASRC.

Fixes thesofproject#4193

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
  • Loading branch information
singalsu authored and lgirdwood committed May 19, 2021
1 parent ab08781 commit 79c6475
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ipc/helper-ipc3.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ static void comp_specific_builder(struct sof_ipc_comp *comp,
struct sof_ipc_comp_volume *vol = (struct sof_ipc_comp_volume *)comp;
struct sof_ipc_comp_process *proc = (struct sof_ipc_comp_process *)comp;
struct sof_ipc_comp_src *src = (struct sof_ipc_comp_src *)comp;
struct sof_ipc_comp_asrc *asrc = (struct sof_ipc_comp_asrc *)comp;
struct sof_ipc_comp_tone *tone = (struct sof_ipc_comp_tone *)comp;

memset(config, 0, sizeof(*config));
Expand Down Expand Up @@ -356,14 +357,19 @@ static void comp_specific_builder(struct sof_ipc_comp *comp,
config->tone.repeats = tone->repeats;
config->tone.sample_rate = tone->sample_rate;
break;
case SOF_COMP_ASRC:
config->asrc.source_rate = src->source_rate;
config->asrc.sink_rate = src->sink_rate;
config->asrc.asynchronous_mode = asrc->asynchronous_mode;
config->asrc.operation_mode = asrc->operation_mode;
break;
case SOF_COMP_EQ_IIR:
case SOF_COMP_EQ_FIR:
case SOF_COMP_KEYWORD_DETECT:
case SOF_COMP_KPB:
case SOF_COMP_SELECTOR:
case SOF_COMP_DEMUX:
case SOF_COMP_MUX:
case SOF_COMP_ASRC:
case SOF_COMP_DCBLOCK:
case SOF_COMP_SMART_AMP:
case SOF_COMP_CODEC_ADAPTOR:
Expand Down

0 comments on commit 79c6475

Please sign in to comment.