ASoC: intel: Fix SSP port configuration after RTD3 resume.
Currently the SSP port settings are being clobbered as part of the DSP RTD3 restore logic. make sure we save the correct params and restore them at resume. The FW sadly does not save SSP settings as part of the PM context. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d770e558e2
commit
f1ec5ec7a9
|
@ -302,6 +302,10 @@ struct sst_hsw {
|
||||||
struct sst_hsw_ipc_dx_reply dx;
|
struct sst_hsw_ipc_dx_reply dx;
|
||||||
void *dx_context;
|
void *dx_context;
|
||||||
dma_addr_t dx_context_paddr;
|
dma_addr_t dx_context_paddr;
|
||||||
|
enum sst_hsw_device_id dx_dev;
|
||||||
|
enum sst_hsw_device_mclk dx_mclk;
|
||||||
|
enum sst_hsw_device_mode dx_mode;
|
||||||
|
u32 dx_clock_divider;
|
||||||
|
|
||||||
/* boot */
|
/* boot */
|
||||||
wait_queue_head_t boot_wait;
|
wait_queue_head_t boot_wait;
|
||||||
|
@ -1400,10 +1404,10 @@ int sst_hsw_device_set_config(struct sst_hsw *hsw,
|
||||||
|
|
||||||
trace_ipc_request("set device config", dev);
|
trace_ipc_request("set device config", dev);
|
||||||
|
|
||||||
config.ssp_interface = dev;
|
hsw->dx_dev = config.ssp_interface = dev;
|
||||||
config.clock_frequency = mclk;
|
hsw->dx_mclk = config.clock_frequency = mclk;
|
||||||
config.mode = mode;
|
hsw->dx_mode = config.mode = mode;
|
||||||
config.clock_divider = clock_divider;
|
hsw->dx_clock_divider = config.clock_divider = clock_divider;
|
||||||
if (mode == SST_HSW_DEVICE_TDM_CLOCK_MASTER)
|
if (mode == SST_HSW_DEVICE_TDM_CLOCK_MASTER)
|
||||||
config.channels = 4;
|
config.channels = 4;
|
||||||
else
|
else
|
||||||
|
@ -1704,10 +1708,10 @@ int sst_hsw_dsp_runtime_resume(struct sst_hsw *hsw)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set ADSP SSP port settings */
|
/* Set ADSP SSP port settings - sadly the FW does not store SSP port
|
||||||
ret = sst_hsw_device_set_config(hsw, SST_HSW_DEVICE_SSP_0,
|
settings as part of the PM context. */
|
||||||
SST_HSW_DEVICE_MCLK_FREQ_24_MHZ,
|
ret = sst_hsw_device_set_config(hsw, hsw->dx_dev, hsw->dx_mclk,
|
||||||
SST_HSW_DEVICE_CLOCK_MASTER, 9);
|
hsw->dx_mode, hsw->dx_clock_divider);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
dev_err(dev, "error: SSP re-initialization failed\n");
|
dev_err(dev, "error: SSP re-initialization failed\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue