All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: Vinod Koul <vinod.koul@intel.com>,
	broonie@kernel.org, subhransu.s.prusty@intel.com,
	lgirdwood@gmail.com
Subject: [PATCH 3/4] ASoC: mfld-compress: implement .power callback
Date: Thu, 30 Oct 2014 16:20:58 +0530	[thread overview]
Message-ID: <1414666259-4450-4-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1414666259-4450-1-git-send-email-vinod.koul@intel.com>

From: Subhransu S. Prusty <subhransu.s.prusty@intel.com>

.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>
---
 sound/soc/intel/sst-mfld-platform-compress.c |    8 +++++++-
 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 5946777..3951689 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)
 		goto out_ops;
 	}
 	stream->compr_ops = sst->compr_ops;
-
 	stream->id = 0;
+
+	/* Turn on LPE */
+	sst->compr_ops->power(sst->dev, true);
+
 	sst_set_stream_status(stream, SST_PLATFORM_INIT);
 	runtime->private_data = stream;
 	return 0;
@@ -83,6 +86,9 @@ static int sst_platform_compr_free(struct snd_compr_stream *cstream)
 	int ret_val = 0, str_id;
 
 	stream = cstream->runtime->private_data;
+	/* Turn off LPE */
+	sst->compr_ops->power(sst->dev, false);
+
 	/*need to check*/
 	str_id = stream->id;
 	if (str_id)
diff --git a/sound/soc/intel/sst-mfld-platform.h b/sound/soc/intel/sst-mfld-platform.h
index d41d1c3..79c8d12 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 {
 	int (*get_codec_caps)(struct snd_compr_codec_caps *codec);
 	int (*set_metadata)(struct device *dev,	unsigned int str_id,
 			struct snd_compr_metadata *mdata);
+	int (*power)(struct device *dev, bool state);
 };
 
 struct sst_ops {
-- 
1.7.0.4

  parent reply	other threads:[~2014-10-30 11:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 10:50 [PATCH 0/4] ASoC: Intel: add compressed support Vinod Koul
2014-10-30 10:50 ` [PATCH 1/4] ASoC: Intel: sst: load firmware using async callback Vinod Koul
2014-10-31 12:51   ` Mark Brown
2014-10-30 10:50 ` [PATCH 2/4] ASoC: Intel: use correct firmware name Vinod Koul
2014-10-31 12:51   ` Mark Brown
2014-11-03  4:38     ` Vinod Koul
2014-10-30 10:50 ` Vinod Koul [this message]
2014-10-31 12:52   ` [PATCH 3/4] ASoC: mfld-compress: implement .power callback Mark Brown
2014-10-30 10:50 ` [PATCH 4/4] ASoC: Intel: sst - add compressed ops handling Vinod Koul
2014-10-31 12:52   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1414666259-4450-4-git-send-email-vinod.koul@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=subhransu.s.prusty@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.