Merge remote-tracking branch 'asoc/topic/compress' into asoc-next
This commit is contained in:
commit
54b019cbd9
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* sst_platform.c - Intel MID Platform driver
|
* 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: Vinod Koul <vinod.koul@intel.com>
|
||||||
* Author: Harsha Priya <priya.harsha@intel.com>
|
* Author: Harsha Priya <priya.harsha@intel.com>
|
||||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -656,11 +656,21 @@ static int sst_platform_compr_get_codec_caps(struct snd_compr_stream *cstream,
|
||||||
return stream->compr_ops->get_codec_caps(codec);
|
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 = {
|
static struct snd_compr_ops sst_platform_compr_ops = {
|
||||||
|
|
||||||
.open = sst_platform_compr_open,
|
.open = sst_platform_compr_open,
|
||||||
.free = sst_platform_compr_free,
|
.free = sst_platform_compr_free,
|
||||||
.set_params = sst_platform_compr_set_params,
|
.set_params = sst_platform_compr_set_params,
|
||||||
|
.set_metadata = sst_platform_compr_set_metadata,
|
||||||
.trigger = sst_platform_compr_trigger,
|
.trigger = sst_platform_compr_trigger,
|
||||||
.pointer = sst_platform_compr_pointer,
|
.pointer = sst_platform_compr_pointer,
|
||||||
.ack = sst_platform_compr_ack,
|
.ack = sst_platform_compr_ack,
|
||||||
|
|
|
@ -124,6 +124,8 @@ struct compress_sst_ops {
|
||||||
int (*close) (unsigned int str_id);
|
int (*close) (unsigned int str_id);
|
||||||
int (*get_caps) (struct snd_compr_caps *caps);
|
int (*get_caps) (struct snd_compr_caps *caps);
|
||||||
int (*get_codec_caps) (struct snd_compr_codec_caps *codec);
|
int (*get_codec_caps) (struct snd_compr_codec_caps *codec);
|
||||||
|
int (*set_metadata) (unsigned int str_id,
|
||||||
|
struct snd_compr_metadata *mdata);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -330,11 +330,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,
|
||||||
|
|
Loading…
Reference in New Issue