Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / sound / soc / codecs / twl4030.c
index b717a03..b4fcdb0 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
 #include <linux/i2c/twl.h>
+#include <linux/slab.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
@@ -1102,6 +1103,16 @@ static const struct soc_enum twl4030_vibradir_enum =
                        ARRAY_SIZE(twl4030_vibradir_texts),
                        twl4030_vibradir_texts);
 
+/* Digimic Left and right swapping */
+static const char *twl4030_digimicswap_texts[] = {
+       "Not swapped", "Swapped",
+};
+
+static const struct soc_enum twl4030_digimicswap_enum =
+       SOC_ENUM_SINGLE(TWL4030_REG_MISC_SET_1, 0,
+                       ARRAY_SIZE(twl4030_digimicswap_texts),
+                       twl4030_digimicswap_texts);
+
 static const struct snd_kcontrol_new twl4030_snd_controls[] = {
        /* Codec operation mode control */
        SOC_ENUM_EXT("Codec Operation Mode", twl4030_op_modes_enum,
@@ -1178,6 +1189,8 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = {
 
        SOC_ENUM("Vibra H-bridge mode", twl4030_vibradirmode_enum),
        SOC_ENUM("Vibra H-bridge direction", twl4030_vibradir_enum),
+
+       SOC_ENUM("Digimic LR Swap", twl4030_digimicswap_enum),
 };
 
 static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = {
@@ -2181,7 +2194,6 @@ static int twl4030_soc_resume(struct platform_device *pdev)
        struct snd_soc_codec *codec = socdev->card->codec;
 
        twl4030_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       twl4030_set_bias_level(codec, codec->suspend_bias_level);
        return 0;
 }