ASoC: Intel: Add TDM support to HSW/BDW SSP port
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>
Thu, 16 Oct 2014 14:29:15 +0000 (15:29 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 20 Oct 2014 11:20:33 +0000 (12:20 +0100)
Add TDM support to SSP port via DSP IPC SetDeviceFormat message.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/sst-haswell-ipc.c
sound/soc/intel/sst-haswell-ipc.h

index b6291516dbbf5b9b52204dd3cca17f38a0e1a53e..92d625ab6415aef1c6f59adbe16f061b127d3d55 100644 (file)
@@ -1630,6 +1630,10 @@ int sst_hsw_device_set_config(struct sst_hsw *hsw,
        config.clock_frequency = mclk;
        config.mode = mode;
        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);
 
index 2ac194a6d04b226eb86cb42c2361c643f7400635..063dd6b669bf5394e4310d750b531e0efdf59d29 100644 (file)
@@ -84,6 +84,7 @@ enum sst_hsw_device_mclk {
 enum sst_hsw_device_mode {
        SST_HSW_DEVICE_CLOCK_SLAVE   = 0,
        SST_HSW_DEVICE_CLOCK_MASTER  = 1,
+       SST_HSW_DEVICE_TDM_CLOCK_MASTER = 2,
 };
 
 /* DX Power State */
@@ -295,7 +296,8 @@ struct sst_hsw_ipc_device_config_req {
        u32 clock_frequency;
        u32 mode;
        u16 clock_divider;
-       u16 reserved;
+       u8 channels;
+       u8 reserved;
 } __attribute__((packed));
 
 /* Audio Data formats */