Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1156970 > unrolled thread
| Started by | Ben Zhang <benzh@chromium.org> |
|---|---|
| First post | 2015-06-03 00:30 +0200 |
| Last post | 2015-06-03 14:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ASoC: core: Pass kcontrol pointer to bytes tlv callbacks Ben Zhang <benzh@chromium.org> - 2015-06-03 00:30 +0200
Re: [PATCH] ASoC: core: Pass kcontrol pointer to bytes tlv callbacks Mark Brown <broonie@kernel.org> - 2015-06-03 14:10 +0200
| From | Ben Zhang <benzh@chromium.org> |
|---|---|
| Date | 2015-06-03 00:30 +0200 |
| Subject | [PATCH] ASoC: core: Pass kcontrol pointer to bytes tlv callbacks |
| Message-ID | <px2R4-6uX-13@gated-at.bofh.it> |
The get/put callbacks need the kcontrol pointer to get context
information like snd_soc_codec and drvdata.
Signed-off-by: Ben Zhang <benzh@chromium.org>
---
include/sound/soc.h | 6 ++++--
sound/soc/soc-ops.c | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index fcb312b..404265d 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1169,8 +1169,10 @@ struct soc_bytes {
struct soc_bytes_ext {
int max;
/* used for TLV byte control */
- int (*get)(unsigned int __user *bytes, unsigned int size);
- int (*put)(const unsigned int __user *bytes, unsigned int size);
+ int (*get)(struct snd_kcontrol *kcontrol,
+ unsigned int __user *bytes, unsigned int size);
+ int (*put)(struct snd_kcontrol *kcontrol,
+ const unsigned int __user *bytes, unsigned int size);
};
/* multi register control */
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index 100d92b..7f53da9 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -751,11 +751,11 @@ int snd_soc_bytes_tlv_callback(struct snd_kcontrol *kcontrol, int op_flag,
switch (op_flag) {
case SNDRV_CTL_TLV_OP_READ:
if (params->get)
- ret = params->get(tlv, count);
+ ret = params->get(kcontrol, tlv, count);
break;
case SNDRV_CTL_TLV_OP_WRITE:
if (params->put)
- ret = params->put(tlv, count);
+ ret = params->put(kcontrol, tlv, count);
break;
}
return ret;
--
2.2.0.rc0.207.ga3a616c
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2015-06-03 14:10 +0200 |
| Message-ID | <pxfEB-rG-15@gated-at.bofh.it> |
| In reply to | #1156970 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Jun 02, 2015 at 03:24:03PM -0700, Ben Zhang wrote: > - int (*get)(unsigned int __user *bytes, unsigned int size); > - int (*put)(const unsigned int __user *bytes, unsigned int size); > + int (*get)(struct snd_kcontrol *kcontrol, > + unsigned int __user *bytes, unsigned int size); > + int (*put)(struct snd_kcontrol *kcontrol, > + const unsigned int __user *bytes, unsigned int size); This doesn't update any users and we do have some like the Haswell PCM driver.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web