mirror of https://gitee.com/openkylin/linux.git
ASoC: wm8990: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be removed, use snd_soc_dapm_to_codec(w->dapm) instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
8b39dd9f08
commit
68ca2f682e
|
@ -374,13 +374,14 @@ SOC_SINGLE("RIN34 Mute Switch", WM8990_RIGHT_LINE_INPUT_3_4_VOLUME,
|
|||
static int outmixer_event(struct snd_soc_dapm_widget *w,
|
||||
struct snd_kcontrol *kcontrol, int event)
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
|
||||
u32 reg_shift = kcontrol->private_value & 0xfff;
|
||||
int ret = 0;
|
||||
u16 reg;
|
||||
|
||||
switch (reg_shift) {
|
||||
case WM8990_SPEAKER_MIXER | (WM8990_LDSPK_BIT << 8) :
|
||||
reg = snd_soc_read(w->codec, WM8990_OUTPUT_MIXER1);
|
||||
reg = snd_soc_read(codec, WM8990_OUTPUT_MIXER1);
|
||||
if (reg & WM8990_LDLO) {
|
||||
printk(KERN_WARNING
|
||||
"Cannot set as Output Mixer 1 LDLO Set\n");
|
||||
|
@ -388,7 +389,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
|
|||
}
|
||||
break;
|
||||
case WM8990_SPEAKER_MIXER | (WM8990_RDSPK_BIT << 8):
|
||||
reg = snd_soc_read(w->codec, WM8990_OUTPUT_MIXER2);
|
||||
reg = snd_soc_read(codec, WM8990_OUTPUT_MIXER2);
|
||||
if (reg & WM8990_RDRO) {
|
||||
printk(KERN_WARNING
|
||||
"Cannot set as Output Mixer 2 RDRO Set\n");
|
||||
|
@ -396,7 +397,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
|
|||
}
|
||||
break;
|
||||
case WM8990_OUTPUT_MIXER1 | (WM8990_LDLO_BIT << 8):
|
||||
reg = snd_soc_read(w->codec, WM8990_SPEAKER_MIXER);
|
||||
reg = snd_soc_read(codec, WM8990_SPEAKER_MIXER);
|
||||
if (reg & WM8990_LDSPK) {
|
||||
printk(KERN_WARNING
|
||||
"Cannot set as Speaker Mixer LDSPK Set\n");
|
||||
|
@ -404,7 +405,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
|
|||
}
|
||||
break;
|
||||
case WM8990_OUTPUT_MIXER2 | (WM8990_RDRO_BIT << 8):
|
||||
reg = snd_soc_read(w->codec, WM8990_SPEAKER_MIXER);
|
||||
reg = snd_soc_read(codec, WM8990_SPEAKER_MIXER);
|
||||
if (reg & WM8990_RDSPK) {
|
||||
printk(KERN_WARNING
|
||||
"Cannot set as Speaker Mixer RDSPK Set\n");
|
||||
|
|
Loading…
Reference in New Issue