1 From 759e70d4743828cb902f093a3cee8a7af76f2440 Mon Sep 17 00:00:00 2001
2 From: "Zhang,Vivian" <vivian.zhang@intel.com>
3 Date: Wed, 28 Nov 2012 21:55:54 +0800
4 Subject: [PATCH 18/23] Configure modem I2s1 to 8khz,mono if routing to
5 bluetooth, fixed TZSP-3943: modem configuration to
7 Content-Type: text/plain; charset="utf-8"
8 Content-Transfer-Encoding: 8bit
11 src/s_call.c | 18 ++++++++++++------
12 1 file changed, 12 insertions(+), 6 deletions(-)
14 diff --git a/src/s_call.c b/src/s_call.c
15 index 2d2b711..762fb24 100644
18 @@ -2880,11 +2880,17 @@ static TReturn s_call_set_sound_path(CoreObject *o, UserRequest *ur)
20 plugin = tcore_object_ref_plugin(o);
22 - // Configure modem I2S1
23 - prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,4,3,0,1,0,8,0,1,0,2,0,21", NULL, TCORE_AT_NO_RESULT, NULL);
24 - prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,5,2,0,1,0,8,0,1,0,2,0,22", NULL, TCORE_AT_NO_RESULT, NULL);
25 + /* Configure modem I2S1 to 8khz, mono, PCM if routing to bluetooth */
26 + if (SoundPathP->path == CALL_SOUND_PATH_BLUETOOTH) {
27 + prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,4,3,0,1,0,0,0,0,0,0,0,21", NULL, TCORE_AT_NO_RESULT, NULL);
28 + prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,5,2,0,1,0,0,0,0,0,0,0,22", NULL, TCORE_AT_NO_RESULT, NULL);
31 + prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,4,3,0,1,0,8,0,1,0,2,0,21", NULL, TCORE_AT_NO_RESULT, NULL);
32 + prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,5,2,0,1,0,8,0,1,0,2,0,22", NULL, TCORE_AT_NO_RESULT, NULL);
35 - // Configure modem I2S2 and do the modem routing
36 + /* Configure modem I2S2 and do the modem routing */
37 prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,4,4,0,0,0,8,0,1,0,2,0,21", NULL, TCORE_AT_NO_RESULT, NULL);
38 prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,5,3,0,0,0,8,0,1,0,2,0,22", NULL, TCORE_AT_NO_RESULT, NULL);
39 prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,6,0,4", NULL, TCORE_AT_NO_RESULT, NULL);
40 @@ -2892,10 +2898,10 @@ static TReturn s_call_set_sound_path(CoreObject *o, UserRequest *ur)
41 prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,6,4,2", NULL, TCORE_AT_NO_RESULT, NULL);
42 prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,6,5,2", NULL, TCORE_AT_NO_RESULT, NULL);
46 prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,2,4", NULL, TCORE_AT_NO_RESULT, NULL); //AMC_I2S2_RX
47 prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,2,3", NULL, TCORE_AT_NO_RESULT, NULL); //AMC_I2S1_RX
48 - // amc route: AMC_RADIO_RX => AMC_I2S1_TX
49 + /* amc route: AMC_RADIO_RX => AMC_I2S1_TX */
50 prepare_and_send_pending_request(plugin, "call", "AT+XDRV=40,6,0,2", NULL, TCORE_AT_NO_RESULT, NULL);
52 usleep(40000); // Time to Enable modem I2S...