Loading include/sound/soc.h +13 −0 Original line number Diff line number Diff line Loading @@ -266,6 +266,13 @@ {.base = xbase, .num_regs = xregs, \ .mask = xmask }) } #define SND_SOC_BYTES_EXT(xname, xcount, xhandler_get, xhandler_put) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ .info = snd_soc_bytes_info_ext, \ .get = xhandler_get, .put = xhandler_put, \ .private_value = (unsigned long)&(struct soc_bytes_ext) \ {.max = xcount} } #define SOC_SINGLE_XR_SX(xname, xregbase, xregcount, xnbits, \ xmin, xmax, xinvert) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ Loading Loading @@ -534,6 +541,8 @@ int snd_soc_bytes_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); int snd_soc_bytes_info_ext(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *ucontrol); int snd_soc_info_xr_sx(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo); int snd_soc_get_xr_sx(struct snd_kcontrol *kcontrol, Loading Loading @@ -1080,6 +1089,10 @@ struct soc_bytes { u32 mask; }; struct soc_bytes_ext { int max; }; /* multi register control */ struct soc_mreg_control { long min, max; Loading sound/soc/soc-core.c +12 −0 Original line number Diff line number Diff line Loading @@ -3107,6 +3107,18 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, } EXPORT_SYMBOL_GPL(snd_soc_bytes_put); int snd_soc_bytes_info_ext(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *ucontrol) { struct soc_bytes_ext *params = (void *)kcontrol->private_value; ucontrol->type = SNDRV_CTL_ELEM_TYPE_BYTES; ucontrol->count = params->max; return 0; } EXPORT_SYMBOL_GPL(snd_soc_bytes_info_ext); /** * snd_soc_info_xr_sx - signed multi register info callback * @kcontrol: mreg control Loading Loading
include/sound/soc.h +13 −0 Original line number Diff line number Diff line Loading @@ -266,6 +266,13 @@ {.base = xbase, .num_regs = xregs, \ .mask = xmask }) } #define SND_SOC_BYTES_EXT(xname, xcount, xhandler_get, xhandler_put) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ .info = snd_soc_bytes_info_ext, \ .get = xhandler_get, .put = xhandler_put, \ .private_value = (unsigned long)&(struct soc_bytes_ext) \ {.max = xcount} } #define SOC_SINGLE_XR_SX(xname, xregbase, xregcount, xnbits, \ xmin, xmax, xinvert) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ Loading Loading @@ -534,6 +541,8 @@ int snd_soc_bytes_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); int snd_soc_bytes_info_ext(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *ucontrol); int snd_soc_info_xr_sx(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo); int snd_soc_get_xr_sx(struct snd_kcontrol *kcontrol, Loading Loading @@ -1080,6 +1089,10 @@ struct soc_bytes { u32 mask; }; struct soc_bytes_ext { int max; }; /* multi register control */ struct soc_mreg_control { long min, max; Loading
sound/soc/soc-core.c +12 −0 Original line number Diff line number Diff line Loading @@ -3107,6 +3107,18 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, } EXPORT_SYMBOL_GPL(snd_soc_bytes_put); int snd_soc_bytes_info_ext(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *ucontrol) { struct soc_bytes_ext *params = (void *)kcontrol->private_value; ucontrol->type = SNDRV_CTL_ELEM_TYPE_BYTES; ucontrol->count = params->max; return 0; } EXPORT_SYMBOL_GPL(snd_soc_bytes_info_ext); /** * snd_soc_info_xr_sx - signed multi register info callback * @kcontrol: mreg control Loading