aboutsummaryrefslogtreecommitdiffstats
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 22:06:43 +0530
committerMark Brown <broonie@kernel.org>2015-05-06 19:50:22 +0100
commit0b44e345495ad97d533461e53a9218de8039d20b (patch)
tree72a521e3c7be4e56572b79e57f7af018c5f4071e /sound/soc/intel/atom/sst-mfld-platform-pcm.c
parentASoC: Intel: load hw_defaults in hw_params of ssp be (diff)
downloadlinux-dev-0b44e345495ad97d533461e53a9218de8039d20b.tar.xz
linux-dev-0b44e345495ad97d533461e53a9218de8039d20b.zip
ASoC: intel: add support for specifying PCM format
With this machines can configure the PCM format applied on SSP port using the set_fmt 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.c15
1 files changed, 15 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 1fb2448e0fed..580f5e92580e 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -450,6 +450,20 @@ static int sst_be_hw_params(struct snd_pcm_substream *substream,
return ret;
}
+static int sst_set_format(struct snd_soc_dai *dai, unsigned int fmt)
+{
+ int ret = 0;
+
+ if (!dai->active)
+ return 0;
+
+ ret = sst_fill_ssp_config(dai, fmt);
+ if (ret < 0)
+ dev_err(dai->dev, "sst_set_format failed..\n");
+
+ return ret;
+}
+
static void sst_disable_ssp(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
@@ -475,6 +489,7 @@ static struct snd_soc_dai_ops sst_compr_dai_ops = {
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,
.shutdown = sst_disable_ssp,
};