From 55a9b7e2b42d6ec89e0ed043fad108dbd000e034 Mon Sep 17 00:00:00 2001 From: Iliyan Malchev Date: Fri, 6 Aug 2010 15:32:33 -0700 Subject: [PATCH] [ARM] tegra: stingray: add mic2 and correct mic1 configuration Signed-off-by: Iliyan Malchev --- arch/arm/mach-tegra/board-stingray.c | 38 ++++++++++++++++------------ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-tegra/board-stingray.c b/arch/arm/mach-tegra/board-stingray.c index 338fb0dc5c96..6ef4db70fffe 100644 --- a/arch/arm/mach-tegra/board-stingray.c +++ b/arch/arm/mach-tegra/board-stingray.c @@ -236,10 +236,8 @@ static const struct cpcap_audio_config_table speaker_config_table[] = { CPCAP_REG(CPCAP_REG_CDI, 0x1E42, 0xBFFF), /* 514 */ CPCAP_REG(CPCAP_REG_SDAC, 0x0079, 0xFFF), /* 515 */ CPCAP_REG_SLAVE(CPCAP_REG_SDACDI, 0x003E, 0x3FFF, 1), /* 516 */ - CPCAP_REG(CPCAP_REG_TXI, 0x0CC6, 0xFFFF), /* 517 */ - CPCAP_REG(CPCAP_REG_TXMP, 0x03FF, 0x0FFF), /* 518 */ CPCAP_REG(CPCAP_REG_RXOA, 0x0218, 0x07FF), /* 519 */ - CPCAP_REG(CPCAP_REG_RXVC, 0xAA28, 0xFF3C), /* 520 */ + CPCAP_REG(CPCAP_REG_RXVC, 0x0028, 0x003C), /* 520 */ CPCAP_REG(CPCAP_REG_RXCOA, 0x0618, 0x07FF), /* 521 */ CPCAP_REG(CPCAP_REG_RXSDOA, 0x1818, 0x1FFF), /* 522 */ }; @@ -250,26 +248,26 @@ static const struct cpcap_audio_config_table headset_config_table[] = { CPCAP_REG(CPCAP_REG_CDI, 0x8607, 0xBFFF), /* 514 */ CPCAP_REG(CPCAP_REG_SDAC, 0x0079, 0xFFF), /* 515 */ CPCAP_REG_SLAVE(CPCAP_REG_SDACDI, 0x003E, 0x3FFF, 1), /* 516 */ - CPCAP_REG(CPCAP_REG_TXI, 0x500A, 0xFFFF), /* 517 */ - CPCAP_REG(CPCAP_REG_TXMP, 0x039C, 0x0FFF), /* 518 */ CPCAP_REG(CPCAP_REG_RXOA, 0x0262, 0x07FF), /* 519 */ - CPCAP_REG(CPCAP_REG_RXVC, 0xCC30, 0xFF3C), /* 520 */ + CPCAP_REG(CPCAP_REG_RXVC, 0x0030, 0x003C), /* 520 */ CPCAP_REG(CPCAP_REG_RXCOA, 0x0000, 0x07FF), /* 521 */ CPCAP_REG(CPCAP_REG_RXSDOA, 0x1862, 0x1FFF), /* 522 */ }; static const struct cpcap_audio_config_table mic1_config_table[] = { - CPCAP_REG(CPCAP_REG_VAUDIOC, 0x0035, 0xFFFF), /* 512 */ - CPCAP_REG(CPCAP_REG_CC, 0x8FB3, 0xFEDF), /* 513 */ - CPCAP_REG(CPCAP_REG_CDI, 0x9E40, 0xFFFF), /* 514 */ - CPCAP_REG(CPCAP_REG_SDAC, 0x0008, 0xFCFF), /* 515 */ - CPCAP_REG(CPCAP_REG_SDACDI, 0x0808, 0xFFFF), /* 516 */ + CPCAP_REG(CPCAP_REG_VAUDIOC, 0x0035, 0x77), /* 512 */ + CPCAP_REG(CPCAP_REG_CC, 0x8F11, 0xFE11), /* 513 */ + CPCAP_REG(CPCAP_REG_CDI, 0x9E42, 0xBFFF), /* 514 */ + CPCAP_REG_SLAVE(CPCAP_REG_SDACDI, 0x003E, 0x3FFF, 1), /* 516 */ CPCAP_REG(CPCAP_REG_TXI, 0x1CC6, 0xFFFF), /* 517 */ - CPCAP_REG(CPCAP_REG_TXMP, 0x03FF, 0xFFFF), /* 518 */ - CPCAP_REG(CPCAP_REG_RXOA, 0x0000, 0xFFFF), /* 519 */ - CPCAP_REG(CPCAP_REG_RXVC, 0xDD34, 0xFFFF), /* 520 */ - CPCAP_REG(CPCAP_REG_RXCOA, 0x0200, 0xFFFF), /* 521 */ - CPCAP_REG(CPCAP_REG_RXSDOA, 0x1E02, 0xFFFF), /* 522 */ +}; + +static const struct cpcap_audio_config_table mic2_config_table[] = { + CPCAP_REG(CPCAP_REG_VAUDIOC, 0x0007, 0x77), + CPCAP_REG(CPCAP_REG_CC, 0x8FB3, 0xFEDF), + CPCAP_REG(CPCAP_REG_CDI, 0x1E40, 0xBFFF), + CPCAP_REG_SLAVE(CPCAP_REG_SDACDI, 0x007E, 0x3FFF, 1), + CPCAP_REG(CPCAP_REG_TXI, 0x0CC6, 0xFFFF), }; #undef CPCAP_REG @@ -296,12 +294,20 @@ static const struct cpcap_audio_path mic1 = { .table_len = ARRAY_SIZE(mic1_config_table), }; +static const struct cpcap_audio_path mic2 = { + .name = "mic2", + .gpio = -1, + .table = mic2_config_table, + .table_len = ARRAY_SIZE(mic2_config_table), +}; + /* CPCAP is i2s master; tegra_audio_pdata.master == false */ static struct cpcap_audio_platform_data cpcap_audio_pdata = { .master = true, .speaker = &speaker, .headset = &headset, .mic1 = &mic1, + .mic2 = &mic2, }; static struct platform_device cpcap_audio_device = { -- 2.34.1