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
2 changes: 1 addition & 1 deletion src/audio/dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static struct comp_dev *dai_new(struct sof_ipc_comp *comp)

comp_set_drvdata(dev, dd);

dd->dai = dai_get(dai->type, dai->index);
dd->dai = dai_get(dai->type, dai->dai_index);
if (dd->dai == NULL) {
trace_dai_error("eDg");
goto error;
Expand Down
2 changes: 1 addition & 1 deletion src/audio/pipeline_static.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
{.comp = scomp, .no_irq = hno_irq, \
.dmac_config = hconfig}
#define SPIPE_DAI(scomp, ddai_type, ddai_idx, ddmac, dchan, dconfig) \
{.comp = scomp, .type = ddai_type, .index = ddai_idx, \
{.comp = scomp, .type = ddai_type, .dai_index = ddai_idx, \
.dmac_config = dconfig}
#define SPIPE_VOL(scomp, vmin, vmax) \
{.comp = scomp, .min_value = vmin, .max_value = vmax}
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/apl-ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,8 @@ static inline int ssp_set_config(struct dai *dai,
/* TODO: move this into M/N driver */
mn_reg_write(0x0, mdivc);
mn_reg_write(0x80 + config->ssp.mclk_id * 0x4, mdivr);
mn_reg_write(0x100 + config->id * 0x8 + 0x0, i2s_m);
mn_reg_write(0x100 + config->id * 0x8 + 0x4, i2s_n);
mn_reg_write(0x100 + config->dai_index * 0x8 + 0x0, i2s_m);
mn_reg_write(0x100 + config->dai_index * 0x8 + 0x4, i2s_n);

ssp->state[DAI_DIR_PLAYBACK] = COMP_STATE_PREPARE;
ssp->state[DAI_DIR_CAPTURE] = COMP_STATE_PREPARE;
Expand Down
4 changes: 2 additions & 2 deletions src/include/uapi/ipc.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ struct sof_ipc_dai_dmic_params {
struct sof_ipc_dai_config {
struct sof_ipc_hdr hdr;
enum sof_ipc_dai_type type;
uint32_t id; /* physical number if more than 1 of this type */
uint32_t dai_index; /* index of this type dai */

/* physical protocol and clocking */
uint16_t format; /* SOF_DAI_FMT_ */
Expand Down Expand Up @@ -665,7 +665,7 @@ struct sof_ipc_comp_dai {
struct sof_ipc_comp comp;
struct sof_ipc_comp_config config;
enum sof_ipc_stream_direction direction;
uint32_t index;
uint32_t dai_index; /* index of this type dai */
enum sof_ipc_dai_type type;
uint32_t dmac_config; /* DMA engine specific */
} __attribute__((packed));
Expand Down
4 changes: 2 additions & 2 deletions src/ipc/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,11 @@ static int ipc_dai_config(uint32_t header)
trace_ipc("DsF");

/* get DAI */
dai = dai_get(config->type, config->id);
dai = dai_get(config->type, config->dai_index);
if (dai == NULL) {
trace_ipc_error("eDi");
trace_error_value(config->type);
trace_error_value(config->id);
trace_error_value(config->dai_index);
return -ENODEV;
}

Expand Down