diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-02-29 20:02:59 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-03-01 06:03:45 +0300 |
commit | 89300b4e5a5b5b5c145318f3b257291239522da6 (patch) | |
tree | cb0baf836aed27c51fcc9931a7d4c9fdbed0b70e /sound | |
parent | 92e963f50fc74041b5e9e744c330dca48e04f08d (diff) | |
download | linux-89300b4e5a5b5b5c145318f3b257291239522da6.tar.xz |
ASoC: cs42l51: Fix enum ctl accesses in a wrong type
"PCM channel mixer" ctl in cs42l51 codec driver is 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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/cs42l51.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c index b3951524339f..35488f14e237 100644 --- a/sound/soc/codecs/cs42l51.c +++ b/sound/soc/codecs/cs42l51.c @@ -60,15 +60,15 @@ static int cs42l51_get_chan_mix(struct snd_kcontrol *kcontrol, switch (value) { default: case 0: - ucontrol->value.integer.value[0] = 0; + ucontrol->value.enumerated.item[0] = 0; break; /* same value : (L+R)/2 and (R+L)/2 */ case 1: case 2: - ucontrol->value.integer.value[0] = 1; + ucontrol->value.enumerated.item[0] = 1; break; case 3: - ucontrol->value.integer.value[0] = 2; + ucontrol->value.enumerated.item[0] = 2; break; } @@ -85,7 +85,7 @@ static int cs42l51_set_chan_mix(struct snd_kcontrol *kcontrol, struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); unsigned char val; - switch (ucontrol->value.integer.value[0]) { + switch (ucontrol->value.enumerated.item[0]) { default: case 0: val = CHAN_MIX_NORMAL; |