mirror of https://github.com/thesofproject/sof.git
platform: imx: dai: Get the direction from the component instead of the IPC
The direction was already configured correctly in the component during dai_new, and the IPC data is shared for both instances of the DAI component (playback and capture). Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
This commit is contained in:
parent
655d077f72
commit
fa6206d47c
|
@ -675,6 +675,7 @@ static int dai_config(struct comp_dev *dev, struct sof_ipc_dai_config *config)
|
|||
{
|
||||
struct sof_ipc_comp_config *dconfig = COMP_GET_CONFIG(dev);
|
||||
struct dai_data *dd = comp_get_drvdata(dev);
|
||||
struct sof_ipc_comp_dai *dai = (struct sof_ipc_comp_dai *)&dev->comp;
|
||||
int channel = 0;
|
||||
int i;
|
||||
int handshake;
|
||||
|
@ -795,7 +796,7 @@ static int dai_config(struct comp_dev *dev, struct sof_ipc_dai_config *config)
|
|||
channel);
|
||||
break;
|
||||
case SOF_DAI_IMX_SAI:
|
||||
handshake = dai_get_handshake(dd->dai, dev->params.direction,
|
||||
handshake = dai_get_handshake(dd->dai, dai->direction,
|
||||
dd->stream_id);
|
||||
channel = EDMA_HS_GET_CHAN(handshake);
|
||||
|
||||
|
@ -812,10 +813,10 @@ static int dai_config(struct comp_dev *dev, struct sof_ipc_dai_config *config)
|
|||
}
|
||||
|
||||
dd->config.burst_elems =
|
||||
dd->dai->plat_data.fifo[dev->params.direction].depth;
|
||||
dd->dai->plat_data.fifo[dai->direction].depth;
|
||||
break;
|
||||
case SOF_DAI_IMX_ESAI:
|
||||
handshake = dai_get_handshake(dd->dai, dev->params.direction,
|
||||
handshake = dai_get_handshake(dd->dai, dai->direction,
|
||||
dd->stream_id);
|
||||
channel = EDMA_HS_GET_CHAN(handshake);
|
||||
|
||||
|
@ -840,7 +841,7 @@ static int dai_config(struct comp_dev *dev, struct sof_ipc_dai_config *config)
|
|||
}
|
||||
|
||||
dd->config.burst_elems =
|
||||
dd->dai->plat_data.fifo[dev->params.direction].depth;
|
||||
dd->dai->plat_data.fifo[dai->direction].depth;
|
||||
break;
|
||||
default:
|
||||
/* other types of DAIs not handled for now */
|
||||
|
|
Loading…
Reference in New Issue