Commit 711bc947 authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown

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: default avatarPraveen Diwakar <praveen.diwakar@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5749d70e
...@@ -869,4 +869,6 @@ struct sst_enum { ...@@ -869,4 +869,6 @@ struct sst_enum {
SOC_DAPM_ENUM(SST_MUX_CTL_NAME(xpname, xinstance), \ SOC_DAPM_ENUM(SST_MUX_CTL_NAME(xpname, xinstance), \
SST_SSP_MUX_ENUM(xreg, xshift, xtexts)) SST_SSP_MUX_ENUM(xreg, xshift, xtexts))
void sst_fill_ssp_defaults(struct snd_soc_dai *dai);
#endif #endif
...@@ -434,13 +434,22 @@ static int sst_enable_ssp(struct snd_pcm_substream *substream, ...@@ -434,13 +434,22 @@ static int sst_enable_ssp(struct snd_pcm_substream *substream,
if (!dai->active) { if (!dai->active) {
ret = sst_handle_vb_timer(dai, true); ret = sst_handle_vb_timer(dai, true);
if (ret) sst_fill_ssp_defaults(dai);
return ret;
ret = send_ssp_cmd(dai, dai->name, 1);
} }
return ret; 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, static void sst_disable_ssp(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) struct snd_soc_dai *dai)
{ {
...@@ -465,6 +474,7 @@ static struct snd_soc_dai_ops sst_compr_dai_ops = { ...@@ -465,6 +474,7 @@ static struct snd_soc_dai_ops sst_compr_dai_ops = {
static struct snd_soc_dai_ops sst_be_dai_ops = { static struct snd_soc_dai_ops sst_be_dai_ops = {
.startup = sst_enable_ssp, .startup = sst_enable_ssp,
.hw_params = sst_be_hw_params,
.shutdown = sst_disable_ssp, .shutdown = sst_disable_ssp,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment