|
20 | 20 | /* size of tplg ABI in bytes */ |
21 | 21 | #define SOF_IPC3_TPLG_ABI_SIZE 3 |
22 | 22 |
|
23 | | -/* Base of SOF_DAI_INTEL_ALH, this should be aligned with SOC_SDW_INTEL_BIDIR_PDI_BASE */ |
24 | | -#define INTEL_ALH_DAI_INDEX_BASE 2 |
25 | | - |
26 | 23 | struct sof_widget_data { |
27 | 24 | int ctrl_type; |
28 | 25 | int ipc_cmd; |
@@ -1597,17 +1594,6 @@ static int sof_ipc3_widget_setup_comp_dai(struct snd_sof_widget *swidget) |
1597 | 1594 | if (ret < 0) |
1598 | 1595 | goto free; |
1599 | 1596 |
|
1600 | | - /* Subtract the base to match the FW dai index. */ |
1601 | | - if (comp_dai->type == SOF_DAI_INTEL_ALH) { |
1602 | | - if (comp_dai->dai_index < INTEL_ALH_DAI_INDEX_BASE) { |
1603 | | - dev_err(sdev->dev, |
1604 | | - "Invalid ALH dai index %d, only Pin numbers >= %d can be used\n", |
1605 | | - comp_dai->dai_index, INTEL_ALH_DAI_INDEX_BASE); |
1606 | | - return -EINVAL; |
1607 | | - } |
1608 | | - comp_dai->dai_index -= INTEL_ALH_DAI_INDEX_BASE; |
1609 | | - } |
1610 | | - |
1611 | 1597 | dev_dbg(scomp->dev, "dai %s: type %d index %d\n", |
1612 | 1598 | swidget->widget->name, comp_dai->type, comp_dai->dai_index); |
1613 | 1599 | sof_dbg_comp_config(scomp, &comp_dai->config); |
@@ -2181,16 +2167,8 @@ static int sof_ipc3_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget * |
2181 | 2167 | case SOF_DAI_INTEL_ALH: |
2182 | 2168 | if (data) { |
2183 | 2169 | /* save the dai_index during hw_params and reuse it for hw_free */ |
2184 | | - if (flags & SOF_DAI_CONFIG_FLAGS_HW_PARAMS) { |
2185 | | - /* Subtract the base to match the FW dai index. */ |
2186 | | - if (data->dai_index < INTEL_ALH_DAI_INDEX_BASE) { |
2187 | | - dev_err(sdev->dev, |
2188 | | - "Invalid ALH dai index %d, only Pin numbers >= %d can be used\n", |
2189 | | - config->dai_index, INTEL_ALH_DAI_INDEX_BASE); |
2190 | | - return -EINVAL; |
2191 | | - } |
2192 | | - config->dai_index = data->dai_index - INTEL_ALH_DAI_INDEX_BASE; |
2193 | | - } |
| 2170 | + if (flags & SOF_DAI_CONFIG_FLAGS_HW_PARAMS) |
| 2171 | + config->dai_index = data->dai_index; |
2194 | 2172 | config->alh.stream_id = data->dai_data; |
2195 | 2173 | } |
2196 | 2174 | break; |
|
0 commit comments