Merge branch 'for-3.2' into for-3.3
[deliverable/linux.git] / sound / soc / codecs / wm_hubs.c
index ca8ce03510f4ee460da84d12596c6f54ca1e5522..bde0e84e8214c7a98c326403ac7499133c752a52 100644 (file)
@@ -40,7 +40,7 @@ static const DECLARE_TLV_DB_SCALE(outmix_tlv, -2100, 300, 0);
 static const DECLARE_TLV_DB_SCALE(spkmixout_tlv, -1800, 600, 1);
 static const DECLARE_TLV_DB_SCALE(outpga_tlv, -5700, 100, 0);
 static const unsigned int spkboost_tlv[] = {
-       TLV_DB_RANGE_HEAD(7),
+       TLV_DB_RANGE_HEAD(2),
        0, 6, TLV_DB_SCALE_ITEM(0, 150, 0),
        7, 7, TLV_DB_SCALE_ITEM(1200, 0, 0),
 };
@@ -222,7 +222,7 @@ static int wm8993_put_dc_servo(struct snd_kcontrol *kcontrol,
        struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);
        int ret;
 
-       ret = snd_soc_put_volsw_2r(kcontrol, ucontrol);
+       ret = snd_soc_put_volsw(kcontrol, ucontrol);
 
        /* Updating the analogue gains invalidates the DC servo cache */
        hubs->class_w_dcs = 0;
@@ -362,19 +362,11 @@ SOC_DOUBLE_TLV("Speaker Boost Volume", WM8993_SPKOUT_BOOST, 3, 0, 7, 0,
 SOC_ENUM("Speaker Reference", speaker_ref),
 SOC_ENUM("Speaker Mode", speaker_mode),
 
-{
-       .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Headphone Volume",
-       .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |
-                SNDRV_CTL_ELEM_ACCESS_READWRITE,
-       .tlv.p = outpga_tlv,
-       .info = snd_soc_info_volsw_2r,
-       .get = snd_soc_get_volsw_2r, .put = wm8993_put_dc_servo,
-       .private_value = (unsigned long)&(struct soc_mixer_control) {
-               .reg = WM8993_LEFT_OUTPUT_VOLUME,
-               .rreg = WM8993_RIGHT_OUTPUT_VOLUME,
-               .shift = 0, .max = 63
-       },
-},
+SOC_DOUBLE_R_EXT_TLV("Headphone Volume",
+                    WM8993_LEFT_OUTPUT_VOLUME, WM8993_RIGHT_OUTPUT_VOLUME,
+                    0, 63, 0, snd_soc_get_volsw, wm8993_put_dc_servo,
+                    outpga_tlv),
+
 SOC_DOUBLE_R("Headphone Switch", WM8993_LEFT_OUTPUT_VOLUME,
             WM8993_RIGHT_OUTPUT_VOLUME, 6, 1, 0),
 SOC_DOUBLE_R("Headphone ZC Switch", WM8993_LEFT_OUTPUT_VOLUME,
@@ -662,6 +654,7 @@ SND_SOC_DAPM_MIXER("SPKL Boost", SND_SOC_NOPM, 0, 0,
 SND_SOC_DAPM_MIXER("SPKR Boost", SND_SOC_NOPM, 0, 0,
                   right_speaker_boost, ARRAY_SIZE(right_speaker_boost)),
 
+SND_SOC_DAPM_SUPPLY("TSHUT", WM8993_POWER_MANAGEMENT_2, 14, 0, NULL, 0),
 SND_SOC_DAPM_PGA("SPKL Driver", WM8993_POWER_MANAGEMENT_1, 12, 0,
                 NULL, 0),
 SND_SOC_DAPM_PGA("SPKR Driver", WM8993_POWER_MANAGEMENT_1, 13, 0,
@@ -797,10 +790,12 @@ static const struct snd_soc_dapm_route analogue_routes[] = {
        { "SPKL Driver", NULL, "VMID" },
        { "SPKL Driver", NULL, "SPKL Boost" },
        { "SPKL Driver", NULL, "CLK_SYS" },
+       { "SPKL Driver", NULL, "TSHUT" },
 
        { "SPKR Driver", NULL, "VMID" },
        { "SPKR Driver", NULL, "SPKR Boost" },
        { "SPKR Driver", NULL, "CLK_SYS" },
+       { "SPKR Driver", NULL, "TSHUT" },
 
        { "SPKOUTLP", NULL, "SPKL Driver" },
        { "SPKOUTLN", NULL, "SPKL Driver" },
This page took 0.029326 seconds and 5 git commands to generate.