summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/atom/sst-mfld-platform-pcm.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2015-05-06 18:36:44 +0200
committerMark Brown <broonie@kernel.org>2015-05-06 20:50:22 +0200
commit83f125e2a1a3c7aba9c40016b9d4bec4d43f165d (patch)
treed745ab3f6823f37981152d25ab571ee096e4e2e7 /sound/soc/intel/atom/sst-mfld-platform-pcm.c
parentASoC: intel: add support for specifying PCM format (diff)
downloadlinux-83f125e2a1a3c7aba9c40016b9d4bec4d43f165d.tar.xz
linux-83f125e2a1a3c7aba9c40016b9d4bec4d43f165d.zip
ASoC: Intel: add support for configuring TDM slots for SSP
With this machines can now configure TDM settings for SSP port using set_tdm_slot API Signed-off-by: Praveen Diwakar <praveen.diwakar@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/atom/sst-mfld-platform-pcm.c')
-rw-r--r--sound/soc/intel/atom/sst-mfld-platform-pcm.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index 580f5e92580e..641ebe61dc08 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -464,6 +464,21 @@ static int sst_set_format(struct snd_soc_dai *dai, unsigned int fmt)
return ret;
}
+static int sst_platform_set_ssp_slot(struct snd_soc_dai *dai,
+ unsigned int tx_mask, unsigned int rx_mask,
+ int slots, int slot_width) {
+ int ret = 0;
+
+ if (!dai->active)
+ return ret;
+
+ ret = sst_fill_ssp_slot(dai, tx_mask, rx_mask, slots, slot_width);
+ if (ret < 0)
+ dev_err(dai->dev, "sst_fill_ssp_slot failed..%d\n", ret);
+
+ return ret;
+}
+
static void sst_disable_ssp(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
@@ -490,6 +505,7 @@ static struct snd_soc_dai_ops sst_be_dai_ops = {
.startup = sst_enable_ssp,
.hw_params = sst_be_hw_params,
.set_fmt = sst_set_format,
+ .set_tdm_slot = sst_platform_set_ssp_slot,
.shutdown = sst_disable_ssp,
};