wm8904.c (eb5bc2a213f96bd43b5f00a625acb0c669613645) wm8904.c (eaddf6fd959074f6a6e71deffe079c71eef35da6)
1/*
2 * wm8904.c -- WM8904 ALSA SoC Audio driver
3 *
4 * Copyright 2009-12 Wolfson Microelectronics plc
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 *

--- 511 unchanged lines hidden (view full) ---

520}
521
522static int wm8904_get_deemph(struct snd_kcontrol *kcontrol,
523 struct snd_ctl_elem_value *ucontrol)
524{
525 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
526 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
527
1/*
2 * wm8904.c -- WM8904 ALSA SoC Audio driver
3 *
4 * Copyright 2009-12 Wolfson Microelectronics plc
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 *

--- 511 unchanged lines hidden (view full) ---

520}
521
522static int wm8904_get_deemph(struct snd_kcontrol *kcontrol,
523 struct snd_ctl_elem_value *ucontrol)
524{
525 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
526 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
527
528 ucontrol->value.enumerated.item[0] = wm8904->deemph;
528 ucontrol->value.integer.value[0] = wm8904->deemph;
529 return 0;
530}
531
532static int wm8904_put_deemph(struct snd_kcontrol *kcontrol,
533 struct snd_ctl_elem_value *ucontrol)
534{
535 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
536 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
529 return 0;
530}
531
532static int wm8904_put_deemph(struct snd_kcontrol *kcontrol,
533 struct snd_ctl_elem_value *ucontrol)
534{
535 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
536 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
537 int deemph = ucontrol->value.enumerated.item[0];
537 int deemph = ucontrol->value.integer.value[0];
538
539 if (deemph > 1)
540 return -EINVAL;
541
542 wm8904->deemph = deemph;
543
544 return wm8904_set_deemph(codec);
545}

--- 1763 unchanged lines hidden ---
538
539 if (deemph > 1)
540 return -EINVAL;
541
542 wm8904->deemph = deemph;
543
544 return wm8904_set_deemph(codec);
545}

--- 1763 unchanged lines hidden ---