lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131125101648.GA1818@opensource.wolfsonmicro.com>
Date:	Mon, 25 Nov 2013 10:16:48 +0000
From:	Richard Fitzgerald <rf@...nsource.wolfsonmicro.com>
To:	vinod.koul@...el.com, broonie@...nel.org
Cc:	lgirdwood@...il.com, perex@...ex.cz, tiwai@...e.de,
	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
	ckeepax@...nsource.wolfsonmicro.com
Subject: [PATCH 1/1] ASoC: soc_compress: Add set_metadata


Pass the set_metadata() calls through to the codec driver.

Signed-off-by: Zhao Weijia <weijia.zhao@...elabs.com>
Signed-off-by: Richard Fitzgerald <rf@...nsource.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ