CHROMIUM: ALSA:hda/ca0132 - initialize AEC level.
authorDylan Reid <dgreid@chromium.org>
Wed, 12 Dec 2012 18:53:21 +0000 (10:53 -0800)
committerGerrit <chrome-bot@google.com>
Mon, 17 Dec 2012 18:43:17 +0000 (10:43 -0800)
Set the AEC level to max during init.  After testing with various
levels, the maximum value proved to work the best.

BUG=chrome-os-partner:13065
TEST=hangout, listen for echo.

Change-Id: I237b9af5f9e0f8de7331d96f40e1fc5eb6379f79
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39593
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
sound/pci/hda/patch_ca0132.c

index b431251..cec8ee2 100644 (file)
@@ -44,6 +44,7 @@
 #define FLOAT_ONE      0x3f800000
 #define FLOAT_TWO      0x40000000
 #define FLOAT_MINUS_5  0xc0a00000
+#define FLOAT_60       0x42700000;
 
 #define UNSOL_TAG_HP   0x10
 #define UNSOL_TAG_AMIC1        0x12
@@ -4235,6 +4236,10 @@ static void ca0132_setup_defaults(struct hda_codec *codec)
        /* set WUH source */
        tmp = FLOAT_TWO;
        dspio_set_param(codec, 0x31, 0x00, &tmp, sizeof(unsigned int));
+
+       /* set AEC level */
+       tmp = FLOAT_60;
+       dspio_set_param(codec, 0x86, 0x05, &tmp, sizeof(unsigned int));
 }
 
 static void ca0132_init_flags(struct hda_codec *codec)