diff options
author | Subhransu S. Prusty <subhransu.s.prusty@intel.com> | 2014-10-30 06:50:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-31 08:51:59 -0400 |
commit | fdcc4a039f0263f4674e363ebed14783b2f0543d (patch) | |
tree | 8d7fce7b0c128306a7a3508c56ec9a2e27169bdc | |
parent | 5794b7ec62d85700d372b07d88eaf71e807f542f (diff) |
ASoC: mfld-compress: implement .power callback
.power callback is required to invoked for compressed audio as well to turn
on/off sst, so invoke them
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/sst-mfld-platform-compress.c | 8 | ||||
-rw-r--r-- | sound/soc/intel/sst-mfld-platform.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/intel/sst-mfld-platform-compress.c b/sound/soc/intel/sst-mfld-platform-compress.c index 59467775c9b8..395168986462 100644 --- a/sound/soc/intel/sst-mfld-platform-compress.c +++ b/sound/soc/intel/sst-mfld-platform-compress.c | |||
@@ -67,8 +67,11 @@ static int sst_platform_compr_open(struct snd_compr_stream *cstream) | |||
67 | goto out_ops; | 67 | goto out_ops; |
68 | } | 68 | } |
69 | stream->compr_ops = sst->compr_ops; | 69 | stream->compr_ops = sst->compr_ops; |
70 | |||
71 | stream->id = 0; | 70 | stream->id = 0; |
71 | |||
72 | /* Turn on LPE */ | ||
73 | sst->compr_ops->power(sst->dev, true); | ||
74 | |||
72 | sst_set_stream_status(stream, SST_PLATFORM_INIT); | 75 | sst_set_stream_status(stream, SST_PLATFORM_INIT); |
73 | runtime->private_data = stream; | 76 | runtime->private_data = stream; |
74 | return 0; | 77 | return 0; |
@@ -83,6 +86,9 @@ static int sst_platform_compr_free(struct snd_compr_stream *cstream) | |||
83 | int ret_val = 0, str_id; | 86 | int ret_val = 0, str_id; |
84 | 87 | ||
85 | stream = cstream->runtime->private_data; | 88 | stream = cstream->runtime->private_data; |
89 | /* Turn off LPE */ | ||
90 | sst->compr_ops->power(sst->dev, false); | ||
91 | |||
86 | /*need to check*/ | 92 | /*need to check*/ |
87 | str_id = stream->id; | 93 | str_id = stream->id; |
88 | if (str_id) | 94 | if (str_id) |
diff --git a/sound/soc/intel/sst-mfld-platform.h b/sound/soc/intel/sst-mfld-platform.h index d41d1c36031a..79c8d1246a8f 100644 --- a/sound/soc/intel/sst-mfld-platform.h +++ b/sound/soc/intel/sst-mfld-platform.h | |||
@@ -117,6 +117,7 @@ struct compress_sst_ops { | |||
117 | int (*get_codec_caps)(struct snd_compr_codec_caps *codec); | 117 | int (*get_codec_caps)(struct snd_compr_codec_caps *codec); |
118 | int (*set_metadata)(struct device *dev, unsigned int str_id, | 118 | int (*set_metadata)(struct device *dev, unsigned int str_id, |
119 | struct snd_compr_metadata *mdata); | 119 | struct snd_compr_metadata *mdata); |
120 | int (*power)(struct device *dev, bool state); | ||
120 | }; | 121 | }; |
121 | 122 | ||
122 | struct sst_ops { | 123 | struct sst_ops { |