]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: core: Pass kcontrol to bytes tlv callbacks
authorMythri P K <mythri.p.k@intel.com>
Mon, 9 Nov 2015 17:50:00 +0000 (23:20 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 18 Nov 2015 12:57:50 +0000 (12:57 +0000)
Add kcontrol to the tlv callbacks in soc_bytes_ext, as it is
needed for referencing the corresponding control in the driver
code

Also fix the only upstream user in topology core

Signed-off-by: Mythri P K <mythri.p.k@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-topology.h
include/sound/soc.h
sound/soc/soc-ops.c

index 086cd7ff6ddcbb457ee31277baf3fee143f0181d..5b68e3f5aa85b301eaab5ff6975b76e257a00c52 100644 (file)
@@ -92,8 +92,10 @@ struct snd_soc_tplg_kcontrol_ops {
 /* Bytes ext operations, for TLV byte controls */
 struct snd_soc_tplg_bytes_ext_ops {
        u32 id;
-       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);
 };
 
 /*
index a8b4b9c8b1d2415e7220913715fc2cd4bd95212c..6603155f50ca84723ab2ce6219a86622aa8ee8fe 100644 (file)
@@ -1225,8 +1225,10 @@ struct soc_bytes_ext {
        struct snd_soc_dobj dobj;
 
        /* 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 */
index ecd38e52285a964d53fce4c5c0d4ae71fd4bc15d..ba3e49010ac3bf840c9a2da67d1290322104d66b 100644 (file)
@@ -779,11 +779,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;