[ARM] tegra: stingray: board changes for cpcap-audio suspend mode
authorJames Wylder <james.wylder@motorola.com>
Tue, 14 Sep 2010 03:20:04 +0000 (22:20 -0500)
committerColin Cross <ccross@android.com>
Thu, 7 Oct 2010 00:01:26 +0000 (17:01 -0700)
- Initialize VAUDIO to low power mode
- Add standby_config changes to allow audio to go into low
  power state.
- remove direct references to register 512, because access
  should be through the Linux regulator framework.

Change-Id: I3ea23e2aabd183a3ecae0d30fce15a7365b168d8
Signed-off-by: James Wylder <james.wylder@motorola.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
arch/arm/mach-tegra/board-stingray-power.c
arch/arm/mach-tegra/board-stingray.c

index d4ac87c765438edf28755896181e3e321cd4885a..2218c8a8c806b98f1d227a6644fef8199332bc3a 100644 (file)
@@ -286,6 +286,7 @@ struct cpcap_spi_init_data stingray_cpcap_spi_init[] = {
        {CPCAP_REG_VRF1C,     0x0000},
        {CPCAP_REG_VRF2C,     0x0000},
        {CPCAP_REG_VRFREFC,   0x0000},
+       {CPCAP_REG_VAUDIOC,   0x0065},
        {CPCAP_REG_ADCC1,     0x9000},
        {CPCAP_REG_ADCC2,     0x4136},
        {CPCAP_REG_USBC1,     0x1201},
index c788e4ecb8940dce80219d131b1e276559bfa81a..4554e814b27a127c01aeec04a59a4d937b9fac7f 100644 (file)
@@ -244,28 +244,28 @@ static struct platform_device cpcap_otg = {
 };
 
 static struct cpcap_audio_state stingray_cpcap_audio_state = {
-       NULL,
-       CPCAP_AUDIO_MODE_NORMAL,
-       CPCAP_AUDIO_CODEC_OFF,
-       CPCAP_AUDIO_CODEC_RATE_8000_HZ,
-       CPCAP_AUDIO_CODEC_MUTE,
-       CPCAP_AUDIO_STDAC_OFF,
-       CPCAP_AUDIO_STDAC_RATE_44100_HZ,
-       CPCAP_AUDIO_STDAC_MUTE,
-       CPCAP_AUDIO_ANALOG_SOURCE_OFF,
-       CPCAP_AUDIO_OUT_NONE,
-       CPCAP_AUDIO_OUT_NONE,
-       CPCAP_AUDIO_OUT_LINEOUT,
-       CPCAP_AUDIO_OUT_LINEOUT,
-       CPCAP_AUDIO_OUT_NONE,
-       CPCAP_AUDIO_OUT_NONE,
-       CPCAP_AUDIO_BALANCE_NEUTRAL,
-       CPCAP_AUDIO_BALANCE_NEUTRAL,
-       CPCAP_AUDIO_BALANCE_NEUTRAL,
-       7,                      /*default output gain */
-       CPCAP_AUDIO_IN_NONE,
-       31,                     /*default input_gain */
-       CPCAP_AUDIO_RAT_NONE
+       .cpcap                   = NULL,
+       .mode                    = CPCAP_AUDIO_MODE_NORMAL,
+       .codec_mode              = CPCAP_AUDIO_CODEC_OFF,
+       .codec_rate              = CPCAP_AUDIO_CODEC_RATE_8000_HZ,
+       .codec_mute              = CPCAP_AUDIO_CODEC_MUTE,
+       .stdac_mode              = CPCAP_AUDIO_STDAC_OFF,
+       .stdac_rate              = CPCAP_AUDIO_STDAC_RATE_44100_HZ,
+       .stdac_mute              = CPCAP_AUDIO_STDAC_MUTE,
+       .analog_source           = CPCAP_AUDIO_ANALOG_SOURCE_OFF,
+       .codec_primary_speaker   = CPCAP_AUDIO_OUT_NONE,
+       .codec_secondary_speaker = CPCAP_AUDIO_OUT_NONE,
+       .stdac_primary_speaker   = CPCAP_AUDIO_OUT_NONE,
+       .stdac_secondary_speaker = CPCAP_AUDIO_OUT_NONE,
+       .ext_primary_speaker     = CPCAP_AUDIO_OUT_NONE,
+       .ext_secondary_speaker   = CPCAP_AUDIO_OUT_NONE,
+       .codec_primary_balance   = CPCAP_AUDIO_BALANCE_NEUTRAL,
+       .stdac_primary_balance   = CPCAP_AUDIO_BALANCE_NEUTRAL,
+       .ext_primary_balance     = CPCAP_AUDIO_BALANCE_NEUTRAL,
+       .output_gain             = 7,
+       .microphone              = CPCAP_AUDIO_IN_NONE,
+       .input_gain              = 31,
+       .rat_type                = CPCAP_AUDIO_RAT_NONE
 };
 
 /* CPCAP is i2s master; tegra_audio_pdata.master == false */