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

ASoC: da732x: Fix enum ctl accesses in a wrong type

"DAC1 High Pass Filter Mode" & co in da732x codec driver are enum,
while the current driver accesses wrongly via value.integer.value[].
They have to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Takashi Iwai and committed by
Mark Brown
fe9aba13 92e963f5

+4 -4
+4 -4
sound/soc/codecs/da732x.c
··· 334 334 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 335 335 struct soc_enum *enum_ctrl = (struct soc_enum *)kcontrol->private_value; 336 336 unsigned int reg = enum_ctrl->reg; 337 - unsigned int sel = ucontrol->value.integer.value[0]; 337 + unsigned int sel = ucontrol->value.enumerated.item[0]; 338 338 unsigned int bits; 339 339 340 340 switch (sel) { ··· 368 368 369 369 switch (val) { 370 370 case DA732X_HPF_VOICE_EN: 371 - ucontrol->value.integer.value[0] = DA732X_HPF_VOICE; 371 + ucontrol->value.enumerated.item[0] = DA732X_HPF_VOICE; 372 372 break; 373 373 case DA732X_HPF_MUSIC_EN: 374 - ucontrol->value.integer.value[0] = DA732X_HPF_MUSIC; 374 + ucontrol->value.enumerated.item[0] = DA732X_HPF_MUSIC; 375 375 break; 376 376 default: 377 - ucontrol->value.integer.value[0] = DA732X_HPF_DISABLED; 377 + ucontrol->value.enumerated.item[0] = DA732X_HPF_DISABLED; 378 378 break; 379 379 } 380 380