From 21f7a9a5eb53a2c51264253c1d74b7baf13c30d3 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Wed, 4 Sep 2013 08:31:51 -0700 Subject: [PATCH] ASoc: msm: stub set_metadata ops function Implement stub set_metadata ops function in compressed platform driver. Just return no error and print debug log. Change-Id: I45d69b5902b666abc12549aebf1bfc58824ab8ec Signed-off-by: Haynes Mathew George Signed-off-by: Eric Laurent Git-commit: 902e5b4af87f4649f3b093dea0c5f59c87be0dc1 Git-repo: https://android.googlesource.com/kernel/msm Signed-off-by: Dhananjay Kumar --- sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c index 929604a1291a..6243239c5e09 100644 --- a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c @@ -867,7 +867,17 @@ static int msm_compr_set_metadata(struct snd_compr_stream *cstream, struct snd_compr_metadata *metadata) { pr_debug("%s\n", __func__); - return -ENXIO; + + if (!metadata || !cstream) + return -EINVAL; + + if (metadata->key == SNDRV_COMPRESS_ENCODER_PADDING) { + pr_debug("%s, got encoder padding %u", __func__, metadata->value[0]); + } else if (metadata->key == SNDRV_COMPRESS_ENCODER_DELAY) { + pr_debug("%s, got encoder delay %u", __func__, metadata->value[0]); + } + + return 0; } static int msm_compr_volume_put(struct snd_kcontrol *kcontrol,