All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: compress - add support for metadata apis
@ 2013-02-18 10:29 Vinod Koul
  2013-02-18 10:29 ` [PATCH 2/2] ASoC: mid-x86 - add support for metedata apis Vinod Koul
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Vinod Koul @ 2013-02-18 10:29 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Jeeja KP, broonie, Vinod Koul, liam.r.girdwood

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,
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH 1/2] ASoC: compress - add support for metadata apis
@ 2013-03-26 15:52 Vinod Koul
  2013-03-26 17:46 ` Mark Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Vinod Koul @ 2013-03-26 15:52 UTC (permalink / raw)
  To: alsa-devel; +Cc: Vinod Koul, Jeeja KP, broonie, liam.r.girdwood

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>
---
Rebased on asoc-next

 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 b5b3db7..f9b2197 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -322,11 +322,38 @@ static int soc_compr_copy(struct snd_compr_stream *cstream,
 	return ret;
 }
 
+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->set_metadata)
+		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->get_metadata)
+		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,
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-03-26 17:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-18 10:29 [PATCH 1/2] ASoC: compress - add support for metadata apis Vinod Koul
2013-02-18 10:29 ` [PATCH 2/2] ASoC: mid-x86 - add support for metedata apis Vinod Koul
2013-02-18 13:19 ` [PATCH 1/2] ASoC: compress - add support for metadata apis Mark Brown
2013-02-18 13:35   ` Vinod Koul
2013-02-18 14:35     ` Mark Brown
2013-03-21  4:31       ` Vinod Koul
2013-03-21 15:24         ` Mark Brown
2013-03-22 10:57 ` Mark Brown
2013-03-26 15:52 Vinod Koul
2013-03-26 17:46 ` Mark Brown

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.