diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-12 16:56:57 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-12 16:56:57 +0400 |
commit | 54b019cbd993bb9d432a27a51a800f4981aa2f1c (patch) | |
tree | 875dea2d6a3aaf4e66a947a40226fdaf1f496f84 /sound/soc/soc-compress.c | |
parent | 13419625774f9f3e65e07257ad2a7beb445e9942 (diff) | |
parent | 0cd5751ab360573f607d1cbf97aa072667f888c8 (diff) | |
download | linux-54b019cbd993bb9d432a27a51a800f4981aa2f1c.tar.xz |
Merge remote-tracking branch 'asoc/topic/compress' into asoc-next
Diffstat (limited to 'sound/soc/soc-compress.c')
-rw-r--r-- | 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 ed0bfb0ddb96..29093a306ea2 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -330,11 +330,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, |