From: Mark Brown Date: Fri, 27 Apr 2012 17:44:50 +0000 (+0100) Subject: Merge branch 'for-3.5' into asoc-next X-Git-Tag: next-20120430~48^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2fbbbc1b958ff7c81c32488b63140e540fe24d10;p=karo-tx-linux.git Merge branch 'for-3.5' into asoc-next --- 2fbbbc1b958ff7c81c32488b63140e540fe24d10 diff --cc sound/soc/codecs/wm8994.c index 587062b1cb25,d2db63022607..b3b2d5f344ce --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@@ -989,43 -973,21 +973,34 @@@ static bool wm8994_check_class_w_digita reg_r = snd_soc_read(codec, WM8994_DAC1_RIGHT_MIXER_ROUTING); if (reg_r != reg) { dev_vdbg(codec->dev, "Left and right DAC mixers different\n"); - enable = 0; + return false; } - if (enable) { - dev_dbg(codec->dev, "Class W enabled\n"); - snd_soc_update_bits(codec, WM8994_CLASS_W_1, - WM8994_CP_DYN_PWR | - WM8994_CP_DYN_SRC_SEL_MASK, - source | WM8994_CP_DYN_PWR); - wm8994->hubs.class_w = true; + /* Set the source up */ + snd_soc_update_bits(codec, WM8994_CLASS_W_1, + WM8994_CP_DYN_SRC_SEL_MASK, source); - } else { - dev_dbg(codec->dev, "Class W disabled\n"); - snd_soc_update_bits(codec, WM8994_CLASS_W_1, - WM8994_CP_DYN_PWR, 0); - wm8994->hubs.class_w = false; - } + return true; } -static int late_enable_ev(struct snd_soc_dapm_widget *w, - struct snd_kcontrol *kcontrol, int event) +static int aif1clk_ev(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, int event) { struct snd_soc_codec *codec = w->codec; - struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); + struct wm8994 *control = codec->control_data; + int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; + int dac; + int adc; + int val; + + switch (control->type) { + case WM8994: + case WM8958: + mask |= WM8994_AIF1DAC2L_ENA | WM8994_AIF1DAC2R_ENA; + break; + default: + break; + } switch (event) { case SND_SOC_DAPM_PRE_PMU: