Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: use snd_kcontrol_chip() instead of

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

We would like to hide struct snd_soc_dapm_context from driver. So we need
cleanup code first. Current ASoC have very similar functions (A)(B).

(A) snd_soc_kcontrol_component()
(B) snd_soc_dapm_kcontrol_component()

(B) is using very picky way to get component but using it is necessary in
ASoC. But (A) is just wrapper function to snd_kcontrol_chip(), and directly
using it without wrapper is very common way on ALSA.

This patch-set doesn't merge patches for each vender etc, because it makes
backport difficult.

+703 -813
+5 -5
drivers/staging/greybus/audio_topology.c
··· 163 163 struct gbaudio_ctl_pvt *data; 164 164 struct gb_audio_ctl_elem_info *info; 165 165 struct gbaudio_module_info *module; 166 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 166 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 167 167 struct gbaudio_codec_info *gbcodec = snd_soc_component_get_drvdata(comp); 168 168 169 169 dev_dbg(comp->dev, "Entered %s:%s\n", __func__, kcontrol->id.name); ··· 214 214 struct gbaudio_ctl_pvt *data; 215 215 struct gb_audio_ctl_elem_value gbvalue; 216 216 struct gbaudio_module_info *module; 217 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 217 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 218 218 struct gbaudio_codec_info *gb = snd_soc_component_get_drvdata(comp); 219 219 struct gb_bundle *bundle; 220 220 ··· 276 276 struct gbaudio_ctl_pvt *data; 277 277 struct gb_audio_ctl_elem_value gbvalue; 278 278 struct gbaudio_module_info *module; 279 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 279 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 280 280 struct gbaudio_codec_info *gb = snd_soc_component_get_drvdata(comp); 281 281 struct gb_bundle *bundle; 282 282 ··· 543 543 struct snd_ctl_elem_value *ucontrol) 544 544 { 545 545 int ret, ctl_id; 546 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 546 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 547 547 struct gbaudio_codec_info *gb = snd_soc_component_get_drvdata(comp); 548 548 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 549 549 struct gb_audio_ctl_elem_value gbvalue; ··· 588 588 struct snd_ctl_elem_value *ucontrol) 589 589 { 590 590 int ret, ctl_id; 591 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 591 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 592 592 struct gbaudio_codec_info *gb = snd_soc_component_get_drvdata(comp); 593 593 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 594 594 struct gb_audio_ctl_elem_value gbvalue;
-16
include/sound/soc.h
··· 1305 1305 return e->values[item]; 1306 1306 } 1307 1307 1308 - /** 1309 - * snd_soc_kcontrol_component() - Returns the component that registered the 1310 - * control 1311 - * @kcontrol: The control for which to get the component 1312 - * 1313 - * Note: This function will work correctly if the control has been registered 1314 - * for a component. With snd_soc_add_codec_controls() or via table based 1315 - * setup for either a CODEC or component driver. Otherwise the behavior is 1316 - * undefined. 1317 - */ 1318 - static inline struct snd_soc_component *snd_soc_kcontrol_component( 1319 - struct snd_kcontrol *kcontrol) 1320 - { 1321 - return snd_kcontrol_chip(kcontrol); 1322 - } 1323 - 1324 1308 int snd_soc_util_init(void); 1325 1309 void snd_soc_util_exit(void); 1326 1310
+2 -2
sound/soc/atmel/atmel-pdmic.c
··· 280 280 static int pdmic_get_mic_volsw(struct snd_kcontrol *kcontrol, 281 281 struct snd_ctl_elem_value *ucontrol) 282 282 { 283 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 283 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 284 284 unsigned int dgain_val, scale_val; 285 285 int i; 286 286 ··· 304 304 { 305 305 struct soc_mixer_control *mc = 306 306 (struct soc_mixer_control *)kcontrol->private_value; 307 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 307 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 308 308 int max = mc->max; 309 309 unsigned int val; 310 310 int ret;
+4 -4
sound/soc/codecs/88pm860x-codec.c
··· 269 269 { 270 270 struct soc_mixer_control *mc = 271 271 (struct soc_mixer_control *)kcontrol->private_value; 272 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 272 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 273 273 unsigned int reg = mc->reg; 274 274 unsigned int reg2 = mc->rreg; 275 275 int val[2], val2[2], i; ··· 293 293 { 294 294 struct soc_mixer_control *mc = 295 295 (struct soc_mixer_control *)kcontrol->private_value; 296 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 296 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 297 297 unsigned int reg = mc->reg; 298 298 unsigned int reg2 = mc->rreg; 299 299 int err; ··· 326 326 { 327 327 struct soc_mixer_control *mc = 328 328 (struct soc_mixer_control *)kcontrol->private_value; 329 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 329 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 330 330 unsigned int reg = mc->reg; 331 331 unsigned int reg2 = mc->rreg; 332 332 unsigned int shift = mc->shift; ··· 346 346 { 347 347 struct soc_mixer_control *mc = 348 348 (struct soc_mixer_control *)kcontrol->private_value; 349 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 349 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 350 350 unsigned int reg = mc->reg; 351 351 unsigned int reg2 = mc->rreg; 352 352 unsigned int shift = mc->shift;
+6 -6
sound/soc/codecs/ab8500-codec.c
··· 1114 1114 static int sid_status_control_get(struct snd_kcontrol *kcontrol, 1115 1115 struct snd_ctl_elem_value *ucontrol) 1116 1116 { 1117 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1117 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1118 1118 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev); 1119 1119 1120 1120 mutex_lock(&drvdata->ctrl_lock); ··· 1128 1128 static int sid_status_control_put(struct snd_kcontrol *kcontrol, 1129 1129 struct snd_ctl_elem_value *ucontrol) 1130 1130 { 1131 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1131 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1132 1132 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev); 1133 1133 unsigned int param, sidconf, val; 1134 1134 int status = 1; ··· 1183 1183 static int anc_status_control_get(struct snd_kcontrol *kcontrol, 1184 1184 struct snd_ctl_elem_value *ucontrol) 1185 1185 { 1186 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1186 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1187 1187 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev); 1188 1188 1189 1189 mutex_lock(&drvdata->ctrl_lock); ··· 1196 1196 static int anc_status_control_put(struct snd_kcontrol *kcontrol, 1197 1197 struct snd_ctl_elem_value *ucontrol) 1198 1198 { 1199 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1199 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1200 1200 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 1201 1201 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev); 1202 1202 struct device *dev = component->dev; ··· 1279 1279 static int filter_control_get(struct snd_kcontrol *kcontrol, 1280 1280 struct snd_ctl_elem_value *ucontrol) 1281 1281 { 1282 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1282 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1283 1283 struct ab8500_codec_drvdata *drvdata = snd_soc_component_get_drvdata(component); 1284 1284 struct filter_control *fc = 1285 1285 (struct filter_control *)kcontrol->private_value; ··· 1296 1296 static int filter_control_put(struct snd_kcontrol *kcontrol, 1297 1297 struct snd_ctl_elem_value *ucontrol) 1298 1298 { 1299 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1299 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1300 1300 struct ab8500_codec_drvdata *drvdata = snd_soc_component_get_drvdata(component); 1301 1301 struct filter_control *fc = 1302 1302 (struct filter_control *)kcontrol->private_value;
+2 -2
sound/soc/codecs/adav80x.c
··· 314 314 static int adav80x_put_deemph(struct snd_kcontrol *kcontrol, 315 315 struct snd_ctl_elem_value *ucontrol) 316 316 { 317 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 317 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 318 318 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); 319 319 unsigned int deemph = ucontrol->value.integer.value[0]; 320 320 ··· 329 329 static int adav80x_get_deemph(struct snd_kcontrol *kcontrol, 330 330 struct snd_ctl_elem_value *ucontrol) 331 331 { 332 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 332 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 333 333 struct adav80x *adav80x = snd_soc_component_get_drvdata(component); 334 334 335 335 ucontrol->value.integer.value[0] = adav80x->deemph;
+2 -2
sound/soc/codecs/ak4458.c
··· 187 187 static int get_digfil(struct snd_kcontrol *kcontrol, 188 188 struct snd_ctl_elem_value *ucontrol) 189 189 { 190 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 190 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 191 191 struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component); 192 192 193 193 ucontrol->value.enumerated.item[0] = ak4458->digfil; ··· 198 198 static int set_digfil(struct snd_kcontrol *kcontrol, 199 199 struct snd_ctl_elem_value *ucontrol) 200 200 { 201 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 201 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 202 202 struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component); 203 203 int num; 204 204
+2 -2
sound/soc/codecs/ak4619.c
··· 257 257 static int ak4619_put_deemph(struct snd_kcontrol *kcontrol, 258 258 struct snd_ctl_elem_value *ucontrol) 259 259 { 260 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 260 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 261 261 struct ak4619_priv *ak4619 = snd_soc_component_get_drvdata(component); 262 262 int deemph_en = ucontrol->value.integer.value[0]; 263 263 int ret = 0; ··· 282 282 static int ak4619_get_deemph(struct snd_kcontrol *kcontrol, 283 283 struct snd_ctl_elem_value *ucontrol) 284 284 { 285 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 285 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 286 286 struct ak4619_priv *ak4619 = snd_soc_component_get_drvdata(component); 287 287 288 288 ucontrol->value.integer.value[0] = ak4619->deemph_en;
+2 -2
sound/soc/codecs/ak4641.c
··· 91 91 static int ak4641_put_deemph(struct snd_kcontrol *kcontrol, 92 92 struct snd_ctl_elem_value *ucontrol) 93 93 { 94 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 94 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 95 95 struct ak4641_priv *ak4641 = snd_soc_component_get_drvdata(component); 96 96 int deemph = ucontrol->value.integer.value[0]; 97 97 ··· 106 106 static int ak4641_get_deemph(struct snd_kcontrol *kcontrol, 107 107 struct snd_ctl_elem_value *ucontrol) 108 108 { 109 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 109 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 110 110 struct ak4641_priv *ak4641 = snd_soc_component_get_drvdata(component); 111 111 112 112 ucontrol->value.integer.value[0] = ak4641->deemph;
+2 -2
sound/soc/codecs/arizona.c
··· 2724 2724 int arizona_eq_coeff_put(struct snd_kcontrol *kcontrol, 2725 2725 struct snd_ctl_elem_value *ucontrol) 2726 2726 { 2727 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2727 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2728 2728 struct arizona *arizona = dev_get_drvdata(component->dev->parent); 2729 2729 struct soc_bytes *params = (void *)kcontrol->private_value; 2730 2730 unsigned int val; ··· 2768 2768 int arizona_lhpf_coeff_put(struct snd_kcontrol *kcontrol, 2769 2769 struct snd_ctl_elem_value *ucontrol) 2770 2770 { 2771 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2771 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2772 2772 struct arizona *arizona = dev_get_drvdata(component->dev->parent); 2773 2773 __be16 *data = (__be16 *)ucontrol->value.bytes.data; 2774 2774 s16 val = be16_to_cpu(*data);
+3 -3
sound/soc/codecs/aw87390.c
··· 175 175 static int aw87390_profile_info(struct snd_kcontrol *kcontrol, 176 176 struct snd_ctl_elem_info *uinfo) 177 177 { 178 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 178 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 179 179 struct aw87390 *aw87390 = snd_soc_component_get_drvdata(codec); 180 180 char *prof_name; 181 181 int count, ret; ··· 210 210 static int aw87390_profile_get(struct snd_kcontrol *kcontrol, 211 211 struct snd_ctl_elem_value *ucontrol) 212 212 { 213 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 213 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 214 214 struct aw87390 *aw87390 = snd_soc_component_get_drvdata(codec); 215 215 216 216 ucontrol->value.integer.value[0] = aw87390->aw_pa->prof_index; ··· 221 221 static int aw87390_profile_set(struct snd_kcontrol *kcontrol, 222 222 struct snd_ctl_elem_value *ucontrol) 223 223 { 224 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 224 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 225 225 struct aw87390 *aw87390 = snd_soc_component_get_drvdata(codec); 226 226 int ret; 227 227
+11 -11
sound/soc/codecs/aw88081.c
··· 808 808 static int aw88081_get_fade_in_time(struct snd_kcontrol *kcontrol, 809 809 struct snd_ctl_elem_value *ucontrol) 810 810 { 811 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 811 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 812 812 struct aw88081 *aw88081 = snd_soc_component_get_drvdata(component); 813 813 struct aw_device *aw_dev = aw88081->aw_pa; 814 814 ··· 820 820 static int aw88081_set_fade_in_time(struct snd_kcontrol *kcontrol, 821 821 struct snd_ctl_elem_value *ucontrol) 822 822 { 823 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 823 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 824 824 struct aw88081 *aw88081 = snd_soc_component_get_drvdata(component); 825 825 struct soc_mixer_control *mc = 826 826 (struct soc_mixer_control *)kcontrol->private_value; ··· 843 843 static int aw88081_get_fade_out_time(struct snd_kcontrol *kcontrol, 844 844 struct snd_ctl_elem_value *ucontrol) 845 845 { 846 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 846 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 847 847 struct aw88081 *aw88081 = snd_soc_component_get_drvdata(component); 848 848 struct aw_device *aw_dev = aw88081->aw_pa; 849 849 ··· 855 855 static int aw88081_set_fade_out_time(struct snd_kcontrol *kcontrol, 856 856 struct snd_ctl_elem_value *ucontrol) 857 857 { 858 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 858 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 859 859 struct aw88081 *aw88081 = snd_soc_component_get_drvdata(component); 860 860 struct soc_mixer_control *mc = 861 861 (struct soc_mixer_control *)kcontrol->private_value; ··· 891 891 static int aw88081_profile_info(struct snd_kcontrol *kcontrol, 892 892 struct snd_ctl_elem_info *uinfo) 893 893 { 894 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 894 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 895 895 struct aw88081 *aw88081 = snd_soc_component_get_drvdata(codec); 896 896 char *prof_name; 897 897 int count, ret; ··· 926 926 static int aw88081_profile_get(struct snd_kcontrol *kcontrol, 927 927 struct snd_ctl_elem_value *ucontrol) 928 928 { 929 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 929 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 930 930 struct aw88081 *aw88081 = snd_soc_component_get_drvdata(codec); 931 931 932 932 ucontrol->value.integer.value[0] = aw88081->aw_pa->prof_index; ··· 937 937 static int aw88081_profile_set(struct snd_kcontrol *kcontrol, 938 938 struct snd_ctl_elem_value *ucontrol) 939 939 { 940 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 940 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 941 941 struct aw88081 *aw88081 = snd_soc_component_get_drvdata(codec); 942 942 int ret; 943 943 ··· 963 963 static int aw88081_volume_get(struct snd_kcontrol *kcontrol, 964 964 struct snd_ctl_elem_value *ucontrol) 965 965 { 966 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 966 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 967 967 struct aw88081 *aw88081 = snd_soc_component_get_drvdata(codec); 968 968 struct aw_volume_desc *vol_desc = &aw88081->aw_pa->volume_desc; 969 969 ··· 975 975 static int aw88081_volume_set(struct snd_kcontrol *kcontrol, 976 976 struct snd_ctl_elem_value *ucontrol) 977 977 { 978 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 978 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 979 979 struct aw88081 *aw88081 = snd_soc_component_get_drvdata(codec); 980 980 struct aw_volume_desc *vol_desc = &aw88081->aw_pa->volume_desc; 981 981 struct soc_mixer_control *mc = ··· 1003 1003 static int aw88081_get_fade_step(struct snd_kcontrol *kcontrol, 1004 1004 struct snd_ctl_elem_value *ucontrol) 1005 1005 { 1006 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1006 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1007 1007 struct aw88081 *aw88081 = snd_soc_component_get_drvdata(codec); 1008 1008 1009 1009 ucontrol->value.integer.value[0] = aw88081->aw_pa->fade_step; ··· 1014 1014 static int aw88081_set_fade_step(struct snd_kcontrol *kcontrol, 1015 1015 struct snd_ctl_elem_value *ucontrol) 1016 1016 { 1017 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1017 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1018 1018 struct aw88081 *aw88081 = snd_soc_component_get_drvdata(codec); 1019 1019 struct soc_mixer_control *mc = 1020 1020 (struct soc_mixer_control *)kcontrol->private_value;
+13 -13
sound/soc/codecs/aw88166.c
··· 1391 1391 static int aw88166_get_fade_in_time(struct snd_kcontrol *kcontrol, 1392 1392 struct snd_ctl_elem_value *ucontrol) 1393 1393 { 1394 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1394 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1395 1395 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(component); 1396 1396 struct aw_device *aw_dev = aw88166->aw_pa; 1397 1397 ··· 1403 1403 static int aw88166_set_fade_in_time(struct snd_kcontrol *kcontrol, 1404 1404 struct snd_ctl_elem_value *ucontrol) 1405 1405 { 1406 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1406 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1407 1407 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(component); 1408 1408 struct soc_mixer_control *mc = 1409 1409 (struct soc_mixer_control *)kcontrol->private_value; ··· 1426 1426 static int aw88166_get_fade_out_time(struct snd_kcontrol *kcontrol, 1427 1427 struct snd_ctl_elem_value *ucontrol) 1428 1428 { 1429 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1429 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1430 1430 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(component); 1431 1431 struct aw_device *aw_dev = aw88166->aw_pa; 1432 1432 ··· 1438 1438 static int aw88166_set_fade_out_time(struct snd_kcontrol *kcontrol, 1439 1439 struct snd_ctl_elem_value *ucontrol) 1440 1440 { 1441 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1441 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1442 1442 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(component); 1443 1443 struct soc_mixer_control *mc = 1444 1444 (struct soc_mixer_control *)kcontrol->private_value; ··· 1476 1476 static int aw88166_profile_info(struct snd_kcontrol *kcontrol, 1477 1477 struct snd_ctl_elem_info *uinfo) 1478 1478 { 1479 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1479 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1480 1480 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(codec); 1481 1481 char *prof_name; 1482 1482 int count, ret; ··· 1511 1511 static int aw88166_profile_get(struct snd_kcontrol *kcontrol, 1512 1512 struct snd_ctl_elem_value *ucontrol) 1513 1513 { 1514 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1514 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1515 1515 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(codec); 1516 1516 1517 1517 ucontrol->value.integer.value[0] = aw88166->aw_pa->prof_index; ··· 1522 1522 static int aw88166_profile_set(struct snd_kcontrol *kcontrol, 1523 1523 struct snd_ctl_elem_value *ucontrol) 1524 1524 { 1525 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1525 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1526 1526 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(codec); 1527 1527 int ret; 1528 1528 ··· 1547 1547 static int aw88166_volume_get(struct snd_kcontrol *kcontrol, 1548 1548 struct snd_ctl_elem_value *ucontrol) 1549 1549 { 1550 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1550 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1551 1551 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(codec); 1552 1552 struct aw_volume_desc *vol_desc = &aw88166->aw_pa->volume_desc; 1553 1553 ··· 1559 1559 static int aw88166_volume_set(struct snd_kcontrol *kcontrol, 1560 1560 struct snd_ctl_elem_value *ucontrol) 1561 1561 { 1562 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1562 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1563 1563 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(codec); 1564 1564 struct aw_volume_desc *vol_desc = &aw88166->aw_pa->volume_desc; 1565 1565 struct soc_mixer_control *mc = ··· 1583 1583 static int aw88166_get_fade_step(struct snd_kcontrol *kcontrol, 1584 1584 struct snd_ctl_elem_value *ucontrol) 1585 1585 { 1586 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1586 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1587 1587 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(codec); 1588 1588 1589 1589 ucontrol->value.integer.value[0] = aw88166->aw_pa->fade_step; ··· 1594 1594 static int aw88166_set_fade_step(struct snd_kcontrol *kcontrol, 1595 1595 struct snd_ctl_elem_value *ucontrol) 1596 1596 { 1597 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1597 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1598 1598 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(codec); 1599 1599 struct soc_mixer_control *mc = 1600 1600 (struct soc_mixer_control *)kcontrol->private_value; ··· 1615 1615 static int aw88166_re_get(struct snd_kcontrol *kcontrol, 1616 1616 struct snd_ctl_elem_value *ucontrol) 1617 1617 { 1618 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1618 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1619 1619 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(codec); 1620 1620 struct aw_device *aw_dev = aw88166->aw_pa; 1621 1621 ··· 1627 1627 static int aw88166_re_set(struct snd_kcontrol *kcontrol, 1628 1628 struct snd_ctl_elem_value *ucontrol) 1629 1629 { 1630 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1630 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1631 1631 struct aw88166 *aw88166 = snd_soc_component_get_drvdata(codec); 1632 1632 struct soc_mixer_control *mc = 1633 1633 (struct soc_mixer_control *)kcontrol->private_value;
+11 -11
sound/soc/codecs/aw88261.c
··· 734 734 static int aw88261_get_fade_in_time(struct snd_kcontrol *kcontrol, 735 735 struct snd_ctl_elem_value *ucontrol) 736 736 { 737 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 737 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 738 738 struct aw88261 *aw88261 = snd_soc_component_get_drvdata(component); 739 739 struct aw_device *aw_dev = aw88261->aw_pa; 740 740 ··· 746 746 static int aw88261_set_fade_in_time(struct snd_kcontrol *kcontrol, 747 747 struct snd_ctl_elem_value *ucontrol) 748 748 { 749 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 749 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 750 750 struct aw88261 *aw88261 = snd_soc_component_get_drvdata(component); 751 751 struct soc_mixer_control *mc = 752 752 (struct soc_mixer_control *)kcontrol->private_value; ··· 769 769 static int aw88261_get_fade_out_time(struct snd_kcontrol *kcontrol, 770 770 struct snd_ctl_elem_value *ucontrol) 771 771 { 772 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 772 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 773 773 struct aw88261 *aw88261 = snd_soc_component_get_drvdata(component); 774 774 struct aw_device *aw_dev = aw88261->aw_pa; 775 775 ··· 781 781 static int aw88261_set_fade_out_time(struct snd_kcontrol *kcontrol, 782 782 struct snd_ctl_elem_value *ucontrol) 783 783 { 784 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 784 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 785 785 struct aw88261 *aw88261 = snd_soc_component_get_drvdata(component); 786 786 struct soc_mixer_control *mc = 787 787 (struct soc_mixer_control *)kcontrol->private_value; ··· 817 817 static int aw88261_profile_info(struct snd_kcontrol *kcontrol, 818 818 struct snd_ctl_elem_info *uinfo) 819 819 { 820 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 820 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 821 821 struct aw88261 *aw88261 = snd_soc_component_get_drvdata(codec); 822 822 char *prof_name; 823 823 int count, ret; ··· 852 852 static int aw88261_profile_get(struct snd_kcontrol *kcontrol, 853 853 struct snd_ctl_elem_value *ucontrol) 854 854 { 855 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 855 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 856 856 struct aw88261 *aw88261 = snd_soc_component_get_drvdata(codec); 857 857 858 858 ucontrol->value.integer.value[0] = aw88261->aw_pa->prof_index; ··· 863 863 static int aw88261_profile_set(struct snd_kcontrol *kcontrol, 864 864 struct snd_ctl_elem_value *ucontrol) 865 865 { 866 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 866 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 867 867 struct aw88261 *aw88261 = snd_soc_component_get_drvdata(codec); 868 868 int ret; 869 869 ··· 889 889 static int aw88261_volume_get(struct snd_kcontrol *kcontrol, 890 890 struct snd_ctl_elem_value *ucontrol) 891 891 { 892 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 892 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 893 893 struct aw88261 *aw88261 = snd_soc_component_get_drvdata(codec); 894 894 struct aw_volume_desc *vol_desc = &aw88261->aw_pa->volume_desc; 895 895 ··· 901 901 static int aw88261_volume_set(struct snd_kcontrol *kcontrol, 902 902 struct snd_ctl_elem_value *ucontrol) 903 903 { 904 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 904 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 905 905 struct aw88261 *aw88261 = snd_soc_component_get_drvdata(codec); 906 906 struct aw_volume_desc *vol_desc = &aw88261->aw_pa->volume_desc; 907 907 struct soc_mixer_control *mc = ··· 926 926 static int aw88261_get_fade_step(struct snd_kcontrol *kcontrol, 927 927 struct snd_ctl_elem_value *ucontrol) 928 928 { 929 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 929 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 930 930 struct aw88261 *aw88261 = snd_soc_component_get_drvdata(codec); 931 931 932 932 ucontrol->value.integer.value[0] = aw88261->aw_pa->fade_step; ··· 937 937 static int aw88261_set_fade_step(struct snd_kcontrol *kcontrol, 938 938 struct snd_ctl_elem_value *ucontrol) 939 939 { 940 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 940 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 941 941 struct aw88261 *aw88261 = snd_soc_component_get_drvdata(codec); 942 942 struct soc_mixer_control *mc = 943 943 (struct soc_mixer_control *)kcontrol->private_value;
+13 -13
sound/soc/codecs/aw88395/aw88395.c
··· 104 104 static int aw88395_get_fade_in_time(struct snd_kcontrol *kcontrol, 105 105 struct snd_ctl_elem_value *ucontrol) 106 106 { 107 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 107 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 108 108 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(component); 109 109 struct aw_device *aw_dev = aw88395->aw_pa; 110 110 ··· 116 116 static int aw88395_set_fade_in_time(struct snd_kcontrol *kcontrol, 117 117 struct snd_ctl_elem_value *ucontrol) 118 118 { 119 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 119 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 120 120 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(component); 121 121 struct soc_mixer_control *mc = 122 122 (struct soc_mixer_control *)kcontrol->private_value; ··· 139 139 static int aw88395_get_fade_out_time(struct snd_kcontrol *kcontrol, 140 140 struct snd_ctl_elem_value *ucontrol) 141 141 { 142 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 142 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 143 143 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(component); 144 144 struct aw_device *aw_dev = aw88395->aw_pa; 145 145 ··· 151 151 static int aw88395_set_fade_out_time(struct snd_kcontrol *kcontrol, 152 152 struct snd_ctl_elem_value *ucontrol) 153 153 { 154 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 154 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 155 155 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(component); 156 156 struct soc_mixer_control *mc = 157 157 (struct soc_mixer_control *)kcontrol->private_value; ··· 173 173 static int aw88395_profile_info(struct snd_kcontrol *kcontrol, 174 174 struct snd_ctl_elem_info *uinfo) 175 175 { 176 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 176 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 177 177 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(codec); 178 178 char *prof_name; 179 179 int count, ret; ··· 208 208 static int aw88395_profile_get(struct snd_kcontrol *kcontrol, 209 209 struct snd_ctl_elem_value *ucontrol) 210 210 { 211 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 211 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 212 212 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(codec); 213 213 214 214 ucontrol->value.integer.value[0] = aw88395_dev_get_profile_index(aw88395->aw_pa); ··· 219 219 static int aw88395_profile_set(struct snd_kcontrol *kcontrol, 220 220 struct snd_ctl_elem_value *ucontrol) 221 221 { 222 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 222 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 223 223 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(codec); 224 224 int ret; 225 225 ··· 245 245 static int aw88395_volume_get(struct snd_kcontrol *kcontrol, 246 246 struct snd_ctl_elem_value *ucontrol) 247 247 { 248 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 248 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 249 249 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(codec); 250 250 struct aw_volume_desc *vol_desc = &aw88395->aw_pa->volume_desc; 251 251 ··· 257 257 static int aw88395_volume_set(struct snd_kcontrol *kcontrol, 258 258 struct snd_ctl_elem_value *ucontrol) 259 259 { 260 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 260 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 261 261 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(codec); 262 262 struct aw_volume_desc *vol_desc = &aw88395->aw_pa->volume_desc; 263 263 struct soc_mixer_control *mc = ··· 281 281 static int aw88395_get_fade_step(struct snd_kcontrol *kcontrol, 282 282 struct snd_ctl_elem_value *ucontrol) 283 283 { 284 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 284 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 285 285 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(codec); 286 286 287 287 ucontrol->value.integer.value[0] = aw88395->aw_pa->fade_step; ··· 292 292 static int aw88395_set_fade_step(struct snd_kcontrol *kcontrol, 293 293 struct snd_ctl_elem_value *ucontrol) 294 294 { 295 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 295 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 296 296 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(codec); 297 297 struct soc_mixer_control *mc = 298 298 (struct soc_mixer_control *)kcontrol->private_value; ··· 313 313 static int aw88395_re_get(struct snd_kcontrol *kcontrol, 314 314 struct snd_ctl_elem_value *ucontrol) 315 315 { 316 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 316 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 317 317 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(codec); 318 318 struct aw_device *aw_dev = aw88395->aw_pa; 319 319 ··· 325 325 static int aw88395_re_set(struct snd_kcontrol *kcontrol, 326 326 struct snd_ctl_elem_value *ucontrol) 327 327 { 328 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 328 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 329 329 struct aw88395 *aw88395 = snd_soc_component_get_drvdata(codec); 330 330 struct soc_mixer_control *mc = 331 331 (struct soc_mixer_control *)kcontrol->private_value;
+16 -16
sound/soc/codecs/aw88399.c
··· 1744 1744 static int aw88399_get_fade_in_time(struct snd_kcontrol *kcontrol, 1745 1745 struct snd_ctl_elem_value *ucontrol) 1746 1746 { 1747 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1747 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1748 1748 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(component); 1749 1749 struct aw_device *aw_dev = aw88399->aw_pa; 1750 1750 ··· 1756 1756 static int aw88399_set_fade_in_time(struct snd_kcontrol *kcontrol, 1757 1757 struct snd_ctl_elem_value *ucontrol) 1758 1758 { 1759 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1759 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1760 1760 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(component); 1761 1761 struct soc_mixer_control *mc = 1762 1762 (struct soc_mixer_control *)kcontrol->private_value; ··· 1779 1779 static int aw88399_get_fade_out_time(struct snd_kcontrol *kcontrol, 1780 1780 struct snd_ctl_elem_value *ucontrol) 1781 1781 { 1782 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1782 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1783 1783 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(component); 1784 1784 struct aw_device *aw_dev = aw88399->aw_pa; 1785 1785 ··· 1791 1791 static int aw88399_set_fade_out_time(struct snd_kcontrol *kcontrol, 1792 1792 struct snd_ctl_elem_value *ucontrol) 1793 1793 { 1794 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1794 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1795 1795 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(component); 1796 1796 struct soc_mixer_control *mc = 1797 1797 (struct soc_mixer_control *)kcontrol->private_value; ··· 1829 1829 static int aw88399_profile_info(struct snd_kcontrol *kcontrol, 1830 1830 struct snd_ctl_elem_info *uinfo) 1831 1831 { 1832 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1832 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1833 1833 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 1834 1834 char *prof_name; 1835 1835 int count, ret; ··· 1864 1864 static int aw88399_profile_get(struct snd_kcontrol *kcontrol, 1865 1865 struct snd_ctl_elem_value *ucontrol) 1866 1866 { 1867 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1867 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1868 1868 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 1869 1869 1870 1870 ucontrol->value.integer.value[0] = aw88399->aw_pa->prof_index; ··· 1875 1875 static int aw88399_profile_set(struct snd_kcontrol *kcontrol, 1876 1876 struct snd_ctl_elem_value *ucontrol) 1877 1877 { 1878 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1878 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1879 1879 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 1880 1880 int ret; 1881 1881 ··· 1900 1900 static int aw88399_volume_get(struct snd_kcontrol *kcontrol, 1901 1901 struct snd_ctl_elem_value *ucontrol) 1902 1902 { 1903 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1903 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1904 1904 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 1905 1905 struct aw_volume_desc *vol_desc = &aw88399->aw_pa->volume_desc; 1906 1906 ··· 1912 1912 static int aw88399_volume_set(struct snd_kcontrol *kcontrol, 1913 1913 struct snd_ctl_elem_value *ucontrol) 1914 1914 { 1915 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1915 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1916 1916 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 1917 1917 struct aw_volume_desc *vol_desc = &aw88399->aw_pa->volume_desc; 1918 1918 struct soc_mixer_control *mc = ··· 1936 1936 static int aw88399_get_fade_step(struct snd_kcontrol *kcontrol, 1937 1937 struct snd_ctl_elem_value *ucontrol) 1938 1938 { 1939 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1939 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1940 1940 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 1941 1941 1942 1942 ucontrol->value.integer.value[0] = aw88399->aw_pa->fade_step; ··· 1947 1947 static int aw88399_set_fade_step(struct snd_kcontrol *kcontrol, 1948 1948 struct snd_ctl_elem_value *ucontrol) 1949 1949 { 1950 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1950 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1951 1951 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 1952 1952 struct soc_mixer_control *mc = 1953 1953 (struct soc_mixer_control *)kcontrol->private_value; ··· 1968 1968 static int aw88399_re_get(struct snd_kcontrol *kcontrol, 1969 1969 struct snd_ctl_elem_value *ucontrol) 1970 1970 { 1971 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1971 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1972 1972 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 1973 1973 struct aw_device *aw_dev = aw88399->aw_pa; 1974 1974 ··· 1980 1980 static int aw88399_re_set(struct snd_kcontrol *kcontrol, 1981 1981 struct snd_ctl_elem_value *ucontrol) 1982 1982 { 1983 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1983 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1984 1984 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 1985 1985 struct soc_mixer_control *mc = 1986 1986 (struct soc_mixer_control *)kcontrol->private_value; ··· 2002 2002 static int aw88399_calib_switch_get(struct snd_kcontrol *kcontrol, 2003 2003 struct snd_ctl_elem_value *ucontrol) 2004 2004 { 2005 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 2005 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 2006 2006 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 2007 2007 struct aw_device *aw_dev = aw88399->aw_pa; 2008 2008 ··· 2014 2014 static int aw88399_calib_switch_set(struct snd_kcontrol *kcontrol, 2015 2015 struct snd_ctl_elem_value *ucontrol) 2016 2016 { 2017 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 2017 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 2018 2018 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 2019 2019 struct aw_device *aw_dev = aw88399->aw_pa; 2020 2020 ··· 2036 2036 static int aw88399_calib_set(struct snd_kcontrol *kcontrol, 2037 2037 struct snd_ctl_elem_value *ucontrol) 2038 2038 { 2039 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 2039 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 2040 2040 struct aw88399 *aw88399 = snd_soc_component_get_drvdata(codec); 2041 2041 struct aw_device *aw_dev = aw88399->aw_pa; 2042 2042
+2 -4
sound/soc/codecs/bd28623.c
··· 70 70 static int bd28623_get_switch_spk(struct snd_kcontrol *kcontrol, 71 71 struct snd_ctl_elem_value *ucontrol) 72 72 { 73 - struct snd_soc_component *component = 74 - snd_soc_kcontrol_component(kcontrol); 73 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 75 74 struct bd28623_priv *bd = snd_soc_component_get_drvdata(component); 76 75 77 76 ucontrol->value.integer.value[0] = bd->switch_spk; ··· 81 82 static int bd28623_set_switch_spk(struct snd_kcontrol *kcontrol, 82 83 struct snd_ctl_elem_value *ucontrol) 83 84 { 84 - struct snd_soc_component *component = 85 - snd_soc_kcontrol_component(kcontrol); 85 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 86 86 struct bd28623_priv *bd = snd_soc_component_get_drvdata(component); 87 87 88 88 if (bd->switch_spk == ucontrol->value.integer.value[0])
+4 -6
sound/soc/codecs/cros_ec_codec.c
··· 108 108 static int dmic_get_gain(struct snd_kcontrol *kcontrol, 109 109 struct snd_ctl_elem_value *ucontrol) 110 110 { 111 - struct snd_soc_component *component = 112 - snd_soc_kcontrol_component(kcontrol); 111 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 113 112 struct cros_ec_codec_priv *priv = 114 113 snd_soc_component_get_drvdata(component); 115 114 struct ec_param_ec_codec_dmic p; ··· 139 140 static int dmic_put_gain(struct snd_kcontrol *kcontrol, 140 141 struct snd_ctl_elem_value *ucontrol) 141 142 { 142 - struct snd_soc_component *component = 143 - snd_soc_kcontrol_component(kcontrol); 143 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 144 144 struct cros_ec_codec_priv *priv = 145 145 snd_soc_component_get_drvdata(component); 146 146 struct soc_mixer_control *control = ··· 631 633 static int wov_enable_get(struct snd_kcontrol *kcontrol, 632 634 struct snd_ctl_elem_value *ucontrol) 633 635 { 634 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 636 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 635 637 struct cros_ec_codec_priv *priv = snd_soc_component_get_drvdata(c); 636 638 637 639 ucontrol->value.integer.value[0] = priv->wov_enabled; ··· 641 643 static int wov_enable_put(struct snd_kcontrol *kcontrol, 642 644 struct snd_ctl_elem_value *ucontrol) 643 645 { 644 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 646 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 645 647 struct cros_ec_codec_priv *priv = snd_soc_component_get_drvdata(c); 646 648 int enabled = ucontrol->value.integer.value[0]; 647 649 struct ec_param_ec_codec_wov p;
+2 -4
sound/soc/codecs/cs35l36.c
··· 455 455 static int cs35l36_ldm_sel_get(struct snd_kcontrol *kcontrol, 456 456 struct snd_ctl_elem_value *ucontrol) 457 457 { 458 - struct snd_soc_component *component = 459 - snd_soc_kcontrol_component(kcontrol); 458 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 460 459 struct cs35l36_private *cs35l36 = 461 460 snd_soc_component_get_drvdata(component); 462 461 ··· 467 468 static int cs35l36_ldm_sel_put(struct snd_kcontrol *kcontrol, 468 469 struct snd_ctl_elem_value *ucontrol) 469 470 { 470 - struct snd_soc_component *component = 471 - snd_soc_kcontrol_component(kcontrol); 471 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 472 472 struct cs35l36_private *cs35l36 = 473 473 snd_soc_component_get_drvdata(component); 474 474 int val = (ucontrol->value.integer.value[0]) ? CS35L36_NG_AMP_EN_MASK :
+2 -4
sound/soc/codecs/cs35l45.c
··· 198 198 static int cs35l45_amplifier_mode_get(struct snd_kcontrol *kcontrol, 199 199 struct snd_ctl_elem_value *ucontrol) 200 200 { 201 - struct snd_soc_component *component = 202 - snd_soc_kcontrol_component(kcontrol); 201 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 203 202 struct cs35l45_private *cs35l45 = 204 203 snd_soc_component_get_drvdata(component); 205 204 ··· 210 211 static int cs35l45_amplifier_mode_put(struct snd_kcontrol *kcontrol, 211 212 struct snd_ctl_elem_value *ucontrol) 212 213 { 213 - struct snd_soc_component *component = 214 - snd_soc_kcontrol_component(kcontrol); 214 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 215 215 struct cs35l45_private *cs35l45 = 216 216 snd_soc_component_get_drvdata(component); 217 217 struct snd_soc_dapm_context *dapm =
+1 -1
sound/soc/codecs/cs4234.c
··· 85 85 static int cs4234_dac14_grp_delay_put(struct snd_kcontrol *kctrl, 86 86 struct snd_ctl_elem_value *uctrl) 87 87 { 88 - struct snd_soc_component *component = snd_soc_kcontrol_component(kctrl); 88 + struct snd_soc_component *component = snd_kcontrol_chip(kctrl); 89 89 struct cs4234 *cs4234 = snd_soc_component_get_drvdata(component); 90 90 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 91 91 unsigned int val = 0;
+1 -1
sound/soc/codecs/cs4270.c
··· 433 433 static int cs4270_soc_put_mute(struct snd_kcontrol *kcontrol, 434 434 struct snd_ctl_elem_value *ucontrol) 435 435 { 436 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 436 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 437 437 struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); 438 438 int left = !ucontrol->value.integer.value[0]; 439 439 int right = !ucontrol->value.integer.value[1];
+2 -2
sound/soc/codecs/cs4271.c
··· 276 276 static int cs4271_get_deemph(struct snd_kcontrol *kcontrol, 277 277 struct snd_ctl_elem_value *ucontrol) 278 278 { 279 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 279 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 280 280 struct cs4271_private *cs4271 = snd_soc_component_get_drvdata(component); 281 281 282 282 ucontrol->value.integer.value[0] = cs4271->deemph; ··· 286 286 static int cs4271_put_deemph(struct snd_kcontrol *kcontrol, 287 287 struct snd_ctl_elem_value *ucontrol) 288 288 { 289 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 289 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 290 290 struct cs4271_private *cs4271 = snd_soc_component_get_drvdata(component); 291 291 292 292 cs4271->deemph = ucontrol->value.integer.value[0];
+1 -1
sound/soc/codecs/cs42l42.c
··· 403 403 static int cs42l42_slow_start_put(struct snd_kcontrol *kcontrol, 404 404 struct snd_ctl_elem_value *ucontrol) 405 405 { 406 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 406 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 407 407 u8 val; 408 408 409 409 /* all bits of SLOW_START_EN must change together */
+2 -2
sound/soc/codecs/cs42l43-jack.c
··· 866 866 867 867 int cs42l43_jack_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 868 868 { 869 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 869 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 870 870 struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); 871 871 872 872 mutex_lock(&priv->jack_lock); ··· 878 878 879 879 int cs42l43_jack_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 880 880 { 881 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 881 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 882 882 struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); 883 883 struct cs42l43 *cs42l43 = priv->core; 884 884 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
+9 -9
sound/soc/codecs/cs42l43.c
··· 949 949 static int cs42l43_dapm_get_volsw(struct snd_kcontrol *kcontrol, 950 950 struct snd_ctl_elem_value *ucontrol) 951 951 { 952 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 952 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 953 953 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 954 954 int ret; 955 955 ··· 963 963 static int cs42l43_dapm_put_volsw(struct snd_kcontrol *kcontrol, 964 964 struct snd_ctl_elem_value *ucontrol) 965 965 { 966 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 966 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 967 967 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 968 968 int ret; 969 969 ··· 977 977 static int cs42l43_dapm_get_enum(struct snd_kcontrol *kcontrol, 978 978 struct snd_ctl_elem_value *ucontrol) 979 979 { 980 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 980 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 981 981 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 982 982 int ret; 983 983 ··· 991 991 static int cs42l43_dapm_put_enum(struct snd_kcontrol *kcontrol, 992 992 struct snd_ctl_elem_value *ucontrol) 993 993 { 994 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 994 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 995 995 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 996 996 int ret; 997 997 ··· 1005 1005 static int cs42l43_eq_get(struct snd_kcontrol *kcontrol, 1006 1006 struct snd_ctl_elem_value *ucontrol) 1007 1007 { 1008 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1008 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1009 1009 struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); 1010 1010 1011 1011 memcpy(ucontrol->value.integer.value, priv->eq_coeffs, sizeof(priv->eq_coeffs)); ··· 1016 1016 static int cs42l43_eq_put(struct snd_kcontrol *kcontrol, 1017 1017 struct snd_ctl_elem_value *ucontrol) 1018 1018 { 1019 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1019 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1020 1020 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 1021 1021 struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); 1022 1022 ··· 1088 1088 static int cs42l43_decim_get(struct snd_kcontrol *kcontrol, 1089 1089 struct snd_ctl_elem_value *ucontrol) 1090 1090 { 1091 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1091 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1092 1092 struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); 1093 1093 int ret; 1094 1094 ··· 1104 1104 static int cs42l43_spk_get(struct snd_kcontrol *kcontrol, 1105 1105 struct snd_ctl_elem_value *ucontrol) 1106 1106 { 1107 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1107 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1108 1108 struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); 1109 1109 int ret; 1110 1110 ··· 1120 1120 static int cs42l43_spk_put(struct snd_kcontrol *kcontrol, 1121 1121 struct snd_ctl_elem_value *ucontrol) 1122 1122 { 1123 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1123 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1124 1124 struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); 1125 1125 int ret; 1126 1126
+2 -2
sound/soc/codecs/cs42l51.c
··· 57 57 static int cs42l51_get_chan_mix(struct snd_kcontrol *kcontrol, 58 58 struct snd_ctl_elem_value *ucontrol) 59 59 { 60 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 60 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 61 61 unsigned long value = snd_soc_component_read(component, CS42L51_PCM_MIXER)&3; 62 62 63 63 switch (value) { ··· 85 85 static int cs42l51_set_chan_mix(struct snd_kcontrol *kcontrol, 86 86 struct snd_ctl_elem_value *ucontrol) 87 87 { 88 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 88 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 89 89 unsigned char val; 90 90 91 91 switch (ucontrol->value.enumerated.item[0]) {
+2 -2
sound/soc/codecs/cs42l84.c
··· 84 84 static int cs42l84_put_dac_vol(struct snd_kcontrol *kctl, 85 85 struct snd_ctl_elem_value *val) 86 86 { 87 - struct snd_soc_component *component = snd_soc_kcontrol_component(kctl); 87 + struct snd_soc_component *component = snd_kcontrol_chip(kctl); 88 88 struct soc_mixer_control *mc = (struct soc_mixer_control *) kctl->private_value; 89 89 int vola, volb; 90 90 int ret, ret2, updated = 0; ··· 138 138 static int cs42l84_get_dac_vol(struct snd_kcontrol *kctl, 139 139 struct snd_ctl_elem_value *val) 140 140 { 141 - struct snd_soc_component *component = snd_soc_kcontrol_component(kctl); 141 + struct snd_soc_component *component = snd_kcontrol_chip(kctl); 142 142 struct soc_mixer_control *mc = (struct soc_mixer_control *) kctl->private_value; 143 143 int vola, volb; 144 144 int ret;
+1 -1
sound/soc/codecs/cs43130.c
··· 1062 1062 { 1063 1063 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 1064 1064 unsigned int *item = ucontrol->value.enumerated.item; 1065 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1065 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1066 1066 struct cs43130_private *cs43130 = snd_soc_component_get_drvdata(component); 1067 1067 unsigned int val; 1068 1068
+2 -4
sound/soc/codecs/cs47l15.c
··· 106 106 static int cs47l15_in1_adc_get(struct snd_kcontrol *kcontrol, 107 107 struct snd_ctl_elem_value *ucontrol) 108 108 { 109 - struct snd_soc_component *component = 110 - snd_soc_kcontrol_component(kcontrol); 109 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 111 110 struct cs47l15 *cs47l15 = snd_soc_component_get_drvdata(component); 112 111 113 112 ucontrol->value.integer.value[0] = !!cs47l15->in1_lp_mode; ··· 117 118 static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol, 118 119 struct snd_ctl_elem_value *ucontrol) 119 120 { 120 - struct snd_soc_component *component = 121 - snd_soc_kcontrol_component(kcontrol); 121 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 122 122 struct cs47l15 *cs47l15 = snd_soc_component_get_drvdata(component); 123 123 124 124 if (!!ucontrol->value.integer.value[0] == cs47l15->in1_lp_mode)
+11 -11
sound/soc/codecs/cs48l32.c
··· 231 231 232 232 static int cs48l32_rate_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 233 233 { 234 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 234 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 235 235 struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component); 236 236 int ret; 237 237 ··· 704 704 static int cs48l32_in_rate_put(struct snd_kcontrol *kcontrol, 705 705 struct snd_ctl_elem_value *ucontrol) 706 706 { 707 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 707 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 708 708 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 709 709 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 710 710 int ret; ··· 755 755 struct snd_ctl_elem_value *ucontrol) 756 756 { 757 757 struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; 758 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 758 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 759 759 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 760 760 int ret; 761 761 ··· 912 912 static int cs48l32_lhpf_coeff_put(struct snd_kcontrol *kcontrol, 913 913 struct snd_ctl_elem_value *ucontrol) 914 914 { 915 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 915 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 916 916 struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component); 917 917 __be32 *data = (__be32 *)ucontrol->value.bytes.data; 918 918 s16 val = (s16)be32_to_cpu(*data); ··· 947 947 static int cs48l32_eq_mode_get(struct snd_kcontrol *kcontrol, 948 948 struct snd_ctl_elem_value *ucontrol) 949 949 { 950 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 950 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 951 951 struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component); 952 952 struct soc_enum *e = (struct soc_enum *) kcontrol->private_value; 953 953 unsigned int item; ··· 961 961 static int cs48l32_eq_mode_put(struct snd_kcontrol *kcontrol, 962 962 struct snd_ctl_elem_value *ucontrol) 963 963 { 964 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 964 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 965 965 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 966 966 struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component); 967 967 struct soc_enum *e = (struct soc_enum *) kcontrol->private_value; ··· 1000 1000 static int cs48l32_eq_coeff_get(struct snd_kcontrol *kcontrol, 1001 1001 struct snd_ctl_elem_value *ucontrol) 1002 1002 { 1003 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1003 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1004 1004 struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component); 1005 1005 struct cs48l32_eq_control *params = (void *)kcontrol->private_value; 1006 1006 __be16 *coeffs; ··· 1025 1025 static int cs48l32_eq_coeff_put(struct snd_kcontrol *kcontrol, 1026 1026 struct snd_ctl_elem_value *ucontrol) 1027 1027 { 1028 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1028 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1029 1029 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 1030 1030 struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component); 1031 1031 struct cs48l32_eq_control *params = (void *)kcontrol->private_value; ··· 1062 1062 static int cs48l32_dsp_rate_get(struct snd_kcontrol *kcontrol, 1063 1063 struct snd_ctl_elem_value *ucontrol) 1064 1064 { 1065 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1065 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1066 1066 struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component); 1067 1067 struct soc_enum *e = (struct soc_enum *) kcontrol->private_value; 1068 1068 unsigned int cached_rate; ··· 1082 1082 static int cs48l32_dsp_rate_put(struct snd_kcontrol *kcontrol, 1083 1083 struct snd_ctl_elem_value *ucontrol) 1084 1084 { 1085 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1085 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1086 1086 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 1087 1087 struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component); 1088 1088 struct soc_enum *e = (struct soc_enum *) kcontrol->private_value; ··· 2465 2465 static int cs48l32_in_put_volsw(struct snd_kcontrol *kcontrol, 2466 2466 struct snd_ctl_elem_value *ucontrol) 2467 2467 { 2468 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2468 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2469 2469 struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component); 2470 2470 int ret; 2471 2471
+1 -1
sound/soc/codecs/cs530x.c
··· 106 106 static int cs530x_put_volsw_vu(struct snd_kcontrol *kcontrol, 107 107 struct snd_ctl_elem_value *ucontrol) 108 108 { 109 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 109 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 110 110 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 111 111 struct cs530x_priv *cs530x = snd_soc_component_get_drvdata(component); 112 112 struct regmap *regmap = cs530x->regmap;
+2 -2
sound/soc/codecs/da7210.c
··· 326 326 static int da7210_put_alc_sw(struct snd_kcontrol *kcontrol, 327 327 struct snd_ctl_elem_value *ucontrol) 328 328 { 329 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 329 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 330 330 331 331 if (ucontrol->value.integer.value[0]) { 332 332 /* Check if noise suppression is enabled */ ··· 349 349 static int da7210_put_noise_sup_sw(struct snd_kcontrol *kcontrol, 350 350 struct snd_ctl_elem_value *ucontrol) 351 351 { 352 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 352 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 353 353 u8 val; 354 354 355 355 if (ucontrol->value.integer.value[0]) {
+8 -8
sound/soc/codecs/da7213.c
··· 214 214 static int da7213_volsw_locked_get(struct snd_kcontrol *kcontrol, 215 215 struct snd_ctl_elem_value *ucontrol) 216 216 { 217 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 217 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 218 218 struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); 219 219 int ret; 220 220 ··· 228 228 static int da7213_volsw_locked_put(struct snd_kcontrol *kcontrol, 229 229 struct snd_ctl_elem_value *ucontrol) 230 230 { 231 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 231 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 232 232 struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); 233 233 int ret; 234 234 ··· 242 242 static int da7213_enum_locked_get(struct snd_kcontrol *kcontrol, 243 243 struct snd_ctl_elem_value *ucontrol) 244 244 { 245 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 245 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 246 246 struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); 247 247 int ret; 248 248 ··· 256 256 static int da7213_enum_locked_put(struct snd_kcontrol *kcontrol, 257 257 struct snd_ctl_elem_value *ucontrol) 258 258 { 259 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 259 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 260 260 struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); 261 261 int ret; 262 262 ··· 420 420 static int da7213_put_mixin_gain(struct snd_kcontrol *kcontrol, 421 421 struct snd_ctl_elem_value *ucontrol) 422 422 { 423 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 423 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 424 424 struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); 425 425 int ret; 426 426 ··· 436 436 static int da7213_put_alc_sw(struct snd_kcontrol *kcontrol, 437 437 struct snd_ctl_elem_value *ucontrol) 438 438 { 439 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 439 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 440 440 struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); 441 441 442 442 /* Force ALC offset calibration if enabling ALC */ ··· 457 457 static int da7213_tonegen_freq_get(struct snd_kcontrol *kcontrol, 458 458 struct snd_ctl_elem_value *ucontrol) 459 459 { 460 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 460 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 461 461 struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); 462 462 struct soc_mixer_control *mixer_ctrl = 463 463 (struct soc_mixer_control *) kcontrol->private_value; ··· 484 484 static int da7213_tonegen_freq_put(struct snd_kcontrol *kcontrol, 485 485 struct snd_ctl_elem_value *ucontrol) 486 486 { 487 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 487 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 488 488 struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); 489 489 struct soc_mixer_control *mixer_ctrl = 490 490 (struct soc_mixer_control *) kcontrol->private_value;
+8 -8
sound/soc/codecs/da7218.c
··· 425 425 static int da7218_mixin_gain_put(struct snd_kcontrol *kcontrol, 426 426 struct snd_ctl_elem_value *ucontrol) 427 427 { 428 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 428 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 429 429 struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); 430 430 int ret; 431 431 ··· 446 446 { 447 447 struct soc_mixer_control *mc = 448 448 (struct soc_mixer_control *) kcontrol->private_value; 449 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 449 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 450 450 struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); 451 451 unsigned int lvalue = ucontrol->value.integer.value[0]; 452 452 unsigned int rvalue = ucontrol->value.integer.value[1]; ··· 469 469 static int da7218_tonegen_freq_get(struct snd_kcontrol *kcontrol, 470 470 struct snd_ctl_elem_value *ucontrol) 471 471 { 472 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 472 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 473 473 struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); 474 474 struct soc_mixer_control *mixer_ctrl = 475 475 (struct soc_mixer_control *) kcontrol->private_value; ··· 493 493 static int da7218_tonegen_freq_put(struct snd_kcontrol *kcontrol, 494 494 struct snd_ctl_elem_value *ucontrol) 495 495 { 496 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 496 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 497 497 struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); 498 498 struct soc_mixer_control *mixer_ctrl = 499 499 (struct soc_mixer_control *) kcontrol->private_value; ··· 513 513 static int da7218_mic_lvl_det_sw_put(struct snd_kcontrol *kcontrol, 514 514 struct snd_ctl_elem_value *ucontrol) 515 515 { 516 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 516 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 517 517 struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); 518 518 struct soc_mixer_control *mixer_ctrl = 519 519 (struct soc_mixer_control *) kcontrol->private_value; ··· 540 540 static int da7218_mic_lvl_det_sw_get(struct snd_kcontrol *kcontrol, 541 541 struct snd_ctl_elem_value *ucontrol) 542 542 { 543 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 543 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 544 544 struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); 545 545 struct soc_mixer_control *mixer_ctrl = 546 546 (struct soc_mixer_control *) kcontrol->private_value; ··· 560 560 static int da7218_biquad_coeff_get(struct snd_kcontrol *kcontrol, 561 561 struct snd_ctl_elem_value *ucontrol) 562 562 { 563 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 563 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 564 564 struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); 565 565 struct soc_bytes_ext *bytes_ext = 566 566 (struct soc_bytes_ext *) kcontrol->private_value; ··· 585 585 static int da7218_biquad_coeff_put(struct snd_kcontrol *kcontrol, 586 586 struct snd_ctl_elem_value *ucontrol) 587 587 { 588 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 588 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 589 589 struct da7218_priv *da7218 = snd_soc_component_get_drvdata(component); 590 590 struct soc_bytes_ext *bytes_ext = 591 591 (struct soc_bytes_ext *) kcontrol->private_value;
+8 -8
sound/soc/codecs/da7219.c
··· 254 254 static int da7219_volsw_locked_get(struct snd_kcontrol *kcontrol, 255 255 struct snd_ctl_elem_value *ucontrol) 256 256 { 257 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 257 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 258 258 struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component); 259 259 int ret; 260 260 ··· 268 268 static int da7219_volsw_locked_put(struct snd_kcontrol *kcontrol, 269 269 struct snd_ctl_elem_value *ucontrol) 270 270 { 271 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 271 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 272 272 struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component); 273 273 int ret; 274 274 ··· 282 282 static int da7219_enum_locked_get(struct snd_kcontrol *kcontrol, 283 283 struct snd_ctl_elem_value *ucontrol) 284 284 { 285 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 285 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 286 286 struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component); 287 287 int ret; 288 288 ··· 296 296 static int da7219_enum_locked_put(struct snd_kcontrol *kcontrol, 297 297 struct snd_ctl_elem_value *ucontrol) 298 298 { 299 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 299 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 300 300 struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component); 301 301 int ret; 302 302 ··· 376 376 static int da7219_mixin_gain_put(struct snd_kcontrol *kcontrol, 377 377 struct snd_ctl_elem_value *ucontrol) 378 378 { 379 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 379 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 380 380 struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component); 381 381 int ret; 382 382 ··· 395 395 static int da7219_alc_sw_put(struct snd_kcontrol *kcontrol, 396 396 struct snd_ctl_elem_value *ucontrol) 397 397 { 398 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 398 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 399 399 struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component); 400 400 401 401 ··· 414 414 static int da7219_tonegen_freq_get(struct snd_kcontrol *kcontrol, 415 415 struct snd_ctl_elem_value *ucontrol) 416 416 { 417 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 417 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 418 418 struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component); 419 419 struct soc_mixer_control *mixer_ctrl = 420 420 (struct soc_mixer_control *) kcontrol->private_value; ··· 441 441 static int da7219_tonegen_freq_put(struct snd_kcontrol *kcontrol, 442 442 struct snd_ctl_elem_value *ucontrol) 443 443 { 444 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 444 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 445 445 struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component); 446 446 struct soc_mixer_control *mixer_ctrl = 447 447 (struct soc_mixer_control *) kcontrol->private_value;
+2 -2
sound/soc/codecs/da732x.c
··· 323 323 static int da732x_hpf_set(struct snd_kcontrol *kcontrol, 324 324 struct snd_ctl_elem_value *ucontrol) 325 325 { 326 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 326 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 327 327 struct soc_enum *enum_ctrl = (struct soc_enum *)kcontrol->private_value; 328 328 unsigned int reg = enum_ctrl->reg; 329 329 unsigned int sel = ucontrol->value.enumerated.item[0]; ··· 351 351 static int da732x_hpf_get(struct snd_kcontrol *kcontrol, 352 352 struct snd_ctl_elem_value *ucontrol) 353 353 { 354 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 354 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 355 355 struct soc_enum *enum_ctrl = (struct soc_enum *)kcontrol->private_value; 356 356 unsigned int reg = enum_ctrl->reg; 357 357 int val;
+1 -1
sound/soc/codecs/da9055.c
··· 476 476 static int da9055_put_alc_sw(struct snd_kcontrol *kcontrol, 477 477 struct snd_ctl_elem_value *ucontrol) 478 478 { 479 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 479 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 480 480 u8 reg_val, adc_left, adc_right, mic_left, mic_right; 481 481 int avg_left_data, avg_right_data, offset_l, offset_r; 482 482
+2 -2
sound/soc/codecs/es8328.c
··· 142 142 static int es8328_get_deemph(struct snd_kcontrol *kcontrol, 143 143 struct snd_ctl_elem_value *ucontrol) 144 144 { 145 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 145 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 146 146 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); 147 147 148 148 ucontrol->value.integer.value[0] = es8328->deemph; ··· 152 152 static int es8328_put_deemph(struct snd_kcontrol *kcontrol, 153 153 struct snd_ctl_elem_value *ucontrol) 154 154 { 155 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 155 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 156 156 struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component); 157 157 unsigned int deemph = ucontrol->value.integer.value[0]; 158 158 int ret;
+1 -1
sound/soc/codecs/fs210x.c
··· 924 924 return -EINVAL; 925 925 } 926 926 927 - cmpnt = snd_soc_kcontrol_component(kctrl); 927 + cmpnt = snd_kcontrol_chip(kctrl); 928 928 if (!cmpnt) { 929 929 pr_err("fs210x: component is null\n"); 930 930 return -EINVAL;
+4 -4
sound/soc/codecs/idt821034.c
··· 402 402 struct snd_ctl_elem_value *ucontrol) 403 403 { 404 404 struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; 405 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 405 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 406 406 struct idt821034 *idt821034 = snd_soc_component_get_drvdata(component); 407 407 int min = mc->min; 408 408 int max = mc->max; ··· 433 433 struct snd_ctl_elem_value *ucontrol) 434 434 { 435 435 struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; 436 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 436 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 437 437 struct idt821034 *idt821034 = snd_soc_component_get_drvdata(component); 438 438 struct idt821034_amp *amp; 439 439 int min = mc->min; ··· 487 487 static int idt821034_kctrl_mute_get(struct snd_kcontrol *kcontrol, 488 488 struct snd_ctl_elem_value *ucontrol) 489 489 { 490 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 490 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 491 491 struct idt821034 *idt821034 = snd_soc_component_get_drvdata(component); 492 492 int id = kcontrol->private_value; 493 493 bool is_muted; ··· 509 509 static int idt821034_kctrl_mute_put(struct snd_kcontrol *kcontrol, 510 510 struct snd_ctl_elem_value *ucontrol) 511 511 { 512 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 512 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 513 513 struct idt821034 *idt821034 = snd_soc_component_get_drvdata(component); 514 514 int id = kcontrol->private_value; 515 515 struct idt821034_amp *amp;
+14 -17
sound/soc/codecs/lpass-rx-macro.c
··· 2434 2434 static int rx_macro_get_compander(struct snd_kcontrol *kcontrol, 2435 2435 struct snd_ctl_elem_value *ucontrol) 2436 2436 { 2437 - struct snd_soc_component *component = 2438 - snd_soc_kcontrol_component(kcontrol); 2437 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2439 2438 int comp = ((struct soc_mixer_control *) kcontrol->private_value)->shift; 2440 2439 struct rx_macro *rx = snd_soc_component_get_drvdata(component); 2441 2440 ··· 2445 2446 static int rx_macro_set_compander(struct snd_kcontrol *kcontrol, 2446 2447 struct snd_ctl_elem_value *ucontrol) 2447 2448 { 2448 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2449 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2449 2450 int comp = ((struct soc_mixer_control *) kcontrol->private_value)->shift; 2450 2451 int value = ucontrol->value.integer.value[0]; 2451 2452 struct rx_macro *rx = snd_soc_component_get_drvdata(component); ··· 2547 2548 static int rx_macro_get_ear_mode(struct snd_kcontrol *kcontrol, 2548 2549 struct snd_ctl_elem_value *ucontrol) 2549 2550 { 2550 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2551 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2551 2552 struct rx_macro *rx = snd_soc_component_get_drvdata(component); 2552 2553 2553 2554 ucontrol->value.integer.value[0] = rx->is_ear_mode_on; ··· 2557 2558 static int rx_macro_put_ear_mode(struct snd_kcontrol *kcontrol, 2558 2559 struct snd_ctl_elem_value *ucontrol) 2559 2560 { 2560 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2561 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2561 2562 struct rx_macro *rx = snd_soc_component_get_drvdata(component); 2562 2563 2563 2564 rx->is_ear_mode_on = (!ucontrol->value.integer.value[0] ? false : true); ··· 2567 2568 static int rx_macro_get_hph_hd2_mode(struct snd_kcontrol *kcontrol, 2568 2569 struct snd_ctl_elem_value *ucontrol) 2569 2570 { 2570 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2571 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2571 2572 struct rx_macro *rx = snd_soc_component_get_drvdata(component); 2572 2573 2573 2574 ucontrol->value.integer.value[0] = rx->hph_hd2_mode; ··· 2577 2578 static int rx_macro_put_hph_hd2_mode(struct snd_kcontrol *kcontrol, 2578 2579 struct snd_ctl_elem_value *ucontrol) 2579 2580 { 2580 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2581 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2581 2582 struct rx_macro *rx = snd_soc_component_get_drvdata(component); 2582 2583 2583 2584 rx->hph_hd2_mode = ucontrol->value.integer.value[0]; ··· 2587 2588 static int rx_macro_get_hph_pwr_mode(struct snd_kcontrol *kcontrol, 2588 2589 struct snd_ctl_elem_value *ucontrol) 2589 2590 { 2590 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2591 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2591 2592 struct rx_macro *rx = snd_soc_component_get_drvdata(component); 2592 2593 2593 2594 ucontrol->value.enumerated.item[0] = rx->hph_pwr_mode; ··· 2597 2598 static int rx_macro_put_hph_pwr_mode(struct snd_kcontrol *kcontrol, 2598 2599 struct snd_ctl_elem_value *ucontrol) 2599 2600 { 2600 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2601 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2601 2602 struct rx_macro *rx = snd_soc_component_get_drvdata(component); 2602 2603 2603 2604 rx->hph_pwr_mode = ucontrol->value.enumerated.item[0]; ··· 2607 2608 static int rx_macro_soft_clip_enable_get(struct snd_kcontrol *kcontrol, 2608 2609 struct snd_ctl_elem_value *ucontrol) 2609 2610 { 2610 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2611 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2611 2612 struct rx_macro *rx = snd_soc_component_get_drvdata(component); 2612 2613 2613 2614 ucontrol->value.integer.value[0] = rx->is_softclip_on; ··· 2618 2619 static int rx_macro_soft_clip_enable_put(struct snd_kcontrol *kcontrol, 2619 2620 struct snd_ctl_elem_value *ucontrol) 2620 2621 { 2621 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2622 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2622 2623 struct rx_macro *rx = snd_soc_component_get_drvdata(component); 2623 2624 2624 2625 rx->is_softclip_on = ucontrol->value.integer.value[0]; ··· 2629 2630 static int rx_macro_aux_hpf_mode_get(struct snd_kcontrol *kcontrol, 2630 2631 struct snd_ctl_elem_value *ucontrol) 2631 2632 { 2632 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2633 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2633 2634 struct rx_macro *rx = snd_soc_component_get_drvdata(component); 2634 2635 2635 2636 ucontrol->value.integer.value[0] = rx->is_aux_hpf_on; ··· 2640 2641 static int rx_macro_aux_hpf_mode_put(struct snd_kcontrol *kcontrol, 2641 2642 struct snd_ctl_elem_value *ucontrol) 2642 2643 { 2643 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2644 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2644 2645 struct rx_macro *rx = snd_soc_component_get_drvdata(component); 2645 2646 2646 2647 rx->is_aux_hpf_on = ucontrol->value.integer.value[0]; ··· 2929 2930 struct snd_kcontrol *kcontrol, 2930 2931 struct snd_ctl_elem_value *ucontrol) 2931 2932 { 2932 - struct snd_soc_component *component = 2933 - snd_soc_kcontrol_component(kcontrol); 2933 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2934 2934 struct wcd_iir_filter_ctl *ctl = 2935 2935 (struct wcd_iir_filter_ctl *)kcontrol->private_value; 2936 2936 struct soc_bytes_ext *params = &ctl->bytes_ext; ··· 2957 2959 static int rx_macro_get_iir_band_audio_mixer(struct snd_kcontrol *kcontrol, 2958 2960 struct snd_ctl_elem_value *ucontrol) 2959 2961 { 2960 - struct snd_soc_component *component = 2961 - snd_soc_kcontrol_component(kcontrol); 2962 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2962 2963 struct wcd_iir_filter_ctl *ctl = 2963 2964 (struct wcd_iir_filter_ctl *)kcontrol->private_value; 2964 2965 struct soc_bytes_ext *params = &ctl->bytes_ext;
+4 -4
sound/soc/codecs/lpass-tx-macro.c
··· 1070 1070 static int tx_macro_dec_mode_get(struct snd_kcontrol *kcontrol, 1071 1071 struct snd_ctl_elem_value *ucontrol) 1072 1072 { 1073 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1073 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1074 1074 struct tx_macro *tx = snd_soc_component_get_drvdata(component); 1075 1075 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 1076 1076 int path = e->shift_l; ··· 1083 1083 static int tx_macro_dec_mode_put(struct snd_kcontrol *kcontrol, 1084 1084 struct snd_ctl_elem_value *ucontrol) 1085 1085 { 1086 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1086 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1087 1087 int value = ucontrol->value.integer.value[0]; 1088 1088 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 1089 1089 int path = e->shift_l; ··· 1100 1100 static int tx_macro_get_bcs(struct snd_kcontrol *kcontrol, 1101 1101 struct snd_ctl_elem_value *ucontrol) 1102 1102 { 1103 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1103 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1104 1104 struct tx_macro *tx = snd_soc_component_get_drvdata(component); 1105 1105 1106 1106 ucontrol->value.integer.value[0] = tx->bcs_enable; ··· 1111 1111 static int tx_macro_set_bcs(struct snd_kcontrol *kcontrol, 1112 1112 struct snd_ctl_elem_value *ucontrol) 1113 1113 { 1114 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1114 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1115 1115 int value = ucontrol->value.integer.value[0]; 1116 1116 struct tx_macro *tx = snd_soc_component_get_drvdata(component); 1117 1117
+2 -2
sound/soc/codecs/lpass-va-macro.c
··· 827 827 static int va_macro_dec_mode_get(struct snd_kcontrol *kcontrol, 828 828 struct snd_ctl_elem_value *ucontrol) 829 829 { 830 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 830 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 831 831 struct va_macro *va = snd_soc_component_get_drvdata(comp); 832 832 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 833 833 int path = e->shift_l; ··· 840 840 static int va_macro_dec_mode_put(struct snd_kcontrol *kcontrol, 841 841 struct snd_ctl_elem_value *ucontrol) 842 842 { 843 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 843 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 844 844 int value = ucontrol->value.enumerated.item[0]; 845 845 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 846 846 int path = e->shift_l;
+8 -8
sound/soc/codecs/lpass-wsa-macro.c
··· 2114 2114 struct snd_ctl_elem_value *ucontrol) 2115 2115 { 2116 2116 2117 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2117 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2118 2118 int ec_tx = ((struct soc_mixer_control *) kcontrol->private_value)->shift; 2119 2119 struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); 2120 2120 ··· 2126 2126 static int wsa_macro_set_ec_hq(struct snd_kcontrol *kcontrol, 2127 2127 struct snd_ctl_elem_value *ucontrol) 2128 2128 { 2129 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2129 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2130 2130 int ec_tx = ((struct soc_mixer_control *) kcontrol->private_value)->shift; 2131 2131 int value = ucontrol->value.integer.value[0]; 2132 2132 struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); ··· 2140 2140 struct snd_ctl_elem_value *ucontrol) 2141 2141 { 2142 2142 2143 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2143 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2144 2144 int comp = ((struct soc_mixer_control *) kcontrol->private_value)->shift; 2145 2145 struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); 2146 2146 ··· 2151 2151 static int wsa_macro_set_compander(struct snd_kcontrol *kcontrol, 2152 2152 struct snd_ctl_elem_value *ucontrol) 2153 2153 { 2154 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2154 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2155 2155 int comp = ((struct soc_mixer_control *) kcontrol->private_value)->shift; 2156 2156 int value = ucontrol->value.integer.value[0]; 2157 2157 struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); ··· 2164 2164 static int wsa_macro_ear_spkr_pa_gain_get(struct snd_kcontrol *kcontrol, 2165 2165 struct snd_ctl_elem_value *ucontrol) 2166 2166 { 2167 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2167 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2168 2168 struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); 2169 2169 2170 2170 ucontrol->value.integer.value[0] = wsa->ear_spkr_gain; ··· 2175 2175 static int wsa_macro_ear_spkr_pa_gain_put(struct snd_kcontrol *kcontrol, 2176 2176 struct snd_ctl_elem_value *ucontrol) 2177 2177 { 2178 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2178 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2179 2179 struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); 2180 2180 2181 2181 wsa->ear_spkr_gain = ucontrol->value.integer.value[0]; ··· 2259 2259 static int wsa_macro_soft_clip_enable_get(struct snd_kcontrol *kcontrol, 2260 2260 struct snd_ctl_elem_value *ucontrol) 2261 2261 { 2262 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2262 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2263 2263 struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); 2264 2264 int path = ((struct soc_mixer_control *)kcontrol->private_value)->shift; 2265 2265 ··· 2271 2271 static int wsa_macro_soft_clip_enable_put(struct snd_kcontrol *kcontrol, 2272 2272 struct snd_ctl_elem_value *ucontrol) 2273 2273 { 2274 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2274 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2275 2275 struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); 2276 2276 int path = ((struct soc_mixer_control *) kcontrol->private_value)->shift; 2277 2277
+7 -14
sound/soc/codecs/madera.c
··· 873 873 static int madera_adsp_rate_get(struct snd_kcontrol *kcontrol, 874 874 struct snd_ctl_elem_value *ucontrol) 875 875 { 876 - struct snd_soc_component *component = 877 - snd_soc_kcontrol_component(kcontrol); 876 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 878 877 struct madera_priv *priv = snd_soc_component_get_drvdata(component); 879 878 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 880 879 unsigned int cached_rate; ··· 893 894 static int madera_adsp_rate_put(struct snd_kcontrol *kcontrol, 894 895 struct snd_ctl_elem_value *ucontrol) 895 896 { 896 - struct snd_soc_component *component = 897 - snd_soc_kcontrol_component(kcontrol); 897 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 898 898 struct madera_priv *priv = snd_soc_component_get_drvdata(component); 899 899 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 900 900 const int adsp_num = e->shift_l; ··· 1052 1054 int madera_rate_put(struct snd_kcontrol *kcontrol, 1053 1055 struct snd_ctl_elem_value *ucontrol) 1054 1056 { 1055 - struct snd_soc_component *component = 1056 - snd_soc_kcontrol_component(kcontrol); 1057 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1057 1058 struct madera_priv *priv = snd_soc_component_get_drvdata(component); 1058 1059 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 1059 1060 unsigned int item = ucontrol->value.enumerated.item[0]; ··· 2160 2163 int madera_dfc_put(struct snd_kcontrol *kcontrol, 2161 2164 struct snd_ctl_elem_value *ucontrol) 2162 2165 { 2163 - struct snd_soc_component *component = 2164 - snd_soc_kcontrol_component(kcontrol); 2166 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2165 2167 struct snd_soc_dapm_context *dapm = 2166 2168 snd_soc_component_get_dapm(component); 2167 2169 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; ··· 2192 2196 { 2193 2197 struct soc_mixer_control *mc = 2194 2198 (struct soc_mixer_control *)kcontrol->private_value; 2195 - struct snd_soc_component *component = 2196 - snd_soc_kcontrol_component(kcontrol); 2199 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2197 2200 struct snd_soc_dapm_context *dapm = 2198 2201 snd_soc_component_get_dapm(component); 2199 2202 unsigned int val, mask; ··· 4737 4742 int madera_eq_coeff_put(struct snd_kcontrol *kcontrol, 4738 4743 struct snd_ctl_elem_value *ucontrol) 4739 4744 { 4740 - struct snd_soc_component *component = 4741 - snd_soc_kcontrol_component(kcontrol); 4745 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 4742 4746 struct madera_priv *priv = snd_soc_component_get_drvdata(component); 4743 4747 struct madera *madera = priv->madera; 4744 4748 struct soc_bytes *params = (void *)kcontrol->private_value; ··· 4783 4789 int madera_lhpf_coeff_put(struct snd_kcontrol *kcontrol, 4784 4790 struct snd_ctl_elem_value *ucontrol) 4785 4791 { 4786 - struct snd_soc_component *component = 4787 - snd_soc_kcontrol_component(kcontrol); 4792 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 4788 4793 struct madera_priv *priv = snd_soc_component_get_drvdata(component); 4789 4794 struct madera *madera = priv->madera; 4790 4795 __be16 *data = (__be16 *)ucontrol->value.bytes.data;
+4 -4
sound/soc/codecs/max9759.c
··· 42 42 static int speaker_gain_control_get(struct snd_kcontrol *kcontrol, 43 43 struct snd_ctl_elem_value *ucontrol) 44 44 { 45 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 45 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 46 46 struct max9759 *priv = snd_soc_component_get_drvdata(c); 47 47 48 48 ucontrol->value.integer.value[0] = priv->gain; ··· 61 61 static int speaker_gain_control_put(struct snd_kcontrol *kcontrol, 62 62 struct snd_ctl_elem_value *ucontrol) 63 63 { 64 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 64 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 65 65 struct max9759 *priv = snd_soc_component_get_drvdata(c); 66 66 67 67 if (ucontrol->value.integer.value[0] < 0 || ··· 83 83 static int speaker_mute_get(struct snd_kcontrol *kcontrol, 84 84 struct snd_ctl_elem_value *ucontrol) 85 85 { 86 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 86 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 87 87 struct max9759 *priv = snd_soc_component_get_drvdata(c); 88 88 89 89 ucontrol->value.integer.value[0] = !priv->is_mute; ··· 94 94 static int speaker_mute_put(struct snd_kcontrol *kcontrol, 95 95 struct snd_ctl_elem_value *ucontrol) 96 96 { 97 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 97 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 98 98 struct max9759 *priv = snd_soc_component_get_drvdata(c); 99 99 100 100 priv->is_mute = !ucontrol->value.integer.value[0];
+2 -2
sound/soc/codecs/max9768.c
··· 40 40 static int max9768_get_gpio(struct snd_kcontrol *kcontrol, 41 41 struct snd_ctl_elem_value *ucontrol) 42 42 { 43 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 43 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 44 44 struct max9768 *max9768 = snd_soc_component_get_drvdata(c); 45 45 int val = gpiod_get_value_cansleep(max9768->mute); 46 46 ··· 52 52 static int max9768_set_gpio(struct snd_kcontrol *kcontrol, 53 53 struct snd_ctl_elem_value *ucontrol) 54 54 { 55 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 55 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 56 56 struct max9768 *max9768 = snd_soc_component_get_drvdata(c); 57 57 bool val = !ucontrol->value.integer.value[0]; 58 58 int ret;
+6 -6
sound/soc/codecs/max98088.c
··· 380 380 static int max98088_mic1pre_set(struct snd_kcontrol *kcontrol, 381 381 struct snd_ctl_elem_value *ucontrol) 382 382 { 383 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 383 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 384 384 struct max98088_priv *max98088 = snd_soc_component_get_drvdata(component); 385 385 unsigned int sel = ucontrol->value.integer.value[0]; 386 386 ··· 394 394 static int max98088_mic1pre_get(struct snd_kcontrol *kcontrol, 395 395 struct snd_ctl_elem_value *ucontrol) 396 396 { 397 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 397 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 398 398 struct max98088_priv *max98088 = snd_soc_component_get_drvdata(component); 399 399 400 400 ucontrol->value.integer.value[0] = max98088->mic1pre; ··· 404 404 static int max98088_mic2pre_set(struct snd_kcontrol *kcontrol, 405 405 struct snd_ctl_elem_value *ucontrol) 406 406 { 407 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 407 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 408 408 struct max98088_priv *max98088 = snd_soc_component_get_drvdata(component); 409 409 unsigned int sel = ucontrol->value.integer.value[0]; 410 410 ··· 418 418 static int max98088_mic2pre_get(struct snd_kcontrol *kcontrol, 419 419 struct snd_ctl_elem_value *ucontrol) 420 420 { 421 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 421 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 422 422 struct max98088_priv *max98088 = snd_soc_component_get_drvdata(component); 423 423 424 424 ucontrol->value.integer.value[0] = max98088->mic2pre; ··· 1500 1500 static int max98088_put_eq_enum(struct snd_kcontrol *kcontrol, 1501 1501 struct snd_ctl_elem_value *ucontrol) 1502 1502 { 1503 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1503 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1504 1504 struct max98088_priv *max98088 = snd_soc_component_get_drvdata(component); 1505 1505 struct max98088_pdata *pdata = max98088->pdata; 1506 1506 int channel = max98088_get_channel(component, kcontrol->id.name); ··· 1532 1532 static int max98088_get_eq_enum(struct snd_kcontrol *kcontrol, 1533 1533 struct snd_ctl_elem_value *ucontrol) 1534 1534 { 1535 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1535 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1536 1536 struct max98088_priv *max98088 = snd_soc_component_get_drvdata(component); 1537 1537 int channel = max98088_get_channel(component, kcontrol->id.name); 1538 1538 struct max98088_cdata *cdata;
+2 -2
sound/soc/codecs/max98090.c
··· 347 347 static int max98090_get_enab_tlv(struct snd_kcontrol *kcontrol, 348 348 struct snd_ctl_elem_value *ucontrol) 349 349 { 350 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 350 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 351 351 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); 352 352 struct soc_mixer_control *mc = 353 353 (struct soc_mixer_control *)kcontrol->private_value; ··· 387 387 static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol, 388 388 struct snd_ctl_elem_value *ucontrol) 389 389 { 390 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 390 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 391 391 struct max98090_priv *max98090 = snd_soc_component_get_drvdata(component); 392 392 struct soc_mixer_control *mc = 393 393 (struct soc_mixer_control *)kcontrol->private_value;
+8 -8
sound/soc/codecs/max98095.c
··· 350 350 static int max98095_mic1pre_set(struct snd_kcontrol *kcontrol, 351 351 struct snd_ctl_elem_value *ucontrol) 352 352 { 353 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 353 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 354 354 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); 355 355 unsigned int sel = ucontrol->value.integer.value[0]; 356 356 ··· 364 364 static int max98095_mic1pre_get(struct snd_kcontrol *kcontrol, 365 365 struct snd_ctl_elem_value *ucontrol) 366 366 { 367 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 367 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 368 368 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); 369 369 370 370 ucontrol->value.integer.value[0] = max98095->mic1pre; ··· 374 374 static int max98095_mic2pre_set(struct snd_kcontrol *kcontrol, 375 375 struct snd_ctl_elem_value *ucontrol) 376 376 { 377 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 377 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 378 378 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); 379 379 unsigned int sel = ucontrol->value.integer.value[0]; 380 380 ··· 388 388 static int max98095_mic2pre_get(struct snd_kcontrol *kcontrol, 389 389 struct snd_ctl_elem_value *ucontrol) 390 390 { 391 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 391 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 392 392 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); 393 393 394 394 ucontrol->value.integer.value[0] = max98095->mic2pre; ··· 1485 1485 static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol, 1486 1486 struct snd_ctl_elem_value *ucontrol) 1487 1487 { 1488 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1488 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1489 1489 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); 1490 1490 struct max98095_pdata *pdata = max98095->pdata; 1491 1491 int channel = max98095_get_eq_channel(kcontrol->id.name); ··· 1549 1549 static int max98095_get_eq_enum(struct snd_kcontrol *kcontrol, 1550 1550 struct snd_ctl_elem_value *ucontrol) 1551 1551 { 1552 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1552 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1553 1553 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); 1554 1554 int channel = max98095_get_eq_channel(kcontrol->id.name); 1555 1555 struct max98095_cdata *cdata; ··· 1636 1636 static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol, 1637 1637 struct snd_ctl_elem_value *ucontrol) 1638 1638 { 1639 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1639 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1640 1640 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); 1641 1641 struct max98095_pdata *pdata = max98095->pdata; 1642 1642 int channel = max98095_get_bq_channel(component, kcontrol->id.name); ··· 1697 1697 static int max98095_get_bq_enum(struct snd_kcontrol *kcontrol, 1698 1698 struct snd_ctl_elem_value *ucontrol) 1699 1699 { 1700 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1700 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1701 1701 struct max98095_priv *max98095 = snd_soc_component_get_drvdata(component); 1702 1702 int channel = max98095_get_bq_channel(component, kcontrol->id.name); 1703 1703 struct max98095_cdata *cdata;
+7 -13
sound/soc/codecs/max98390.c
··· 534 534 static int max98390_ref_rdc_put(struct snd_kcontrol *kcontrol, 535 535 struct snd_ctl_elem_value *ucontrol) 536 536 { 537 - struct snd_soc_component *component = 538 - snd_soc_kcontrol_component(kcontrol); 537 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 539 538 struct max98390_priv *max98390 = 540 539 snd_soc_component_get_drvdata(component); 541 540 ··· 553 554 static int max98390_ref_rdc_get(struct snd_kcontrol *kcontrol, 554 555 struct snd_ctl_elem_value *ucontrol) 555 556 { 556 - struct snd_soc_component *component = 557 - snd_soc_kcontrol_component(kcontrol); 557 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 558 558 struct max98390_priv *max98390 = 559 559 snd_soc_component_get_drvdata(component); 560 560 ··· 565 567 static int max98390_ambient_temp_put(struct snd_kcontrol *kcontrol, 566 568 struct snd_ctl_elem_value *ucontrol) 567 569 { 568 - struct snd_soc_component *component = 569 - snd_soc_kcontrol_component(kcontrol); 570 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 570 571 struct max98390_priv *max98390 = 571 572 snd_soc_component_get_drvdata(component); 572 573 ··· 582 585 static int max98390_ambient_temp_get(struct snd_kcontrol *kcontrol, 583 586 struct snd_ctl_elem_value *ucontrol) 584 587 { 585 - struct snd_soc_component *component = 586 - snd_soc_kcontrol_component(kcontrol); 588 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 587 589 struct max98390_priv *max98390 = 588 590 snd_soc_component_get_drvdata(component); 589 591 ··· 594 598 static int max98390_adaptive_rdc_put(struct snd_kcontrol *kcontrol, 595 599 struct snd_ctl_elem_value *ucontrol) 596 600 { 597 - struct snd_soc_component *component = 598 - snd_soc_kcontrol_component(kcontrol); 601 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 599 602 600 603 dev_warn(component->dev, "Put adaptive rdc not supported\n"); 601 604 ··· 605 610 struct snd_ctl_elem_value *ucontrol) 606 611 { 607 612 int rdc, rdc0; 608 - struct snd_soc_component *component = 609 - snd_soc_kcontrol_component(kcontrol); 613 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 610 614 struct max98390_priv *max98390 = 611 615 snd_soc_component_get_drvdata(component); 612 616 ··· 626 632 static int max98390_dsm_calib_put(struct snd_kcontrol *kcontrol, 627 633 struct snd_ctl_elem_value *ucontrol) 628 634 { 629 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 635 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 630 636 struct max98390_priv *max98390 = snd_soc_component_get_drvdata(component); 631 637 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 632 638 unsigned int rdc, rdc_cal_result, rdc_integer, rdc_factor, temp, val;
+2 -2
sound/soc/codecs/max9867.c
··· 78 78 static int max9867_filter_get(struct snd_kcontrol *kcontrol, 79 79 struct snd_ctl_elem_value *ucontrol) 80 80 { 81 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 81 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 82 82 struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); 83 83 unsigned int reg; 84 84 int ret; ··· 98 98 static int max9867_filter_set(struct snd_kcontrol *kcontrol, 99 99 struct snd_ctl_elem_value *ucontrol) 100 100 { 101 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 101 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 102 102 struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); 103 103 unsigned int reg, mode = ucontrol->value.enumerated.item[0]; 104 104 int ret;
+1 -1
sound/soc/codecs/max98925.c
··· 97 97 static int max98925_dac_event(struct snd_soc_dapm_widget *w, 98 98 struct snd_kcontrol *kcontrol, int event) 99 99 { 100 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 100 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 101 101 struct max98925_priv *max98925 = snd_soc_component_get_drvdata(component); 102 102 103 103 switch (event) {
+2 -4
sound/soc/codecs/msm8916-wcd-digital.c
··· 423 423 struct snd_ctl_elem_value *ucontrol) 424 424 { 425 425 426 - struct snd_soc_component *component = 427 - snd_soc_kcontrol_component(kcontrol); 426 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 428 427 struct wcd_iir_filter_ctl *ctl = 429 428 (struct wcd_iir_filter_ctl *)kcontrol->private_value; 430 429 struct soc_bytes_ext *params = &ctl->bytes_ext; ··· 468 469 struct snd_kcontrol *kcontrol, 469 470 struct snd_ctl_elem_value *ucontrol) 470 471 { 471 - struct snd_soc_component *component = 472 - snd_soc_kcontrol_component(kcontrol); 472 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 473 473 struct wcd_iir_filter_ctl *ctl = 474 474 (struct wcd_iir_filter_ctl *)kcontrol->private_value; 475 475 struct soc_bytes_ext *params = &ctl->bytes_ext;
+5 -6
sound/soc/codecs/mt6358.c
··· 320 320 static int mt6358_put_volsw(struct snd_kcontrol *kcontrol, 321 321 struct snd_ctl_elem_value *ucontrol) 322 322 { 323 - struct snd_soc_component *component = 324 - snd_soc_kcontrol_component(kcontrol); 323 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 325 324 struct mt6358_priv *priv = snd_soc_component_get_drvdata(component); 326 325 struct soc_mixer_control *mc = 327 326 (struct soc_mixer_control *)kcontrol->private_value; ··· 441 442 static int mt6358_get_wov(struct snd_kcontrol *kcontrol, 442 443 struct snd_ctl_elem_value *ucontrol) 443 444 { 444 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 445 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 445 446 struct mt6358_priv *priv = snd_soc_component_get_drvdata(c); 446 447 447 448 ucontrol->value.integer.value[0] = priv->wov_enabled; ··· 451 452 static int mt6358_put_wov(struct snd_kcontrol *kcontrol, 452 453 struct snd_ctl_elem_value *ucontrol) 453 454 { 454 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 455 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 455 456 struct mt6358_priv *priv = snd_soc_component_get_drvdata(c); 456 457 int enabled = ucontrol->value.integer.value[0]; 457 458 ··· 475 476 static int mt6358_dmic_mode_get(struct snd_kcontrol *kcontrol, 476 477 struct snd_ctl_elem_value *ucontrol) 477 478 { 478 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 479 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 479 480 struct mt6358_priv *priv = snd_soc_component_get_drvdata(c); 480 481 481 482 ucontrol->value.integer.value[0] = priv->dmic_one_wire_mode; ··· 487 488 static int mt6358_dmic_mode_set(struct snd_kcontrol *kcontrol, 488 489 struct snd_ctl_elem_value *ucontrol) 489 490 { 490 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 491 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 491 492 struct mt6358_priv *priv = snd_soc_component_get_drvdata(c); 492 493 int enabled = ucontrol->value.integer.value[0]; 493 494
+2 -4
sound/soc/codecs/mt6359.c
··· 367 367 static int mt6359_put_volsw(struct snd_kcontrol *kcontrol, 368 368 struct snd_ctl_elem_value *ucontrol) 369 369 { 370 - struct snd_soc_component *component = 371 - snd_soc_kcontrol_component(kcontrol); 370 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 372 371 struct mt6359_priv *priv = snd_soc_component_get_drvdata(component); 373 372 struct soc_mixer_control *mc = 374 373 (struct soc_mixer_control *)kcontrol->private_value; ··· 467 468 static int mt6359_get_playback_volsw(struct snd_kcontrol *kcontrol, 468 469 struct snd_ctl_elem_value *ucontrol) 469 470 { 470 - struct snd_soc_component *component = 471 - snd_soc_kcontrol_component(kcontrol); 471 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 472 472 struct mt6359_priv *priv = snd_soc_component_get_drvdata(component); 473 473 struct soc_mixer_control *mc = 474 474 (struct soc_mixer_control *)kcontrol->private_value;
+1 -2
sound/soc/codecs/mt6660.c
··· 187 187 static int mt6660_component_get_volsw(struct snd_kcontrol *kcontrol, 188 188 struct snd_ctl_elem_value *ucontrol) 189 189 { 190 - struct snd_soc_component *component = 191 - snd_soc_kcontrol_component(kcontrol); 190 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 192 191 struct mt6660_chip *chip = (struct mt6660_chip *) 193 192 snd_soc_component_get_drvdata(component); 194 193
+2 -2
sound/soc/codecs/nau8810.c
··· 164 164 static int nau8810_eq_get(struct snd_kcontrol *kcontrol, 165 165 struct snd_ctl_elem_value *ucontrol) 166 166 { 167 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 167 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 168 168 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); 169 169 struct soc_bytes_ext *params = (void *)kcontrol->private_value; 170 170 int i, reg, reg_val; ··· 196 196 static int nau8810_eq_put(struct snd_kcontrol *kcontrol, 197 197 struct snd_ctl_elem_value *ucontrol) 198 198 { 199 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 199 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 200 200 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); 201 201 struct soc_bytes_ext *params = (void *)kcontrol->private_value; 202 202 void *data;
+2 -4
sound/soc/codecs/nau8822.c
··· 180 180 static int nau8822_eq_get(struct snd_kcontrol *kcontrol, 181 181 struct snd_ctl_elem_value *ucontrol) 182 182 { 183 - struct snd_soc_component *component = 184 - snd_soc_kcontrol_component(kcontrol); 183 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 185 184 struct soc_bytes_ext *params = (void *)kcontrol->private_value; 186 185 int i, reg; 187 186 u16 reg_val, *val; ··· 211 212 static int nau8822_eq_put(struct snd_kcontrol *kcontrol, 212 213 struct snd_ctl_elem_value *ucontrol) 213 214 { 214 - struct snd_soc_component *component = 215 - snd_soc_kcontrol_component(kcontrol); 215 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 216 216 struct soc_bytes_ext *params = (void *)kcontrol->private_value; 217 217 void *data; 218 218 u16 *val, value;
+2 -2
sound/soc/codecs/ntp8835.c
··· 92 92 static int ntp8835_mute_get(struct snd_kcontrol *kcontrol, 93 93 struct snd_ctl_elem_value *ucontrol) 94 94 { 95 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 95 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 96 96 unsigned int val; 97 97 98 98 val = snd_soc_component_read(component, NTP8835_SOFT_MUTE); ··· 104 104 static int ntp8835_mute_put(struct snd_kcontrol *kcontrol, 105 105 struct snd_ctl_elem_value *ucontrol) 106 106 { 107 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 107 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 108 108 unsigned int val; 109 109 110 110 val = ucontrol->value.integer.value[0] ? 0 : 7;
+2 -2
sound/soc/codecs/pcm1681.c
··· 108 108 static int pcm1681_get_deemph(struct snd_kcontrol *kcontrol, 109 109 struct snd_ctl_elem_value *ucontrol) 110 110 { 111 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 111 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 112 112 struct pcm1681_private *priv = snd_soc_component_get_drvdata(component); 113 113 114 114 ucontrol->value.integer.value[0] = priv->deemph; ··· 119 119 static int pcm1681_put_deemph(struct snd_kcontrol *kcontrol, 120 120 struct snd_ctl_elem_value *ucontrol) 121 121 { 122 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 122 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 123 123 struct pcm1681_private *priv = snd_soc_component_get_drvdata(component); 124 124 125 125 priv->deemph = ucontrol->value.integer.value[0];
+8 -8
sound/soc/codecs/pcm512x.c
··· 224 224 static int pcm512x_overclock_pll_get(struct snd_kcontrol *kcontrol, 225 225 struct snd_ctl_elem_value *ucontrol) 226 226 { 227 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 227 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 228 228 struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component); 229 229 230 230 ucontrol->value.integer.value[0] = pcm512x->overclock_pll; ··· 234 234 static int pcm512x_overclock_pll_put(struct snd_kcontrol *kcontrol, 235 235 struct snd_ctl_elem_value *ucontrol) 236 236 { 237 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 237 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 238 238 struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component); 239 239 240 240 switch (snd_soc_component_get_bias_level(component)) { ··· 252 252 static int pcm512x_overclock_dsp_get(struct snd_kcontrol *kcontrol, 253 253 struct snd_ctl_elem_value *ucontrol) 254 254 { 255 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 255 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 256 256 struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component); 257 257 258 258 ucontrol->value.integer.value[0] = pcm512x->overclock_dsp; ··· 262 262 static int pcm512x_overclock_dsp_put(struct snd_kcontrol *kcontrol, 263 263 struct snd_ctl_elem_value *ucontrol) 264 264 { 265 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 265 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 266 266 struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component); 267 267 268 268 switch (snd_soc_component_get_bias_level(component)) { ··· 280 280 static int pcm512x_overclock_dac_get(struct snd_kcontrol *kcontrol, 281 281 struct snd_ctl_elem_value *ucontrol) 282 282 { 283 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 283 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 284 284 struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component); 285 285 286 286 ucontrol->value.integer.value[0] = pcm512x->overclock_dac; ··· 290 290 static int pcm512x_overclock_dac_put(struct snd_kcontrol *kcontrol, 291 291 struct snd_ctl_elem_value *ucontrol) 292 292 { 293 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 293 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 294 294 struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component); 295 295 296 296 switch (snd_soc_component_get_bias_level(component)) { ··· 393 393 static int pcm512x_digital_playback_switch_get(struct snd_kcontrol *kcontrol, 394 394 struct snd_ctl_elem_value *ucontrol) 395 395 { 396 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 396 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 397 397 struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component); 398 398 399 399 mutex_lock(&pcm512x->mutex); ··· 407 407 static int pcm512x_digital_playback_switch_put(struct snd_kcontrol *kcontrol, 408 408 struct snd_ctl_elem_value *ucontrol) 409 409 { 410 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 410 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 411 411 struct pcm512x_priv *pcm512x = snd_soc_component_get_drvdata(component); 412 412 int ret, changed = 0; 413 413
+3 -6
sound/soc/codecs/pcm6240.c
··· 1139 1139 struct snd_kcontrol *kcontrol, 1140 1140 struct snd_ctl_elem_info *uinfo) 1141 1141 { 1142 - struct snd_soc_component *codec 1143 - = snd_soc_kcontrol_component(kcontrol); 1142 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1144 1143 struct pcmdevice_priv *pcm_dev = 1145 1144 snd_soc_component_get_drvdata(codec); 1146 1145 ··· 1155 1156 struct snd_kcontrol *kcontrol, 1156 1157 struct snd_ctl_elem_value *ucontrol) 1157 1158 { 1158 - struct snd_soc_component *codec 1159 - = snd_soc_kcontrol_component(kcontrol); 1159 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1160 1160 struct pcmdevice_priv *pcm_dev = 1161 1161 snd_soc_component_get_drvdata(codec); 1162 1162 ··· 1168 1170 struct snd_kcontrol *kcontrol, 1169 1171 struct snd_ctl_elem_value *ucontrol) 1170 1172 { 1171 - struct snd_soc_component *codec 1172 - = snd_soc_kcontrol_component(kcontrol); 1173 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1173 1174 struct pcmdevice_priv *pcm_dev = 1174 1175 snd_soc_component_get_drvdata(codec); 1175 1176 int nr_profile = ucontrol->value.integer.value[0];
+3 -3
sound/soc/codecs/peb2466.c
··· 276 276 { 277 277 struct peb2466_lkup_ctrl *lkup_ctrl = 278 278 (struct peb2466_lkup_ctrl *)kcontrol->private_value; 279 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 279 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 280 280 struct peb2466 *peb2466 = snd_soc_component_get_drvdata(component); 281 281 unsigned int index; 282 282 int ret; ··· 377 377 static int peb2466_tg_freq_get(struct snd_kcontrol *kcontrol, 378 378 struct snd_ctl_elem_value *ucontrol) 379 379 { 380 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 380 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 381 381 struct peb2466 *peb2466 = snd_soc_component_get_drvdata(component); 382 382 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 383 383 ··· 415 415 static int peb2466_tg_freq_put(struct snd_kcontrol *kcontrol, 416 416 struct snd_ctl_elem_value *ucontrol) 417 417 { 418 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 418 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 419 419 struct peb2466 *peb2466 = snd_soc_component_get_drvdata(component); 420 420 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 421 421 unsigned int *tg_freq_item;
+4 -4
sound/soc/codecs/pm4125.c
··· 879 879 880 880 static int pm4125_get_compander(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 881 881 { 882 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 882 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 883 883 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); 884 884 struct soc_mixer_control *mc; 885 885 bool hphr; ··· 893 893 894 894 static int pm4125_set_compander(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 895 895 { 896 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 896 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 897 897 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(component); 898 898 struct pm4125_sdw_priv *sdw_priv = pm4125->sdw_priv[AIF1_PB]; 899 899 int value = ucontrol->value.integer.value[0]; ··· 926 926 static int pm4125_get_swr_port(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 927 927 { 928 928 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; 929 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 929 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 930 930 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(comp); 931 931 struct pm4125_sdw_priv *sdw_priv; 932 932 int dai_id = mixer->shift; ··· 944 944 static int pm4125_set_swr_port(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 945 945 { 946 946 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; 947 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 947 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 948 948 struct pm4125_priv *pm4125 = snd_soc_component_get_drvdata(comp); 949 949 struct pm4125_sdw_priv *sdw_priv; 950 950 int dai_id = mixer->shift;
+6 -12
sound/soc/codecs/rt1011.c
··· 1034 1034 static int rt1011_recv_spk_mode_get(struct snd_kcontrol *kcontrol, 1035 1035 struct snd_ctl_elem_value *ucontrol) 1036 1036 { 1037 - struct snd_soc_component *component = 1038 - snd_soc_kcontrol_component(kcontrol); 1037 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1039 1038 struct rt1011_priv *rt1011 = 1040 1039 snd_soc_component_get_drvdata(component); 1041 1040 ··· 1046 1047 static int rt1011_recv_spk_mode_put(struct snd_kcontrol *kcontrol, 1047 1048 struct snd_ctl_elem_value *ucontrol) 1048 1049 { 1049 - struct snd_soc_component *component = 1050 - snd_soc_kcontrol_component(kcontrol); 1050 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1051 1051 struct rt1011_priv *rt1011 = 1052 1052 snd_soc_component_get_drvdata(component); 1053 1053 ··· 1108 1110 static int rt1011_bq_drc_coeff_get(struct snd_kcontrol *kcontrol, 1109 1111 struct snd_ctl_elem_value *ucontrol) 1110 1112 { 1111 - struct snd_soc_component *component = 1112 - snd_soc_kcontrol_component(kcontrol); 1113 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1113 1114 struct rt1011_priv *rt1011 = 1114 1115 snd_soc_component_get_drvdata(component); 1115 1116 struct rt1011_bq_drc_params *bq_drc_info; ··· 1144 1147 static int rt1011_bq_drc_coeff_put(struct snd_kcontrol *kcontrol, 1145 1148 struct snd_ctl_elem_value *ucontrol) 1146 1149 { 1147 - struct snd_soc_component *component = 1148 - snd_soc_kcontrol_component(kcontrol); 1150 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1149 1151 struct rt1011_priv *rt1011 = 1150 1152 snd_soc_component_get_drvdata(component); 1151 1153 struct rt1011_bq_drc_params *bq_drc_info; ··· 1315 1319 static int rt1011_i2s_ref_put(struct snd_kcontrol *kcontrol, 1316 1320 struct snd_ctl_elem_value *ucontrol) 1317 1321 { 1318 - struct snd_soc_component *component = 1319 - snd_soc_kcontrol_component(kcontrol); 1322 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1320 1323 struct rt1011_priv *rt1011 = 1321 1324 snd_soc_component_get_drvdata(component); 1322 1325 ··· 1343 1348 static int rt1011_i2s_ref_get(struct snd_kcontrol *kcontrol, 1344 1349 struct snd_ctl_elem_value *ucontrol) 1345 1350 { 1346 - struct snd_soc_component *component = 1347 - snd_soc_kcontrol_component(kcontrol); 1351 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1348 1352 struct rt1011_priv *rt1011 = 1349 1353 snd_soc_component_get_drvdata(component); 1350 1354
+4 -8
sound/soc/codecs/rt1015.c
··· 427 427 static int rt1015_boost_mode_get(struct snd_kcontrol *kcontrol, 428 428 struct snd_ctl_elem_value *ucontrol) 429 429 { 430 - struct snd_soc_component *component = 431 - snd_soc_kcontrol_component(kcontrol); 430 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 432 431 struct rt1015_priv *rt1015 = 433 432 snd_soc_component_get_drvdata(component); 434 433 ··· 439 440 static int rt1015_boost_mode_put(struct snd_kcontrol *kcontrol, 440 441 struct snd_ctl_elem_value *ucontrol) 441 442 { 442 - struct snd_soc_component *component = 443 - snd_soc_kcontrol_component(kcontrol); 443 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 444 444 struct rt1015_priv *rt1015 = 445 445 snd_soc_component_get_drvdata(component); 446 446 int boost_mode = ucontrol->value.integer.value[0]; ··· 479 481 static int rt1015_bypass_boost_get(struct snd_kcontrol *kcontrol, 480 482 struct snd_ctl_elem_value *ucontrol) 481 483 { 482 - struct snd_soc_component *component = 483 - snd_soc_kcontrol_component(kcontrol); 484 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 484 485 struct rt1015_priv *rt1015 = 485 486 snd_soc_component_get_drvdata(component); 486 487 ··· 521 524 static int rt1015_bypass_boost_put(struct snd_kcontrol *kcontrol, 522 525 struct snd_ctl_elem_value *ucontrol) 523 526 { 524 - struct snd_soc_component *component = 525 - snd_soc_kcontrol_component(kcontrol); 527 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 526 528 struct rt1015_priv *rt1015 = 527 529 snd_soc_component_get_drvdata(component); 528 530
+2 -2
sound/soc/codecs/rt1318.c
··· 505 505 static int rt1318_dvol_put(struct snd_kcontrol *kcontrol, 506 506 struct snd_ctl_elem_value *ucontrol) 507 507 { 508 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 508 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 509 509 struct rt1318_priv *rt1318 = snd_soc_component_get_drvdata(component); 510 510 511 511 rt1318->rt1318_dvol = ucontrol->value.integer.value[0]; ··· 528 528 static int rt1318_dvol_get(struct snd_kcontrol *kcontrol, 529 529 struct snd_ctl_elem_value *ucontrol) 530 530 { 531 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 531 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 532 532 struct rt1318_priv *rt1318 = snd_soc_component_get_drvdata(component); 533 533 534 534 ucontrol->value.integer.value[0] = rt1318->rt1318_dvol;
+2 -2
sound/soc/codecs/rt5631.c
··· 183 183 static int rt5631_dmic_get(struct snd_kcontrol *kcontrol, 184 184 struct snd_ctl_elem_value *ucontrol) 185 185 { 186 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 186 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 187 187 struct rt5631_priv *rt5631 = snd_soc_component_get_drvdata(component); 188 188 189 189 ucontrol->value.integer.value[0] = rt5631->dmic_used_flag; ··· 194 194 static int rt5631_dmic_put(struct snd_kcontrol *kcontrol, 195 195 struct snd_ctl_elem_value *ucontrol) 196 196 { 197 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 197 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 198 198 struct rt5631_priv *rt5631 = snd_soc_component_get_drvdata(component); 199 199 200 200 rt5631->dmic_used_flag = ucontrol->value.integer.value[0];
+1 -1
sound/soc/codecs/rt5659.c
··· 1197 1197 static int rt5659_hp_vol_put(struct snd_kcontrol *kcontrol, 1198 1198 struct snd_ctl_elem_value *ucontrol) 1199 1199 { 1200 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1200 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1201 1201 int ret = snd_soc_put_volsw(kcontrol, ucontrol); 1202 1202 1203 1203 if (snd_soc_component_read(component, RT5659_STO_NG2_CTRL_1) & RT5659_NG2_EN) {
+2 -2
sound/soc/codecs/rt5665.c
··· 993 993 static int rt5665_hp_vol_put(struct snd_kcontrol *kcontrol, 994 994 struct snd_ctl_elem_value *ucontrol) 995 995 { 996 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 996 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 997 997 int ret = snd_soc_put_volsw(kcontrol, ucontrol); 998 998 999 999 if (snd_soc_component_read(component, RT5665_STO_NG2_CTRL_1) & RT5665_NG2_EN) { ··· 1009 1009 static int rt5665_mono_vol_put(struct snd_kcontrol *kcontrol, 1010 1010 struct snd_ctl_elem_value *ucontrol) 1011 1011 { 1012 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1012 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1013 1013 int ret = snd_soc_put_volsw(kcontrol, ucontrol); 1014 1014 1015 1015 if (snd_soc_component_read(component, RT5665_MONO_NG2_CTRL_1) & RT5665_NG2_EN) {
+2 -2
sound/soc/codecs/rt5670.c
··· 652 652 static int rt5670_dac1_playback_switch_get(struct snd_kcontrol *kcontrol, 653 653 struct snd_ctl_elem_value *ucontrol) 654 654 { 655 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 655 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 656 656 struct rt5670_priv *rt5670 = snd_soc_component_get_drvdata(component); 657 657 658 658 ucontrol->value.integer.value[0] = rt5670->dac1_playback_switch_l; ··· 664 664 static int rt5670_dac1_playback_switch_put(struct snd_kcontrol *kcontrol, 665 665 struct snd_ctl_elem_value *ucontrol) 666 666 { 667 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 667 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 668 668 struct rt5670_priv *rt5670 = snd_soc_component_get_drvdata(component); 669 669 670 670 if (rt5670->dac1_playback_switch_l == ucontrol->value.integer.value[0] &&
+2 -2
sound/soc/codecs/rt711-sdca.c
··· 813 813 struct snd_ctl_elem_value *ucontrol) 814 814 { 815 815 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 816 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 816 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 817 817 struct rt711_sdca_priv *rt711 = snd_soc_component_get_drvdata(component); 818 818 unsigned int val, item; 819 819 ··· 828 828 { 829 829 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 830 830 unsigned int *item = ucontrol->value.enumerated.item; 831 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 831 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 832 832 struct rt711_sdca_priv *rt711 = snd_soc_component_get_drvdata(component); 833 833 unsigned int val, change = 0; 834 834
+3 -3
sound/soc/codecs/rt9123.c
··· 107 107 108 108 static int rt9123_kcontrol_name_comp(struct snd_kcontrol *kcontrol, const char *s) 109 109 { 110 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 110 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 111 111 const char *kctlname = kcontrol->id.name; 112 112 113 113 if (comp && comp->name_prefix) ··· 118 118 119 119 static int rt9123_xhandler_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 120 120 { 121 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 121 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 122 122 struct device *dev = comp->dev; 123 123 int ret; 124 124 ··· 145 145 146 146 static int rt9123_xhandler_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 147 147 { 148 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 148 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 149 149 struct device *dev = comp->dev; 150 150 int ret; 151 151
+4 -4
sound/soc/codecs/sgtl5000.c
··· 540 540 static int dac_get_volsw(struct snd_kcontrol *kcontrol, 541 541 struct snd_ctl_elem_value *ucontrol) 542 542 { 543 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 543 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 544 544 int reg; 545 545 int l; 546 546 int r; ··· 593 593 static int dac_put_volsw(struct snd_kcontrol *kcontrol, 594 594 struct snd_ctl_elem_value *ucontrol) 595 595 { 596 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 596 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 597 597 int reg; 598 598 int l; 599 599 int r; ··· 631 631 static int avc_get_threshold(struct snd_kcontrol *kcontrol, 632 632 struct snd_ctl_elem_value *ucontrol) 633 633 { 634 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 634 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 635 635 int db, i; 636 636 u16 reg = snd_soc_component_read(component, SGTL5000_DAP_AVC_THRESHOLD); 637 637 ··· 664 664 static int avc_put_threshold(struct snd_kcontrol *kcontrol, 665 665 struct snd_ctl_elem_value *ucontrol) 666 666 { 667 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 667 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 668 668 int db; 669 669 u16 reg; 670 670
+8 -16
sound/soc/codecs/sma1303.c
··· 309 309 static int sma1303_force_mute_get(struct snd_kcontrol *kcontrol, 310 310 struct snd_ctl_elem_value *ucontrol) 311 311 { 312 - struct snd_soc_component *component = 313 - snd_soc_kcontrol_component(kcontrol); 312 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 314 313 struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); 315 314 316 315 ucontrol->value.integer.value[0] = (int)sma1303->force_mute_status; ··· 322 323 static int sma1303_force_mute_put(struct snd_kcontrol *kcontrol, 323 324 struct snd_ctl_elem_value *ucontrol) 324 325 { 325 - struct snd_soc_component *component = 326 - snd_soc_kcontrol_component(kcontrol); 326 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 327 327 struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); 328 328 bool change = false, val = (bool)ucontrol->value.integer.value[0]; 329 329 ··· 341 343 static int sma1303_postscaler_get(struct snd_kcontrol *kcontrol, 342 344 struct snd_ctl_elem_value *ucontrol) 343 345 { 344 - struct snd_soc_component *component = 345 - snd_soc_kcontrol_component(kcontrol); 346 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 346 347 struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); 347 348 int val, ret; 348 349 ··· 357 360 static int sma1303_postscaler_put(struct snd_kcontrol *kcontrol, 358 361 struct snd_ctl_elem_value *ucontrol) 359 362 { 360 - struct snd_soc_component *component = 361 - snd_soc_kcontrol_component(kcontrol); 363 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 362 364 struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); 363 365 int ret, val = (int)ucontrol->value.integer.value[0]; 364 366 bool change; ··· 373 377 static int sma1303_tdm_slot_rx_get(struct snd_kcontrol *kcontrol, 374 378 struct snd_ctl_elem_value *ucontrol) 375 379 { 376 - struct snd_soc_component *component = 377 - snd_soc_kcontrol_component(kcontrol); 380 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 378 381 struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); 379 382 int val, ret; 380 383 ··· 390 395 static int sma1303_tdm_slot_rx_put(struct snd_kcontrol *kcontrol, 391 396 struct snd_ctl_elem_value *ucontrol) 392 397 { 393 - struct snd_soc_component *component = 394 - snd_soc_kcontrol_component(kcontrol); 398 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 395 399 struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); 396 400 int ret, val = (int)ucontrol->value.integer.value[0]; 397 401 bool change; ··· 406 412 static int sma1303_tdm_slot_tx_get(struct snd_kcontrol *kcontrol, 407 413 struct snd_ctl_elem_value *ucontrol) 408 414 { 409 - struct snd_soc_component *component = 410 - snd_soc_kcontrol_component(kcontrol); 415 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 411 416 struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); 412 417 int val, ret; 413 418 ··· 423 430 static int sma1303_tdm_slot_tx_put(struct snd_kcontrol *kcontrol, 424 431 struct snd_ctl_elem_value *ucontrol) 425 432 { 426 - struct snd_soc_component *component = 427 - snd_soc_kcontrol_component(kcontrol); 433 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 428 434 struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); 429 435 int ret, val = (int)ucontrol->value.integer.value[0]; 430 436 bool change;
+12 -24
sound/soc/codecs/sma1307.c
··· 303 303 static int sma1307_force_mute_get(struct snd_kcontrol *kcontrol, 304 304 struct snd_ctl_elem_value *ucontrol) 305 305 { 306 - struct snd_soc_component *component = 307 - snd_soc_kcontrol_component(kcontrol); 306 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 308 307 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 309 308 310 309 ucontrol->value.integer.value[0] = (int)sma1307->force_mute_status; ··· 314 315 static int sma1307_force_mute_put(struct snd_kcontrol *kcontrol, 315 316 struct snd_ctl_elem_value *ucontrol) 316 317 { 317 - struct snd_soc_component *component = 318 - snd_soc_kcontrol_component(kcontrol); 318 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 319 319 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 320 320 bool change = false, val = (bool)ucontrol->value.integer.value[0]; 321 321 ··· 331 333 static int sma1307_tdm_slot_get(struct snd_kcontrol *kcontrol, 332 334 struct snd_ctl_elem_value *ucontrol) 333 335 { 334 - struct snd_soc_component *component = 335 - snd_soc_kcontrol_component(kcontrol); 336 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 336 337 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 337 338 int val1, val2; 338 339 ··· 364 367 static int sma1307_tdm_slot_put(struct snd_kcontrol *kcontrol, 365 368 struct snd_ctl_elem_value *ucontrol) 366 369 { 367 - struct snd_soc_component *component = 368 - snd_soc_kcontrol_component(kcontrol); 370 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 369 371 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 370 372 int val = (int)ucontrol->value.integer.value[0]; 371 373 bool change; ··· 417 421 static int sma1307_sw_ot1_prot_get(struct snd_kcontrol *kcontrol, 418 422 struct snd_ctl_elem_value *ucontrol) 419 423 { 420 - struct snd_soc_component *component = 421 - snd_soc_kcontrol_component(kcontrol); 424 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 422 425 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 423 426 424 427 ucontrol->value.integer.value[0] = (int)sma1307->sw_ot1_prot; ··· 428 433 static int sma1307_sw_ot1_prot_put(struct snd_kcontrol *kcontrol, 429 434 struct snd_ctl_elem_value *ucontrol) 430 435 { 431 - struct snd_soc_component *component = 432 - snd_soc_kcontrol_component(kcontrol); 436 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 433 437 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 434 438 bool change = false, val = (bool)ucontrol->value.integer.value[0]; 435 439 ··· 445 451 static int sma1307_check_fault_status_get(struct snd_kcontrol *kcontrol, 446 452 struct snd_ctl_elem_value *ucontrol) 447 453 { 448 - struct snd_soc_component *component = 449 - snd_soc_kcontrol_component(kcontrol); 454 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 450 455 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 451 456 452 457 ucontrol->value.integer.value[0] = (int)sma1307->check_fault_status; ··· 456 463 static int sma1307_check_fault_status_put(struct snd_kcontrol *kcontrol, 457 464 struct snd_ctl_elem_value *ucontrol) 458 465 { 459 - struct snd_soc_component *component = 460 - snd_soc_kcontrol_component(kcontrol); 466 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 461 467 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 462 468 bool change = false, val = (bool)ucontrol->value.integer.value[0]; 463 469 ··· 473 481 static int sma1307_check_fault_period_get(struct snd_kcontrol *kcontrol, 474 482 struct snd_ctl_elem_value *ucontrol) 475 483 { 476 - struct snd_soc_component *component = 477 - snd_soc_kcontrol_component(kcontrol); 484 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 478 485 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 479 486 480 487 ucontrol->value.integer.value[0] = sma1307->check_fault_period; ··· 484 493 static int sma1307_check_fault_period_put(struct snd_kcontrol *kcontrol, 485 494 struct snd_ctl_elem_value *ucontrol) 486 495 { 487 - struct snd_soc_component *component = 488 - snd_soc_kcontrol_component(kcontrol); 496 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 489 497 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 490 498 struct soc_mixer_control *mc = 491 499 (struct soc_mixer_control *)kcontrol->private_value; ··· 506 516 static int sma1307_reset_put(struct snd_kcontrol *kcontrol, 507 517 struct snd_ctl_elem_value *ucontrol) 508 518 { 509 - struct snd_soc_component *component = 510 - snd_soc_kcontrol_component(kcontrol); 519 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 511 520 struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component); 512 521 513 522 regmap_update_bits(sma1307->regmap, SMA1307_00_SYSTEM_CTRL, ··· 522 533 static int sma1307_binary_mode_put(struct snd_kcontrol *kcontrol, 523 534 struct snd_ctl_elem_value *ucontrol) 524 535 { 525 - struct snd_soc_component *component = 526 - snd_soc_kcontrol_component(kcontrol); 536 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 527 537 struct sma1307_priv *sma1307 = snd_kcontrol_chip(kcontrol); 528 538 529 539 sma1307->binary_mode = (int)ucontrol->value.enumerated.item[0];
+2 -2
sound/soc/codecs/sta32x.c
··· 264 264 static int sta32x_coefficient_get(struct snd_kcontrol *kcontrol, 265 265 struct snd_ctl_elem_value *ucontrol) 266 266 { 267 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 267 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 268 268 struct sta32x_priv *sta32x = snd_soc_component_get_drvdata(component); 269 269 int numcoef = kcontrol->private_value >> 16; 270 270 int index = kcontrol->private_value & 0xffff; ··· 306 306 static int sta32x_coefficient_put(struct snd_kcontrol *kcontrol, 307 307 struct snd_ctl_elem_value *ucontrol) 308 308 { 309 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 309 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 310 310 struct sta32x_priv *sta32x = snd_soc_component_get_drvdata(component); 311 311 int numcoef = kcontrol->private_value >> 16; 312 312 int index = kcontrol->private_value & 0xffff;
+2 -2
sound/soc/codecs/sta350.c
··· 301 301 static int sta350_coefficient_get(struct snd_kcontrol *kcontrol, 302 302 struct snd_ctl_elem_value *ucontrol) 303 303 { 304 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 304 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 305 305 struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component); 306 306 int numcoef = kcontrol->private_value >> 16; 307 307 int index = kcontrol->private_value & 0xffff; ··· 343 343 static int sta350_coefficient_put(struct snd_kcontrol *kcontrol, 344 344 struct snd_ctl_elem_value *ucontrol) 345 345 { 346 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 346 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 347 347 struct sta350_priv *sta350 = snd_soc_component_get_drvdata(component); 348 348 int numcoef = kcontrol->private_value >> 16; 349 349 int index = kcontrol->private_value & 0xffff;
+2 -2
sound/soc/codecs/tas2562.c
··· 459 459 static int tas2562_volume_control_get(struct snd_kcontrol *kcontrol, 460 460 struct snd_ctl_elem_value *ucontrol) 461 461 { 462 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 462 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 463 463 struct tas2562_data *tas2562 = snd_soc_component_get_drvdata(component); 464 464 465 465 ucontrol->value.integer.value[0] = tas2562->volume_lvl; ··· 469 469 static int tas2562_volume_control_put(struct snd_kcontrol *kcontrol, 470 470 struct snd_ctl_elem_value *ucontrol) 471 471 { 472 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 472 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 473 473 struct tas2562_data *tas2562 = snd_soc_component_get_drvdata(component); 474 474 int ret; 475 475 u32 reg_val;
+32 -35
sound/soc/codecs/tas2781-i2c.c
··· 151 151 static int tas2781_digital_getvol(struct snd_kcontrol *kcontrol, 152 152 struct snd_ctl_elem_value *ucontrol) 153 153 { 154 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 154 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 155 155 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 156 156 struct soc_mixer_control *mc = 157 157 (struct soc_mixer_control *)kcontrol->private_value; ··· 162 162 static int tas2781_digital_putvol(struct snd_kcontrol *kcontrol, 163 163 struct snd_ctl_elem_value *ucontrol) 164 164 { 165 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 165 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 166 166 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 167 167 struct soc_mixer_control *mc = 168 168 (struct soc_mixer_control *)kcontrol->private_value; ··· 173 173 static int tas2781_amp_getvol(struct snd_kcontrol *kcontrol, 174 174 struct snd_ctl_elem_value *ucontrol) 175 175 { 176 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 176 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 177 177 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 178 178 struct soc_mixer_control *mc = 179 179 (struct soc_mixer_control *)kcontrol->private_value; ··· 184 184 static int tas2781_amp_putvol(struct snd_kcontrol *kcontrol, 185 185 struct snd_ctl_elem_value *ucontrol) 186 186 { 187 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 187 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 188 188 struct tasdevice_priv *tas_priv = 189 189 snd_soc_component_get_drvdata(codec); 190 190 struct soc_mixer_control *mc = ··· 196 196 static int tasdev_force_fwload_get(struct snd_kcontrol *kcontrol, 197 197 struct snd_ctl_elem_value *ucontrol) 198 198 { 199 - struct snd_soc_component *component = 200 - snd_soc_kcontrol_component(kcontrol); 199 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 201 200 struct tasdevice_priv *tas_priv = 202 201 snd_soc_component_get_drvdata(component); 203 202 ··· 210 211 static int tasdev_force_fwload_put(struct snd_kcontrol *kcontrol, 211 212 struct snd_ctl_elem_value *ucontrol) 212 213 { 213 - struct snd_soc_component *component = 214 - snd_soc_kcontrol_component(kcontrol); 214 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 215 215 struct tasdevice_priv *tas_priv = 216 216 snd_soc_component_get_drvdata(component); 217 217 bool change, val = (bool)ucontrol->value.integer.value[0]; ··· 230 232 static int tasdev_cali_data_get(struct snd_kcontrol *kcontrol, 231 233 struct snd_ctl_elem_value *ucontrol) 232 234 { 233 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 235 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 234 236 struct tasdevice_priv *priv = snd_soc_component_get_drvdata(comp); 235 237 struct soc_bytes_ext *bytes_ext = 236 238 (struct soc_bytes_ext *) kcontrol->private_value; ··· 467 469 static int tas2781_calib_start_put(struct snd_kcontrol *kcontrol, 468 470 struct snd_ctl_elem_value *ucontrol) 469 471 { 470 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 472 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 471 473 struct tasdevice_priv *priv = snd_soc_component_get_drvdata(comp); 472 474 struct soc_bytes_ext *bytes_ext = 473 475 (struct soc_bytes_ext *) kcontrol->private_value; ··· 540 542 struct snd_ctl_elem_value *ucontrol) 541 543 { 542 544 struct bulk_reg_val *q = (struct bulk_reg_val *)tas2563_cali_start_reg; 543 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 545 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 544 546 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp); 545 547 const int sum = ARRAY_SIZE(tas2563_cali_start_reg); 546 548 int i, j; ··· 604 606 static int tasdev_calib_stop_put(struct snd_kcontrol *kcontrol, 605 607 struct snd_ctl_elem_value *ucontrol) 606 608 { 607 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 609 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 608 610 struct tasdevice_priv *priv = snd_soc_component_get_drvdata(comp); 609 611 610 612 guard(mutex)(&priv->codec_lock); ··· 619 621 static int tasdev_cali_data_put(struct snd_kcontrol *kcontrol, 620 622 struct snd_ctl_elem_value *ucontrol) 621 623 { 622 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 624 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 623 625 struct tasdevice_priv *priv = snd_soc_component_get_drvdata(comp); 624 626 struct soc_bytes_ext *bytes_ext = 625 627 (struct soc_bytes_ext *) kcontrol->private_value; ··· 666 668 static int tas2781_latch_reg_get(struct snd_kcontrol *kcontrol, 667 669 struct snd_ctl_elem_value *ucontrol) 668 670 { 669 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 671 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 670 672 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp); 671 673 struct i2c_client *clt = (struct i2c_client *)tas_priv->client; 672 674 struct soc_bytes_ext *bytes_ext = ··· 699 701 static int tasdev_tf_data_get(struct snd_kcontrol *kcontrol, 700 702 struct snd_ctl_elem_value *ucontrol) 701 703 { 702 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 704 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 703 705 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp); 704 706 struct soc_bytes_ext *bytes_ext = 705 707 (struct soc_bytes_ext *) kcontrol->private_value; ··· 726 728 static int tasdev_re_data_get(struct snd_kcontrol *kcontrol, 727 729 struct snd_ctl_elem_value *ucontrol) 728 730 { 729 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 731 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 730 732 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp); 731 733 struct soc_bytes_ext *bytes_ext = 732 734 (struct soc_bytes_ext *) kcontrol->private_value; ··· 752 754 static int tasdev_r0_data_get(struct snd_kcontrol *kcontrol, 753 755 struct snd_ctl_elem_value *ucontrol) 754 756 { 755 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 757 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 756 758 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp); 757 759 struct calidata *cali_data = &tas_priv->cali_data; 758 760 struct soc_bytes_ext *bytes_ext = ··· 775 777 static int tasdev_XMA1_data_get(struct snd_kcontrol *kcontrol, 776 778 struct snd_ctl_elem_value *ucontrol) 777 779 { 778 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 780 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 779 781 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp); 780 782 struct tasdevice_fw *tas_fmw = tas_priv->fmw; 781 783 struct fct_param_address *p = &(tas_fmw->fct_par_addr); ··· 795 797 static int tasdev_XMA2_data_get(struct snd_kcontrol *kcontrol, 796 798 struct snd_ctl_elem_value *ucontrol) 797 799 { 798 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 800 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 799 801 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp); 800 802 struct tasdevice_fw *tas_fmw = tas_priv->fmw; 801 803 struct fct_param_address *p = &(tas_fmw->fct_par_addr); ··· 825 827 { 826 828 struct soc_mixer_control *mc = 827 829 (struct soc_mixer_control *)kcontrol->private_value; 828 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 830 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 829 831 struct tasdevice_priv *tas_dev = snd_soc_component_get_drvdata(codec); 830 832 unsigned int l = 0, r = mc->max; 831 833 unsigned int target, ar_mid, mid, ar_l, ar_r; ··· 869 871 { 870 872 struct soc_mixer_control *mc = 871 873 (struct soc_mixer_control *)kcontrol->private_value; 872 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 874 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 873 875 struct tasdevice_priv *tas_dev = snd_soc_component_get_drvdata(codec); 874 876 int vol = ucontrol->value.integer.value[0]; 875 877 int status = 0, max = mc->max, rc = 1; ··· 971 973 static int tasdevice_set_profile_id(struct snd_kcontrol *kcontrol, 972 974 struct snd_ctl_elem_value *ucontrol) 973 975 { 974 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 976 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 975 977 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 976 978 int ret = 0; 977 979 ··· 988 990 static int tasdevice_info_active_num(struct snd_kcontrol *kcontrol, 989 991 struct snd_ctl_elem_info *uinfo) 990 992 { 991 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 993 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 992 994 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 993 995 994 996 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ··· 1013 1015 static int tasdevice_info_programs(struct snd_kcontrol *kcontrol, 1014 1016 struct snd_ctl_elem_info *uinfo) 1015 1017 { 1016 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1018 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1017 1019 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 1018 1020 struct tasdevice_fw *tas_fw = tas_priv->fmw; 1019 1021 ··· 1028 1030 static int tasdevice_info_configurations( 1029 1031 struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1030 1032 { 1031 - struct snd_soc_component *codec = 1032 - snd_soc_kcontrol_component(kcontrol); 1033 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1033 1034 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 1034 1035 struct tasdevice_fw *tas_fw = tas_priv->fmw; 1035 1036 ··· 1043 1046 static int tasdevice_info_profile(struct snd_kcontrol *kcontrol, 1044 1047 struct snd_ctl_elem_info *uinfo) 1045 1048 { 1046 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1049 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1047 1050 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 1048 1051 1049 1052 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ··· 1057 1060 static int tasdevice_get_profile_id(struct snd_kcontrol *kcontrol, 1058 1061 struct snd_ctl_elem_value *ucontrol) 1059 1062 { 1060 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1063 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1061 1064 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 1062 1065 1063 1066 ucontrol->value.integer.value[0] = tas_priv->rcabin.profile_cfg_id; ··· 1068 1071 static int tasdevice_get_chip_id(struct snd_kcontrol *kcontrol, 1069 1072 struct snd_ctl_elem_value *ucontrol) 1070 1073 { 1071 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1074 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1072 1075 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 1073 1076 1074 1077 ucontrol->value.integer.value[0] = tas_priv->chip_id; ··· 1114 1117 static int tasdevice_program_get(struct snd_kcontrol *kcontrol, 1115 1118 struct snd_ctl_elem_value *ucontrol) 1116 1119 { 1117 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1120 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1118 1121 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 1119 1122 1120 1123 ucontrol->value.integer.value[0] = tas_priv->cur_prog; ··· 1125 1128 static int tasdevice_program_put(struct snd_kcontrol *kcontrol, 1126 1129 struct snd_ctl_elem_value *ucontrol) 1127 1130 { 1128 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1131 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1129 1132 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 1130 1133 unsigned int nr_program = ucontrol->value.integer.value[0]; 1131 1134 int ret = 0; ··· 1142 1145 struct snd_ctl_elem_value *ucontrol) 1143 1146 { 1144 1147 1145 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1148 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1146 1149 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 1147 1150 1148 1151 ucontrol->value.integer.value[0] = tas_priv->cur_conf; ··· 1154 1157 struct snd_kcontrol *kcontrol, 1155 1158 struct snd_ctl_elem_value *ucontrol) 1156 1159 { 1157 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1160 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1158 1161 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 1159 1162 unsigned int nr_configuration = ucontrol->value.integer.value[0]; 1160 1163 int ret = 0; ··· 1170 1173 static int tasdevice_active_num_get(struct snd_kcontrol *kcontrol, 1171 1174 struct snd_ctl_elem_value *ucontrol) 1172 1175 { 1173 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1176 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1174 1177 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 1175 1178 struct i2c_client *clt = (struct i2c_client *)tas_priv->client; 1176 1179 struct tasdevice *tasdev = tas_priv->tasdevice; ··· 1189 1192 static int tasdevice_active_num_put(struct snd_kcontrol *kcontrol, 1190 1193 struct snd_ctl_elem_value *ucontrol) 1191 1194 { 1192 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 1195 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 1193 1196 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 1194 1197 int dev_id = ucontrol->value.integer.value[0]; 1195 1198 int max = tas_priv->ndev - 1;
+2 -2
sound/soc/codecs/tas5086.c
··· 272 272 static int tas5086_get_deemph(struct snd_kcontrol *kcontrol, 273 273 struct snd_ctl_elem_value *ucontrol) 274 274 { 275 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 275 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 276 276 struct tas5086_private *priv = snd_soc_component_get_drvdata(component); 277 277 278 278 ucontrol->value.integer.value[0] = priv->deemph; ··· 283 283 static int tas5086_put_deemph(struct snd_kcontrol *kcontrol, 284 284 struct snd_ctl_elem_value *ucontrol) 285 285 { 286 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 286 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 287 287 struct tas5086_private *priv = snd_soc_component_get_drvdata(component); 288 288 289 289 priv->deemph = ucontrol->value.integer.value[0];
+2 -2
sound/soc/codecs/tas571x.c
··· 241 241 static int tas571x_coefficient_get(struct snd_kcontrol *kcontrol, 242 242 struct snd_ctl_elem_value *ucontrol) 243 243 { 244 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 244 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 245 245 struct i2c_client *i2c = to_i2c_client(component->dev); 246 246 int numcoef = kcontrol->private_value >> 16; 247 247 int index = kcontrol->private_value & 0xffff; ··· 253 253 static int tas571x_coefficient_put(struct snd_kcontrol *kcontrol, 254 254 struct snd_ctl_elem_value *ucontrol) 255 255 { 256 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 256 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 257 257 struct i2c_client *i2c = to_i2c_client(component->dev); 258 258 int numcoef = kcontrol->private_value >> 16; 259 259 int index = kcontrol->private_value & 0xffff;
+2 -2
sound/soc/codecs/tas5720.c
··· 564 564 static int tas5722_volume_get(struct snd_kcontrol *kcontrol, 565 565 struct snd_ctl_elem_value *ucontrol) 566 566 { 567 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 567 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 568 568 unsigned int val; 569 569 570 570 val = snd_soc_component_read(component, TAS5720_VOLUME_CTRL_REG); ··· 579 579 static int tas5722_volume_set(struct snd_kcontrol *kcontrol, 580 580 struct snd_ctl_elem_value *ucontrol) 581 581 { 582 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 582 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 583 583 unsigned int sel = ucontrol->value.integer.value[0]; 584 584 585 585 snd_soc_component_write(component, TAS5720_VOLUME_CTRL_REG, sel >> 1);
+2 -4
sound/soc/codecs/tas5805m.c
··· 226 226 static int tas5805m_vol_get(struct snd_kcontrol *kcontrol, 227 227 struct snd_ctl_elem_value *ucontrol) 228 228 { 229 - struct snd_soc_component *component = 230 - snd_soc_kcontrol_component(kcontrol); 229 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 231 230 struct tas5805m_priv *tas5805m = 232 231 snd_soc_component_get_drvdata(component); 233 232 ··· 246 247 static int tas5805m_vol_put(struct snd_kcontrol *kcontrol, 247 248 struct snd_ctl_elem_value *ucontrol) 248 249 { 249 - struct snd_soc_component *component = 250 - snd_soc_kcontrol_component(kcontrol); 250 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 251 251 struct tas5805m_priv *tas5805m = 252 252 snd_soc_component_get_drvdata(component); 253 253 int ret = 0;
+1 -1
sound/soc/codecs/tfa989x.c
··· 105 105 106 106 static int tfa989x_put_mode(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 107 107 { 108 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 108 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 109 109 struct tfa989x *tfa989x = snd_soc_component_get_drvdata(component); 110 110 111 111 gpiod_set_value_cansleep(tfa989x->rcv_gpiod, ucontrol->value.enumerated.item[0]);
+2 -2
sound/soc/codecs/tlv320adc3xxx.c
··· 565 565 static int adc3xxx_coefficient_get(struct snd_kcontrol *kcontrol, 566 566 struct snd_ctl_elem_value *ucontrol) 567 567 { 568 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 568 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 569 569 int numcoeff = kcontrol->private_value >> 16; 570 570 int reg = kcontrol->private_value & 0xffff; 571 571 int index = 0; ··· 591 591 static int adc3xxx_coefficient_put(struct snd_kcontrol *kcontrol, 592 592 struct snd_ctl_elem_value *ucontrol) 593 593 { 594 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 594 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 595 595 int numcoeff = kcontrol->private_value >> 16; 596 596 int reg = kcontrol->private_value & 0xffff; 597 597 int index = 0;
+2 -4
sound/soc/codecs/tlv320adcx140.c
··· 612 612 static int adcx140_phase_calib_get(struct snd_kcontrol *kcontrol, 613 613 struct snd_ctl_elem_value *value) 614 614 { 615 - struct snd_soc_component *codec = 616 - snd_soc_kcontrol_component(kcontrol); 615 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 617 616 struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(codec); 618 617 619 618 value->value.integer.value[0] = adcx140->phase_calib_on ? 1 : 0; ··· 624 625 static int adcx140_phase_calib_put(struct snd_kcontrol *kcontrol, 625 626 struct snd_ctl_elem_value *value) 626 627 { 627 - struct snd_soc_component *codec 628 - = snd_soc_kcontrol_component(kcontrol); 628 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 629 629 struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(codec); 630 630 631 631 bool v = value->value.integer.value[0] ? true : false;
+2 -2
sound/soc/codecs/tlv320aic23.c
··· 77 77 static int snd_soc_tlv320aic23_put_volsw(struct snd_kcontrol *kcontrol, 78 78 struct snd_ctl_elem_value *ucontrol) 79 79 { 80 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 80 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 81 81 u16 val, reg; 82 82 83 83 val = (ucontrol->value.integer.value[0] & 0x07); ··· 100 100 static int snd_soc_tlv320aic23_get_volsw(struct snd_kcontrol *kcontrol, 101 101 struct snd_ctl_elem_value *ucontrol) 102 102 { 103 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 103 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 104 104 u16 val; 105 105 106 106 val = snd_soc_component_read(component, TLV320AIC23_ANLG) & (0x1C0);
+2 -2
sound/soc/codecs/tlv320dac33.c
··· 442 442 static int dac33_get_fifo_mode(struct snd_kcontrol *kcontrol, 443 443 struct snd_ctl_elem_value *ucontrol) 444 444 { 445 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 445 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 446 446 struct tlv320dac33_priv *dac33 = snd_soc_component_get_drvdata(component); 447 447 448 448 ucontrol->value.enumerated.item[0] = dac33->fifo_mode; ··· 453 453 static int dac33_set_fifo_mode(struct snd_kcontrol *kcontrol, 454 454 struct snd_ctl_elem_value *ucontrol) 455 455 { 456 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 456 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 457 457 struct tlv320dac33_priv *dac33 = snd_soc_component_get_drvdata(component); 458 458 int ret = 0; 459 459
+2 -4
sound/soc/codecs/tscs42xx.c
··· 263 263 static int coeff_ram_get(struct snd_kcontrol *kcontrol, 264 264 struct snd_ctl_elem_value *ucontrol) 265 265 { 266 - struct snd_soc_component *component = 267 - snd_soc_kcontrol_component(kcontrol); 266 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 268 267 struct tscs42xx *tscs42xx = snd_soc_component_get_drvdata(component); 269 268 struct coeff_ram_ctl *ctl = 270 269 (struct coeff_ram_ctl *)kcontrol->private_value; ··· 282 283 static int coeff_ram_put(struct snd_kcontrol *kcontrol, 283 284 struct snd_ctl_elem_value *ucontrol) 284 285 { 285 - struct snd_soc_component *component = 286 - snd_soc_kcontrol_component(kcontrol); 286 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 287 287 struct tscs42xx *tscs42xx = snd_soc_component_get_drvdata(component); 288 288 struct coeff_ram_ctl *ctl = 289 289 (struct coeff_ram_ctl *)kcontrol->private_value;
+2 -4
sound/soc/codecs/tscs454.c
··· 308 308 static int coeff_ram_get(struct snd_kcontrol *kcontrol, 309 309 struct snd_ctl_elem_value *ucontrol) 310 310 { 311 - struct snd_soc_component *component = 312 - snd_soc_kcontrol_component(kcontrol); 311 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 313 312 struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); 314 313 struct coeff_ram_ctl *ctl = 315 314 (struct coeff_ram_ctl *)kcontrol->private_value; ··· 388 389 static int coeff_ram_put(struct snd_kcontrol *kcontrol, 389 390 struct snd_ctl_elem_value *ucontrol) 390 391 { 391 - struct snd_soc_component *component = 392 - snd_soc_kcontrol_component(kcontrol); 392 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 393 393 struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); 394 394 struct coeff_ram_ctl *ctl = 395 395 (struct coeff_ram_ctl *)kcontrol->private_value;
+5 -5
sound/soc/codecs/twl4030.c
··· 830 830 { 831 831 struct soc_mixer_control *mc = 832 832 (struct soc_mixer_control *)kcontrol->private_value; 833 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 833 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 834 834 unsigned int reg = mc->reg; 835 835 unsigned int shift = mc->shift; 836 836 unsigned int rshift = mc->rshift; ··· 859 859 { 860 860 struct soc_mixer_control *mc = 861 861 (struct soc_mixer_control *)kcontrol->private_value; 862 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 862 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 863 863 unsigned int reg = mc->reg; 864 864 unsigned int shift = mc->shift; 865 865 unsigned int rshift = mc->rshift; ··· 888 888 { 889 889 struct soc_mixer_control *mc = 890 890 (struct soc_mixer_control *)kcontrol->private_value; 891 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 891 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 892 892 unsigned int reg = mc->reg; 893 893 unsigned int reg2 = mc->rreg; 894 894 unsigned int shift = mc->shift; ··· 915 915 { 916 916 struct soc_mixer_control *mc = 917 917 (struct soc_mixer_control *)kcontrol->private_value; 918 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 918 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 919 919 unsigned int reg = mc->reg; 920 920 unsigned int reg2 = mc->rreg; 921 921 unsigned int shift = mc->shift; ··· 956 956 static int snd_soc_put_twl4030_opmode_enum_double(struct snd_kcontrol *kcontrol, 957 957 struct snd_ctl_elem_value *ucontrol) 958 958 { 959 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 959 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 960 960 struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component); 961 961 962 962 if (twl4030->configured) {
+4 -4
sound/soc/codecs/twl6040.c
··· 472 472 static int twl6040_headset_power_get_enum(struct snd_kcontrol *kcontrol, 473 473 struct snd_ctl_elem_value *ucontrol) 474 474 { 475 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 475 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 476 476 struct twl6040_data *priv = snd_soc_component_get_drvdata(component); 477 477 478 478 ucontrol->value.enumerated.item[0] = priv->hs_power_mode; ··· 483 483 static int twl6040_headset_power_put_enum(struct snd_kcontrol *kcontrol, 484 484 struct snd_ctl_elem_value *ucontrol) 485 485 { 486 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 486 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 487 487 struct twl6040_data *priv = snd_soc_component_get_drvdata(component); 488 488 int high_perf = ucontrol->value.enumerated.item[0]; 489 489 int ret = 0; ··· 500 500 static int twl6040_pll_get_enum(struct snd_kcontrol *kcontrol, 501 501 struct snd_ctl_elem_value *ucontrol) 502 502 { 503 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 503 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 504 504 struct twl6040_data *priv = snd_soc_component_get_drvdata(component); 505 505 506 506 ucontrol->value.enumerated.item[0] = priv->pll_power_mode; ··· 511 511 static int twl6040_pll_put_enum(struct snd_kcontrol *kcontrol, 512 512 struct snd_ctl_elem_value *ucontrol) 513 513 { 514 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 514 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 515 515 struct twl6040_data *priv = snd_soc_component_get_drvdata(component); 516 516 517 517 priv->pll_power_mode = ucontrol->value.enumerated.item[0];
+2 -2
sound/soc/codecs/uda1334.c
··· 42 42 static int uda1334_put_deemph(struct snd_kcontrol *kcontrol, 43 43 struct snd_ctl_elem_value *ucontrol) 44 44 { 45 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 45 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 46 46 struct uda1334_priv *uda1334 = snd_soc_component_get_drvdata(component); 47 47 int deemph = ucontrol->value.integer.value[0]; 48 48 ··· 57 57 static int uda1334_get_deemph(struct snd_kcontrol *kcontrol, 58 58 struct snd_ctl_elem_value *ucontrol) 59 59 { 60 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 60 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 61 61 struct uda1334_priv *uda1334 = snd_soc_component_get_drvdata(component); 62 62 int ret; 63 63
+4 -4
sound/soc/codecs/wcd9335.c
··· 2177 2177 struct snd_ctl_elem_value *ucontrol) 2178 2178 { 2179 2179 2180 - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); 2180 + struct snd_soc_component *component = snd_kcontrol_chip(kc); 2181 2181 int comp = ((struct soc_mixer_control *)kc->private_value)->shift; 2182 2182 struct wcd9335_codec *wcd = dev_get_drvdata(component->dev); 2183 2183 ··· 2188 2188 static int wcd9335_set_compander(struct snd_kcontrol *kc, 2189 2189 struct snd_ctl_elem_value *ucontrol) 2190 2190 { 2191 - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); 2191 + struct snd_soc_component *component = snd_kcontrol_chip(kc); 2192 2192 struct wcd9335_codec *wcd = dev_get_drvdata(component->dev); 2193 2193 int comp = ((struct soc_mixer_control *) kc->private_value)->shift; 2194 2194 int value = ucontrol->value.integer.value[0]; ··· 2227 2227 static int wcd9335_rx_hph_mode_get(struct snd_kcontrol *kc, 2228 2228 struct snd_ctl_elem_value *ucontrol) 2229 2229 { 2230 - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); 2230 + struct snd_soc_component *component = snd_kcontrol_chip(kc); 2231 2231 struct wcd9335_codec *wcd = dev_get_drvdata(component->dev); 2232 2232 2233 2233 ucontrol->value.enumerated.item[0] = wcd->hph_mode; ··· 2238 2238 static int wcd9335_rx_hph_mode_put(struct snd_kcontrol *kc, 2239 2239 struct snd_ctl_elem_value *ucontrol) 2240 2240 { 2241 - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); 2241 + struct snd_soc_component *component = snd_kcontrol_chip(kc); 2242 2242 struct wcd9335_codec *wcd = dev_get_drvdata(component->dev); 2243 2243 u32 mode_val; 2244 2244
+8 -10
sound/soc/codecs/wcd934x.c
··· 2909 2909 static int wcd934x_get_hph_type(struct snd_kcontrol *kcontrol, 2910 2910 struct snd_ctl_elem_value *ucontrol) 2911 2911 { 2912 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2912 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2913 2913 struct wcd934x_codec *wcd = snd_soc_component_get_drvdata(component); 2914 2914 2915 2915 ucontrol->value.integer.value[0] = wcd_mbhc_get_hph_type(wcd->mbhc); ··· 2923 2923 uint32_t zl, zr; 2924 2924 bool hphr; 2925 2925 struct soc_mixer_control *mc; 2926 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2926 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2927 2927 struct wcd934x_codec *wcd = snd_soc_component_get_drvdata(component); 2928 2928 2929 2929 mc = (struct soc_mixer_control *)(kcontrol->private_value); ··· 3102 3102 struct snd_kcontrol *kcontrol, 3103 3103 struct snd_ctl_elem_value *ucontrol) 3104 3104 { 3105 - struct snd_soc_component *component = 3106 - snd_soc_kcontrol_component(kcontrol); 3105 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 3107 3106 struct wcd_iir_filter_ctl *ctl = 3108 3107 (struct wcd_iir_filter_ctl *)kcontrol->private_value; 3109 3108 struct soc_bytes_ext *params = &ctl->bytes_ext; ··· 3130 3131 static int wcd934x_get_iir_band_audio_mixer(struct snd_kcontrol *kcontrol, 3131 3132 struct snd_ctl_elem_value *ucontrol) 3132 3133 { 3133 - struct snd_soc_component *component = 3134 - snd_soc_kcontrol_component(kcontrol); 3134 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 3135 3135 struct wcd_iir_filter_ctl *ctl = 3136 3136 (struct wcd_iir_filter_ctl *)kcontrol->private_value; 3137 3137 struct soc_bytes_ext *params = &ctl->bytes_ext; ··· 3165 3167 static int wcd934x_compander_get(struct snd_kcontrol *kc, 3166 3168 struct snd_ctl_elem_value *ucontrol) 3167 3169 { 3168 - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); 3170 + struct snd_soc_component *component = snd_kcontrol_chip(kc); 3169 3171 int comp = ((struct soc_mixer_control *)kc->private_value)->shift; 3170 3172 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); 3171 3173 ··· 3177 3179 static int wcd934x_compander_set(struct snd_kcontrol *kc, 3178 3180 struct snd_ctl_elem_value *ucontrol) 3179 3181 { 3180 - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); 3182 + struct snd_soc_component *component = snd_kcontrol_chip(kc); 3181 3183 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); 3182 3184 int comp = ((struct soc_mixer_control *)kc->private_value)->shift; 3183 3185 int value = ucontrol->value.integer.value[0]; ··· 3218 3220 static int wcd934x_rx_hph_mode_get(struct snd_kcontrol *kc, 3219 3221 struct snd_ctl_elem_value *ucontrol) 3220 3222 { 3221 - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); 3223 + struct snd_soc_component *component = snd_kcontrol_chip(kc); 3222 3224 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); 3223 3225 3224 3226 ucontrol->value.enumerated.item[0] = wcd->hph_mode; ··· 3229 3231 static int wcd934x_rx_hph_mode_put(struct snd_kcontrol *kc, 3230 3232 struct snd_ctl_elem_value *ucontrol) 3231 3233 { 3232 - struct snd_soc_component *component = snd_soc_kcontrol_component(kc); 3234 + struct snd_soc_component *component = snd_kcontrol_chip(kc); 3233 3235 struct wcd934x_codec *wcd = dev_get_drvdata(component->dev); 3234 3236 u32 mode_val; 3235 3237
+8 -10
sound/soc/codecs/wcd937x.c
··· 1208 1208 static int wcd937x_rx_hph_mode_get(struct snd_kcontrol *kcontrol, 1209 1209 struct snd_ctl_elem_value *ucontrol) 1210 1210 { 1211 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1211 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1212 1212 struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component); 1213 1213 1214 1214 ucontrol->value.integer.value[0] = wcd937x->hph_mode; ··· 1218 1218 static int wcd937x_rx_hph_mode_put(struct snd_kcontrol *kcontrol, 1219 1219 struct snd_ctl_elem_value *ucontrol) 1220 1220 { 1221 - struct snd_soc_component *component = 1222 - snd_soc_kcontrol_component(kcontrol); 1221 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1223 1222 struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component); 1224 1223 u32 mode_val; 1225 1224 ··· 1250 1251 static int wcd937x_get_compander(struct snd_kcontrol *kcontrol, 1251 1252 struct snd_ctl_elem_value *ucontrol) 1252 1253 { 1253 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1254 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1254 1255 struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component); 1255 1256 struct soc_mixer_control *mc; 1256 1257 bool hphr; ··· 1266 1267 static int wcd937x_set_compander(struct snd_kcontrol *kcontrol, 1267 1268 struct snd_ctl_elem_value *ucontrol) 1268 1269 { 1269 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1270 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1270 1271 struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component); 1271 1272 struct wcd937x_sdw_priv *wcd = wcd937x->sdw_priv[AIF1_PB]; 1272 1273 int value = ucontrol->value.integer.value[0]; ··· 1303 1304 struct snd_ctl_elem_value *ucontrol) 1304 1305 { 1305 1306 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; 1306 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 1307 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 1307 1308 struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(comp); 1308 1309 struct wcd937x_sdw_priv *wcd; 1309 1310 int dai_id = mixer->shift; ··· 1322 1323 struct snd_ctl_elem_value *ucontrol) 1323 1324 { 1324 1325 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; 1325 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 1326 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 1326 1327 struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(comp); 1327 1328 struct wcd937x_sdw_priv *wcd; 1328 1329 int dai_id = mixer->shift; ··· 1950 1951 static int wcd937x_get_hph_type(struct snd_kcontrol *kcontrol, 1951 1952 struct snd_ctl_elem_value *ucontrol) 1952 1953 { 1953 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1954 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1954 1955 struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component); 1955 1956 1956 1957 ucontrol->value.integer.value[0] = wcd_mbhc_get_hph_type(wcd937x->wcd_mbhc); ··· 1964 1965 u32 zl, zr; 1965 1966 bool hphr; 1966 1967 struct soc_mixer_control *mc; 1967 - struct snd_soc_component *component = 1968 - snd_soc_kcontrol_component(kcontrol); 1968 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1969 1969 struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component); 1970 1970 1971 1971 mc = (struct soc_mixer_control *)(kcontrol->private_value);
+13 -14
sound/soc/codecs/wcd938x.c
··· 1479 1479 static int wcd938x_tx_mode_get(struct snd_kcontrol *kcontrol, 1480 1480 struct snd_ctl_elem_value *ucontrol) 1481 1481 { 1482 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1482 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1483 1483 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 1484 1484 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 1485 1485 int path = e->shift_l; ··· 1492 1492 static int wcd938x_tx_mode_put(struct snd_kcontrol *kcontrol, 1493 1493 struct snd_ctl_elem_value *ucontrol) 1494 1494 { 1495 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1495 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1496 1496 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 1497 1497 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 1498 1498 int path = e->shift_l; ··· 1508 1508 static int wcd938x_rx_hph_mode_get(struct snd_kcontrol *kcontrol, 1509 1509 struct snd_ctl_elem_value *ucontrol) 1510 1510 { 1511 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1511 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1512 1512 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 1513 1513 1514 1514 ucontrol->value.enumerated.item[0] = wcd938x->hph_mode; ··· 1519 1519 static int wcd938x_rx_hph_mode_put(struct snd_kcontrol *kcontrol, 1520 1520 struct snd_ctl_elem_value *ucontrol) 1521 1521 { 1522 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1522 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1523 1523 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 1524 1524 1525 1525 if (wcd938x->hph_mode == ucontrol->value.enumerated.item[0]) ··· 1533 1533 static int wcd938x_ear_pa_put_gain(struct snd_kcontrol *kcontrol, 1534 1534 struct snd_ctl_elem_value *ucontrol) 1535 1535 { 1536 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1536 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1537 1537 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 1538 1538 1539 1539 if (wcd938x->comp1_enable) { ··· 1552 1552 struct snd_ctl_elem_value *ucontrol) 1553 1553 { 1554 1554 1555 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1555 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1556 1556 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 1557 1557 struct soc_mixer_control *mc; 1558 1558 bool hphr; ··· 1571 1571 static int wcd938x_set_compander(struct snd_kcontrol *kcontrol, 1572 1572 struct snd_ctl_elem_value *ucontrol) 1573 1573 { 1574 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1574 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1575 1575 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 1576 1576 struct wcd938x_sdw_priv *wcd; 1577 1577 int value = ucontrol->value.integer.value[0]; ··· 1602 1602 static int wcd938x_ldoh_get(struct snd_kcontrol *kcontrol, 1603 1603 struct snd_ctl_elem_value *ucontrol) 1604 1604 { 1605 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1605 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1606 1606 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 1607 1607 1608 1608 ucontrol->value.integer.value[0] = wcd938x->ldoh; ··· 1613 1613 static int wcd938x_ldoh_put(struct snd_kcontrol *kcontrol, 1614 1614 struct snd_ctl_elem_value *ucontrol) 1615 1615 { 1616 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1616 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1617 1617 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 1618 1618 1619 1619 if (wcd938x->ldoh == ucontrol->value.integer.value[0]) ··· 1843 1843 static int wcd938x_get_swr_port(struct snd_kcontrol *kcontrol, 1844 1844 struct snd_ctl_elem_value *ucontrol) 1845 1845 { 1846 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 1846 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 1847 1847 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(comp); 1848 1848 struct wcd938x_sdw_priv *wcd; 1849 1849 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; ··· 1862 1862 static int wcd938x_set_swr_port(struct snd_kcontrol *kcontrol, 1863 1863 struct snd_ctl_elem_value *ucontrol) 1864 1864 { 1865 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 1865 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 1866 1866 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(comp); 1867 1867 struct wcd938x_sdw_priv *wcd; 1868 1868 struct soc_mixer_control *mixer = ··· 2506 2506 static int wcd938x_get_hph_type(struct snd_kcontrol *kcontrol, 2507 2507 struct snd_ctl_elem_value *ucontrol) 2508 2508 { 2509 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2509 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2510 2510 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 2511 2511 2512 2512 ucontrol->value.integer.value[0] = wcd_mbhc_get_hph_type(wcd938x->wcd_mbhc); ··· 2520 2520 uint32_t zl, zr; 2521 2521 bool hphr; 2522 2522 struct soc_mixer_control *mc; 2523 - struct snd_soc_component *component = 2524 - snd_soc_kcontrol_component(kcontrol); 2523 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2525 2524 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); 2526 2525 2527 2526 mc = (struct soc_mixer_control *)(kcontrol->private_value);
+12 -12
sound/soc/codecs/wcd939x.c
··· 1433 1433 static int wcd939x_tx_mode_get(struct snd_kcontrol *kcontrol, 1434 1434 struct snd_ctl_elem_value *ucontrol) 1435 1435 { 1436 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1436 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1437 1437 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); 1438 1438 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 1439 1439 int path = e->shift_l; ··· 1446 1446 static int wcd939x_tx_mode_put(struct snd_kcontrol *kcontrol, 1447 1447 struct snd_ctl_elem_value *ucontrol) 1448 1448 { 1449 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1449 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1450 1450 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); 1451 1451 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 1452 1452 int path = e->shift_l; ··· 1464 1464 static int wcd939x_rx_hph_mode_get(struct snd_kcontrol *kcontrol, 1465 1465 struct snd_ctl_elem_value *ucontrol) 1466 1466 { 1467 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1467 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1468 1468 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); 1469 1469 1470 1470 ucontrol->value.integer.value[0] = wcd939x->hph_mode; ··· 1475 1475 static int wcd939x_rx_hph_mode_put(struct snd_kcontrol *kcontrol, 1476 1476 struct snd_ctl_elem_value *ucontrol) 1477 1477 { 1478 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1478 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1479 1479 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); 1480 1480 u32 mode_val; 1481 1481 ··· 1520 1520 struct snd_ctl_elem_value *ucontrol) 1521 1521 { 1522 1522 struct soc_mixer_control *mc = (struct soc_mixer_control *)(kcontrol->private_value); 1523 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1523 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1524 1524 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); 1525 1525 1526 1526 if (mc->shift) ··· 1535 1535 struct snd_ctl_elem_value *ucontrol) 1536 1536 { 1537 1537 struct soc_mixer_control *mc = (struct soc_mixer_control *)(kcontrol->private_value); 1538 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1538 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1539 1539 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); 1540 1540 struct wcd939x_sdw_priv *wcd = wcd939x->sdw_priv[AIF1_PB]; 1541 1541 bool value = !!ucontrol->value.integer.value[0]; ··· 1557 1557 static int wcd939x_ldoh_get(struct snd_kcontrol *kcontrol, 1558 1558 struct snd_ctl_elem_value *ucontrol) 1559 1559 { 1560 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1560 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1561 1561 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); 1562 1562 1563 1563 ucontrol->value.integer.value[0] = wcd939x->ldoh ? 1 : 0; ··· 1568 1568 static int wcd939x_ldoh_put(struct snd_kcontrol *kcontrol, 1569 1569 struct snd_ctl_elem_value *ucontrol) 1570 1570 { 1571 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1571 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1572 1572 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); 1573 1573 1574 1574 if (wcd939x->ldoh == !!ucontrol->value.integer.value[0]) ··· 1789 1789 struct snd_ctl_elem_value *ucontrol) 1790 1790 { 1791 1791 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; 1792 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 1792 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 1793 1793 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(comp); 1794 1794 struct wcd939x_sdw_priv *wcd = wcd939x->sdw_priv[mixer->shift]; 1795 1795 unsigned int portidx = wcd->ch_info[mixer->reg].port_num; ··· 1816 1816 struct snd_ctl_elem_value *ucontrol) 1817 1817 { 1818 1818 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; 1819 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 1819 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 1820 1820 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(comp); 1821 1821 struct wcd939x_sdw_priv *wcd = wcd939x->sdw_priv[mixer->shift]; 1822 1822 unsigned int portidx = wcd->ch_info[mixer->reg].port_num; ··· 2432 2432 static int wcd939x_get_hph_type(struct snd_kcontrol *kcontrol, 2433 2433 struct snd_ctl_elem_value *ucontrol) 2434 2434 { 2435 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2435 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2436 2436 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); 2437 2437 2438 2438 ucontrol->value.integer.value[0] = wcd_mbhc_get_hph_type(wcd939x->wcd_mbhc); ··· 2444 2444 struct snd_ctl_elem_value *ucontrol) 2445 2445 { 2446 2446 struct soc_mixer_control *mc = (struct soc_mixer_control *)(kcontrol->private_value); 2447 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 2447 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2448 2448 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); 2449 2449 bool hphr = mc->shift; 2450 2450 u32 zl, zr;
+4 -4
sound/soc/codecs/wm2000.c
··· 598 598 static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol, 599 599 struct snd_ctl_elem_value *ucontrol) 600 600 { 601 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 601 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 602 602 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); 603 603 604 604 ucontrol->value.integer.value[0] = wm2000->anc_active; ··· 609 609 static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol, 610 610 struct snd_ctl_elem_value *ucontrol) 611 611 { 612 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 612 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 613 613 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); 614 614 unsigned int anc_active = ucontrol->value.integer.value[0]; 615 615 int ret; ··· 631 631 static int wm2000_speaker_get(struct snd_kcontrol *kcontrol, 632 632 struct snd_ctl_elem_value *ucontrol) 633 633 { 634 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 634 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 635 635 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); 636 636 637 637 ucontrol->value.integer.value[0] = wm2000->spk_ena; ··· 642 642 static int wm2000_speaker_put(struct snd_kcontrol *kcontrol, 643 643 struct snd_ctl_elem_value *ucontrol) 644 644 { 645 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 645 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 646 646 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); 647 647 unsigned int val = ucontrol->value.integer.value[0]; 648 648 int ret;
+4 -4
sound/soc/codecs/wm5102.c
··· 664 664 static int wm5102_out_comp_coeff_get(struct snd_kcontrol *kcontrol, 665 665 struct snd_ctl_elem_value *ucontrol) 666 666 { 667 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 667 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 668 668 struct arizona *arizona = dev_get_drvdata(component->dev->parent); 669 669 670 670 mutex_lock(&arizona->dac_comp_lock); ··· 678 678 static int wm5102_out_comp_coeff_put(struct snd_kcontrol *kcontrol, 679 679 struct snd_ctl_elem_value *ucontrol) 680 680 { 681 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 681 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 682 682 struct arizona *arizona = dev_get_drvdata(component->dev->parent); 683 683 uint16_t dac_comp_coeff = get_unaligned_be16(ucontrol->value.bytes.data); 684 684 int ret = 0; ··· 696 696 static int wm5102_out_comp_switch_get(struct snd_kcontrol *kcontrol, 697 697 struct snd_ctl_elem_value *ucontrol) 698 698 { 699 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 699 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 700 700 struct arizona *arizona = dev_get_drvdata(component->dev->parent); 701 701 702 702 mutex_lock(&arizona->dac_comp_lock); ··· 709 709 static int wm5102_out_comp_switch_put(struct snd_kcontrol *kcontrol, 710 710 struct snd_ctl_elem_value *ucontrol) 711 711 { 712 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 712 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 713 713 struct arizona *arizona = dev_get_drvdata(component->dev->parent); 714 714 struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; 715 715 int ret = 0;
+3 -3
sound/soc/codecs/wm5110.c
··· 402 402 static int wm5110_put_dre(struct snd_kcontrol *kcontrol, 403 403 struct snd_ctl_elem_value *ucontrol) 404 404 { 405 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 405 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 406 406 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 407 407 struct arizona *arizona = dev_get_drvdata(component->dev->parent); 408 408 struct soc_mixer_control *mc = ··· 467 467 static int wm5110_in_pga_get(struct snd_kcontrol *kcontrol, 468 468 struct snd_ctl_elem_value *ucontrol) 469 469 { 470 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 470 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 471 471 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 472 472 int ret; 473 473 ··· 487 487 static int wm5110_in_pga_put(struct snd_kcontrol *kcontrol, 488 488 struct snd_ctl_elem_value *ucontrol) 489 489 { 490 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 490 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 491 491 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 492 492 int ret; 493 493
+2 -2
sound/soc/codecs/wm8350.c
··· 297 297 static int wm8350_put_volsw_2r_vu(struct snd_kcontrol *kcontrol, 298 298 struct snd_ctl_elem_value *ucontrol) 299 299 { 300 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 300 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 301 301 struct wm8350_data *wm8350_priv = snd_soc_component_get_drvdata(component); 302 302 struct wm8350_output *out = NULL; 303 303 struct soc_mixer_control *mc = ··· 340 340 static int wm8350_get_volsw_2r(struct snd_kcontrol *kcontrol, 341 341 struct snd_ctl_elem_value *ucontrol) 342 342 { 343 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 343 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 344 344 struct wm8350_data *wm8350_priv = snd_soc_component_get_drvdata(component); 345 345 struct wm8350_output *out1 = &wm8350_priv->out1; 346 346 struct wm8350_output *out2 = &wm8350_priv->out2;
+1 -1
sound/soc/codecs/wm8400.c
··· 82 82 static int wm8400_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, 83 83 struct snd_ctl_elem_value *ucontrol) 84 84 { 85 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 85 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 86 86 struct soc_mixer_control *mc = 87 87 (struct soc_mixer_control *)kcontrol->private_value; 88 88 int reg = mc->reg;
+1 -1
sound/soc/codecs/wm8580.c
··· 258 258 { 259 259 struct soc_mixer_control *mc = 260 260 (struct soc_mixer_control *)kcontrol->private_value; 261 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 261 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 262 262 struct wm8580_priv *wm8580 = snd_soc_component_get_drvdata(component); 263 263 unsigned int reg = mc->reg; 264 264 unsigned int reg2 = mc->rreg;
+2 -2
sound/soc/codecs/wm8731.c
··· 96 96 static int wm8731_get_deemph(struct snd_kcontrol *kcontrol, 97 97 struct snd_ctl_elem_value *ucontrol) 98 98 { 99 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 99 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 100 100 struct wm8731_priv *wm8731 = snd_soc_component_get_drvdata(component); 101 101 102 102 ucontrol->value.integer.value[0] = wm8731->deemph; ··· 107 107 static int wm8731_put_deemph(struct snd_kcontrol *kcontrol, 108 108 struct snd_ctl_elem_value *ucontrol) 109 109 { 110 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 110 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 111 111 struct wm8731_priv *wm8731 = snd_soc_component_get_drvdata(component); 112 112 unsigned int deemph = ucontrol->value.integer.value[0]; 113 113 int ret = 0;
+2 -2
sound/soc/codecs/wm8753.c
··· 224 224 static int wm8753_get_dai(struct snd_kcontrol *kcontrol, 225 225 struct snd_ctl_elem_value *ucontrol) 226 226 { 227 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 227 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 228 228 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); 229 229 230 230 ucontrol->value.enumerated.item[0] = wm8753->dai_func; ··· 234 234 static int wm8753_set_dai(struct snd_kcontrol *kcontrol, 235 235 struct snd_ctl_elem_value *ucontrol) 236 236 { 237 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 237 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 238 238 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); 239 239 u16 ioctl; 240 240
+2 -2
sound/soc/codecs/wm8903.c
··· 444 444 static int wm8903_get_deemph(struct snd_kcontrol *kcontrol, 445 445 struct snd_ctl_elem_value *ucontrol) 446 446 { 447 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 447 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 448 448 struct wm8903_priv *wm8903 = snd_soc_component_get_drvdata(component); 449 449 450 450 ucontrol->value.integer.value[0] = wm8903->deemph; ··· 455 455 static int wm8903_put_deemph(struct snd_kcontrol *kcontrol, 456 456 struct snd_ctl_elem_value *ucontrol) 457 457 { 458 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 458 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 459 459 struct wm8903_priv *wm8903 = snd_soc_component_get_drvdata(component); 460 460 unsigned int deemph = ucontrol->value.integer.value[0]; 461 461 int ret = 0;
+7 -7
sound/soc/codecs/wm8904.c
··· 388 388 static int wm8904_put_drc_enum(struct snd_kcontrol *kcontrol, 389 389 struct snd_ctl_elem_value *ucontrol) 390 390 { 391 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 391 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 392 392 struct wm8904_priv *wm8904 = snd_soc_component_get_drvdata(component); 393 393 struct wm8904_pdata *pdata = wm8904->pdata; 394 394 int value = ucontrol->value.enumerated.item[0]; ··· 406 406 static int wm8904_get_drc_enum(struct snd_kcontrol *kcontrol, 407 407 struct snd_ctl_elem_value *ucontrol) 408 408 { 409 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 409 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 410 410 struct wm8904_priv *wm8904 = snd_soc_component_get_drvdata(component); 411 411 412 412 ucontrol->value.enumerated.item[0] = wm8904->drc_cfg; ··· 459 459 static int wm8904_put_retune_mobile_enum(struct snd_kcontrol *kcontrol, 460 460 struct snd_ctl_elem_value *ucontrol) 461 461 { 462 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 462 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 463 463 struct wm8904_priv *wm8904 = snd_soc_component_get_drvdata(component); 464 464 struct wm8904_pdata *pdata = wm8904->pdata; 465 465 int value = ucontrol->value.enumerated.item[0]; ··· 477 477 static int wm8904_get_retune_mobile_enum(struct snd_kcontrol *kcontrol, 478 478 struct snd_ctl_elem_value *ucontrol) 479 479 { 480 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 480 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 481 481 struct wm8904_priv *wm8904 = snd_soc_component_get_drvdata(component); 482 482 483 483 ucontrol->value.enumerated.item[0] = wm8904->retune_mobile_cfg; ··· 517 517 static int wm8904_get_deemph(struct snd_kcontrol *kcontrol, 518 518 struct snd_ctl_elem_value *ucontrol) 519 519 { 520 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 520 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 521 521 struct wm8904_priv *wm8904 = snd_soc_component_get_drvdata(component); 522 522 523 523 ucontrol->value.integer.value[0] = wm8904->deemph; ··· 527 527 static int wm8904_put_deemph(struct snd_kcontrol *kcontrol, 528 528 struct snd_ctl_elem_value *ucontrol) 529 529 { 530 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 530 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 531 531 struct wm8904_priv *wm8904 = snd_soc_component_get_drvdata(component); 532 532 unsigned int deemph = ucontrol->value.integer.value[0]; 533 533 ··· 555 555 static int wm8904_adc_osr_put(struct snd_kcontrol *kcontrol, 556 556 struct snd_ctl_elem_value *ucontrol) 557 557 { 558 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 558 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 559 559 unsigned int val; 560 560 int ret; 561 561
+2 -2
sound/soc/codecs/wm8955.c
··· 387 387 static int wm8955_get_deemph(struct snd_kcontrol *kcontrol, 388 388 struct snd_ctl_elem_value *ucontrol) 389 389 { 390 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 390 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 391 391 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); 392 392 393 393 ucontrol->value.integer.value[0] = wm8955->deemph; ··· 397 397 static int wm8955_put_deemph(struct snd_kcontrol *kcontrol, 398 398 struct snd_ctl_elem_value *ucontrol) 399 399 { 400 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 400 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 401 401 struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); 402 402 unsigned int deemph = ucontrol->value.integer.value[0]; 403 403
+16 -16
sound/soc/codecs/wm8958-dsp2.c
··· 453 453 static int wm8958_put_mbc_enum(struct snd_kcontrol *kcontrol, 454 454 struct snd_ctl_elem_value *ucontrol) 455 455 { 456 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 456 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 457 457 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 458 458 struct wm8994 *control = wm8994->wm8994; 459 459 int value = ucontrol->value.enumerated.item[0]; ··· 475 475 static int wm8958_get_mbc_enum(struct snd_kcontrol *kcontrol, 476 476 struct snd_ctl_elem_value *ucontrol) 477 477 { 478 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 478 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 479 479 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 480 480 481 481 ucontrol->value.enumerated.item[0] = wm8994->mbc_cfg; ··· 497 497 struct snd_ctl_elem_value *ucontrol) 498 498 { 499 499 int mbc = kcontrol->private_value; 500 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 500 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 501 501 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 502 502 503 503 ucontrol->value.integer.value[0] = wm8994->mbc_ena[mbc]; ··· 509 509 struct snd_ctl_elem_value *ucontrol) 510 510 { 511 511 int mbc = kcontrol->private_value; 512 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 512 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 513 513 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 514 514 515 515 if (wm8994->mbc_ena[mbc] == ucontrol->value.integer.value[0]) ··· 543 543 static int wm8958_put_vss_enum(struct snd_kcontrol *kcontrol, 544 544 struct snd_ctl_elem_value *ucontrol) 545 545 { 546 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 546 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 547 547 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 548 548 struct wm8994 *control = wm8994->wm8994; 549 549 int value = ucontrol->value.enumerated.item[0]; ··· 565 565 static int wm8958_get_vss_enum(struct snd_kcontrol *kcontrol, 566 566 struct snd_ctl_elem_value *ucontrol) 567 567 { 568 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 568 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 569 569 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 570 570 571 571 ucontrol->value.enumerated.item[0] = wm8994->vss_cfg; ··· 576 576 static int wm8958_put_vss_hpf_enum(struct snd_kcontrol *kcontrol, 577 577 struct snd_ctl_elem_value *ucontrol) 578 578 { 579 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 579 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 580 580 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 581 581 struct wm8994 *control = wm8994->wm8994; 582 582 int value = ucontrol->value.enumerated.item[0]; ··· 598 598 static int wm8958_get_vss_hpf_enum(struct snd_kcontrol *kcontrol, 599 599 struct snd_ctl_elem_value *ucontrol) 600 600 { 601 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 601 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 602 602 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 603 603 604 604 ucontrol->value.enumerated.item[0] = wm8994->vss_hpf_cfg; ··· 620 620 struct snd_ctl_elem_value *ucontrol) 621 621 { 622 622 int vss = kcontrol->private_value; 623 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 623 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 624 624 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 625 625 626 626 ucontrol->value.integer.value[0] = wm8994->vss_ena[vss]; ··· 632 632 struct snd_ctl_elem_value *ucontrol) 633 633 { 634 634 int vss = kcontrol->private_value; 635 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 635 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 636 636 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 637 637 638 638 if (wm8994->vss_ena[vss] == ucontrol->value.integer.value[0]) ··· 681 681 struct snd_ctl_elem_value *ucontrol) 682 682 { 683 683 int hpf = kcontrol->private_value; 684 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 684 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 685 685 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 686 686 687 687 if (hpf < 3) ··· 696 696 struct snd_ctl_elem_value *ucontrol) 697 697 { 698 698 int hpf = kcontrol->private_value; 699 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 699 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 700 700 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 701 701 702 702 if (hpf < 3) { ··· 743 743 static int wm8958_put_enh_eq_enum(struct snd_kcontrol *kcontrol, 744 744 struct snd_ctl_elem_value *ucontrol) 745 745 { 746 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 746 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 747 747 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 748 748 struct wm8994 *control = wm8994->wm8994; 749 749 int value = ucontrol->value.enumerated.item[0]; ··· 765 765 static int wm8958_get_enh_eq_enum(struct snd_kcontrol *kcontrol, 766 766 struct snd_ctl_elem_value *ucontrol) 767 767 { 768 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 768 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 769 769 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 770 770 771 771 ucontrol->value.enumerated.item[0] = wm8994->enh_eq_cfg; ··· 787 787 struct snd_ctl_elem_value *ucontrol) 788 788 { 789 789 int eq = kcontrol->private_value; 790 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 790 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 791 791 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 792 792 793 793 ucontrol->value.integer.value[0] = wm8994->enh_eq_ena[eq]; ··· 799 799 struct snd_ctl_elem_value *ucontrol) 800 800 { 801 801 int eq = kcontrol->private_value; 802 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 802 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 803 803 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 804 804 805 805 if (wm8994->enh_eq_ena[eq] == ucontrol->value.integer.value[0])
+2 -2
sound/soc/codecs/wm8960.c
··· 211 211 static int wm8960_get_deemph(struct snd_kcontrol *kcontrol, 212 212 struct snd_ctl_elem_value *ucontrol) 213 213 { 214 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 214 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 215 215 struct wm8960_priv *wm8960 = snd_soc_component_get_drvdata(component); 216 216 217 217 ucontrol->value.integer.value[0] = wm8960->deemph; ··· 221 221 static int wm8960_put_deemph(struct snd_kcontrol *kcontrol, 222 222 struct snd_ctl_elem_value *ucontrol) 223 223 { 224 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 224 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 225 225 struct wm8960_priv *wm8960 = snd_soc_component_get_drvdata(component); 226 226 unsigned int deemph = ucontrol->value.integer.value[0]; 227 227
+4 -4
sound/soc/codecs/wm8962.c
··· 1545 1545 struct snd_ctl_elem_value *ucontrol) 1546 1546 { 1547 1547 int shift = kcontrol->private_value; 1548 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1548 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1549 1549 struct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component); 1550 1550 1551 1551 ucontrol->value.integer.value[0] = !!(wm8962->dsp2_ena & 1 << shift); ··· 1557 1557 struct snd_ctl_elem_value *ucontrol) 1558 1558 { 1559 1559 int shift = kcontrol->private_value; 1560 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1560 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1561 1561 struct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component); 1562 1562 int old = wm8962->dsp2_ena; 1563 1563 int ret = 0; ··· 1595 1595 static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol, 1596 1596 struct snd_ctl_elem_value *ucontrol) 1597 1597 { 1598 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1598 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1599 1599 int ret; 1600 1600 1601 1601 /* Apply the update (if any) */ ··· 1625 1625 static int wm8962_put_spk_sw(struct snd_kcontrol *kcontrol, 1626 1626 struct snd_ctl_elem_value *ucontrol) 1627 1627 { 1628 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1628 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1629 1629 int ret; 1630 1630 1631 1631 /* Apply the update (if any) */
+2 -2
sound/soc/codecs/wm8983.c
··· 489 489 static int eqmode_get(struct snd_kcontrol *kcontrol, 490 490 struct snd_ctl_elem_value *ucontrol) 491 491 { 492 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 492 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 493 493 unsigned int reg; 494 494 495 495 reg = snd_soc_component_read(component, WM8983_EQ1_LOW_SHELF); ··· 504 504 static int eqmode_put(struct snd_kcontrol *kcontrol, 505 505 struct snd_ctl_elem_value *ucontrol) 506 506 { 507 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 507 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 508 508 unsigned int regpwr2, regpwr3; 509 509 unsigned int reg_eq; 510 510
+2 -2
sound/soc/codecs/wm8985.c
··· 589 589 static int eqmode_get(struct snd_kcontrol *kcontrol, 590 590 struct snd_ctl_elem_value *ucontrol) 591 591 { 592 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 592 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 593 593 unsigned int reg; 594 594 595 595 reg = snd_soc_component_read(component, WM8985_EQ1_LOW_SHELF); ··· 604 604 static int eqmode_put(struct snd_kcontrol *kcontrol, 605 605 struct snd_ctl_elem_value *ucontrol) 606 606 { 607 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 607 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 608 608 unsigned int regpwr2, regpwr3; 609 609 unsigned int reg_eq; 610 610
+1 -1
sound/soc/codecs/wm8990.c
··· 49 49 static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, 50 50 struct snd_ctl_elem_value *ucontrol) 51 51 { 52 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 52 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 53 53 struct soc_mixer_control *mc = 54 54 (struct soc_mixer_control *)kcontrol->private_value; 55 55 int reg = mc->reg;
+1 -1
sound/soc/codecs/wm8991.c
··· 129 129 static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, 130 130 struct snd_ctl_elem_value *ucontrol) 131 131 { 132 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 132 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 133 133 int reg = kcontrol->private_value & 0xff; 134 134 int ret; 135 135 u16 val;
+5 -5
sound/soc/codecs/wm8994.c
··· 301 301 { 302 302 struct soc_mixer_control *mc = 303 303 (struct soc_mixer_control *)kcontrol->private_value; 304 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 304 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 305 305 int mask, ret; 306 306 307 307 /* Can't enable both ADC and DAC paths simultaneously */ ··· 358 358 static int wm8994_put_drc_enum(struct snd_kcontrol *kcontrol, 359 359 struct snd_ctl_elem_value *ucontrol) 360 360 { 361 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 361 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 362 362 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 363 363 struct wm8994 *control = wm8994->wm8994; 364 364 struct wm8994_pdata *pdata = &control->pdata; ··· 381 381 static int wm8994_get_drc_enum(struct snd_kcontrol *kcontrol, 382 382 struct snd_ctl_elem_value *ucontrol) 383 383 { 384 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 384 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 385 385 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 386 386 int drc = wm8994_get_drc(kcontrol->id.name); 387 387 ··· 465 465 static int wm8994_put_retune_mobile_enum(struct snd_kcontrol *kcontrol, 466 466 struct snd_ctl_elem_value *ucontrol) 467 467 { 468 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 468 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 469 469 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 470 470 struct wm8994 *control = wm8994->wm8994; 471 471 struct wm8994_pdata *pdata = &control->pdata; ··· 488 488 static int wm8994_get_retune_mobile_enum(struct snd_kcontrol *kcontrol, 489 489 struct snd_ctl_elem_value *ucontrol) 490 490 { 491 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 491 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 492 492 struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); 493 493 int block = wm8994_get_retune_mobile_block(kcontrol->id.name); 494 494
+2 -2
sound/soc/codecs/wm8996.c
··· 409 409 static int wm8996_put_retune_mobile_enum(struct snd_kcontrol *kcontrol, 410 410 struct snd_ctl_elem_value *ucontrol) 411 411 { 412 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 412 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 413 413 struct wm8996_priv *wm8996 = snd_soc_component_get_drvdata(component); 414 414 struct wm8996_pdata *pdata = &wm8996->pdata; 415 415 int block = wm8996_get_retune_mobile_block(kcontrol->id.name); ··· 431 431 static int wm8996_get_retune_mobile_enum(struct snd_kcontrol *kcontrol, 432 432 struct snd_ctl_elem_value *ucontrol) 433 433 { 434 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 434 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 435 435 struct wm8996_priv *wm8996 = snd_soc_component_get_drvdata(component); 436 436 int block = wm8996_get_retune_mobile_block(kcontrol->id.name); 437 437
+2 -2
sound/soc/codecs/wm9081.c
··· 335 335 static int speaker_mode_get(struct snd_kcontrol *kcontrol, 336 336 struct snd_ctl_elem_value *ucontrol) 337 337 { 338 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 338 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 339 339 unsigned int reg; 340 340 341 341 reg = snd_soc_component_read(component, WM9081_ANALOGUE_SPEAKER_2); ··· 356 356 static int speaker_mode_put(struct snd_kcontrol *kcontrol, 357 357 struct snd_ctl_elem_value *ucontrol) 358 358 { 359 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 359 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 360 360 unsigned int reg_pwr = snd_soc_component_read(component, WM9081_POWER_MANAGEMENT); 361 361 unsigned int reg2 = snd_soc_component_read(component, WM9081_ANALOGUE_SPEAKER_2); 362 362
+4 -4
sound/soc/codecs/wm_adsp.c
··· 319 319 int wm_adsp_fw_get(struct snd_kcontrol *kcontrol, 320 320 struct snd_ctl_elem_value *ucontrol) 321 321 { 322 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 322 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 323 323 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 324 324 struct wm_adsp *dsp = snd_soc_component_get_drvdata(component); 325 325 ··· 332 332 int wm_adsp_fw_put(struct snd_kcontrol *kcontrol, 333 333 struct snd_ctl_elem_value *ucontrol) 334 334 { 335 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 335 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 336 336 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 337 337 struct wm_adsp *dsp = snd_soc_component_get_drvdata(component); 338 338 int ret = 1; ··· 936 936 int wm_adsp2_preloader_get(struct snd_kcontrol *kcontrol, 937 937 struct snd_ctl_elem_value *ucontrol) 938 938 { 939 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 939 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 940 940 struct wm_adsp *dsps = snd_soc_component_get_drvdata(component); 941 941 struct soc_mixer_control *mc = 942 942 (struct soc_mixer_control *)kcontrol->private_value; ··· 951 951 int wm_adsp2_preloader_put(struct snd_kcontrol *kcontrol, 952 952 struct snd_ctl_elem_value *ucontrol) 953 953 { 954 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 954 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 955 955 struct wm_adsp *dsps = snd_soc_component_get_drvdata(component); 956 956 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 957 957 struct soc_mixer_control *mc =
+1 -1
sound/soc/codecs/wm_hubs.c
··· 331 331 static int wm8993_put_dc_servo(struct snd_kcontrol *kcontrol, 332 332 struct snd_ctl_elem_value *ucontrol) 333 333 { 334 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 334 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 335 335 struct wm_hubs_data *hubs = snd_soc_component_get_drvdata(component); 336 336 int ret; 337 337
+3 -3
sound/soc/codecs/wsa881x.c
··· 738 738 static int wsa881x_put_pa_gain(struct snd_kcontrol *kc, 739 739 struct snd_ctl_elem_value *ucontrol) 740 740 { 741 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kc); 741 + struct snd_soc_component *comp = snd_kcontrol_chip(kc); 742 742 struct soc_mixer_control *mc = 743 743 (struct soc_mixer_control *)kc->private_value; 744 744 int max = mc->max; ··· 783 783 static int wsa881x_get_port(struct snd_kcontrol *kcontrol, 784 784 struct snd_ctl_elem_value *ucontrol) 785 785 { 786 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 786 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 787 787 struct wsa881x_priv *data = snd_soc_component_get_drvdata(comp); 788 788 struct soc_mixer_control *mixer = 789 789 (struct soc_mixer_control *)kcontrol->private_value; ··· 815 815 static int wsa881x_set_port(struct snd_kcontrol *kcontrol, 816 816 struct snd_ctl_elem_value *ucontrol) 817 817 { 818 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 818 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 819 819 struct wsa881x_priv *data = snd_soc_component_get_drvdata(comp); 820 820 struct soc_mixer_control *mixer = 821 821 (struct soc_mixer_control *)kcontrol->private_value;
+6 -6
sound/soc/codecs/wsa883x.c
··· 1121 1121 static int wsa_dev_mode_get(struct snd_kcontrol *kcontrol, 1122 1122 struct snd_ctl_elem_value *ucontrol) 1123 1123 { 1124 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1124 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1125 1125 struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component); 1126 1126 1127 1127 ucontrol->value.enumerated.item[0] = wsa883x->dev_mode; ··· 1132 1132 static int wsa_dev_mode_put(struct snd_kcontrol *kcontrol, 1133 1133 struct snd_ctl_elem_value *ucontrol) 1134 1134 { 1135 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1135 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1136 1136 struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component); 1137 1137 1138 1138 if (wsa883x->dev_mode == ucontrol->value.enumerated.item[0]) ··· 1152 1152 static int wsa883x_get_swr_port(struct snd_kcontrol *kcontrol, 1153 1153 struct snd_ctl_elem_value *ucontrol) 1154 1154 { 1155 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 1155 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 1156 1156 struct wsa883x_priv *data = snd_soc_component_get_drvdata(comp); 1157 1157 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; 1158 1158 int portidx = mixer->reg; ··· 1165 1165 static int wsa883x_set_swr_port(struct snd_kcontrol *kcontrol, 1166 1166 struct snd_ctl_elem_value *ucontrol) 1167 1167 { 1168 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 1168 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 1169 1169 struct wsa883x_priv *data = snd_soc_component_get_drvdata(comp); 1170 1170 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; 1171 1171 int portidx = mixer->reg; ··· 1188 1188 static int wsa883x_get_comp_offset(struct snd_kcontrol *kcontrol, 1189 1189 struct snd_ctl_elem_value *ucontrol) 1190 1190 { 1191 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1191 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1192 1192 struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component); 1193 1193 1194 1194 ucontrol->value.integer.value[0] = wsa883x->comp_offset; ··· 1199 1199 static int wsa883x_set_comp_offset(struct snd_kcontrol *kcontrol, 1200 1200 struct snd_ctl_elem_value *ucontrol) 1201 1201 { 1202 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1202 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1203 1203 struct wsa883x_priv *wsa883x = snd_soc_component_get_drvdata(component); 1204 1204 1205 1205 if (wsa883x->comp_offset == ucontrol->value.integer.value[0])
+4 -4
sound/soc/codecs/wsa884x.c
··· 1587 1587 static int wsa884x_dev_mode_get(struct snd_kcontrol *kcontrol, 1588 1588 struct snd_ctl_elem_value *ucontrol) 1589 1589 { 1590 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1590 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1591 1591 struct wsa884x_priv *wsa884x = snd_soc_component_get_drvdata(component); 1592 1592 1593 1593 ucontrol->value.enumerated.item[0] = wsa884x->dev_mode; ··· 1598 1598 static int wsa884x_dev_mode_put(struct snd_kcontrol *kcontrol, 1599 1599 struct snd_ctl_elem_value *ucontrol) 1600 1600 { 1601 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1601 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1602 1602 struct wsa884x_priv *wsa884x = snd_soc_component_get_drvdata(component); 1603 1603 1604 1604 if (wsa884x->dev_mode == ucontrol->value.enumerated.item[0]) ··· 1612 1612 static int wsa884x_get_swr_port(struct snd_kcontrol *kcontrol, 1613 1613 struct snd_ctl_elem_value *ucontrol) 1614 1614 { 1615 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 1615 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 1616 1616 struct wsa884x_priv *wsa884x = snd_soc_component_get_drvdata(comp); 1617 1617 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; 1618 1618 int portidx = mixer->reg; ··· 1625 1625 static int wsa884x_set_swr_port(struct snd_kcontrol *kcontrol, 1626 1626 struct snd_ctl_elem_value *ucontrol) 1627 1627 { 1628 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 1628 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 1629 1629 struct wsa884x_priv *wsa884x = snd_soc_component_get_drvdata(comp); 1630 1630 struct soc_mixer_control *mixer = (struct soc_mixer_control *)kcontrol->private_value; 1631 1631 int portidx = mixer->reg;
+2 -2
sound/soc/fsl/fsl_micfil.c
··· 197 197 static int micfil_quality_get(struct snd_kcontrol *kcontrol, 198 198 struct snd_ctl_elem_value *ucontrol) 199 199 { 200 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 200 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 201 201 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(cmpnt); 202 202 203 203 ucontrol->value.integer.value[0] = micfil->quality; ··· 208 208 static int micfil_quality_set(struct snd_kcontrol *kcontrol, 209 209 struct snd_ctl_elem_value *ucontrol) 210 210 { 211 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 211 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 212 212 struct fsl_micfil *micfil = snd_soc_component_get_drvdata(cmpnt); 213 213 214 214 micfil->quality = ucontrol->value.integer.value[0];
+3 -3
sound/soc/intel/atom/sst-atom-controls.c
··· 218 218 static int sst_slot_put(struct snd_kcontrol *kcontrol, 219 219 struct snd_ctl_elem_value *ucontrol) 220 220 { 221 - struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 221 + struct snd_soc_component *c = snd_kcontrol_chip(kcontrol); 222 222 struct sst_data *drv = snd_soc_component_get_drvdata(c); 223 223 struct sst_enum *e = (void *)kcontrol->private_value; 224 224 int i, ret = 0; ··· 349 349 struct snd_ctl_elem_value *ucontrol) 350 350 { 351 351 int ret = 0; 352 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 352 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 353 353 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); 354 354 struct sst_algo_control *bc = (void *)kcontrol->private_value; 355 355 ··· 470 470 struct snd_ctl_elem_value *ucontrol) 471 471 { 472 472 int ret = 0; 473 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 473 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 474 474 struct sst_data *drv = snd_soc_component_get_drvdata(cmpnt); 475 475 struct sst_gain_mixer_control *mc = (void *)kcontrol->private_value; 476 476 struct sst_gain_value *gv = mc->gain_val;
+5 -10
sound/soc/intel/catpt/pcm.c
··· 865 865 static int catpt_mixer_volume_get(struct snd_kcontrol *kcontrol, 866 866 struct snd_ctl_elem_value *ucontrol) 867 867 { 868 - struct snd_soc_component *component = 869 - snd_soc_kcontrol_component(kcontrol); 868 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 870 869 struct catpt_dev *cdev = dev_get_drvdata(component->dev); 871 870 u32 dspvol; 872 871 int ret; ··· 888 889 static int catpt_mixer_volume_put(struct snd_kcontrol *kcontrol, 889 890 struct snd_ctl_elem_value *ucontrol) 890 891 { 891 - struct snd_soc_component *component = 892 - snd_soc_kcontrol_component(kcontrol); 892 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 893 893 struct catpt_dev *cdev = dev_get_drvdata(component->dev); 894 894 int ret; 895 895 ··· 908 910 struct snd_ctl_elem_value *ucontrol, 909 911 enum catpt_pin_id pin_id) 910 912 { 911 - struct snd_soc_component *component = 912 - snd_soc_kcontrol_component(kcontrol); 913 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 913 914 struct catpt_stream_runtime *stream; 914 915 struct catpt_dev *cdev = dev_get_drvdata(component->dev); 915 916 long *ctlvol = (long *)kcontrol->private_value; ··· 941 944 struct snd_ctl_elem_value *ucontrol, 942 945 enum catpt_pin_id pin_id) 943 946 { 944 - struct snd_soc_component *component = 945 - snd_soc_kcontrol_component(kcontrol); 947 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 946 948 struct catpt_stream_runtime *stream; 947 949 struct catpt_dev *cdev = dev_get_drvdata(component->dev); 948 950 long *ctlvol = (long *)kcontrol->private_value; ··· 1017 1021 static int catpt_loopback_switch_put(struct snd_kcontrol *kcontrol, 1018 1022 struct snd_ctl_elem_value *ucontrol) 1019 1023 { 1020 - struct snd_soc_component *component = 1021 - snd_soc_kcontrol_component(kcontrol); 1024 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1022 1025 struct catpt_stream_runtime *stream; 1023 1026 struct catpt_dev *cdev = dev_get_drvdata(component->dev); 1024 1027 bool mute;
+12 -12
sound/soc/mediatek/common/mtk-btcvsd.c
··· 1046 1046 static int btcvsd_band_get(struct snd_kcontrol *kcontrol, 1047 1047 struct snd_ctl_elem_value *ucontrol) 1048 1048 { 1049 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1049 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1050 1050 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1051 1051 1052 1052 ucontrol->value.integer.value[0] = bt->band; ··· 1056 1056 static int btcvsd_band_set(struct snd_kcontrol *kcontrol, 1057 1057 struct snd_ctl_elem_value *ucontrol) 1058 1058 { 1059 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1059 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1060 1060 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1061 1061 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 1062 1062 ··· 1071 1071 static int btcvsd_loopback_get(struct snd_kcontrol *kcontrol, 1072 1072 struct snd_ctl_elem_value *ucontrol) 1073 1073 { 1074 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1074 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1075 1075 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1076 1076 bool lpbk_en = bt->tx->state == BT_SCO_STATE_LOOPBACK; 1077 1077 ··· 1082 1082 static int btcvsd_loopback_set(struct snd_kcontrol *kcontrol, 1083 1083 struct snd_ctl_elem_value *ucontrol) 1084 1084 { 1085 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1085 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1086 1086 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1087 1087 1088 1088 if (ucontrol->value.integer.value[0]) { ··· 1098 1098 static int btcvsd_tx_mute_get(struct snd_kcontrol *kcontrol, 1099 1099 struct snd_ctl_elem_value *ucontrol) 1100 1100 { 1101 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1101 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1102 1102 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1103 1103 1104 1104 if (!bt->tx) { ··· 1113 1113 static int btcvsd_tx_mute_set(struct snd_kcontrol *kcontrol, 1114 1114 struct snd_ctl_elem_value *ucontrol) 1115 1115 { 1116 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1116 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1117 1117 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1118 1118 1119 1119 if (!bt->tx) ··· 1126 1126 static int btcvsd_rx_irq_received_get(struct snd_kcontrol *kcontrol, 1127 1127 struct snd_ctl_elem_value *ucontrol) 1128 1128 { 1129 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1129 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1130 1130 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1131 1131 1132 1132 if (!bt->rx) ··· 1139 1139 static int btcvsd_rx_timeout_get(struct snd_kcontrol *kcontrol, 1140 1140 struct snd_ctl_elem_value *ucontrol) 1141 1141 { 1142 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1142 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1143 1143 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1144 1144 1145 1145 if (!bt->rx) ··· 1153 1153 static int btcvsd_rx_timestamp_get(struct snd_kcontrol *kcontrol, 1154 1154 unsigned int __user *data, unsigned int size) 1155 1155 { 1156 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1156 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1157 1157 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1158 1158 int ret = 0; 1159 1159 struct mtk_btcvsd_snd_time_buffer_info time_buffer_info_rx; ··· 1180 1180 static int btcvsd_tx_irq_received_get(struct snd_kcontrol *kcontrol, 1181 1181 struct snd_ctl_elem_value *ucontrol) 1182 1182 { 1183 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1183 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1184 1184 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1185 1185 1186 1186 if (!bt->tx) ··· 1193 1193 static int btcvsd_tx_timeout_get(struct snd_kcontrol *kcontrol, 1194 1194 struct snd_ctl_elem_value *ucontrol) 1195 1195 { 1196 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1196 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1197 1197 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1198 1198 1199 1199 ucontrol->value.integer.value[0] = bt->tx->timeout; ··· 1203 1203 static int btcvsd_tx_timestamp_get(struct snd_kcontrol *kcontrol, 1204 1204 unsigned int __user *data, unsigned int size) 1205 1205 { 1206 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 1206 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 1207 1207 struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt); 1208 1208 int ret = 0; 1209 1209 struct mtk_btcvsd_snd_time_buffer_info time_buffer_info_tx;
+2 -2
sound/soc/mediatek/mt8183/mt8183-dai-adda.c
··· 113 113 static int mt8183_adda_dmic_get(struct snd_kcontrol *kcontrol, 114 114 struct snd_ctl_elem_value *ucontrol) 115 115 { 116 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 116 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 117 117 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 118 118 struct mt8183_afe_private *afe_priv = afe->platform_priv; 119 119 ··· 125 125 static int mt8183_adda_dmic_set(struct snd_kcontrol *kcontrol, 126 126 struct snd_ctl_elem_value *ucontrol) 127 127 { 128 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 128 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 129 129 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 130 130 struct mt8183_afe_private *afe_priv = afe->platform_priv; 131 131 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
+2 -2
sound/soc/mediatek/mt8183/mt8183-dai-i2s.c
··· 118 118 static int mt8183_i2s_hd_get(struct snd_kcontrol *kcontrol, 119 119 struct snd_ctl_elem_value *ucontrol) 120 120 { 121 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 121 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 122 122 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 123 123 struct mtk_afe_i2s_priv *i2s_priv; 124 124 ··· 137 137 static int mt8183_i2s_hd_set(struct snd_kcontrol *kcontrol, 138 138 struct snd_ctl_elem_value *ucontrol) 139 139 { 140 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 140 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 141 141 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 142 142 struct mtk_afe_i2s_priv *i2s_priv; 143 143 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
+6 -6
sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
··· 564 564 static int mt8186_irq_cnt1_get(struct snd_kcontrol *kcontrol, 565 565 struct snd_ctl_elem_value *ucontrol) 566 566 { 567 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 567 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 568 568 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 569 569 struct mt8186_afe_private *afe_priv = afe->platform_priv; 570 570 ··· 577 577 static int mt8186_irq_cnt1_set(struct snd_kcontrol *kcontrol, 578 578 struct snd_ctl_elem_value *ucontrol) 579 579 { 580 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 580 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 581 581 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 582 582 struct mt8186_afe_private *afe_priv = afe->platform_priv; 583 583 int memif_num = MT8186_PRIMARY_MEMIF; ··· 613 613 static int mt8186_irq_cnt2_get(struct snd_kcontrol *kcontrol, 614 614 struct snd_ctl_elem_value *ucontrol) 615 615 { 616 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 616 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 617 617 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 618 618 struct mt8186_afe_private *afe_priv = afe->platform_priv; 619 619 ··· 626 626 static int mt8186_irq_cnt2_set(struct snd_kcontrol *kcontrol, 627 627 struct snd_ctl_elem_value *ucontrol) 628 628 { 629 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 629 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 630 630 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 631 631 struct mt8186_afe_private *afe_priv = afe->platform_priv; 632 632 int memif_num = MT8186_RECORD_MEMIF; ··· 662 662 static int mt8186_record_xrun_assert_get(struct snd_kcontrol *kcontrol, 663 663 struct snd_ctl_elem_value *ucontrol) 664 664 { 665 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 665 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 666 666 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 667 667 struct mt8186_afe_private *afe_priv = afe->platform_priv; 668 668 int xrun_assert = afe_priv->xrun_assert[MT8186_RECORD_MEMIF]; ··· 675 675 static int mt8186_record_xrun_assert_set(struct snd_kcontrol *kcontrol, 676 676 struct snd_ctl_elem_value *ucontrol) 677 677 { 678 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 678 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 679 679 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 680 680 struct mt8186_afe_private *afe_priv = afe->platform_priv; 681 681 int xrun_assert = ucontrol->value.integer.value[0];
+2 -2
sound/soc/mediatek/mt8186/mt8186-dai-adda.c
··· 324 324 static int mt8186_adda_dmic_get(struct snd_kcontrol *kcontrol, 325 325 struct snd_ctl_elem_value *ucontrol) 326 326 { 327 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 327 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 328 328 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 329 329 struct mt8186_afe_private *afe_priv = afe->platform_priv; 330 330 ··· 336 336 static int mt8186_adda_dmic_set(struct snd_kcontrol *kcontrol, 337 337 struct snd_ctl_elem_value *ucontrol) 338 338 { 339 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 339 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 340 340 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 341 341 struct mt8186_afe_private *afe_priv = afe->platform_priv; 342 342 int dmic_on;
+2 -2
sound/soc/mediatek/mt8186/mt8186-dai-i2s.c
··· 113 113 static int mt8186_i2s_hd_get(struct snd_kcontrol *kcontrol, 114 114 struct snd_ctl_elem_value *ucontrol) 115 115 { 116 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 116 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 117 117 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 118 118 struct mtk_afe_i2s_priv *i2s_priv; 119 119 ··· 126 126 static int mt8186_i2s_hd_set(struct snd_kcontrol *kcontrol, 127 127 struct snd_ctl_elem_value *ucontrol) 128 128 { 129 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 129 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 130 130 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 131 131 struct mtk_afe_i2s_priv *i2s_priv; 132 132 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
+2 -2
sound/soc/mediatek/mt8186/mt8186-dai-tdm.c
··· 272 272 static int mt8186_tdm_hd_get(struct snd_kcontrol *kcontrol, 273 273 struct snd_ctl_elem_value *ucontrol) 274 274 { 275 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 275 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 276 276 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 277 277 struct mt8186_afe_private *afe_priv = afe->platform_priv; 278 278 int dai_id = get_tdm_id_by_name(kcontrol->id.name); ··· 286 286 static int mt8186_tdm_hd_set(struct snd_kcontrol *kcontrol, 287 287 struct snd_ctl_elem_value *ucontrol) 288 288 { 289 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 289 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 290 290 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 291 291 struct mt8186_afe_private *afe_priv = afe->platform_priv; 292 292 int dai_id = get_tdm_id_by_name(kcontrol->id.name);
+6 -6
sound/soc/mediatek/mt8186/mt8186-misc-control.c
··· 74 74 static int mt8186_sgen_get(struct snd_kcontrol *kcontrol, 75 75 struct snd_ctl_elem_value *ucontrol) 76 76 { 77 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 77 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 78 78 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 79 79 struct mt8186_afe_private *afe_priv = afe->platform_priv; 80 80 ··· 86 86 static int mt8186_sgen_set(struct snd_kcontrol *kcontrol, 87 87 struct snd_ctl_elem_value *ucontrol) 88 88 { 89 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 89 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 90 90 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 91 91 struct mt8186_afe_private *afe_priv = afe->platform_priv; 92 92 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; ··· 128 128 static int mt8186_sgen_rate_get(struct snd_kcontrol *kcontrol, 129 129 struct snd_ctl_elem_value *ucontrol) 130 130 { 131 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 131 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 132 132 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 133 133 struct mt8186_afe_private *afe_priv = afe->platform_priv; 134 134 ··· 140 140 static int mt8186_sgen_rate_set(struct snd_kcontrol *kcontrol, 141 141 struct snd_ctl_elem_value *ucontrol) 142 142 { 143 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 143 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 144 144 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 145 145 struct mt8186_afe_private *afe_priv = afe->platform_priv; 146 146 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; ··· 172 172 static int mt8186_sgen_amplitude_get(struct snd_kcontrol *kcontrol, 173 173 struct snd_ctl_elem_value *ucontrol) 174 174 { 175 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 175 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 176 176 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 177 177 struct mt8186_afe_private *afe_priv = afe->platform_priv; 178 178 ··· 183 183 static int mt8186_sgen_amplitude_set(struct snd_kcontrol *kcontrol, 184 184 struct snd_ctl_elem_value *ucontrol) 185 185 { 186 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 186 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 187 187 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 188 188 struct mt8186_afe_private *afe_priv = afe->platform_priv; 189 189 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
+4 -6
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
··· 1623 1623 static int mt8188_memif_1x_en_sel_put(struct snd_kcontrol *kcontrol, 1624 1624 struct snd_ctl_elem_value *ucontrol) 1625 1625 { 1626 - struct snd_soc_component *component = 1627 - snd_soc_kcontrol_component(kcontrol); 1626 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1628 1627 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 1629 1628 struct mt8188_afe_private *afe_priv = afe->platform_priv; 1630 1629 struct mtk_dai_memif_priv *memif_priv; ··· 1646 1647 static int mt8188_asys_irq_1x_en_sel_put(struct snd_kcontrol *kcontrol, 1647 1648 struct snd_ctl_elem_value *ucontrol) 1648 1649 { 1649 - struct snd_soc_component *component = 1650 - snd_soc_kcontrol_component(kcontrol); 1650 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1651 1651 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 1652 1652 struct mt8188_afe_private *afe_priv = afe->platform_priv; 1653 1653 unsigned int id = kcontrol->id.device; ··· 1666 1668 static int mt8188_memif_fs_timing_sel_get(struct snd_kcontrol *kcontrol, 1667 1669 struct snd_ctl_elem_value *ucontrol) 1668 1670 { 1669 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1671 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1670 1672 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 1671 1673 struct mt8188_afe_private *afe_priv = afe->platform_priv; 1672 1674 struct mtk_dai_memif_priv *memif_priv; ··· 1684 1686 static int mt8188_memif_fs_timing_sel_put(struct snd_kcontrol *kcontrol, 1685 1687 struct snd_ctl_elem_value *ucontrol) 1686 1688 { 1687 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1689 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1688 1690 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 1689 1691 struct mt8188_afe_private *afe_priv = afe->platform_priv; 1690 1692 struct mtk_dai_memif_priv *memif_priv;
+2 -2
sound/soc/mediatek/mt8188/mt8188-dai-adda.c
··· 310 310 static int mt8188_adda_dmic_get(struct snd_kcontrol *kcontrol, 311 311 struct snd_ctl_elem_value *ucontrol) 312 312 { 313 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 313 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 314 314 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 315 315 struct mt8188_afe_private *afe_priv = afe->platform_priv; 316 316 struct mtkaif_param *param = &afe_priv->mtkaif_params; ··· 322 322 static int mt8188_adda_dmic_set(struct snd_kcontrol *kcontrol, 323 323 struct snd_ctl_elem_value *ucontrol) 324 324 { 325 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 325 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 326 326 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 327 327 struct mt8188_afe_private *afe_priv = afe->platform_priv; 328 328 struct mtkaif_param *param = &afe_priv->mtkaif_params;
+1 -1
sound/soc/mediatek/mt8188/mt8188-dai-dmic.c
··· 570 570 static int mtk_dai_dmic_hw_gain_ctrl_get(struct snd_kcontrol *kcontrol, 571 571 struct snd_ctl_elem_value *ucontrol) 572 572 { 573 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 573 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 574 574 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 575 575 struct mt8188_afe_private *afe_priv = afe->platform_priv; 576 576 struct mtk_dai_dmic_priv *dmic_priv = afe_priv->dai_priv[MT8188_AFE_IO_DMIC_IN];
+1 -2
sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
··· 1061 1061 static int mt8188_etdm_clk_src_sel_get(struct snd_kcontrol *kcontrol, 1062 1062 struct snd_ctl_elem_value *ucontrol) 1063 1063 { 1064 - struct snd_soc_component *component = 1065 - snd_soc_kcontrol_component(kcontrol); 1064 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1066 1065 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 1067 1066 unsigned int value; 1068 1067 unsigned int reg;
+6 -6
sound/soc/mediatek/mt8192/mt8192-dai-adda.c
··· 492 492 static int stf_positive_gain_get(struct snd_kcontrol *kcontrol, 493 493 struct snd_ctl_elem_value *ucontrol) 494 494 { 495 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 495 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 496 496 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 497 497 struct mt8192_afe_private *afe_priv = afe->platform_priv; 498 498 ··· 503 503 static int stf_positive_gain_set(struct snd_kcontrol *kcontrol, 504 504 struct snd_ctl_elem_value *ucontrol) 505 505 { 506 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 506 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 507 507 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 508 508 struct mt8192_afe_private *afe_priv = afe->platform_priv; 509 509 int gain_db = ucontrol->value.integer.value[0]; ··· 527 527 static int mt8192_adda_dmic_get(struct snd_kcontrol *kcontrol, 528 528 struct snd_ctl_elem_value *ucontrol) 529 529 { 530 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 530 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 531 531 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 532 532 struct mt8192_afe_private *afe_priv = afe->platform_priv; 533 533 ··· 538 538 static int mt8192_adda_dmic_set(struct snd_kcontrol *kcontrol, 539 539 struct snd_ctl_elem_value *ucontrol) 540 540 { 541 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 541 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 542 542 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 543 543 struct mt8192_afe_private *afe_priv = afe->platform_priv; 544 544 int dmic_on; ··· 558 558 static int mt8192_adda6_only_get(struct snd_kcontrol *kcontrol, 559 559 struct snd_ctl_elem_value *ucontrol) 560 560 { 561 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 561 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 562 562 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 563 563 struct mt8192_afe_private *afe_priv = afe->platform_priv; 564 564 ··· 569 569 static int mt8192_adda6_only_set(struct snd_kcontrol *kcontrol, 570 570 struct snd_ctl_elem_value *ucontrol) 571 571 { 572 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 572 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 573 573 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 574 574 struct mt8192_afe_private *afe_priv = afe->platform_priv; 575 575 int mtkaif_adda6_only;
+2 -2
sound/soc/mediatek/mt8192/mt8192-dai-i2s.c
··· 135 135 static int mt8192_i2s_hd_get(struct snd_kcontrol *kcontrol, 136 136 struct snd_ctl_elem_value *ucontrol) 137 137 { 138 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 138 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 139 139 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 140 140 struct mtk_afe_i2s_priv *i2s_priv; 141 141 ··· 154 154 static int mt8192_i2s_hd_set(struct snd_kcontrol *kcontrol, 155 155 struct snd_ctl_elem_value *ucontrol) 156 156 { 157 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 157 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 158 158 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 159 159 struct mtk_afe_i2s_priv *i2s_priv; 160 160 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
+2 -4
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
··· 1460 1460 static int mt8195_memif_1x_en_sel_put(struct snd_kcontrol *kcontrol, 1461 1461 struct snd_ctl_elem_value *ucontrol) 1462 1462 { 1463 - struct snd_soc_component *component = 1464 - snd_soc_kcontrol_component(kcontrol); 1463 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1465 1464 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 1466 1465 struct mt8195_afe_private *afe_priv = afe->platform_priv; 1467 1466 struct mtk_dai_memif_priv *memif_priv; ··· 1483 1484 static int mt8195_asys_irq_1x_en_sel_put(struct snd_kcontrol *kcontrol, 1484 1485 struct snd_ctl_elem_value *ucontrol) 1485 1486 { 1486 - struct snd_soc_component *component = 1487 - snd_soc_kcontrol_component(kcontrol); 1487 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1488 1488 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 1489 1489 struct mt8195_afe_private *afe_priv = afe->platform_priv; 1490 1490 unsigned int id = kcontrol->id.device;
+4 -4
sound/soc/mediatek/mt8195/mt8195-dai-adda.c
··· 484 484 static int mt8195_adda6_only_get(struct snd_kcontrol *kcontrol, 485 485 struct snd_ctl_elem_value *ucontrol) 486 486 { 487 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 487 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 488 488 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 489 489 struct mt8195_afe_private *afe_priv = afe->platform_priv; 490 490 struct mtkaif_param *param = &afe_priv->mtkaif_params; ··· 496 496 static int mt8195_adda6_only_set(struct snd_kcontrol *kcontrol, 497 497 struct snd_ctl_elem_value *ucontrol) 498 498 { 499 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 499 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 500 500 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 501 501 struct mt8195_afe_private *afe_priv = afe->platform_priv; 502 502 struct mtkaif_param *param = &afe_priv->mtkaif_params; ··· 515 515 static int mt8195_adda_dmic_get(struct snd_kcontrol *kcontrol, 516 516 struct snd_ctl_elem_value *ucontrol) 517 517 { 518 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 518 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 519 519 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 520 520 struct mt8195_afe_private *afe_priv = afe->platform_priv; 521 521 struct mtkaif_param *param = &afe_priv->mtkaif_params; ··· 527 527 static int mt8195_adda_dmic_set(struct snd_kcontrol *kcontrol, 528 528 struct snd_ctl_elem_value *ucontrol) 529 529 { 530 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 530 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 531 531 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); 532 532 struct mt8195_afe_private *afe_priv = afe->platform_priv; 533 533 struct mtkaif_param *param = &afe_priv->mtkaif_params;
+1 -2
sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
··· 738 738 static int mt8195_etdm_clk_src_sel_get(struct snd_kcontrol *kcontrol, 739 739 struct snd_ctl_elem_value *ucontrol) 740 740 { 741 - struct snd_soc_component *component = 742 - snd_soc_kcontrol_component(kcontrol); 741 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 743 742 struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component); 744 743 unsigned int value = 0; 745 744 unsigned int reg = 0;
+4 -4
sound/soc/rockchip/rockchip_sai.c
··· 1227 1227 static int rockchip_sai_rd_wait_time_get(struct snd_kcontrol *kcontrol, 1228 1228 struct snd_ctl_elem_value *ucontrol) 1229 1229 { 1230 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1230 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1231 1231 struct rk_sai_dev *sai = snd_soc_component_get_drvdata(component); 1232 1232 1233 1233 ucontrol->value.integer.value[0] = sai->wait_time[SNDRV_PCM_STREAM_CAPTURE]; ··· 1238 1238 static int rockchip_sai_rd_wait_time_put(struct snd_kcontrol *kcontrol, 1239 1239 struct snd_ctl_elem_value *ucontrol) 1240 1240 { 1241 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1241 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1242 1242 struct rk_sai_dev *sai = snd_soc_component_get_drvdata(component); 1243 1243 1244 1244 if (ucontrol->value.integer.value[0] > WAIT_TIME_MS_MAX) ··· 1252 1252 static int rockchip_sai_wr_wait_time_get(struct snd_kcontrol *kcontrol, 1253 1253 struct snd_ctl_elem_value *ucontrol) 1254 1254 { 1255 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1255 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1256 1256 struct rk_sai_dev *sai = snd_soc_component_get_drvdata(component); 1257 1257 1258 1258 ucontrol->value.integer.value[0] = sai->wait_time[SNDRV_PCM_STREAM_PLAYBACK]; ··· 1263 1263 static int rockchip_sai_wr_wait_time_put(struct snd_kcontrol *kcontrol, 1264 1264 struct snd_ctl_elem_value *ucontrol) 1265 1265 { 1266 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 1266 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1267 1267 struct rk_sai_dev *sai = snd_soc_component_get_drvdata(component); 1268 1268 1269 1269 if (ucontrol->value.integer.value[0] > WAIT_TIME_MS_MAX)
+12 -12
sound/soc/tegra/tegra186_asrc.c
··· 241 241 { 242 242 struct soc_enum *asrc_private = 243 243 (struct soc_enum *)kcontrol->private_value; 244 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 244 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 245 245 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 246 246 unsigned int id = asrc_private->reg / TEGRA186_ASRC_STREAM_STRIDE; 247 247 ··· 255 255 { 256 256 struct soc_enum *asrc_private = 257 257 (struct soc_enum *)kcontrol->private_value; 258 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 258 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 259 259 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 260 260 unsigned int id = asrc_private->reg / TEGRA186_ASRC_STREAM_STRIDE; 261 261 bool change = false; ··· 275 275 { 276 276 struct soc_mixer_control *asrc_private = 277 277 (struct soc_mixer_control *)kcontrol->private_value; 278 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 278 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 279 279 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 280 280 unsigned int id = asrc_private->reg / TEGRA186_ASRC_STREAM_STRIDE; 281 281 ··· 293 293 { 294 294 struct soc_mixer_control *asrc_private = 295 295 (struct soc_mixer_control *)kcontrol->private_value; 296 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 296 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 297 297 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 298 298 unsigned int id = asrc_private->reg / TEGRA186_ASRC_STREAM_STRIDE; 299 299 bool change = false; ··· 323 323 { 324 324 struct soc_mreg_control *asrc_private = 325 325 (struct soc_mreg_control *)kcontrol->private_value; 326 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 326 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 327 327 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 328 328 unsigned int id = asrc_private->regbase / TEGRA186_ASRC_STREAM_STRIDE; 329 329 ··· 341 341 { 342 342 struct soc_mreg_control *asrc_private = 343 343 (struct soc_mreg_control *)kcontrol->private_value; 344 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 344 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 345 345 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 346 346 unsigned int id = asrc_private->regbase / TEGRA186_ASRC_STREAM_STRIDE; 347 347 bool change = false; ··· 371 371 { 372 372 struct soc_mixer_control *asrc_private = 373 373 (struct soc_mixer_control *)kcontrol->private_value; 374 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 374 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 375 375 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 376 376 unsigned int id = asrc_private->reg / TEGRA186_ASRC_STREAM_STRIDE; 377 377 ··· 385 385 { 386 386 struct soc_mixer_control *asrc_private = 387 387 (struct soc_mixer_control *)kcontrol->private_value; 388 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 388 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 389 389 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 390 390 unsigned int id = asrc_private->reg / TEGRA186_ASRC_STREAM_STRIDE; 391 391 int value = ucontrol->value.integer.value[0]; ··· 403 403 { 404 404 struct soc_mixer_control *asrc_private = 405 405 (struct soc_mixer_control *)kcontrol->private_value; 406 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 406 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 407 407 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 408 408 unsigned int id = asrc_private->reg / TEGRA186_ASRC_STREAM_STRIDE; 409 409 ··· 417 417 { 418 418 struct soc_mixer_control *asrc_private = 419 419 (struct soc_mixer_control *)kcontrol->private_value; 420 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 420 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 421 421 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 422 422 unsigned int id = asrc_private->reg / TEGRA186_ASRC_STREAM_STRIDE; 423 423 int value = (asrc->lane[id].input_thresh & ~(0x3)) | ··· 436 436 { 437 437 struct soc_mixer_control *asrc_private = 438 438 (struct soc_mixer_control *)kcontrol->private_value; 439 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 439 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 440 440 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 441 441 unsigned int id = asrc_private->reg / TEGRA186_ASRC_STREAM_STRIDE; 442 442 ··· 450 450 { 451 451 struct soc_mixer_control *asrc_private = 452 452 (struct soc_mixer_control *)kcontrol->private_value; 453 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 453 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 454 454 struct tegra186_asrc *asrc = snd_soc_component_get_drvdata(cmpnt); 455 455 unsigned int id = asrc_private->reg / TEGRA186_ASRC_STREAM_STRIDE; 456 456 int value = (asrc->lane[id].output_thresh & ~(0x3)) |
+12 -12
sound/soc/tegra/tegra186_dspk.c
··· 28 28 static int tegra186_dspk_get_fifo_th(struct snd_kcontrol *kcontrol, 29 29 struct snd_ctl_elem_value *ucontrol) 30 30 { 31 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 31 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 32 32 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 33 33 34 34 ucontrol->value.integer.value[0] = dspk->rx_fifo_th; ··· 39 39 static int tegra186_dspk_put_fifo_th(struct snd_kcontrol *kcontrol, 40 40 struct snd_ctl_elem_value *ucontrol) 41 41 { 42 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 42 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 43 43 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 44 44 int value = ucontrol->value.integer.value[0]; 45 45 ··· 54 54 static int tegra186_dspk_get_osr_val(struct snd_kcontrol *kcontrol, 55 55 struct snd_ctl_elem_value *ucontrol) 56 56 { 57 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 57 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 58 58 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 59 59 60 60 ucontrol->value.enumerated.item[0] = dspk->osr_val; ··· 65 65 static int tegra186_dspk_put_osr_val(struct snd_kcontrol *kcontrol, 66 66 struct snd_ctl_elem_value *ucontrol) 67 67 { 68 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 68 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 69 69 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 70 70 unsigned int value = ucontrol->value.enumerated.item[0]; 71 71 ··· 80 80 static int tegra186_dspk_get_pol_sel(struct snd_kcontrol *kcontrol, 81 81 struct snd_ctl_elem_value *ucontrol) 82 82 { 83 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 83 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 84 84 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 85 85 86 86 ucontrol->value.enumerated.item[0] = dspk->lrsel; ··· 91 91 static int tegra186_dspk_put_pol_sel(struct snd_kcontrol *kcontrol, 92 92 struct snd_ctl_elem_value *ucontrol) 93 93 { 94 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 94 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 95 95 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 96 96 unsigned int value = ucontrol->value.enumerated.item[0]; 97 97 ··· 106 106 static int tegra186_dspk_get_ch_sel(struct snd_kcontrol *kcontrol, 107 107 struct snd_ctl_elem_value *ucontrol) 108 108 { 109 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 109 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 110 110 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 111 111 112 112 ucontrol->value.enumerated.item[0] = dspk->ch_sel; ··· 117 117 static int tegra186_dspk_put_ch_sel(struct snd_kcontrol *kcontrol, 118 118 struct snd_ctl_elem_value *ucontrol) 119 119 { 120 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 120 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 121 121 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 122 122 unsigned int value = ucontrol->value.enumerated.item[0]; 123 123 ··· 132 132 static int tegra186_dspk_get_mono_to_stereo(struct snd_kcontrol *kcontrol, 133 133 struct snd_ctl_elem_value *ucontrol) 134 134 { 135 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 135 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 136 136 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 137 137 138 138 ucontrol->value.enumerated.item[0] = dspk->mono_to_stereo; ··· 143 143 static int tegra186_dspk_put_mono_to_stereo(struct snd_kcontrol *kcontrol, 144 144 struct snd_ctl_elem_value *ucontrol) 145 145 { 146 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 146 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 147 147 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 148 148 unsigned int value = ucontrol->value.enumerated.item[0]; 149 149 ··· 158 158 static int tegra186_dspk_get_stereo_to_mono(struct snd_kcontrol *kcontrol, 159 159 struct snd_ctl_elem_value *ucontrol) 160 160 { 161 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 161 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 162 162 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 163 163 164 164 ucontrol->value.enumerated.item[0] = dspk->stereo_to_mono; ··· 169 169 static int tegra186_dspk_put_stereo_to_mono(struct snd_kcontrol *kcontrol, 170 170 struct snd_ctl_elem_value *ucontrol) 171 171 { 172 - struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol); 172 + struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol); 173 173 struct tegra186_dspk *dspk = snd_soc_component_get_drvdata(codec); 174 174 unsigned int value = ucontrol->value.enumerated.item[0]; 175 175
+8 -8
sound/soc/tegra/tegra210_admaif.c
··· 493 493 static int tegra210_admaif_pget_mono_to_stereo(struct snd_kcontrol *kcontrol, 494 494 struct snd_ctl_elem_value *ucontrol) 495 495 { 496 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 496 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 497 497 struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt); 498 498 struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value; 499 499 ··· 506 506 static int tegra210_admaif_pput_mono_to_stereo(struct snd_kcontrol *kcontrol, 507 507 struct snd_ctl_elem_value *ucontrol) 508 508 { 509 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 509 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 510 510 struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt); 511 511 struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value; 512 512 unsigned int value = ucontrol->value.enumerated.item[0]; ··· 522 522 static int tegra210_admaif_cget_mono_to_stereo(struct snd_kcontrol *kcontrol, 523 523 struct snd_ctl_elem_value *ucontrol) 524 524 { 525 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 525 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 526 526 struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt); 527 527 struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value; 528 528 ··· 535 535 static int tegra210_admaif_cput_mono_to_stereo(struct snd_kcontrol *kcontrol, 536 536 struct snd_ctl_elem_value *ucontrol) 537 537 { 538 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 538 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 539 539 struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt); 540 540 struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value; 541 541 unsigned int value = ucontrol->value.enumerated.item[0]; ··· 551 551 static int tegra210_admaif_pget_stereo_to_mono(struct snd_kcontrol *kcontrol, 552 552 struct snd_ctl_elem_value *ucontrol) 553 553 { 554 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 554 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 555 555 struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt); 556 556 struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value; 557 557 ··· 564 564 static int tegra210_admaif_pput_stereo_to_mono(struct snd_kcontrol *kcontrol, 565 565 struct snd_ctl_elem_value *ucontrol) 566 566 { 567 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 567 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 568 568 struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt); 569 569 struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value; 570 570 unsigned int value = ucontrol->value.enumerated.item[0]; ··· 580 580 static int tegra210_admaif_cget_stereo_to_mono(struct snd_kcontrol *kcontrol, 581 581 struct snd_ctl_elem_value *ucontrol) 582 582 { 583 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 583 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 584 584 struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt); 585 585 struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value; 586 586 ··· 593 593 static int tegra210_admaif_cput_stereo_to_mono(struct snd_kcontrol *kcontrol, 594 594 struct snd_ctl_elem_value *ucontrol) 595 595 { 596 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 596 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 597 597 struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt); 598 598 struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value; 599 599 unsigned int value = ucontrol->value.enumerated.item[0];
+2 -2
sound/soc/tegra/tegra210_adx.c
··· 186 186 static int tegra210_adx_get_byte_map(struct snd_kcontrol *kcontrol, 187 187 struct snd_ctl_elem_value *ucontrol) 188 188 { 189 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 189 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 190 190 struct tegra210_adx *adx = snd_soc_component_get_drvdata(cmpnt); 191 191 struct soc_mixer_control *mc; 192 192 unsigned char *bytes_map = (unsigned char *)adx->map; ··· 216 216 static int tegra210_adx_put_byte_map(struct snd_kcontrol *kcontrol, 217 217 struct snd_ctl_elem_value *ucontrol) 218 218 { 219 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 219 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 220 220 struct tegra210_adx *adx = snd_soc_component_get_drvdata(cmpnt); 221 221 unsigned char *bytes_map = (unsigned char *)adx->map; 222 222 int value = ucontrol->value.integer.value[0];
+2 -2
sound/soc/tegra/tegra210_amx.c
··· 208 208 static int tegra210_amx_get_byte_map(struct snd_kcontrol *kcontrol, 209 209 struct snd_ctl_elem_value *ucontrol) 210 210 { 211 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 211 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 212 212 struct soc_mixer_control *mc = 213 213 (struct soc_mixer_control *)kcontrol->private_value; 214 214 struct tegra210_amx *amx = snd_soc_component_get_drvdata(cmpnt); ··· 241 241 { 242 242 struct soc_mixer_control *mc = 243 243 (struct soc_mixer_control *)kcontrol->private_value; 244 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 244 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 245 245 struct tegra210_amx *amx = snd_soc_component_get_drvdata(cmpnt); 246 246 unsigned char *bytes_map = (unsigned char *)amx->map; 247 247 int reg = mc->reg;
+12 -12
sound/soc/tegra/tegra210_dmic.c
··· 160 160 static int tegra210_dmic_get_boost_gain(struct snd_kcontrol *kcontrol, 161 161 struct snd_ctl_elem_value *ucontrol) 162 162 { 163 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 163 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 164 164 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 165 165 166 166 ucontrol->value.integer.value[0] = dmic->boost_gain; ··· 171 171 static int tegra210_dmic_put_boost_gain(struct snd_kcontrol *kcontrol, 172 172 struct snd_ctl_elem_value *ucontrol) 173 173 { 174 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 174 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 175 175 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 176 176 int value = ucontrol->value.integer.value[0]; 177 177 ··· 186 186 static int tegra210_dmic_get_ch_select(struct snd_kcontrol *kcontrol, 187 187 struct snd_ctl_elem_value *ucontrol) 188 188 { 189 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 189 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 190 190 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 191 191 192 192 ucontrol->value.enumerated.item[0] = dmic->ch_select; ··· 197 197 static int tegra210_dmic_put_ch_select(struct snd_kcontrol *kcontrol, 198 198 struct snd_ctl_elem_value *ucontrol) 199 199 { 200 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 200 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 201 201 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 202 202 unsigned int value = ucontrol->value.enumerated.item[0]; 203 203 ··· 212 212 static int tegra210_dmic_get_mono_to_stereo(struct snd_kcontrol *kcontrol, 213 213 struct snd_ctl_elem_value *ucontrol) 214 214 { 215 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 215 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 216 216 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 217 217 218 218 ucontrol->value.enumerated.item[0] = dmic->mono_to_stereo; ··· 223 223 static int tegra210_dmic_put_mono_to_stereo(struct snd_kcontrol *kcontrol, 224 224 struct snd_ctl_elem_value *ucontrol) 225 225 { 226 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 226 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 227 227 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 228 228 unsigned int value = ucontrol->value.enumerated.item[0]; 229 229 ··· 238 238 static int tegra210_dmic_get_stereo_to_mono(struct snd_kcontrol *kcontrol, 239 239 struct snd_ctl_elem_value *ucontrol) 240 240 { 241 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 241 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 242 242 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 243 243 244 244 ucontrol->value.enumerated.item[0] = dmic->stereo_to_mono; ··· 249 249 static int tegra210_dmic_put_stereo_to_mono(struct snd_kcontrol *kcontrol, 250 250 struct snd_ctl_elem_value *ucontrol) 251 251 { 252 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 252 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 253 253 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 254 254 unsigned int value = ucontrol->value.enumerated.item[0]; 255 255 ··· 264 264 static int tegra210_dmic_get_osr_val(struct snd_kcontrol *kcontrol, 265 265 struct snd_ctl_elem_value *ucontrol) 266 266 { 267 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 267 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 268 268 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 269 269 270 270 ucontrol->value.enumerated.item[0] = dmic->osr_val; ··· 275 275 static int tegra210_dmic_put_osr_val(struct snd_kcontrol *kcontrol, 276 276 struct snd_ctl_elem_value *ucontrol) 277 277 { 278 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 278 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 279 279 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 280 280 unsigned int value = ucontrol->value.enumerated.item[0]; 281 281 ··· 290 290 static int tegra210_dmic_get_pol_sel(struct snd_kcontrol *kcontrol, 291 291 struct snd_ctl_elem_value *ucontrol) 292 292 { 293 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 293 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 294 294 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 295 295 296 296 ucontrol->value.enumerated.item[0] = dmic->lrsel; ··· 301 301 static int tegra210_dmic_put_pol_sel(struct snd_kcontrol *kcontrol, 302 302 struct snd_ctl_elem_value *ucontrol) 303 303 { 304 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 304 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 305 305 struct tegra210_dmic *dmic = snd_soc_component_get_drvdata(comp); 306 306 unsigned int value = ucontrol->value.enumerated.item[0]; 307 307
+16 -16
sound/soc/tegra/tegra210_i2s.c
··· 319 319 static int tegra210_i2s_get_loopback(struct snd_kcontrol *kcontrol, 320 320 struct snd_ctl_elem_value *ucontrol) 321 321 { 322 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 322 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 323 323 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 324 324 325 325 ucontrol->value.integer.value[0] = i2s->loopback; ··· 330 330 static int tegra210_i2s_put_loopback(struct snd_kcontrol *kcontrol, 331 331 struct snd_ctl_elem_value *ucontrol) 332 332 { 333 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 333 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 334 334 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 335 335 int value = ucontrol->value.integer.value[0]; 336 336 ··· 348 348 static int tegra210_i2s_get_fsync_width(struct snd_kcontrol *kcontrol, 349 349 struct snd_ctl_elem_value *ucontrol) 350 350 { 351 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 351 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 352 352 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 353 353 354 354 ucontrol->value.integer.value[0] = i2s->fsync_width; ··· 359 359 static int tegra210_i2s_put_fsync_width(struct snd_kcontrol *kcontrol, 360 360 struct snd_ctl_elem_value *ucontrol) 361 361 { 362 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 362 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 363 363 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 364 364 int value = ucontrol->value.integer.value[0]; 365 365 ··· 386 386 static int tegra210_i2s_cget_stereo_to_mono(struct snd_kcontrol *kcontrol, 387 387 struct snd_ctl_elem_value *ucontrol) 388 388 { 389 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 389 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 390 390 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 391 391 392 392 ucontrol->value.enumerated.item[0] = i2s->stereo_to_mono[I2S_TX_PATH]; ··· 397 397 static int tegra210_i2s_cput_stereo_to_mono(struct snd_kcontrol *kcontrol, 398 398 struct snd_ctl_elem_value *ucontrol) 399 399 { 400 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 400 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 401 401 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 402 402 unsigned int value = ucontrol->value.enumerated.item[0]; 403 403 ··· 412 412 static int tegra210_i2s_cget_mono_to_stereo(struct snd_kcontrol *kcontrol, 413 413 struct snd_ctl_elem_value *ucontrol) 414 414 { 415 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 415 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 416 416 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 417 417 418 418 ucontrol->value.enumerated.item[0] = i2s->mono_to_stereo[I2S_TX_PATH]; ··· 423 423 static int tegra210_i2s_cput_mono_to_stereo(struct snd_kcontrol *kcontrol, 424 424 struct snd_ctl_elem_value *ucontrol) 425 425 { 426 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 426 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 427 427 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 428 428 unsigned int value = ucontrol->value.enumerated.item[0]; 429 429 ··· 438 438 static int tegra210_i2s_pget_stereo_to_mono(struct snd_kcontrol *kcontrol, 439 439 struct snd_ctl_elem_value *ucontrol) 440 440 { 441 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 441 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 442 442 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 443 443 444 444 ucontrol->value.enumerated.item[0] = i2s->stereo_to_mono[I2S_RX_PATH]; ··· 449 449 static int tegra210_i2s_pput_stereo_to_mono(struct snd_kcontrol *kcontrol, 450 450 struct snd_ctl_elem_value *ucontrol) 451 451 { 452 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 452 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 453 453 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 454 454 unsigned int value = ucontrol->value.enumerated.item[0]; 455 455 ··· 464 464 static int tegra210_i2s_pget_mono_to_stereo(struct snd_kcontrol *kcontrol, 465 465 struct snd_ctl_elem_value *ucontrol) 466 466 { 467 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 467 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 468 468 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 469 469 470 470 ucontrol->value.enumerated.item[0] = i2s->mono_to_stereo[I2S_RX_PATH]; ··· 475 475 static int tegra210_i2s_pput_mono_to_stereo(struct snd_kcontrol *kcontrol, 476 476 struct snd_ctl_elem_value *ucontrol) 477 477 { 478 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 478 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 479 479 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 480 480 unsigned int value = ucontrol->value.enumerated.item[0]; 481 481 ··· 490 490 static int tegra210_i2s_pget_fifo_th(struct snd_kcontrol *kcontrol, 491 491 struct snd_ctl_elem_value *ucontrol) 492 492 { 493 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 493 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 494 494 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 495 495 496 496 ucontrol->value.integer.value[0] = i2s->rx_fifo_th; ··· 501 501 static int tegra210_i2s_pput_fifo_th(struct snd_kcontrol *kcontrol, 502 502 struct snd_ctl_elem_value *ucontrol) 503 503 { 504 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 504 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 505 505 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 506 506 int value = ucontrol->value.integer.value[0]; 507 507 ··· 516 516 static int tegra210_i2s_get_bclk_ratio(struct snd_kcontrol *kcontrol, 517 517 struct snd_ctl_elem_value *ucontrol) 518 518 { 519 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 519 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 520 520 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 521 521 522 522 ucontrol->value.integer.value[0] = i2s->bclk_ratio; ··· 527 527 static int tegra210_i2s_put_bclk_ratio(struct snd_kcontrol *kcontrol, 528 528 struct snd_ctl_elem_value *ucontrol) 529 529 { 530 - struct snd_soc_component *compnt = snd_soc_kcontrol_component(kcontrol); 530 + struct snd_soc_component *compnt = snd_kcontrol_chip(kcontrol); 531 531 struct tegra210_i2s *i2s = snd_soc_component_get_drvdata(compnt); 532 532 int value = ucontrol->value.integer.value[0]; 533 533
+12 -12
sound/soc/tegra/tegra210_mbdrc.c
··· 235 235 { 236 236 struct soc_mixer_control *mc = 237 237 (struct soc_mixer_control *)kcontrol->private_value; 238 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 238 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 239 239 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 240 240 unsigned int val; 241 241 ··· 251 251 { 252 252 struct soc_mixer_control *mc = 253 253 (struct soc_mixer_control *)kcontrol->private_value; 254 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 254 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 255 255 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 256 256 unsigned int val = ucontrol->value.integer.value[0]; 257 257 bool change = false; ··· 267 267 static int tegra210_mbdrc_get_enum(struct snd_kcontrol *kcontrol, 268 268 struct snd_ctl_elem_value *ucontrol) 269 269 { 270 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 270 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 271 271 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 272 272 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 273 273 unsigned int val; ··· 282 282 static int tegra210_mbdrc_put_enum(struct snd_kcontrol *kcontrol, 283 283 struct snd_ctl_elem_value *ucontrol) 284 284 { 285 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 285 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 286 286 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 287 287 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 288 288 bool change = false; ··· 305 305 struct snd_ctl_elem_value *ucontrol) 306 306 { 307 307 struct tegra_soc_bytes *params = (void *)kcontrol->private_value; 308 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 308 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 309 309 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 310 310 u32 *data = (u32 *)ucontrol->value.bytes.data; 311 311 u32 regs = params->soc.base; ··· 326 326 struct snd_ctl_elem_value *ucontrol) 327 327 { 328 328 struct tegra_soc_bytes *params = (void *)kcontrol->private_value; 329 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 329 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 330 330 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 331 331 u32 *data = (u32 *)ucontrol->value.bytes.data; 332 332 u32 regs = params->soc.base; ··· 351 351 struct snd_ctl_elem_value *ucontrol) 352 352 { 353 353 struct tegra_soc_bytes *params = (void *)kcontrol->private_value; 354 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 354 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 355 355 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 356 356 u32 *data = (u32 *)ucontrol->value.bytes.data; 357 357 u32 regs = params->soc.base; ··· 379 379 struct snd_ctl_elem_value *ucontrol) 380 380 { 381 381 struct tegra_soc_bytes *params = (void *)kcontrol->private_value; 382 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 382 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 383 383 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 384 384 u32 *data = (u32 *)ucontrol->value.bytes.data; 385 385 u32 regs = params->soc.base; ··· 412 412 struct snd_ctl_elem_value *ucontrol) 413 413 { 414 414 struct tegra_soc_bytes *params = (void *)kcontrol->private_value; 415 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 415 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 416 416 u32 *data = (u32 *)ucontrol->value.bytes.data; 417 417 418 418 memset(data, 0, params->soc.num_regs * cmpnt->val_bytes); ··· 424 424 struct snd_ctl_elem_value *ucontrol) 425 425 { 426 426 struct tegra_soc_bytes *params = (void *)kcontrol->private_value; 427 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 427 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 428 428 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 429 429 u32 reg_ctrl = params->soc.base; 430 430 u32 reg_data = reg_ctrl + cmpnt->val_bytes; ··· 452 452 { 453 453 struct soc_mixer_control *mc = 454 454 (struct soc_mixer_control *)kcontrol->private_value; 455 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 455 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 456 456 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 457 457 int val; 458 458 ··· 469 469 { 470 470 struct soc_mixer_control *mc = 471 471 (struct soc_mixer_control *)kcontrol->private_value; 472 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 472 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 473 473 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 474 474 int val = ucontrol->value.integer.value[0]; 475 475 bool change = false;
+2 -2
sound/soc/tegra/tegra210_mixer.c
··· 178 178 { 179 179 struct soc_mixer_control *mc = 180 180 (struct soc_mixer_control *)kcontrol->private_value; 181 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 181 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 182 182 struct tegra210_mixer *mixer = snd_soc_component_get_drvdata(cmpnt); 183 183 unsigned int reg = mc->reg; 184 184 unsigned int i; ··· 197 197 { 198 198 struct soc_mixer_control *mc = 199 199 (struct soc_mixer_control *)kcontrol->private_value; 200 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 200 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 201 201 struct tegra210_mixer *mixer = snd_soc_component_get_drvdata(cmpnt); 202 202 unsigned int reg = mc->reg, id; 203 203 int err;
+6 -6
sound/soc/tegra/tegra210_mvc.c
··· 109 109 110 110 static u32 tegra210_mvc_get_ctrl_reg(struct snd_kcontrol *kcontrol) 111 111 { 112 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 112 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 113 113 struct tegra210_mvc *mvc = snd_soc_component_get_drvdata(cmpnt); 114 114 u32 val; 115 115 ··· 194 194 struct snd_ctl_elem_value *ucontrol, 195 195 bool per_chan_ctrl) 196 196 { 197 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 197 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 198 198 struct tegra210_mvc *mvc = snd_soc_component_get_drvdata(cmpnt); 199 199 u32 mute_val = ucontrol->value.integer.value[0]; 200 200 u32 per_ch_ctrl_val; ··· 260 260 { 261 261 struct soc_mixer_control *mc = 262 262 (struct soc_mixer_control *)kcontrol->private_value; 263 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 263 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 264 264 struct tegra210_mvc *mvc = snd_soc_component_get_drvdata(cmpnt); 265 265 u8 chan = TEGRA210_MVC_GET_CHAN(mc->reg, TEGRA210_MVC_TARGET_VOL); 266 266 s32 val = mvc->volume[chan]; ··· 289 289 { 290 290 struct soc_mixer_control *mc = 291 291 (struct soc_mixer_control *)kcontrol->private_value; 292 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 292 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 293 293 struct tegra210_mvc *mvc = snd_soc_component_get_drvdata(cmpnt); 294 294 u8 chan = TEGRA210_MVC_GET_CHAN(mc->reg, TEGRA210_MVC_TARGET_VOL); 295 295 int old_volume = mvc->volume[chan]; ··· 394 394 static int tegra210_mvc_get_curve_type(struct snd_kcontrol *kcontrol, 395 395 struct snd_ctl_elem_value *ucontrol) 396 396 { 397 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 397 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 398 398 struct tegra210_mvc *mvc = snd_soc_component_get_drvdata(cmpnt); 399 399 400 400 ucontrol->value.enumerated.item[0] = mvc->curve_type; ··· 405 405 static int tegra210_mvc_put_curve_type(struct snd_kcontrol *kcontrol, 406 406 struct snd_ctl_elem_value *ucontrol) 407 407 { 408 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 408 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 409 409 struct tegra210_mvc *mvc = snd_soc_component_get_drvdata(cmpnt); 410 410 unsigned int value; 411 411
+2 -2
sound/soc/tegra/tegra210_ope.c
··· 202 202 static int tegra210_ope_get_data_dir(struct snd_kcontrol *kcontrol, 203 203 struct snd_ctl_elem_value *ucontrol) 204 204 { 205 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 205 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 206 206 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 207 207 208 208 ucontrol->value.enumerated.item[0] = ope->data_dir; ··· 213 213 static int tegra210_ope_put_data_dir(struct snd_kcontrol *kcontrol, 214 214 struct snd_ctl_elem_value *ucontrol) 215 215 { 216 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 216 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 217 217 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 218 218 unsigned int value = ucontrol->value.enumerated.item[0]; 219 219
+4 -4
sound/soc/tegra/tegra210_peq.c
··· 100 100 { 101 101 struct soc_mixer_control *mc = 102 102 (struct soc_mixer_control *)kcontrol->private_value; 103 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 103 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 104 104 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 105 105 unsigned int mask = (1 << fls(mc->max)) - 1; 106 106 unsigned int val; ··· 123 123 { 124 124 struct soc_mixer_control *mc = 125 125 (struct soc_mixer_control *)kcontrol->private_value; 126 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 126 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 127 127 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 128 128 unsigned int mask = (1 << fls(mc->max)) - 1; 129 129 bool change = false; ··· 146 146 struct snd_ctl_elem_value *ucontrol) 147 147 { 148 148 struct tegra_soc_bytes *params = (void *)kcontrol->private_value; 149 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 149 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 150 150 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 151 151 u32 i, reg_ctrl = params->soc.base; 152 152 u32 reg_data = reg_ctrl + cmpnt->val_bytes; ··· 169 169 struct snd_ctl_elem_value *ucontrol) 170 170 { 171 171 struct tegra_soc_bytes *params = (void *)kcontrol->private_value; 172 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 172 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 173 173 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt); 174 174 u32 i, reg_ctrl = params->soc.base; 175 175 u32 reg_data = reg_ctrl + cmpnt->val_bytes;
+8 -8
sound/soc/tegra/tegra210_sfc.c
··· 3276 3276 static int tegra210_sfc_iget_stereo_to_mono(struct snd_kcontrol *kcontrol, 3277 3277 struct snd_ctl_elem_value *ucontrol) 3278 3278 { 3279 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 3279 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 3280 3280 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); 3281 3281 3282 3282 ucontrol->value.enumerated.item[0] = sfc->stereo_to_mono[SFC_RX_PATH]; ··· 3287 3287 static int tegra210_sfc_iput_stereo_to_mono(struct snd_kcontrol *kcontrol, 3288 3288 struct snd_ctl_elem_value *ucontrol) 3289 3289 { 3290 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 3290 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 3291 3291 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); 3292 3292 unsigned int value = ucontrol->value.enumerated.item[0]; 3293 3293 ··· 3302 3302 static int tegra210_sfc_iget_mono_to_stereo(struct snd_kcontrol *kcontrol, 3303 3303 struct snd_ctl_elem_value *ucontrol) 3304 3304 { 3305 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 3305 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 3306 3306 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); 3307 3307 3308 3308 ucontrol->value.enumerated.item[0] = sfc->mono_to_stereo[SFC_RX_PATH]; ··· 3313 3313 static int tegra210_sfc_iput_mono_to_stereo(struct snd_kcontrol *kcontrol, 3314 3314 struct snd_ctl_elem_value *ucontrol) 3315 3315 { 3316 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 3316 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 3317 3317 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); 3318 3318 unsigned int value = ucontrol->value.enumerated.item[0]; 3319 3319 ··· 3328 3328 static int tegra210_sfc_oget_stereo_to_mono(struct snd_kcontrol *kcontrol, 3329 3329 struct snd_ctl_elem_value *ucontrol) 3330 3330 { 3331 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 3331 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 3332 3332 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); 3333 3333 3334 3334 ucontrol->value.enumerated.item[0] = sfc->stereo_to_mono[SFC_TX_PATH]; ··· 3339 3339 static int tegra210_sfc_oput_stereo_to_mono(struct snd_kcontrol *kcontrol, 3340 3340 struct snd_ctl_elem_value *ucontrol) 3341 3341 { 3342 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 3342 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 3343 3343 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); 3344 3344 unsigned int value = ucontrol->value.enumerated.item[0]; 3345 3345 ··· 3354 3354 static int tegra210_sfc_oget_mono_to_stereo(struct snd_kcontrol *kcontrol, 3355 3355 struct snd_ctl_elem_value *ucontrol) 3356 3356 { 3357 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 3357 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 3358 3358 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); 3359 3359 3360 3360 ucontrol->value.enumerated.item[0] = sfc->mono_to_stereo[SFC_TX_PATH]; ··· 3365 3365 static int tegra210_sfc_oput_mono_to_stereo(struct snd_kcontrol *kcontrol, 3366 3366 struct snd_ctl_elem_value *ucontrol) 3367 3367 { 3368 - struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol); 3368 + struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol); 3369 3369 struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt); 3370 3370 unsigned int value = ucontrol->value.enumerated.item[0]; 3371 3371
+2 -2
sound/soc/uniphier/aio-cpu.c
··· 623 623 static int uniphier_aio_vol_get(struct snd_kcontrol *kcontrol, 624 624 struct snd_ctl_elem_value *ucontrol) 625 625 { 626 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 626 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 627 627 struct uniphier_aio_chip *chip = snd_soc_component_get_drvdata(comp); 628 628 struct uniphier_aio_sub *sub; 629 629 int oport_hw = kcontrol->private_value; ··· 640 640 static int uniphier_aio_vol_put(struct snd_kcontrol *kcontrol, 641 641 struct snd_ctl_elem_value *ucontrol) 642 642 { 643 - struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol); 643 + struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol); 644 644 struct uniphier_aio_chip *chip = snd_soc_component_get_drvdata(comp); 645 645 struct uniphier_aio_sub *sub; 646 646 int oport_hw = kcontrol->private_value;
+6 -6
sound/soc/uniphier/evea.c
··· 228 228 static int evea_get_switch_lin(struct snd_kcontrol *kcontrol, 229 229 struct snd_ctl_elem_value *ucontrol) 230 230 { 231 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 231 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 232 232 struct evea_priv *evea = snd_soc_component_get_drvdata(component); 233 233 234 234 ucontrol->value.integer.value[0] = evea->switch_lin; ··· 239 239 static int evea_set_switch_lin(struct snd_kcontrol *kcontrol, 240 240 struct snd_ctl_elem_value *ucontrol) 241 241 { 242 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 242 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 243 243 struct evea_priv *evea = snd_soc_component_get_drvdata(component); 244 244 245 245 if (evea->switch_lin == ucontrol->value.integer.value[0]) ··· 253 253 static int evea_get_switch_lo(struct snd_kcontrol *kcontrol, 254 254 struct snd_ctl_elem_value *ucontrol) 255 255 { 256 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 256 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 257 257 struct evea_priv *evea = snd_soc_component_get_drvdata(component); 258 258 259 259 ucontrol->value.integer.value[0] = evea->switch_lo; ··· 264 264 static int evea_set_switch_lo(struct snd_kcontrol *kcontrol, 265 265 struct snd_ctl_elem_value *ucontrol) 266 266 { 267 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 267 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 268 268 struct evea_priv *evea = snd_soc_component_get_drvdata(component); 269 269 270 270 if (evea->switch_lo == ucontrol->value.integer.value[0]) ··· 278 278 static int evea_get_switch_hp(struct snd_kcontrol *kcontrol, 279 279 struct snd_ctl_elem_value *ucontrol) 280 280 { 281 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 281 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 282 282 struct evea_priv *evea = snd_soc_component_get_drvdata(component); 283 283 284 284 ucontrol->value.integer.value[0] = evea->switch_hp; ··· 289 289 static int evea_set_switch_hp(struct snd_kcontrol *kcontrol, 290 290 struct snd_ctl_elem_value *ucontrol) 291 291 { 292 - struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); 292 + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 293 293 struct evea_priv *evea = snd_soc_component_get_drvdata(component); 294 294 295 295 if (evea->switch_hp == ucontrol->value.integer.value[0])