here change to get dai format setting from host via ipc, then we can align it with codec setting easily.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com --- src/include/uapi/intel-ipc.h | 1 + src/ipc/intel-ipc.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/include/uapi/intel-ipc.h b/src/include/uapi/intel-ipc.h index a4b6d28..05992e5 100644 --- a/src/include/uapi/intel-ipc.h +++ b/src/include/uapi/intel-ipc.h @@ -514,6 +514,7 @@ struct ipc_intel_ipc_device_config_req { uint32_t ssp_interface; uint32_t clock_frequency; uint32_t mode; + uint32_t dai_fmt; uint16_t clock_divider; uint8_t channels; uint8_t reserved; diff --git a/src/ipc/intel-ipc.c b/src/ipc/intel-ipc.c index 8d33830..827c9f3 100644 --- a/src/ipc/intel-ipc.c +++ b/src/ipc/intel-ipc.c @@ -561,8 +561,7 @@ static uint32_t ipc_device_set_formats(uint32_t header)
/* setup the DAI HW config - TODO hard coded due to IPC limitations */ dai_dev->dai_config.mclk = config_req.clock_frequency; - dai_dev->dai_config.format = DAI_FMT_I2S | DAI_FMT_CONT | - DAI_FMT_NB_NF | DAI_FMT_CBS_CFS; + dai_dev->dai_config.format = config_req.dai_fmt; dai_dev->dai_config.frame_size = 32; /* TODO 16bit stereo hard coded */ dai_dev->dai_config.bclk_fs = 32; /* 32 BCLKs per frame - */ dai_dev->dai_config.mclk_fs = 256;