Commit f07e51c5 authored by Liam Girdwood's avatar Liam Girdwood Committed by Mark Brown

ASoC: Intel: Add TDM support to HSW/BDW SSP port

Add TDM support to SSP port via DSP IPC SetDeviceFormat message.
Signed-off-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5914ccf4
...@@ -1630,6 +1630,10 @@ int sst_hsw_device_set_config(struct sst_hsw *hsw, ...@@ -1630,6 +1630,10 @@ int sst_hsw_device_set_config(struct sst_hsw *hsw,
config.clock_frequency = mclk; config.clock_frequency = mclk;
config.mode = mode; config.mode = mode;
config.clock_divider = clock_divider; config.clock_divider = clock_divider;
if (mode == SST_HSW_DEVICE_TDM_CLOCK_MASTER)
config.channels = 4;
else
config.channels = 2;
trace_hsw_device_config_req(&config); trace_hsw_device_config_req(&config);
......
...@@ -84,6 +84,7 @@ enum sst_hsw_device_mclk { ...@@ -84,6 +84,7 @@ enum sst_hsw_device_mclk {
enum sst_hsw_device_mode { enum sst_hsw_device_mode {
SST_HSW_DEVICE_CLOCK_SLAVE = 0, SST_HSW_DEVICE_CLOCK_SLAVE = 0,
SST_HSW_DEVICE_CLOCK_MASTER = 1, SST_HSW_DEVICE_CLOCK_MASTER = 1,
SST_HSW_DEVICE_TDM_CLOCK_MASTER = 2,
}; };
/* DX Power State */ /* DX Power State */
...@@ -295,7 +296,8 @@ struct sst_hsw_ipc_device_config_req { ...@@ -295,7 +296,8 @@ struct sst_hsw_ipc_device_config_req {
u32 clock_frequency; u32 clock_frequency;
u32 mode; u32 mode;
u16 clock_divider; u16 clock_divider;
u16 reserved; u8 channels;
u8 reserved;
} __attribute__((packed)); } __attribute__((packed));
/* Audio Data formats */ /* Audio Data formats */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment