We don't need pass the ssp clock param(source), this patch removes it, replaces it with read back from the ssp clock directly.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com --- src/ipc/intel-ipc.c | 5 ++--- src/platform/baytrail/include/platform/platform.h | 3 +-- src/platform/baytrail/platform.c | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/ipc/intel-ipc.c b/src/ipc/intel-ipc.c index 7aa24f3..16a906b 100644 --- a/src/ipc/intel-ipc.c +++ b/src/ipc/intel-ipc.c @@ -570,9 +570,8 @@ static uint32_t ipc_device_set_formats(uint32_t header) dai_dev->dai_config.clk_src = SSP_CLK_EXT;
/* set SSP M/N dividers */ - err = platform_ssp_set_mn(config_req.ssp_interface, - 25000000, 48000, - dai_dev->dai_config.bclk_fs); + err = platform_ssp_set_mn(config_req.ssp_interface, 48000, + dai_dev->dai_config.bclk_fs); if (err < 0) { trace_ipc_error("eDs"); goto error; diff --git a/src/platform/baytrail/include/platform/platform.h b/src/platform/baytrail/include/platform/platform.h index 38fcc26..9b1039b 100644 --- a/src/platform/baytrail/include/platform/platform.h +++ b/src/platform/baytrail/include/platform/platform.h @@ -88,8 +88,7 @@ int platform_boot_complete(uint32_t boot_message);
int platform_init(void);
-int platform_ssp_set_mn(uint32_t ssp_port, uint32_t source, uint32_t rate, - uint32_t bclk_fs); +int platform_ssp_set_mn(uint32_t ssp_port, uint32_t rate, uint32_t bclk_fs);
void platform_ssp_disable_mn(uint32_t ssp_port);
diff --git a/src/platform/baytrail/platform.c b/src/platform/baytrail/platform.c index ea3828f..2276981 100644 --- a/src/platform/baytrail/platform.c +++ b/src/platform/baytrail/platform.c @@ -111,10 +111,10 @@ static const struct ssp_mn ssp_mn_conf[] = { };
/* set the SSP M/N clock dividers */ -int platform_ssp_set_mn(uint32_t ssp_port, uint32_t source, uint32_t rate, - uint32_t bclk_fs) +int platform_ssp_set_mn(uint32_t ssp_port, uint32_t rate, uint32_t bclk_fs) { int i; + uint32_t source = clock_get_freq(CLK_SSP);
/* check for matching config in the table */ for (i = 0; i < ARRAY_SIZE(ssp_mn_conf); i++) {