mirror of https://github.com/thesofproject/sof.git
dai: configure its frame_fmt from topology
For dai component, it's frame_fmt may be different with host, we usually configure it from topology, here fix it. Contributor: Keyon Jie <yang.jie@linux.intel.com> Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This commit is contained in:
parent
359af81a8a
commit
5e60d064db
|
@ -384,6 +384,7 @@ static int dai_params(struct comp_dev *dev)
|
|||
{
|
||||
struct dai_data *dd = comp_get_drvdata(dev);
|
||||
struct comp_buffer *dma_buffer;
|
||||
struct sof_ipc_comp_config *dconfig = COMP_GET_CONFIG(dev);
|
||||
|
||||
trace_dai("par");
|
||||
|
||||
|
@ -393,6 +394,9 @@ static int dai_params(struct comp_dev *dev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* for DAI, we should configure its frame_fmt from topology */
|
||||
dev->params.frame_fmt = dconfig->frame_fmt;
|
||||
|
||||
/* calculate period size based on config */
|
||||
dev->frame_bytes = comp_frame_bytes(dev);
|
||||
if (dev->frame_bytes == 0) {
|
||||
|
|
Loading…
Reference in New Issue