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 22:06:42 +0530
committerMark Brown <broonie@kernel.org>2015-05-06 19:50:22 +0100
commit711bc9476bfaeba279259978aadcaa826a77e170 (patch)
tree2b81c14c86c01789c8ab4c42f367bd21774d21e6 /sound/soc/intel/atom/sst-mfld-platform-pcm.c
parent5749d70edc2796606dfea3b6b6b5524607634453 (diff)
downloadtalos-obmc-linux-711bc9476bfaeba279259978aadcaa826a77e170.tar.gz
talos-obmc-linux-711bc9476bfaeba279259978aadcaa826a77e170.zip
ASoC: Intel: load hw_defaults in hw_params of ssp be
We have the SSP defaults now and we need to load then in hw_params callback of BE SSP DAI ops. 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, 13 insertions, 3 deletions
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index 2fbaf2c75d17..1fb2448e0fed 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -434,13 +434,22 @@ static int sst_enable_ssp(struct snd_pcm_substream *substream,
if (!dai->active) {
ret = sst_handle_vb_timer(dai, true);
- if (ret)
- return ret;
- ret = send_ssp_cmd(dai, dai->name, 1);
+ sst_fill_ssp_defaults(dai);
}
return ret;
}
+static int sst_be_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ int ret = 0;
+
+ if (dai->active == 1)
+ ret = send_ssp_cmd(dai, dai->name, 1);
+ return ret;
+}
+
static void sst_disable_ssp(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
@@ -465,6 +474,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,
.shutdown = sst_disable_ssp,
};
OpenPOWER on IntegriCloud