* [PATCH 1/1] ASoC: soc_compress: Add set_metadata
@ 2013-11-25 10:16 Richard Fitzgerald
2013-11-28 6:19 ` Vinod Koul
0 siblings, 1 reply; 3+ messages in thread
From: Richard Fitzgerald @ 2013-11-25 10:16 UTC (permalink / raw)
To: vinod.koul, broonie
Cc: lgirdwood, perex, tiwai, alsa-devel, linux-kernel, ckeepax
Pass the set_metadata() calls through to the codec driver.
Signed-off-by: Zhao Weijia <weijia.zhao@capelabs.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
sound/soc/soc-compress.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 53c9ecd..186802b 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -318,6 +318,21 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream,
mutex_unlock(&rtd->pcm_mutex);
return 0;
}
+static int soc_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;
+
+ mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
+
+ if (platform->driver->compr_ops && platform->driver->compr_ops->set_metadata)
+ platform->driver->compr_ops->set_metadata(cstream, metadata);
+
+ mutex_unlock(&rtd->pcm_mutex);
+ return 0;
+}
+
static int soc_compr_copy(struct snd_compr_stream *cstream,
char __user *buf, size_t count)
@@ -372,7 +387,8 @@ static struct snd_compr_ops soc_compr_ops = {
.pointer = soc_compr_pointer,
.ack = soc_compr_ack,
.get_caps = soc_compr_get_caps,
- .get_codec_caps = soc_compr_get_codec_caps
+ .get_codec_caps = soc_compr_get_codec_caps,
+ .set_metadata = soc_compr_set_metadata,
};
/* create a new compress */
--
1.7.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] ASoC: soc_compress: Add set_metadata
2013-11-25 10:16 [PATCH 1/1] ASoC: soc_compress: Add set_metadata Richard Fitzgerald
@ 2013-11-28 6:19 ` Vinod Koul
2013-12-02 11:55 ` Richard Fitzgerald
0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2013-11-28 6:19 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: broonie, lgirdwood, perex, tiwai, alsa-devel, linux-kernel, ckeepax
On Mon, Nov 25, 2013 at 10:16:48AM +0000, Richard Fitzgerald wrote:
>
> Pass the set_metadata() calls through to the codec driver.
>
> Signed-off-by: Zhao Weijia <weijia.zhao@capelabs.com>
> Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
> ---
> sound/soc/soc-compress.c | 18 +++++++++++++++++-
> 1 files changed, 17 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
> index 53c9ecd..186802b 100644
> --- a/sound/soc/soc-compress.c
> +++ b/sound/soc/soc-compress.c
> @@ -318,6 +318,21 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream,
> mutex_unlock(&rtd->pcm_mutex);
> return 0;
> }
> +static int soc_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;
> +
> + mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
> +
> + if (platform->driver->compr_ops && platform->driver->compr_ops->set_metadata)
> + platform->driver->compr_ops->set_metadata(cstream, metadata);
> +
> + mutex_unlock(&rtd->pcm_mutex);
> + return 0;
> +}
> +
>
> static int soc_compr_copy(struct snd_compr_stream *cstream,
> char __user *buf, size_t count)
> @@ -372,7 +387,8 @@ static struct snd_compr_ops soc_compr_ops = {
> .pointer = soc_compr_pointer,
> .ack = soc_compr_ack,
> .get_caps = soc_compr_get_caps,
> - .get_codec_caps = soc_compr_get_codec_caps
> + .get_codec_caps = soc_compr_get_codec_caps,
> + .set_metadata = soc_compr_set_metadata,
Sorry am confused by this and the patch description? The set_metadata call
exists so how is this propogating to codec? Also which tree has this been
generated against?
--
~Vinod
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] ASoC: soc_compress: Add set_metadata
2013-11-28 6:19 ` Vinod Koul
@ 2013-12-02 11:55 ` Richard Fitzgerald
0 siblings, 0 replies; 3+ messages in thread
From: Richard Fitzgerald @ 2013-12-02 11:55 UTC (permalink / raw)
To: Vinod Koul
Cc: broonie, lgirdwood, perex, tiwai, alsa-devel, linux-kernel, ckeepax
On Thu, Nov 28, 2013 at 11:49:43AM +0530, Vinod Koul wrote:
> On Mon, Nov 25, 2013 at 10:16:48AM +0000, Richard Fitzgerald wrote:
> >
> > Pass the set_metadata() calls through to the codec driver.
> >
> > Signed-off-by: Zhao Weijia <weijia.zhao@capelabs.com>
> > Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
> > ---
> > sound/soc/soc-compress.c | 18 +++++++++++++++++-
> > 1 files changed, 17 insertions(+), 1 deletions(-)
> >
> > diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
> > index 53c9ecd..186802b 100644
> > --- a/sound/soc/soc-compress.c
> > +++ b/sound/soc/soc-compress.c
> > @@ -318,6 +318,21 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream,
> > mutex_unlock(&rtd->pcm_mutex);
> > return 0;
> > }
> > +static int soc_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;
> > +
> > + mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
> > +
> > + if (platform->driver->compr_ops && platform->driver->compr_ops->set_metadata)
> > + platform->driver->compr_ops->set_metadata(cstream, metadata);
> > +
> > + mutex_unlock(&rtd->pcm_mutex);
> > + return 0;
> > +}
> > +
> >
> > static int soc_compr_copy(struct snd_compr_stream *cstream,
> > char __user *buf, size_t count)
> > @@ -372,7 +387,8 @@ static struct snd_compr_ops soc_compr_ops = {
> > .pointer = soc_compr_pointer,
> > .ack = soc_compr_ack,
> > .get_caps = soc_compr_get_caps,
> > - .get_codec_caps = soc_compr_get_codec_caps
> > + .get_codec_caps = soc_compr_get_codec_caps,
> > + .set_metadata = soc_compr_set_metadata,
> Sorry am confused by this and the patch description? The set_metadata call
> exists so how is this propogating to codec? Also which tree has this been
> generated against?
>
> --
> ~Vinod
> --
My fault. I was sure I checked against broonie's for-next and these function were missing, but I must have checked
against something old. Patch abandoned!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-02 11:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-25 10:16 [PATCH 1/1] ASoC: soc_compress: Add set_metadata Richard Fitzgerald
2013-11-28 6:19 ` Vinod Koul
2013-12-02 11:55 ` Richard Fitzgerald
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).