[alsa-devel] [PATCH 1/2] ASoC: compress - add support for metadata apis
From: Jeeja KP jeeja.kp@intel.com
Compress core added metadata apis in 9727b4, so add same in ASoC
Signed-off-by: Jeeja KP jeeja.kp@intel.com Signed-off-by: Vinod Koul vinod.koul@intel.com --- Mark, Takashi: How do you guys wnat to take this one, Ideally this should go to mark's tree but the dependent apis are in takashi's tree, either way is fine with me :) --- sound/soc/soc-compress.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 3ea7956..4730789 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -302,11 +302,38 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream, return 0; }
+static int sst_compr_set_metadata(struct snd_compr_stream *cstream, + struct snd_compr_metadata *metadata) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_platform *platform = rtd->platform; + int ret = 0; + + if (platform->driver->compr_ops && platform->driver->compr_ops->pointer) + ret = platform->driver->compr_ops->set_metadata(cstream, metadata); + + return ret; +} + +static int sst_compr_get_metadata(struct snd_compr_stream *cstream, + struct snd_compr_metadata *metadata) +{ + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct snd_soc_platform *platform = rtd->platform; + int ret = 0; + + if (platform->driver->compr_ops && platform->driver->compr_ops->pointer) + ret = platform->driver->compr_ops->get_metadata(cstream, metadata); + + return ret; +} /* ASoC Compress operations */ static struct snd_compr_ops soc_compr_ops = { .open = soc_compr_open, .free = soc_compr_free, .set_params = soc_compr_set_params, + .set_metadata = sst_compr_set_metadata, + .get_metadata = sst_compr_get_metadata, .get_params = soc_compr_get_params, .trigger = soc_compr_trigger, .pointer = soc_compr_pointer,
while at it, update the copyright timeline too
Signed-off-by: Jeeja KP jeeja.kp@intel.com Signed-off-by: Vinod Koul vinod.koul@intel.com --- sound/soc/mid-x86/sst_platform.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c index a263cbe..968656c 100644 --- a/sound/soc/mid-x86/sst_platform.c +++ b/sound/soc/mid-x86/sst_platform.c @@ -1,7 +1,7 @@ /* * sst_platform.c - Intel MID Platform driver * - * Copyright (C) 2010-2012 Intel Corp + * Copyright (C) 2010-2013 Intel Corp * Author: Vinod Koul vinod.koul@intel.com * Author: Harsha Priya priya.harsha@intel.com * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -652,11 +652,21 @@ static int sst_platform_compr_get_codec_caps(struct snd_compr_stream *cstream, return stream->compr_ops->get_codec_caps(codec); }
+static int sst_platform_compr_set_metadata(struct snd_compr_stream *cstream, + struct snd_compr_metadata *metadata) +{ + struct sst_runtime_stream *stream = + cstream->runtime->private_data; + + return stream->compr_ops->set_metadata(stream->id, metadata); +} + static struct snd_compr_ops sst_platform_compr_ops = {
.open = sst_platform_compr_open, .free = sst_platform_compr_free, .set_params = sst_platform_compr_set_params, + .set_metadata = sst_platform_compr_set_metadata, .trigger = sst_platform_compr_trigger, .pointer = sst_platform_compr_pointer, .ack = sst_platform_compr_ack,
On Mon, Feb 18, 2013 at 03:59:40PM +0530, Vinod Koul wrote:
Mark, Takashi: How do you guys wnat to take this one, Ideally this should go to mark's tree but the dependent apis are in takashi's tree, either way is fine with me :)
Since we're expecting the merge window to open today or something probably the easiest thing is for me to apply it after -rc1?
On Mon, Feb 18, 2013 at 01:19:28PM +0000, Mark Brown wrote:
On Mon, Feb 18, 2013 at 03:59:40PM +0530, Vinod Koul wrote:
Mark, Takashi: How do you guys wnat to take this one, Ideally this should go to mark's tree but the dependent apis are in takashi's tree, either way is fine with me :)
Since we're expecting the merge window to open today or something probably the easiest thing is for me to apply it after -rc1?
okay, but it can go via takashi's tree after he merges asoc updates from you. Since core support is getting into linus's tree in merge window it would make sense for ASoC and driver update to go along as well.
-- ~Vinod
On Mon, Feb 18, 2013 at 07:05:13PM +0530, Vinod Koul wrote:
On Mon, Feb 18, 2013 at 01:19:28PM +0000, Mark Brown wrote:
Since we're expecting the merge window to open today or something probably the easiest thing is for me to apply it after -rc1?
okay, but it can go via takashi's tree after he merges asoc updates from you. Since core support is getting into linus's tree in merge window it would make sense for ASoC and driver update to go along as well.
There's probably not even enough time for it to sit in -next now...
On Mon, Feb 18, 2013 at 02:35:55PM +0000, Mark Brown wrote:
On Mon, Feb 18, 2013 at 07:05:13PM +0530, Vinod Koul wrote:
On Mon, Feb 18, 2013 at 01:19:28PM +0000, Mark Brown wrote:
Since we're expecting the merge window to open today or something probably the easiest thing is for me to apply it after -rc1?
okay, but it can go via takashi's tree after he merges asoc updates from you. Since core support is getting into linus's tree in merge window it would make sense for ASoC and driver update to go along as well.
There's probably not even enough time for it to sit in -next now...
Ping...
I didnt see this applied yet..
-- ~Vinod
On Mon, Feb 18, 2013 at 03:59:40PM +0530, Vinod Koul wrote:
From: Jeeja KP jeeja.kp@intel.com
Compress core added metadata apis in 9727b4, so add same in ASoC
This doesn't appear to apply any more, it needs a rebase.
participants (2)
-
Mark Brown
-
Vinod Koul