diff options
author | Vinod Koul <vinod.koul@intel.com> | 2015-05-06 12:36:42 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-05-06 14:50:22 -0400 |
commit | 711bc9476bfaeba279259978aadcaa826a77e170 (patch) | |
tree | 2b81c14c86c01789c8ab4c42f367bd21774d21e6 /sound/soc/intel | |
parent | 5749d70edc2796606dfea3b6b6b5524607634453 (diff) |
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')
-rw-r--r-- | sound/soc/intel/atom/sst-atom-controls.h | 2 | ||||
-rw-r--r-- | sound/soc/intel/atom/sst-mfld-platform-pcm.c | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/sound/soc/intel/atom/sst-atom-controls.h b/sound/soc/intel/atom/sst-atom-controls.h index eea715605130..da13f6fa7d1c 100644 --- a/sound/soc/intel/atom/sst-atom-controls.h +++ b/sound/soc/intel/atom/sst-atom-controls.h | |||
@@ -869,4 +869,6 @@ struct sst_enum { | |||
869 | SOC_DAPM_ENUM(SST_MUX_CTL_NAME(xpname, xinstance), \ | 869 | SOC_DAPM_ENUM(SST_MUX_CTL_NAME(xpname, xinstance), \ |
870 | SST_SSP_MUX_ENUM(xreg, xshift, xtexts)) | 870 | SST_SSP_MUX_ENUM(xreg, xshift, xtexts)) |
871 | 871 | ||
872 | void sst_fill_ssp_defaults(struct snd_soc_dai *dai); | ||
873 | |||
872 | #endif | 874 | #endif |
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, | |||
434 | 434 | ||
435 | if (!dai->active) { | 435 | if (!dai->active) { |
436 | ret = sst_handle_vb_timer(dai, true); | 436 | ret = sst_handle_vb_timer(dai, true); |
437 | if (ret) | 437 | sst_fill_ssp_defaults(dai); |
438 | return ret; | ||
439 | ret = send_ssp_cmd(dai, dai->name, 1); | ||
440 | } | 438 | } |
441 | return ret; | 439 | return ret; |
442 | } | 440 | } |
443 | 441 | ||
442 | static int sst_be_hw_params(struct snd_pcm_substream *substream, | ||
443 | struct snd_pcm_hw_params *params, | ||
444 | struct snd_soc_dai *dai) | ||
445 | { | ||
446 | int ret = 0; | ||
447 | |||
448 | if (dai->active == 1) | ||
449 | ret = send_ssp_cmd(dai, dai->name, 1); | ||
450 | return ret; | ||
451 | } | ||
452 | |||
444 | static void sst_disable_ssp(struct snd_pcm_substream *substream, | 453 | static void sst_disable_ssp(struct snd_pcm_substream *substream, |
445 | struct snd_soc_dai *dai) | 454 | struct snd_soc_dai *dai) |
446 | { | 455 | { |
@@ -465,6 +474,7 @@ static struct snd_soc_dai_ops sst_compr_dai_ops = { | |||
465 | 474 | ||
466 | static struct snd_soc_dai_ops sst_be_dai_ops = { | 475 | static struct snd_soc_dai_ops sst_be_dai_ops = { |
467 | .startup = sst_enable_ssp, | 476 | .startup = sst_enable_ssp, |
477 | .hw_params = sst_be_hw_params, | ||
468 | .shutdown = sst_disable_ssp, | 478 | .shutdown = sst_disable_ssp, |
469 | }; | 479 | }; |
470 | 480 | ||