Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
[linux-2.6-block.git] / sound / soc / codecs / wm_hubs.c
index 613df5db0b329d338f7f7eec6c16458ffbfe001b..e55b298c14a06e249f54453829295c880c39998a 100644 (file)
@@ -82,7 +82,8 @@ static void wait_for_dc_servo(struct snd_soc_codec *codec, unsigned int op)
        } while (reg & op && count < 400);
 
        if (reg & op)
-               dev_err(codec->dev, "Timed out waiting for DC Servo\n");
+               dev_err(codec->dev, "Timed out waiting for DC Servo %x\n",
+                       op);
 }
 
 /*
@@ -674,6 +675,9 @@ SND_SOC_DAPM_OUTPUT("LINEOUT2N"),
 };
 
 static const struct snd_soc_dapm_route analogue_routes[] = {
+       { "MICBIAS1", NULL, "CLK_SYS" },
+       { "MICBIAS2", NULL, "CLK_SYS" },
+
        { "IN1L PGA", "IN1LP Switch", "IN1LP" },
        { "IN1L PGA", "IN1LN Switch", "IN1LN" },
 
@@ -736,12 +740,12 @@ static const struct snd_soc_dapm_route analogue_routes[] = {
 
        { "SPKL", "Input Switch", "MIXINL" },
        { "SPKL", "IN1LP Switch", "IN1LP" },
-       { "SPKL", "Output Switch", "Left Output Mixer" },
+       { "SPKL", "Output Switch", "Left Output PGA" },
        { "SPKL", NULL, "TOCLK" },
 
        { "SPKR", "Input Switch", "MIXINR" },
        { "SPKR", "IN1RP Switch", "IN1RP" },
-       { "SPKR", "Output Switch", "Right Output Mixer" },
+       { "SPKR", "Output Switch", "Right Output PGA" },
        { "SPKR", NULL, "TOCLK" },
 
        { "SPKL Boost", "Direct Voice Switch", "Direct Voice" },
@@ -763,8 +767,8 @@ static const struct snd_soc_dapm_route analogue_routes[] = {
        { "SPKOUTRP", NULL, "SPKR Driver" },
        { "SPKOUTRN", NULL, "SPKR Driver" },
 
-       { "Left Headphone Mux", "Mixer", "Left Output Mixer" },
-       { "Right Headphone Mux", "Mixer", "Right Output Mixer" },
+       { "Left Headphone Mux", "Mixer", "Left Output PGA" },
+       { "Right Headphone Mux", "Mixer", "Right Output PGA" },
 
        { "Headphone PGA", NULL, "Left Headphone Mux" },
        { "Headphone PGA", NULL, "Right Headphone Mux" },
@@ -783,17 +787,17 @@ static const struct snd_soc_dapm_route analogue_routes[] = {
 static const struct snd_soc_dapm_route lineout1_diff_routes[] = {
        { "LINEOUT1 Mixer", "IN1L Switch", "IN1L PGA" },
        { "LINEOUT1 Mixer", "IN1R Switch", "IN1R PGA" },
-       { "LINEOUT1 Mixer", "Output Switch", "Left Output Mixer" },
+       { "LINEOUT1 Mixer", "Output Switch", "Left Output PGA" },
 
        { "LINEOUT1N Driver", NULL, "LINEOUT1 Mixer" },
        { "LINEOUT1P Driver", NULL, "LINEOUT1 Mixer" },
 };
 
 static const struct snd_soc_dapm_route lineout1_se_routes[] = {
-       { "LINEOUT1N Mixer", "Left Output Switch", "Left Output Mixer" },
-       { "LINEOUT1N Mixer", "Right Output Switch", "Left Output Mixer" },
+       { "LINEOUT1N Mixer", "Left Output Switch", "Left Output PGA" },
+       { "LINEOUT1N Mixer", "Right Output Switch", "Right Output PGA" },
 
-       { "LINEOUT1P Mixer", "Left Output Switch", "Left Output Mixer" },
+       { "LINEOUT1P Mixer", "Left Output Switch", "Left Output PGA" },
 
        { "LINEOUT1N Driver", NULL, "LINEOUT1N Mixer" },
        { "LINEOUT1P Driver", NULL, "LINEOUT1P Mixer" },
@@ -802,17 +806,17 @@ static const struct snd_soc_dapm_route lineout1_se_routes[] = {
 static const struct snd_soc_dapm_route lineout2_diff_routes[] = {
        { "LINEOUT2 Mixer", "IN2L Switch", "IN2L PGA" },
        { "LINEOUT2 Mixer", "IN2R Switch", "IN2R PGA" },
-       { "LINEOUT2 Mixer", "Output Switch", "Right Output Mixer" },
+       { "LINEOUT2 Mixer", "Output Switch", "Right Output PGA" },
 
        { "LINEOUT2N Driver", NULL, "LINEOUT2 Mixer" },
        { "LINEOUT2P Driver", NULL, "LINEOUT2 Mixer" },
 };
 
 static const struct snd_soc_dapm_route lineout2_se_routes[] = {
-       { "LINEOUT2N Mixer", "Left Output Switch", "Left Output Mixer" },
-       { "LINEOUT2N Mixer", "Right Output Switch", "Left Output Mixer" },
+       { "LINEOUT2N Mixer", "Left Output Switch", "Left Output PGA" },
+       { "LINEOUT2N Mixer", "Right Output Switch", "Right Output PGA" },
 
-       { "LINEOUT2P Mixer", "Right Output Switch", "Right Output Mixer" },
+       { "LINEOUT2P Mixer", "Right Output Switch", "Right Output PGA" },
 
        { "LINEOUT2N Driver", NULL, "LINEOUT2N Mixer" },
        { "LINEOUT2P Driver", NULL, "LINEOUT2P Mixer" },
@@ -832,17 +836,21 @@ int wm_hubs_add_analogue_controls(struct snd_soc_codec *codec)
        snd_soc_update_bits(codec, WM8993_RIGHT_LINE_INPUT_3_4_VOLUME,
                            WM8993_IN2_VU, WM8993_IN2_VU);
 
+       snd_soc_update_bits(codec, WM8993_SPEAKER_VOLUME_LEFT,
+                           WM8993_SPKOUT_VU, WM8993_SPKOUT_VU);
        snd_soc_update_bits(codec, WM8993_SPEAKER_VOLUME_RIGHT,
                            WM8993_SPKOUT_VU, WM8993_SPKOUT_VU);
 
        snd_soc_update_bits(codec, WM8993_LEFT_OUTPUT_VOLUME,
-                           WM8993_HPOUT1L_ZC, WM8993_HPOUT1L_ZC);
+                           WM8993_HPOUT1_VU | WM8993_HPOUT1L_ZC,
+                           WM8993_HPOUT1_VU | WM8993_HPOUT1L_ZC);
        snd_soc_update_bits(codec, WM8993_RIGHT_OUTPUT_VOLUME,
                            WM8993_HPOUT1_VU | WM8993_HPOUT1R_ZC,
                            WM8993_HPOUT1_VU | WM8993_HPOUT1R_ZC);
 
        snd_soc_update_bits(codec, WM8993_LEFT_OPGA_VOLUME,
-                           WM8993_MIXOUTL_ZC, WM8993_MIXOUTL_ZC);
+                           WM8993_MIXOUTL_ZC | WM8993_MIXOUT_VU,
+                           WM8993_MIXOUTL_ZC | WM8993_MIXOUT_VU);
        snd_soc_update_bits(codec, WM8993_RIGHT_OPGA_VOLUME,
                            WM8993_MIXOUTR_ZC | WM8993_MIXOUT_VU,
                            WM8993_MIXOUTR_ZC | WM8993_MIXOUT_VU);