Commit 36953d98 authored by Jeeja KP's avatar Jeeja KP Committed by Mark Brown

ASoC: compress - add support for metadata apis

Compress core added metadata apis in 9727b4, so add same in ASoC
Signed-off-by: default avatarJeeja KP <jeeja.kp@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 8bb96604
...@@ -322,11 +322,38 @@ static int soc_compr_copy(struct snd_compr_stream *cstream, ...@@ -322,11 +322,38 @@ static int soc_compr_copy(struct snd_compr_stream *cstream,
return ret; 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 */ /* ASoC Compress operations */
static struct snd_compr_ops soc_compr_ops = { static struct snd_compr_ops soc_compr_ops = {
.open = soc_compr_open, .open = soc_compr_open,
.free = soc_compr_free, .free = soc_compr_free,
.set_params = soc_compr_set_params, .set_params = soc_compr_set_params,
.set_metadata = sst_compr_set_metadata,
.get_metadata = sst_compr_get_metadata,
.get_params = soc_compr_get_params, .get_params = soc_compr_get_params,
.trigger = soc_compr_trigger, .trigger = soc_compr_trigger,
.pointer = soc_compr_pointer, .pointer = soc_compr_pointer,
......
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