FreeCalypso > hg > fc-tourmaline
comparison src/ui/mfw/mfw_mme.c @ 63:7c7fe9d0ea7c
mfw_mme.[ch]: white space cleanup (bogotabs and trailing ws)
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 22 Oct 2020 23:57:49 +0000 |
parents | 67bfe9f274f6 |
children | 77321341946c |
comparison
equal
deleted
inserted
replaced
62:089c1882788c | 63:7c7fe9d0ea7c |
---|---|
15 TO DO : | 15 TO DO : |
16 | 16 |
17 $History:: mfw_mme.c $ | 17 $History:: mfw_mme.c $ |
18 ************************************************************************ | 18 ************************************************************************ |
19 | 19 |
20 Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) | 20 Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) |
21 Description: Support from MMI to configure drives (NOR, NORMS, NAND, TFLASH) | 21 Description: Support from MMI to configure drives (NOR, NORMS, NAND, TFLASH) |
22 is added as part of SBuild 2.3.0 Migration | 22 is added as part of SBuild 2.3.0 Migration |
23 | 23 |
24 May 30, 2007 DR: OMAPS00132483 x0pleela | 24 May 30, 2007 DR: OMAPS00132483 x0pleela |
25 Description: MM: While playing an AAC, unplug USB freezes the audio | 25 Description: MM: While playing an AAC, unplug USB freezes the audio |
26 Solution: 1. Added the prototype to get the phone lock status | 26 Solution: 1. Added the prototype to get the phone lock status |
27 2. Replaced the function call mfw_get_phlock_status with mfw_get_Phlock_status | 27 2. Replaced the function call mfw_get_phlock_status with mfw_get_Phlock_status |
28 to get the phone lock status | 28 to get the phone lock status |
29 | 29 |
30 Apr 03, 2007 ER: OMAPS00122561 x0pleela | 30 Apr 03, 2007 ER: OMAPS00122561 x0pleela |
31 Description: [ACI] Phone lock feature has to be supported by ACI | 31 Description: [ACI] Phone lock feature has to be supported by ACI |
32 Solution: Phone Lock ER implementation | 32 Solution: Phone Lock ER implementation |
33 | 33 |
34 | 34 |
35 Mar 22, 2007 DVT: OMAPS00121916 x0039928(sumanth) | 35 Mar 22, 2007 DVT: OMAPS00121916 x0039928(sumanth) |
36 Description: T-Flash hot swap. | 36 Description: T-Flash hot swap. |
37 | 37 |
38 Oct 30 2006, OMAPS00098881 x0039928(sumanth) | 38 Oct 30 2006, OMAPS00098881 x0039928(sumanth) |
39 Removal of power variant | 39 Removal of power variant |
40 | 40 |
41 Oct 05, 2006 ER: OMAPS00094496 x0061088(Prachi) | 41 Oct 05, 2006 ER: OMAPS00094496 x0061088(Prachi) |
42 Description:Enhance RSSI to 3 parameters: Strength, quality, min-access-level | 42 Description:Enhance RSSI to 3 parameters: Strength, quality, min-access-level |
43 Solution:To solve the ER OMAPS0094496,mmeInit() is not calling rx_Init(). | 43 Solution:To solve the ER OMAPS0094496,mmeInit() is not calling rx_Init(). |
44 | 44 |
45 | 45 |
46 xashmic 27 Sep 2006, OMAPS00096389 | 46 xashmic 27 Sep 2006, OMAPS00096389 |
47 ENH - a) Providing static menu for re-selection of enum options for enumeration | 47 ENH - a) Providing static menu for re-selection of enum options for enumeration |
48 b) Popup menu displayed on connect event, can be enabled or disabled via menu option | 48 b) Popup menu displayed on connect event, can be enabled or disabled via menu option |
49 | 49 |
50 xashmic 21 Sep 2006, OMAPS00095831 | 50 xashmic 21 Sep 2006, OMAPS00095831 |
51 Description: USB enumeration does not happen in PIN/PUK/Insert SIM scenarios | 51 Description: USB enumeration does not happen in PIN/PUK/Insert SIM scenarios |
52 Solution: When booting up without SIM card, or prompting for PIN/PUK/SIMP entry, | 52 Solution: When booting up without SIM card, or prompting for PIN/PUK/SIMP entry, |
53 enumerate all the USB ports automatically | 53 enumerate all the USB ports automatically |
54 | 54 |
55 xashmic 9 Sep 2006, OMAPS00092732 | 55 xashmic 9 Sep 2006, OMAPS00092732 |
56 USBMS ER | 56 USBMS ER |
57 * | 57 * |
58 * Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth) | 58 * Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth) |
59 * Description: Triton PG2.2 impacts on Locosto program | 59 * Description: Triton PG2.2 impacts on Locosto program |
60 * Solution: Software workaround is done to register headset-hook dynamically | 60 * Solution: Software workaround is done to register headset-hook dynamically |
61 * during/before call is established and unregister it after the call is ended/disconnected. | 61 * during/before call is established and unregister it after the call is ended/disconnected. |
62 * | 62 * |
63 * xdeepadh, nekkareb - OMAPS00076996: 05 May 2006 | 63 * xdeepadh, nekkareb - OMAPS00076996: 05 May 2006 |
64 * Description: MO TTY call works only for the first time | 64 * Description: MO TTY call works only for the first time |
65 * Solution: For the Loocsto-lite variant, when a TTY call is initiated, the | 65 * Solution: For the Loocsto-lite variant, when a TTY call is initiated, the |
66 * current audio profile is identified and when the TTY call is ended, this | 66 * current audio profile is identified and when the TTY call is ended, this |
67 * profile is loaded. | 67 * profile is loaded. |
68 * | 68 * |
69 * nekkareb - OMAPS00057367: 8 Dec 2005 | 69 * nekkareb - OMAPS00057367: 8 Dec 2005 |
70 * Description: Fix build problems for fix of OMAPS00057367 | 70 * Description: Fix build problems for fix of OMAPS00057367 |
71 * Solution: Included OMAPS00057367 changes under a flag ISAMPLE | 71 * Solution: Included OMAPS00057367 changes under a flag ISAMPLE |
72 * | 72 * |
73 * nekkareb - OMAPS00057367: 3 Dec 2005 | 73 * nekkareb - OMAPS00057367: 3 Dec 2005 |
74 * Description: Locosto: TTY MT call does not work | 74 * Description: Locosto: TTY MT call does not work |
75 * Solution: Extra TTY command added so as to initiate the AUDIO entity to send the | 75 * Solution: Extra TTY command added so as to initiate the AUDIO entity to send the |
76 * TTY_START request to L1 only after the Vocoder enable is sent. | 76 * TTY_START request to L1 only after the Vocoder enable is sent. |
77 * Current audio device is read from audio service entity functions. | 77 * Current audio device is read from audio service entity functions. |
78 * | 78 * |
79 * xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 | 79 * xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 |
80 * Description: Support for various audio profiles | 80 * Description: Support for various audio profiles |
81 * Solution: The support for audio device's carkit/headset/loudspeaker/handheld. | 81 * Solution: The support for audio device's carkit/headset/loudspeaker/handheld. |
82 * The audio device is enabled as per the user actions. | 82 * The audio device is enabled as per the user actions. |
83 * | 83 * |
84 * ***************** Version 5 ******************************************** | 84 * ***************** Version 5 ******************************************** |
85 * User: Kk Date: 3.03.00 Time: 17:52 | 85 * User: Kk Date: 3.03.00 Time: 17:52 |
86 * Updated in $/GSM/Condat/MS/SRC/MFW | 86 * Updated in $/GSM/Condat/MS/SRC/MFW |
87 * | 87 * |
140 #include "light.h" | 140 #include "light.h" |
141 #include "mfw_acie.h" | 141 #include "mfw_acie.h" |
142 #include "mfw_mme.h" | 142 #include "mfw_mme.h" |
143 #include "mfw_win.h" | 143 #include "mfw_win.h" |
144 #include "mfw_ffs.h" /*OMAPS00098881 x0039928(sumanth)*/ | 144 #include "mfw_ffs.h" /*OMAPS00098881 x0039928(sumanth)*/ |
145 //xashmic 9 Sep 2006, OMAPS00092732 | 145 //xashmic 9 Sep 2006, OMAPS00092732 |
146 #ifdef FF_MMI_USBMS | 146 #ifdef FF_MMI_USBMS |
147 #include "usb/usb_api.h" | 147 #include "usb/usb_api.h" |
148 #endif | 148 #endif |
149 | 149 |
150 //x0pleela 01 Apr, 2007 ER: OMAPS00122561 | 150 //x0pleela 01 Apr, 2007 ER: OMAPS00122561 |
176 #define MmeFlagIrdaMsg 4 /* IRDA event */ | 176 #define MmeFlagIrdaMsg 4 /* IRDA event */ |
177 U16 mfwMmeDrvFlag = 0; /* hold driver CB flags */ | 177 U16 mfwMmeDrvFlag = 0; /* hold driver CB flags */ |
178 | 178 |
179 static U8 battLevel = 0; /* battery level */ | 179 static U8 battLevel = 0; /* battery level */ |
180 static U8 battState = 0; /* state of power supply */ | 180 static U8 battState = 0; /* state of power supply */ |
181 static U16 hdsPresence = 0; /* headset presence */ | 181 static U16 hdsPresence = 0; /* headset presence */ |
182 | 182 |
183 | 183 |
184 static int mmeCommand (U32 cmd, void *h); | 184 static int mmeCommand (U32 cmd, void *h); |
185 | 185 |
186 /* driver callbacks */ | 186 /* driver callbacks */ |
188 static void rxCb (drv_SignalID_Type *signal_params); | 188 static void rxCb (drv_SignalID_Type *signal_params); |
189 static void rtcCb (drv_SignalID_Type *signal_params); | 189 static void rtcCb (drv_SignalID_Type *signal_params); |
190 | 190 |
191 /* Added to remove warning Aug - 11 */ | 191 /* Added to remove warning Aug - 11 */ |
192 EXTERN UBYTE dspl_Enable (UBYTE in_Enable); | 192 EXTERN UBYTE dspl_Enable (UBYTE in_Enable); |
193 /* End - remove warning Aug - 11 */ | 193 /* End - remove warning Aug - 11 */ |
194 | 194 |
195 static BOOL mmePrimHandler (USHORT opc, void *data); | 195 static BOOL mmePrimHandler (USHORT opc, void *data); |
196 static int pSlot; /* primitive handler slot */ | 196 static int pSlot; /* primitive handler slot */ |
197 #ifndef FF_MMI_AUDIO_PROFILE /*a0393213 warnings removal*/ | 197 #ifndef FF_MMI_AUDIO_PROFILE /*a0393213 warnings removal*/ |
198 static void hdsCb (drv_SignalID_Type *signal_params); | 198 static void hdsCb (drv_SignalID_Type *signal_params); |
199 #endif | 199 #endif |
200 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 | 200 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 |
201 #ifdef FF_MMI_AUDIO_PROFILE | 201 #ifdef FF_MMI_AUDIO_PROFILE |
202 #define HANDHELD "handheld" //0 | 202 #define HANDHELD "handheld" //0 |
203 #define LOUDSPEAKER "handfree" // 1 | 203 #define LOUDSPEAKER "handfree" // 1 |
204 #define HEADSET "headset" // 2 | 204 #define HEADSET "headset" // 2 |
205 #define CARKIT "carkit" // 3 | 205 #define CARKIT "carkit" // 3 |
206 static UBYTE currAudioDevice = MFW_AUD_HANDHELD; | 206 static UBYTE currAudioDevice = MFW_AUD_HANDHELD; |
207 | 207 |
208 UBYTE headsetInserted = FALSE; //indicates if the headset is inserted or not | 208 UBYTE headsetInserted = FALSE; //indicates if the headset is inserted or not |
209 UBYTE carkitInserted = FALSE; //indicates if the carkit is inserted or not | 209 UBYTE carkitInserted = FALSE; //indicates if the carkit is inserted or not |
210 UBYTE mfwAudPlay = FALSE; //indicates if any other audio media is being played or not | 210 UBYTE mfwAudPlay = FALSE; //indicates if any other audio media is being played or not |
211 extern audio_set_device(char* mode); | 211 extern audio_set_device(char* mode); |
212 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth) | 212 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth) |
213 // Fix: A callback function is added that is registered for hook. | 213 // Fix: A callback function is added that is registered for hook. |
214 void mfw_audio_hook_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, | 214 void mfw_audio_hook_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, |
215 ACCESSORY_CALLBACK_PARAM callbackparam ); | 215 ACCESSORY_CALLBACK_PARAM callbackparam ); |
216 void mfw_audio_headSet_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, | 216 void mfw_audio_headSet_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, |
217 ACCESSORY_CALLBACK_PARAM callbackparam ); | 217 ACCESSORY_CALLBACK_PARAM callbackparam ); |
218 void mfw_audio_carKit_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, | 218 void mfw_audio_carKit_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, |
219 ACCESSORY_CALLBACK_PARAM callbackparam ); | 219 ACCESSORY_CALLBACK_PARAM callbackparam ); |
220 #endif | 220 #endif |
221 | 221 |
222 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ | 222 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ |
223 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ | 223 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ |
224 #ifdef FF_MMI_TFLASH | 224 #ifdef FF_MMI_TFLASH |
225 void tflash_notify_register(void); | 225 void tflash_notify_register(void); |
226 typedef void (*T_MC_EVENT_CALLBACK)(T_MC_EVENT mcEvent, void *ctx); | 226 typedef void (*T_MC_EVENT_CALLBACK)(T_MC_EVENT mcEvent, void *ctx); |
227 #endif | 227 #endif |
228 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ | 228 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ |
229 | 229 |
230 void mfw_audio_set_device(int type); | 230 void mfw_audio_set_device(int type); |
231 //xdeepadh, nekkareb - OMAPS00076996: 05 May 2006 | 231 //xdeepadh, nekkareb - OMAPS00076996: 05 May 2006 |
232 //Array to retrieve the profile name | 232 //Array to retrieve the profile name |
233 #ifdef MMI_LITE | 233 #ifdef MMI_LITE |
238 #ifdef FF_PHONE_LOCK | 238 #ifdef FF_PHONE_LOCK |
239 EXTERN int mfw_get_Phlock_status(void); | 239 EXTERN int mfw_get_Phlock_status(void); |
240 #endif // FF_PHONE_LOCK | 240 #endif // FF_PHONE_LOCK |
241 | 241 |
242 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ | 242 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ |
243 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ | 243 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ |
244 #ifdef FF_MMI_TFLASH | 244 #ifdef FF_MMI_TFLASH |
245 void tflash_cb(T_MC_EVENT mcEvent, void *ctx) | 245 void tflash_cb(T_MC_EVENT mcEvent, void *ctx) |
246 { | 246 { |
247 PALLOC(tflash_mmi_ind, TFLASH_MMI_IND); | 247 PALLOC(tflash_mmi_ind, TFLASH_MMI_IND); |
248 tflash_mmi_ind->mc_status = mcEvent; | 248 tflash_mmi_ind->mc_status = mcEvent; |
249 PSENDX(ACI,tflash_mmi_ind); | 249 PSENDX(ACI,tflash_mmi_ind); |
250 } | 250 } |
251 #endif | 251 #endif |
252 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ | 252 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ |
253 | 253 |
254 //xashmic 9 Sep 2006, OMAPS00092732 | 254 //xashmic 9 Sep 2006, OMAPS00092732 |
255 #ifdef FF_MMI_USBMS | 255 #ifdef FF_MMI_USBMS |
256 /* | 256 /* |
257 +--------------------------------------------------------------------+ | 257 +--------------------------------------------------------------------+ |
258 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | | 258 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | |
259 | STATE : code ROUTINE : usbms_cb | | 259 | STATE : code ROUTINE : usbms_cb | |
260 +--------------------------------------------------------------------+ | 260 +--------------------------------------------------------------------+ |
261 | 261 |
262 PURPOSE : Posts the USB events to the MMI task | 262 PURPOSE : Posts the USB events to the MMI task |
263 | 263 |
264 */ | 264 */ |
265 | 265 |
266 void usbms_cb (T_USB_EVENT usbEvent, void *ctx) | 266 void usbms_cb (T_USB_EVENT usbEvent, void *ctx) |
267 { | 267 { |
268 PALLOC(usbms_mmi_ind,USBMS_MMI_IND); | 268 PALLOC(usbms_mmi_ind,USBMS_MMI_IND); |
269 usbms_mmi_ind->usb_status = (U8)usbEvent; | 269 usbms_mmi_ind->usb_status = (U8)usbEvent; |
270 PSENDX(ACI,usbms_mmi_ind); | 270 PSENDX(ACI,usbms_mmi_ind); |
271 } | 271 } |
272 | 272 |
273 | 273 |
274 | 274 |
275 | 275 |
282 PURPOSE : Registers a callback for USB connect/disconnect events | 282 PURPOSE : Registers a callback for USB connect/disconnect events |
283 | 283 |
284 */ | 284 */ |
285 void mfw_usbms_init(void) | 285 void mfw_usbms_init(void) |
286 { | 286 { |
287 T_USB_RETURN ret; | 287 T_USB_RETURN ret; |
288 TRACE_FUNCTION("mfw_usbms_init"); | 288 TRACE_FUNCTION("mfw_usbms_init"); |
289 ret = usb_register_notifcation( (T_USB_EVENT_CALLBACK)usbms_cb,NULL); | 289 ret = usb_register_notifcation( (T_USB_EVENT_CALLBACK)usbms_cb,NULL); |
290 switch(ret) | 290 switch(ret) |
291 { | 291 { |
292 case USB_NOT_SUPPORTED : | 292 case USB_NOT_SUPPORTED : |
293 TRACE_ERROR("USB registeration unsuccessful- Not supported"); | 293 TRACE_ERROR("USB registeration unsuccessful- Not supported"); |
294 break; | 294 break; |
295 case USB_MEMORY_ERR: | 295 case USB_MEMORY_ERR: |
296 TRACE_ERROR("USB registeration unsuccessful - Memeory error"); | 296 TRACE_ERROR("USB registeration unsuccessful - Memeory error"); |
297 break; | 297 break; |
298 case USB_INTERNAL_ERR: | 298 case USB_INTERNAL_ERR: |
299 TRACE_ERROR("USB registeration unsuccessful - Internal error"); | 299 TRACE_ERROR("USB registeration unsuccessful - Internal error"); |
300 break; | 300 break; |
301 case USB_OK: | 301 case USB_OK: |
302 TRACE_EVENT("USB registeration successful"); | 302 TRACE_EVENT("USB registeration successful"); |
303 break; | 303 break; |
304 } | 304 } |
305 } | 305 } |
306 | 306 |
307 /* | 307 /* |
308 +--------------------------------------------------------------------+ | 308 +--------------------------------------------------------------------+ |
309 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | | 309 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | |
313 PURPOSE : Continues or abandons the enumeration based on user selection | 313 PURPOSE : Continues or abandons the enumeration based on user selection |
314 | 314 |
315 */ | 315 */ |
316 void mfw_usbms_enum_control(T_MFW_USB_ENUM_CONTROL usbms_enum_status, T_MFW_USB_ENUM_TYPE usb_enum_type) | 316 void mfw_usbms_enum_control(T_MFW_USB_ENUM_CONTROL usbms_enum_status, T_MFW_USB_ENUM_TYPE usb_enum_type) |
317 { | 317 { |
318 T_USB_ENUM_INFO enumInfo; | 318 T_USB_ENUM_INFO enumInfo; |
319 T_USB_RETURN ret; | 319 T_USB_RETURN ret; |
320 TRACE_FUNCTION("mfw_usbms_enum_control"); | 320 TRACE_FUNCTION("mfw_usbms_enum_control"); |
321 switch(usb_enum_type) | 321 switch(usb_enum_type) |
322 { | 322 { |
323 case MFW_USB_TYPE_MS: | 323 case MFW_USB_TYPE_MS: |
324 enumInfo.info=USB_MS; | 324 enumInfo.info=USB_MS; |
325 break; | 325 break; |
326 case MFW_USB_TYPE_AT: | 326 case MFW_USB_TYPE_AT: |
327 enumInfo.info=USB_AT; | 327 enumInfo.info=USB_AT; |
328 break; | 328 break; |
329 case MFW_USB_TYPE_TRACE: | 329 case MFW_USB_TYPE_TRACE: |
330 enumInfo.info=USB_TRACE; | 330 enumInfo.info=USB_TRACE; |
331 break; | 331 break; |
332 case MFW_USB_TYPE_AT_MS://xashmic 27 Sep 2006, OMAPS00096389 | 332 case MFW_USB_TYPE_AT_MS://xashmic 27 Sep 2006, OMAPS00096389 |
333 enumInfo.info=USB_AT|USB_MS; | 333 enumInfo.info=USB_AT|USB_MS; |
334 break; | 334 break; |
335 case MFW_USB_TYPE_AT_TRACE://xashmic 27 Sep 2006, OMAPS00096389 | 335 case MFW_USB_TYPE_AT_TRACE://xashmic 27 Sep 2006, OMAPS00096389 |
336 enumInfo.info=USB_AT|USB_TRACE; | 336 enumInfo.info=USB_AT|USB_TRACE; |
337 break; | 337 break; |
338 case MFW_USB_TYPE_MS_TRACE://xashmic 27 Sep 2006, OMAPS00096389 | 338 case MFW_USB_TYPE_MS_TRACE://xashmic 27 Sep 2006, OMAPS00096389 |
339 enumInfo.info=USB_MS|USB_TRACE; | 339 enumInfo.info=USB_MS|USB_TRACE; |
340 break; | 340 break; |
341 case MFW_USB_TYPE_ALL: | 341 case MFW_USB_TYPE_ALL: |
342 enumInfo.info=USB_MS| USB_AT|USB_TRACE; | 342 enumInfo.info=USB_MS| USB_AT|USB_TRACE; |
343 break; | 343 break; |
344 default: | 344 default: |
345 TRACE_ERROR("mfw_usbms_enum_control():Invalid type"); | 345 TRACE_ERROR("mfw_usbms_enum_control():Invalid type"); |
346 return; | 346 return; |
347 } | 347 } |
348 TRACE_EVENT_P1("Ports %x",enumInfo.info); | 348 TRACE_EVENT_P1("Ports %x",enumInfo.info); |
349 switch(usbms_enum_status) | 349 switch(usbms_enum_status) |
350 { | 350 { |
351 case MFW_USB_ENUM: | 351 case MFW_USB_ENUM: |
352 ret=usb_enum_control(USB_ENUM,&enumInfo); | 352 ret=usb_enum_control(USB_ENUM,&enumInfo); |
353 TRACE_EVENT_P1("mfw_usbms_enum_control:ret:%d", ret); | 353 TRACE_EVENT_P1("mfw_usbms_enum_control:ret:%d", ret); |
354 switch(ret) | 354 switch(ret) |
355 { | 355 { |
356 case USB_NOT_SUPPORTED : | 356 case USB_NOT_SUPPORTED : |
357 TRACE_ERROR("USB enumeration unsuccessful- Not supported"); | 357 TRACE_ERROR("USB enumeration unsuccessful- Not supported"); |
358 break; | 358 break; |
359 case USB_MEMORY_ERR: | 359 case USB_MEMORY_ERR: |
360 TRACE_ERROR("USB enumeration unsuccessful - Memeory error"); | 360 TRACE_ERROR("USB enumeration unsuccessful - Memeory error"); |
361 break; | 361 break; |
362 case USB_INTERNAL_ERR: | 362 case USB_INTERNAL_ERR: |
363 TRACE_ERROR("USB enumeration unsuccessful - Internal error"); | 363 TRACE_ERROR("USB enumeration unsuccessful - Internal error"); |
364 break; | 364 break; |
365 case USB_OK: | 365 case USB_OK: |
366 TRACE_EVENT("USB enumeration successful"); | 366 TRACE_EVENT("USB enumeration successful"); |
367 break; | 367 break; |
368 default: | 368 default: |
369 TRACE_ERROR("USB enumeration unsuccessful - Invalid return"); | 369 TRACE_ERROR("USB enumeration unsuccessful - Invalid return"); |
370 break; | 370 break; |
371 } | 371 } |
372 break; | 372 break; |
373 case MFW_USB_NO_ENUM: | 373 case MFW_USB_NO_ENUM: |
374 ret=usb_enum_control(USB_NO_ENUM,&enumInfo); | 374 ret=usb_enum_control(USB_NO_ENUM,&enumInfo); |
375 switch(ret) | 375 switch(ret) |
376 { | 376 { |
377 case USB_NOT_SUPPORTED : | 377 case USB_NOT_SUPPORTED : |
378 TRACE_ERROR("USB no enumeration unsuccessful- Not supported"); | 378 TRACE_ERROR("USB no enumeration unsuccessful- Not supported"); |
379 break; | 379 break; |
380 case USB_MEMORY_ERR: | 380 case USB_MEMORY_ERR: |
381 TRACE_ERROR("USB no enumeration unsuccessful - Memeory error"); | 381 TRACE_ERROR("USB no enumeration unsuccessful - Memeory error"); |
382 break; | 382 break; |
383 case USB_INTERNAL_ERR: | 383 case USB_INTERNAL_ERR: |
384 TRACE_ERROR("USB no enumeration unsuccessful - Internal error"); | 384 TRACE_ERROR("USB no enumeration unsuccessful - Internal error"); |
385 break; | 385 break; |
386 case USB_OK: | 386 case USB_OK: |
387 TRACE_EVENT("USB no enumeration successful"); | 387 TRACE_EVENT("USB no enumeration successful"); |
388 break; | 388 break; |
389 default: | 389 default: |
390 TRACE_ERROR("USB enumeration successful - Invalid return"); | 390 TRACE_ERROR("USB enumeration successful - Invalid return"); |
391 break; | 391 break; |
392 } | 392 } |
393 break; | 393 break; |
394 } | 394 } |
395 } | 395 } |
396 | 396 |
397 #endif | 397 #endif |
398 | 398 |
399 /* | 399 /* |
403 +--------------------------------------------------------------------+ | 403 +--------------------------------------------------------------------+ |
404 PURPOSE : initialize equipment handler | 404 PURPOSE : initialize equipment handler |
405 */ | 405 */ |
406 MfwRes mmeInit (void) | 406 MfwRes mmeInit (void) |
407 { | 407 { |
408 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 | 408 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 |
409 // the callback registeration variables are populated here and passed as | 409 // the callback registeration variables are populated here and passed as |
410 // argument to audio_init | 410 // argument to audio_init |
411 #ifdef FF_MMI_AUDIO_PROFILE | 411 #ifdef FF_MMI_AUDIO_PROFILE |
412 T_ACCESSORY_CALLBACK audio_device_config[MAX_EXT_AUD_DEVICE]; | 412 T_ACCESSORY_CALLBACK audio_device_config[MAX_EXT_AUD_DEVICE]; |
413 | 413 |
414 audio_device_config[CALLBACK_HEADSET].callbackFunc = mfw_audio_headSet_indication; | 414 audio_device_config[CALLBACK_HEADSET].callbackFunc = mfw_audio_headSet_indication; |
415 audio_device_config[CALLBACK_HEADSET].callbackVal = NULL; | 415 audio_device_config[CALLBACK_HEADSET].callbackVal = NULL; |
416 audio_device_config[CALLBACK_CARKIT].callbackFunc = mfw_audio_carKit_indication; | 416 audio_device_config[CALLBACK_CARKIT].callbackFunc = mfw_audio_carKit_indication; |
417 audio_device_config[CALLBACK_CARKIT].callbackVal = NULL; | 417 audio_device_config[CALLBACK_CARKIT].callbackVal = NULL; |
418 #endif | 418 #endif |
419 | 419 |
420 mfwCommand[MfwTypMme] = (MfwCb) mmeCommand; | 420 mfwCommand[MfwTypMme] = (MfwCb) mmeCommand; |
421 | 421 |
422 mfwMmeDrvFlag = 0; | 422 mfwMmeDrvFlag = 0; |
427 | 427 |
428 | 428 |
429 pwr_Init(pwrCb); //power driver | 429 pwr_Init(pwrCb); //power driver |
430 rx_Init(rxCb); //fieldstrength driver | 430 rx_Init(rxCb); //fieldstrength driver |
431 light_Init(); //light emitting driver | 431 light_Init(); //light emitting driver |
432 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 | 432 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 |
433 #ifdef FF_MMI_AUDIO_PROFILE | 433 #ifdef FF_MMI_AUDIO_PROFILE |
434 audio_Init(audio_device_config); | 434 audio_Init(audio_device_config); |
435 #else | 435 #else |
436 audio_Init(hdsCb); //audio driver | 436 audio_Init(hdsCb); //audio driver |
437 #endif | 437 #endif |
438 | 438 |
439 mmeBattInfo ( 10, 0); | 439 mmeBattInfo ( 10, 0); |
440 | 440 |
441 mmeRxInfo(5,0); | 441 mmeRxInfo(5,0); |
442 | 442 |
443 /* install prim handler */ | 443 /* install prim handler */ |
444 pSlot = aci_create((T_PRIM_HANDLER)mmePrimHandler,NULL); | 444 pSlot = aci_create((T_PRIM_HANDLER)mmePrimHandler,NULL); |
445 | 445 |
446 //xashmic 9 Sep 2006, OMAPS00092732 | 446 //xashmic 9 Sep 2006, OMAPS00092732 |
447 //Registers a callback for event handling | 447 //Registers a callback for event handling |
448 #ifdef FF_MMI_USBMS | 448 #ifdef FF_MMI_USBMS |
449 mfw_usbms_init(); | 449 mfw_usbms_init(); |
450 | 450 |
451 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ | 451 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ |
452 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ | 452 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ |
453 #ifdef FF_MMI_TFLASH | 453 #ifdef FF_MMI_TFLASH |
454 tflash_notify_register(); | 454 tflash_notify_register(); |
455 #endif | 455 #endif |
456 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ | 456 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ |
457 | 457 |
458 #endif | 458 #endif |
459 | 459 |
460 return MfwResOk; | 460 return MfwResOk; |
461 } | 461 } |
462 | 462 |
463 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ | 463 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ |
464 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ | 464 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ |
465 #ifdef FF_MMI_TFLASH | 465 #ifdef FF_MMI_TFLASH |
466 void tflash_notify_register(void) | 466 void tflash_notify_register(void) |
467 { | 467 { |
468 T_RV_RET result; | 468 T_RV_RET result; |
469 | 469 |
470 result = (T_RV_RET)mc_register_notifcation((T_MC_EVENT_CALLBACK)tflash_cb, NULL); | 470 result = (T_RV_RET)mc_register_notifcation((T_MC_EVENT_CALLBACK)tflash_cb, NULL); |
471 | 471 |
472 if(result == RV_OK) | 472 if(result == RV_OK) |
473 TRACE_EVENT("TFLASH callback registration successful"); | 473 TRACE_EVENT("TFLASH callback registration successful"); |
474 else | 474 else |
475 TRACE_ERROR("TFLASH callback registration failed"); | 475 TRACE_ERROR("TFLASH callback registration failed"); |
476 } | 476 } |
477 #endif | 477 #endif |
478 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ | 478 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ |
479 | 479 |
480 | 480 |
481 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth) | 481 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth) |
482 // Fix: Two new mfw hook register and unregister functions are added | 482 // Fix: Two new mfw hook register and unregister functions are added |
483 // which call the hook register and unregister functions in audio.c file | 483 // which call the hook register and unregister functions in audio.c file |
484 #ifdef FF_MMI_AUDIO_PROFILE | 484 #ifdef FF_MMI_AUDIO_PROFILE |
485 void mfw_hook_unregister(void) | 485 void mfw_hook_unregister(void) |
486 { | 486 { |
487 TRACE_FUNCTION("mfw hook unregister"); | 487 TRACE_FUNCTION("mfw hook unregister"); |
488 hook_unregister(); | 488 hook_unregister(); |
489 } | 489 } |
490 | 490 |
491 void mfw_hook_register(void) | 491 void mfw_hook_register(void) |
492 { | 492 { |
493 T_ACCESSORY_CALLBACK hook_device; | 493 T_ACCESSORY_CALLBACK hook_device; |
494 | 494 |
495 TRACE_FUNCTION("mfw hook register"); | 495 TRACE_FUNCTION("mfw hook register"); |
496 | 496 |
497 hook_device.callbackVal = NULL; | 497 hook_device.callbackVal = NULL; |
498 hook_device.callbackFunc = mfw_audio_hook_indication; | 498 hook_device.callbackFunc = mfw_audio_hook_indication; |
499 hook_register(hook_device); | 499 hook_register(hook_device); |
500 } | 500 } |
501 #endif | 501 #endif |
502 | 502 |
503 | 503 |
504 | 504 |
532 | 532 |
533 MfwHnd mmeCreate (MfwHnd w, MfwEvt e, MfwCb f) | 533 MfwHnd mmeCreate (MfwHnd w, MfwEvt e, MfwCb f) |
534 { | 534 { |
535 MfwHdr *hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr)); | 535 MfwHdr *hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr)); |
536 MfwMme *mme = (MfwMme *) mfwAlloc(sizeof(MfwMme)); | 536 MfwMme *mme = (MfwMme *) mfwAlloc(sizeof(MfwMme)); |
537 MfwHdr *insert_status =0; | 537 MfwHdr *insert_status =0; |
538 | 538 |
539 if (!hdr || !mme) | 539 if (!hdr || !mme) |
540 { | 540 { |
541 TRACE_ERROR("ERROR: mmeCreate() Mem Alloc Failed."); | 541 TRACE_ERROR("ERROR: mmeCreate() Mem Alloc Failed."); |
542 | 542 |
543 if(hdr) | 543 if(hdr) |
544 mfwFree((U8*)hdr,sizeof(MfwHdr)); | 544 mfwFree((U8*)hdr,sizeof(MfwHdr)); |
545 if(mme) | 545 if(mme) |
546 mfwFree((U8*)mme,sizeof(MfwMme)); | 546 mfwFree((U8*)mme,sizeof(MfwMme)); |
547 | 547 |
548 return 0; | 548 return 0; |
549 } | 549 } |
550 | 550 |
551 mme->map = e; | 551 mme->map = e; |
552 mme->handler = f; | 552 mme->handler = f; |
553 mme->value = 0; | 553 mme->value = 0; |
554 | 554 |
555 hdr->data = mme; | 555 hdr->data = mme; |
556 hdr->type = MfwTypMme; | 556 hdr->type = MfwTypMme; |
557 | 557 |
558 insert_status = mfwInsert(w,hdr); | 558 insert_status = mfwInsert(w,hdr); |
559 | 559 |
560 if(!insert_status) | 560 if(!insert_status) |
561 { | 561 { |
562 TRACE_ERROR("ERROR: mmeCreate() Failed to Install Handler. "); | 562 TRACE_ERROR("ERROR: mmeCreate() Failed to Install Handler. "); |
563 mfwFree((U8*)hdr,sizeof(MfwHdr)); | 563 mfwFree((U8*)hdr,sizeof(MfwHdr)); |
564 mfwFree((U8*)mme ,sizeof(MfwMme)); | 564 mfwFree((U8*)mme ,sizeof(MfwMme)); |
565 return 0; | 565 return 0; |
566 } | 566 } |
567 return insert_status; | 567 return insert_status; |
568 } | 568 } |
569 | 569 |
570 | 570 |
571 /* | 571 /* |
618 | STATE : code ROUTINE : mmeRtcInit | | 618 | STATE : code ROUTINE : mmeRtcInit | |
619 +--------------------------------------------------------------------+ | 619 +--------------------------------------------------------------------+ |
620 | 620 |
621 PURPOSE : init the RTC and setup the alarm callback handler | 621 PURPOSE : init the RTC and setup the alarm callback handler |
622 | 622 |
623 extern UBYTE clk_Init (USHORT, drv_SignalCB_Type, UBYTE*); | 623 extern UBYTE clk_Init (USHORT, drv_SignalCB_Type, UBYTE*); |
624 */ | 624 */ |
625 | 625 |
626 MfwRes mmeRtcInit (USHORT drvHandle, UBYTE *info) | 626 MfwRes mmeRtcInit (USHORT drvHandle, UBYTE *info) |
627 { | 627 { |
628 mfwMmeDrvFlag &= ~MmeFlagRtcAlarm; | 628 mfwMmeDrvFlag &= ~MmeFlagRtcAlarm; |
641 PURPOSE : called when an event may change the backlight level/status | 641 PURPOSE : called when an event may change the backlight level/status |
642 | 642 |
643 */ | 643 */ |
644 void mme_backlightEvent(int event) | 644 void mme_backlightEvent(int event) |
645 { | 645 { |
646 int light; | 646 int light; |
647 if ((event >=BL_INIT) && (event <BL_LAST_OPTION)) | 647 if ((event >=BL_INIT) && (event <BL_LAST_OPTION)) |
648 { | 648 { |
649 light = mme_backlightStatus[event]; | 649 light = mme_backlightStatus[event]; |
650 if (light == BL_SET_IDLE) | 650 if (light == BL_SET_IDLE) |
651 { | 651 { |
652 light_setBacklightIdle(); | 652 light_setBacklightIdle(); |
653 } | 653 } |
654 else if (light == BL_NO_CHANGE) | 654 else if (light == BL_NO_CHANGE) |
655 { | 655 { |
656 //No change | 656 //No change |
657 } | 657 } |
658 else if ((light >=BL_NO_LIGHT) && (light <=BL_MAX_LIGHT)) | 658 else if ((light >=BL_NO_LIGHT) && (light <=BL_MAX_LIGHT)) |
659 { | 659 { |
660 mmeBackLight ((U8)light); | 660 mmeBackLight ((U8)light); |
661 } | 661 } |
662 | 662 |
663 } | 663 } |
664 } | 664 } |
665 | 665 |
666 /* | 666 /* |
667 +--------------------------------------------------------------------+ | 667 +--------------------------------------------------------------------+ |
668 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | | 668 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | |
672 PURPOSE : called to initialise backlight events | 672 PURPOSE : called to initialise backlight events |
673 | 673 |
674 */ | 674 */ |
675 void mme_setBacklightEvent(int event, int lightLevel) | 675 void mme_setBacklightEvent(int event, int lightLevel) |
676 { | 676 { |
677 if ((event >=BL_INIT) && (event <BL_LAST_OPTION)) | 677 if ((event >=BL_INIT) && (event <BL_LAST_OPTION)) |
678 { | 678 { |
679 mme_backlightStatus[event] = lightLevel; | 679 mme_backlightStatus[event] = lightLevel; |
680 } | 680 } |
681 } | 681 } |
682 | 682 |
683 | 683 |
684 /* | 684 /* |
685 +--------------------------------------------------------------------+ | 685 +--------------------------------------------------------------------+ |
736 MfwRes mmeSetVolume (U16 audioIn, U16 audioOut) | 736 MfwRes mmeSetVolume (U16 audioIn, U16 audioOut) |
737 { | 737 { |
738 if (audioIn > 255) audioIn = 255; | 738 if (audioIn > 255) audioIn = 255; |
739 if (audioOut > 255) audioOut = 255; | 739 if (audioOut > 255) audioOut = 255; |
740 | 740 |
741 audio_SetAmplf(AUDIO_MICROPHONE,(U8) audioIn); | 741 audio_SetAmplf(AUDIO_MICROPHONE,(U8) audioIn); |
742 audio_SetAmplf(AUDIO_SPEAKER,(U8) audioOut); | 742 audio_SetAmplf(AUDIO_SPEAKER,(U8) audioOut); |
743 | 743 |
744 return MfwResOk; | 744 return MfwResOk; |
745 } | 745 } |
746 | 746 |
772 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | | 772 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | |
773 | STATE : code ROUTINE : mmeBattInfo | | 773 | STATE : code ROUTINE : mmeBattInfo | |
774 +--------------------------------------------------------------------+ | 774 +--------------------------------------------------------------------+ |
775 | 775 |
776 PURPOSE : configure battery level information | 776 PURPOSE : configure battery level information |
777 | 777 |
778 | 778 |
779 */ | 779 */ |
780 | 780 |
781 void mmeBattInfo ( U8 intervalls, U16 level) | 781 void mmeBattInfo ( U8 intervalls, U16 level) |
782 { | 782 { |
848 temp = dspl_Enable(0); | 848 temp = dspl_Enable(0); |
849 #else | 849 #else |
850 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) | 850 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) |
851 display is enabled only when lcd refresh is needed*/ | 851 display is enabled only when lcd refresh is needed*/ |
852 if(FFS_flashData.refresh == 1) | 852 if(FFS_flashData.refresh == 1) |
853 temp = dspl_Enable(0); | 853 temp = dspl_Enable(0); |
854 #endif | 854 #endif |
855 if (mfwSignallingMethod EQ 0) | 855 if (mfwSignallingMethod EQ 0) |
856 { | 856 { |
857 if (mfwFocus) | 857 if (mfwFocus) |
858 if (sigExec(mfwFocus,evt,value)) | 858 if (sigExec(mfwFocus,evt,value)) |
859 { | 859 { |
860 #ifndef FF_POWER_MANAGEMENT | 860 #ifndef FF_POWER_MANAGEMENT |
861 dspl_Enable(temp); | 861 dspl_Enable(temp); |
862 #else | 862 #else |
863 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) | 863 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) |
864 display is enabled only when lcd refresh is needed*/ | 864 display is enabled only when lcd refresh is needed*/ |
865 if(FFS_flashData.refresh == 1) | 865 if(FFS_flashData.refresh == 1) |
866 dspl_Enable(temp); | 866 dspl_Enable(temp); |
867 #endif | 867 #endif |
868 return; | 868 return; |
869 } | 869 } |
870 if (mfwRoot) | 870 if (mfwRoot) |
871 sigExec(mfwRoot,evt,value); | 871 sigExec(mfwRoot,evt,value); |
872 } | 872 } |
873 else | 873 else |
874 { | 874 { |
895 { | 895 { |
896 /* | 896 /* |
897 * Signal consumed, then return | 897 * Signal consumed, then return |
898 */ | 898 */ |
899 if (sigExec (h, evt, value)) | 899 if (sigExec (h, evt, value)) |
900 { | 900 { |
901 #ifndef FF_POWER_MANAGEMENT | 901 #ifndef FF_POWER_MANAGEMENT |
902 dspl_Enable(temp); | 902 dspl_Enable(temp); |
903 #else | 903 #else |
904 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) | 904 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) |
905 display is enabled only when lcd refresh is needed*/ | 905 display is enabled only when lcd refresh is needed*/ |
906 if(FFS_flashData.refresh == 1) | 906 if(FFS_flashData.refresh == 1) |
907 dspl_Enable(temp); | 907 dspl_Enable(temp); |
908 #endif | 908 #endif |
909 return; | 909 return; |
910 } | 910 } |
911 | 911 |
912 /* | 912 /* |
913 * All windows tried inclusive root | 913 * All windows tried inclusive root |
914 */ | 914 */ |
915 if (h == mfwRoot) | 915 if (h == mfwRoot) |
916 { | 916 { |
917 #ifndef FF_POWER_MANAGEMENT | 917 #ifndef FF_POWER_MANAGEMENT |
918 dspl_Enable(temp); | 918 dspl_Enable(temp); |
919 #else | 919 #else |
920 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) | 920 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) |
921 display is enabled only when lcd refresh is needed*/ | 921 display is enabled only when lcd refresh is needed*/ |
922 if(FFS_flashData.refresh == 1) | 922 if(FFS_flashData.refresh == 1) |
923 dspl_Enable(temp); | 923 dspl_Enable(temp); |
924 #endif | 924 #endif |
925 return; | 925 return; |
926 } | 926 } |
927 | 927 |
928 /* | 928 /* |
929 * get parent window | 929 * get parent window |
930 */ | 930 */ |
931 h = mfwParent(mfwParent(h)); | 931 h = mfwParent(mfwParent(h)); |
932 if(h) | 932 if(h) |
933 h = ((MfwWin * )(h->data))->elems; | 933 h = ((MfwWin * )(h->data))->elems; |
934 } | 934 } |
935 sigExec (mfwRoot, evt, value); | 935 sigExec (mfwRoot, evt, value); |
936 | 936 |
937 } | 937 } |
938 #ifndef FF_POWER_MANAGEMENT | 938 #ifndef FF_POWER_MANAGEMENT |
939 dspl_Enable(temp); | 939 dspl_Enable(temp); |
940 #else | 940 #else |
941 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) | 941 /*OMAPS00098881 (removing power variant) a0393213(Prabakar) |
942 display is enabled only when lcd refresh is needed*/ | 942 display is enabled only when lcd refresh is needed*/ |
943 if(FFS_flashData.refresh == 1) | 943 if(FFS_flashData.refresh == 1) |
944 dspl_Enable(temp); | 944 dspl_Enable(temp); |
1022 | 1022 |
1023 static BOOL mmePrimHandler (USHORT opc, void *data) | 1023 static BOOL mmePrimHandler (USHORT opc, void *data) |
1024 { | 1024 { |
1025 U8 level; | 1025 U8 level; |
1026 U8 state; | 1026 U8 state; |
1027 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 | 1027 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 |
1028 #ifdef FF_MMI_AUDIO_PROFILE | 1028 #ifdef FF_MMI_AUDIO_PROFILE |
1029 U8 hdsData; | 1029 U8 hdsData; |
1030 U8 cktData; | 1030 U8 cktData; |
1031 #endif | 1031 #endif |
1032 | 1032 |
1033 | 1033 |
1034 // TRACE_FUNCTION ("mmePrimHandler()"); | 1034 // TRACE_FUNCTION ("mmePrimHandler()"); |
1035 | 1035 |
1036 switch (opc) | 1036 switch (opc) |
1037 { | 1037 { |
1051 { | 1051 { |
1052 battState = state; | 1052 battState = state; |
1053 mmeSignal(MfwMmeBaState,state); | 1053 mmeSignal(MfwMmeBaState,state); |
1054 } | 1054 } |
1055 return TRUE; /* processed by MME, delete */ | 1055 return TRUE; /* processed by MME, delete */ |
1056 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 | 1056 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005 |
1057 // the corresponding callback function is called in MMI context | 1057 // the corresponding callback function is called in MMI context |
1058 // this comment will be removed once the sap for this is available | 1058 // this comment will be removed once the sap for this is available |
1059 #ifdef FF_MMI_AUDIO_PROFILE | 1059 #ifdef FF_MMI_AUDIO_PROFILE |
1060 case MMI_HEADSET_IND: | 1060 case MMI_HEADSET_IND: |
1061 TRACE_EVENT("MMI_HEADSET_IND"); | 1061 TRACE_EVENT("MMI_HEADSET_IND"); |
1062 hdsData = ((T_MMI_HEADSET_IND *) data)->headset_status; | 1062 hdsData = ((T_MMI_HEADSET_IND *) data)->headset_status; |
1063 mmeSignal(MfwMmeHeadset,hdsData); | 1063 mmeSignal(MfwMmeHeadset,hdsData); |
1064 return TRUE; | 1064 return TRUE; |
1065 case MMI_CARKIT_IND: | 1065 case MMI_CARKIT_IND: |
1066 TRACE_EVENT("MMI_CARKIT_IND"); | 1066 TRACE_EVENT("MMI_CARKIT_IND"); |
1067 cktData = ((T_MMI_CARKIT_IND *) data)->carkit_status; | 1067 cktData = ((T_MMI_CARKIT_IND *) data)->carkit_status; |
1068 mmeSignal(MfwMmeCarkit, cktData); | 1068 mmeSignal(MfwMmeCarkit, cktData); |
1069 return TRUE; | 1069 return TRUE; |
1070 #endif | 1070 #endif |
1071 //xashmic 9 Sep 2006, OMAPS00092732 | 1071 //xashmic 9 Sep 2006, OMAPS00092732 |
1072 //Handler for USB connect or disconnect events | 1072 //Handler for USB connect or disconnect events |
1073 #ifdef FF_MMI_USBMS | 1073 #ifdef FF_MMI_USBMS |
1074 case USBMS_MMI_IND: | 1074 case USBMS_MMI_IND: |
1075 { | 1075 { |
1076 T_USBMS_MMI_IND *usbms_mmi_ind=(T_USBMS_MMI_IND *) data; | 1076 T_USBMS_MMI_IND *usbms_mmi_ind=(T_USBMS_MMI_IND *) data; |
1077 switch(usbms_mmi_ind->usb_status) | 1077 switch(usbms_mmi_ind->usb_status) |
1078 { | 1078 { |
1079 case USB_CABLE_CONNECT_EVENT: | 1079 case USB_CABLE_CONNECT_EVENT: |
1080 TRACE_EVENT("USB_CABLE_CONNECT_EVENT"); | 1080 TRACE_EVENT("USB_CABLE_CONNECT_EVENT"); |
1081 //xashmic 27 Sep 2006, OMAPS00096389 | 1081 //xashmic 27 Sep 2006, OMAPS00096389 |
1082 //xashmic 21 Sep 2006, OMAPS00095831 | 1082 //xashmic 21 Sep 2006, OMAPS00095831 |
1083 //To enumerate based on user selection | 1083 //To enumerate based on user selection |
1084 if( ( getBootUpState() > 0 ) && ( getUSBMSFlags() & MFW_USBMS_POPUP_ENABLE)) | 1084 if( ( getBootUpState() > 0 ) && ( getUSBMSFlags() & MFW_USBMS_POPUP_ENABLE)) |
1085 { | 1085 { |
1086 mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT); | 1086 mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT); |
1087 } | 1087 } |
1088 //xashmic 21 Sep 2006, OMAPS00095831 | 1088 //xashmic 21 Sep 2006, OMAPS00095831 |
1089 //To Enumerate automatically | 1089 //To Enumerate automatically |
1090 else | 1090 else |
1091 { | 1091 { |
1092 //x0pleela 01 Apr, 2007 ER: OMAPS00122561 | 1092 //x0pleela 01 Apr, 2007 ER: OMAPS00122561 |
1093 #ifdef FF_PHONE_LOCK | 1093 #ifdef FF_PHONE_LOCK |
1094 //x0pleela 29 May, 2007 DR: OMAPS00132483 | 1094 //x0pleela 29 May, 2007 DR: OMAPS00132483 |
1095 //Check the phone lock status | 1095 //Check the phone lock status |
1096 if( mfw_get_Phlock_status() ) | 1096 if( mfw_get_Phlock_status() ) |
1097 mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT); | 1097 mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT); |
1098 else | 1098 else |
1099 #endif //FF_PHONE_LOCK | 1099 #endif //FF_PHONE_LOCK |
1100 mfw_usbms_enum_control(MFW_USB_ENUM , MFW_USB_TYPE_ALL); | 1100 mfw_usbms_enum_control(MFW_USB_ENUM , MFW_USB_TYPE_ALL); |
1101 } | 1101 } |
1102 break; | 1102 break; |
1103 case USB_CABLE_DISCONNECT_EVENT: | 1103 case USB_CABLE_DISCONNECT_EVENT: |
1104 TRACE_EVENT("USB_CABLE_DISCONNECT_EVENT"); | 1104 TRACE_EVENT("USB_CABLE_DISCONNECT_EVENT"); |
1105 mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_DISCONNECT_EVENT); | 1105 mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_DISCONNECT_EVENT); |
1106 mfw_usbms_enum_control(MFW_USB_NO_ENUM , MFW_USB_TYPE_ALL); | 1106 mfw_usbms_enum_control(MFW_USB_NO_ENUM , MFW_USB_TYPE_ALL); |
1107 break; | 1107 break; |
1108 } | 1108 } |
1109 PFREE(usbms_mmi_ind); | 1109 PFREE(usbms_mmi_ind); |
1110 return TRUE; | 1110 return TRUE; |
1111 } | 1111 } |
1112 | 1112 |
1113 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ | 1113 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ |
1114 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ | 1114 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ |
1115 #ifdef FF_MMI_TFLASH | 1115 #ifdef FF_MMI_TFLASH |
1116 case TFLASH_MMI_IND: | 1116 case TFLASH_MMI_IND: |
1117 { | 1117 { |
1118 T_TFLASH_MMI_IND *tflash_mmi_ind=(T_TFLASH_MMI_IND *) data; | 1118 T_TFLASH_MMI_IND *tflash_mmi_ind=(T_TFLASH_MMI_IND *) data; |
1119 switch(tflash_mmi_ind->mc_status) | 1119 switch(tflash_mmi_ind->mc_status) |
1120 { | 1120 { |
1121 case MC_INSERT_EVENT: | 1121 case MC_INSERT_EVENT: |
1122 TRACE_EVENT("TFLASH card inserted"); | 1122 TRACE_EVENT("TFLASH card inserted"); |
1123 mmeSignal(MfwMmeUSBMS , MFW_TFLASH_INSERTED_EVENT); | 1123 mmeSignal(MfwMmeUSBMS , MFW_TFLASH_INSERTED_EVENT); |
1124 break; | 1124 break; |
1125 case MC_REMOVE_EVENT: | 1125 case MC_REMOVE_EVENT: |
1126 TRACE_EVENT("TFLASH card removed"); | 1126 TRACE_EVENT("TFLASH card removed"); |
1127 mmeSignal(MfwMmeUSBMS , MFW_TFLASH_REMOVED_EVENT); | 1127 mmeSignal(MfwMmeUSBMS , MFW_TFLASH_REMOVED_EVENT); |
1128 break; | 1128 break; |
1129 } | 1129 } |
1130 PFREE(tflash_mmi_ind); | 1130 PFREE(tflash_mmi_ind); |
1131 return TRUE; | 1131 return TRUE; |
1132 } | 1132 } |
1133 #endif | 1133 #endif |
1134 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ | 1134 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ |
1135 | 1135 |
1136 #endif | 1136 #endif |
1137 } | 1137 } |
1138 | 1138 |
1139 return FALSE; /* not processed, forward */ | 1139 return FALSE; /* not processed, forward */ |
1165 { | 1165 { |
1166 mfwMmeDrvFlag &= ~MmeFlagHdsDetect; | 1166 mfwMmeDrvFlag &= ~MmeFlagHdsDetect; |
1167 mmeSignal(MfwMmeHdsDetect,hdsPresence); | 1167 mmeSignal(MfwMmeHdsDetect,hdsPresence); |
1168 } | 1168 } |
1169 else if (mfwMmeDrvFlag & MmeFlagIrdaMsg) | 1169 else if (mfwMmeDrvFlag & MmeFlagIrdaMsg) |
1170 { | 1170 { |
1171 } | 1171 } |
1172 else | 1172 else |
1173 { | 1173 { |
1174 mfwMmeDrvFlag = 0; | 1174 mfwMmeDrvFlag = 0; |
1175 } | 1175 } |
1176 } | 1176 } |
1255 | 1255 |
1256 */ | 1256 */ |
1257 #ifndef FF_MMI_AUDIO_PROFILE /*a0393213 warnings removal*/ | 1257 #ifndef FF_MMI_AUDIO_PROFILE /*a0393213 warnings removal*/ |
1258 static void hdsCb (drv_SignalID_Type *signal_params) | 1258 static void hdsCb (drv_SignalID_Type *signal_params) |
1259 { | 1259 { |
1260 if (signal_params->SignalType == 1) | 1260 if (signal_params->SignalType == 1) |
1261 { | 1261 { |
1262 hdsPresence = (U16)signal_params->UserData; | 1262 hdsPresence = (U16)signal_params->UserData; |
1263 mfwMmeDrvFlag |= MmeFlagHdsDetect; | 1263 mfwMmeDrvFlag |= MmeFlagHdsDetect; |
1264 vsi_c_awake(VSI_CALLER_SINGLE); | 1264 vsi_c_awake(VSI_CALLER_SINGLE); |
1265 } | 1265 } |
1266 } | 1266 } |
1267 #endif | 1267 #endif |
1268 | 1268 |
1269 #ifdef FF_MMI_AUDIO_PROFILE | 1269 #ifdef FF_MMI_AUDIO_PROFILE |
1270 /* | 1270 /* |
1277 | 1277 |
1278 */ | 1278 */ |
1279 | 1279 |
1280 void mfw_set_stereo_path(int device) | 1280 void mfw_set_stereo_path(int device) |
1281 { | 1281 { |
1282 TRACE_FUNCTION("mfw_set_stereo_path()"); | 1282 TRACE_FUNCTION("mfw_set_stereo_path()"); |
1283 | 1283 |
1284 TRACE_EVENT_P1("Device === %d", device); | 1284 TRACE_EVENT_P1("Device === %d", device); |
1285 switch(device) | 1285 switch(device) |
1286 { | 1286 { |
1287 case MFW_AUD_HEADSET: | 1287 case MFW_AUD_HEADSET: |
1288 audio_set_path(AUDIO_STEREO_SPEAKER_HEADPHONE, TRUE); | 1288 audio_set_path(AUDIO_STEREO_SPEAKER_HEADPHONE, TRUE); |
1289 break; | 1289 break; |
1290 case MFW_AUD_HANDHELD: | 1290 case MFW_AUD_HANDHELD: |
1291 audio_set_path(AUDIO_STEREO_SPEAKER_HANDHELD, TRUE); | 1291 audio_set_path(AUDIO_STEREO_SPEAKER_HANDHELD, TRUE); |
1292 break; | 1292 break; |
1293 case MFW_AUD_CARKIT: | 1293 case MFW_AUD_CARKIT: |
1294 audio_set_path(AUDIO_STEREO_SPEAKER_CARKIT, TRUE); | 1294 audio_set_path(AUDIO_STEREO_SPEAKER_CARKIT, TRUE); |
1295 break; | 1295 break; |
1296 case MFW_AUD_LOUDSPEAKER: | 1296 case MFW_AUD_LOUDSPEAKER: |
1297 audio_set_path(AUDIO_STEREO_SPEAKER_HANDFREE, TRUE); | 1297 audio_set_path(AUDIO_STEREO_SPEAKER_HANDFREE, TRUE); |
1298 break; | 1298 break; |
1299 } | 1299 } |
1300 } | 1300 } |
1301 /* | 1301 /* |
1302 +--------------------------------------------------------------------+ | 1302 +--------------------------------------------------------------------+ |
1303 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | | 1303 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | |
1304 | STATE : code ROUTINE : mfw_unset_stereo_path | | 1304 | STATE : code ROUTINE : mfw_unset_stereo_path | |
1307 PURPOSE : This resets the voice path for the current audio profile | 1307 PURPOSE : This resets the voice path for the current audio profile |
1308 | 1308 |
1309 */ | 1309 */ |
1310 void mfw_unset_stereo_path(int device) | 1310 void mfw_unset_stereo_path(int device) |
1311 { | 1311 { |
1312 TRACE_FUNCTION("mfw_unset_stereo_path()"); | 1312 TRACE_FUNCTION("mfw_unset_stereo_path()"); |
1313 | 1313 |
1314 TRACE_EVENT_P1("Device === %d", device); | 1314 TRACE_EVENT_P1("Device === %d", device); |
1315 switch(device) | 1315 switch(device) |
1316 { | 1316 { |
1317 case MFW_AUD_HEADSET: | 1317 case MFW_AUD_HEADSET: |
1318 audio_set_path(AUDIO_SPEAKER_HEADSET, FALSE); | 1318 audio_set_path(AUDIO_SPEAKER_HEADSET, FALSE); |
1319 break; | 1319 break; |
1320 case MFW_AUD_HANDHELD: | 1320 case MFW_AUD_HANDHELD: |
1321 audio_set_path(AUDIO_SPEAKER_HANDHELD, FALSE); | 1321 audio_set_path(AUDIO_SPEAKER_HANDHELD, FALSE); |
1322 break; | 1322 break; |
1323 case MFW_AUD_CARKIT: | 1323 case MFW_AUD_CARKIT: |
1324 audio_set_path(AUDIO_SPEAKER_CARKIT, FALSE); | 1324 audio_set_path(AUDIO_SPEAKER_CARKIT, FALSE); |
1325 break; | 1325 break; |
1326 case MFW_AUD_LOUDSPEAKER: | 1326 case MFW_AUD_LOUDSPEAKER: |
1327 audio_set_path(AUDIO_SPEAKER_HANDFREE, FALSE); | 1327 audio_set_path(AUDIO_SPEAKER_HANDFREE, FALSE); |
1328 break; | 1328 break; |
1329 } | 1329 } |
1330 } | 1330 } |
1331 | 1331 |
1332 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth) | 1332 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth) |
1333 // Fix: Callback function called when mfw receives hook detect event from BSP | 1333 // Fix: Callback function called when mfw receives hook detect event from BSP |
1334 void mfw_audio_hook_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, | 1334 void mfw_audio_hook_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, |
1335 ACCESSORY_CALLBACK_PARAM callbackparam ) | 1335 ACCESSORY_CALLBACK_PARAM callbackparam ) |
1336 { | 1336 { |
1337 | 1337 |
1338 PALLOC(hdsData,MMI_HEADSET_IND); | 1338 PALLOC(hdsData,MMI_HEADSET_IND); |
1339 hdsData->headset_status = (U8)notify; | 1339 hdsData->headset_status = (U8)notify; |
1340 PSENDX(ACI,hdsData); | 1340 PSENDX(ACI,hdsData); |
1341 | 1341 |
1342 } | 1342 } |
1343 | 1343 |
1344 /* | 1344 /* |
1345 +--------------------------------------------------------------------+ | 1345 +--------------------------------------------------------------------+ |
1348 +--------------------------------------------------------------------+ | 1348 +--------------------------------------------------------------------+ |
1349 | 1349 |
1350 PURPOSE :Callback function for the events related to headset and create and post a primitive | 1350 PURPOSE :Callback function for the events related to headset and create and post a primitive |
1351 | 1351 |
1352 */ | 1352 */ |
1353 void mfw_audio_headSet_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, | 1353 void mfw_audio_headSet_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, |
1354 ACCESSORY_CALLBACK_PARAM callbackparam ) | 1354 ACCESSORY_CALLBACK_PARAM callbackparam ) |
1355 { | 1355 { |
1356 | 1356 |
1357 PALLOC(hdsData,MMI_HEADSET_IND); | 1357 PALLOC(hdsData,MMI_HEADSET_IND); |
1358 hdsData->headset_status = (U8)notify; | 1358 hdsData->headset_status = (U8)notify; |
1359 PSENDX(ACI,hdsData); | 1359 PSENDX(ACI,hdsData); |
1360 | 1360 |
1361 } | 1361 } |
1362 /* | 1362 /* |
1363 +--------------------------------------------------------------------+ | 1363 +--------------------------------------------------------------------+ |
1364 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | | 1364 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | |
1366 +--------------------------------------------------------------------+ | 1366 +--------------------------------------------------------------------+ |
1367 | 1367 |
1368 PURPOSE :Callback function for the events related to carkit and create and post a primitive | 1368 PURPOSE :Callback function for the events related to carkit and create and post a primitive |
1369 | 1369 |
1370 */ | 1370 */ |
1371 void mfw_audio_carKit_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, | 1371 void mfw_audio_carKit_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, |
1372 ACCESSORY_CALLBACK_PARAM callback_param ) | 1372 ACCESSORY_CALLBACK_PARAM callback_param ) |
1373 { | 1373 { |
1374 PALLOC(cktData,MMI_CARKIT_IND); | 1374 PALLOC(cktData,MMI_CARKIT_IND); |
1375 cktData->carkit_status = (U8)notify; | 1375 cktData->carkit_status = (U8)notify; |
1376 PSENDX(ACI,cktData); | 1376 PSENDX(ACI,cktData); |
1377 } | 1377 } |
1378 /* | 1378 /* |
1379 +--------------------------------------------------------------------+ | 1379 +--------------------------------------------------------------------+ |
1380 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | | 1380 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | |
1381 | STATE : code ROUTINE : mfw_audio_headSet_indication | | 1381 | STATE : code ROUTINE : mfw_audio_headSet_indication | |
1382 +--------------------------------------------------------------------+ | 1382 +--------------------------------------------------------------------+ |
1383 | 1383 |
1384 PURPOSE :handles the request to switch to the respective device from the | 1384 PURPOSE :handles the request to switch to the respective device from the |
1385 Bmi when the indications of insert and removal are received | 1385 Bmi when the indications of insert and removal are received |
1386 | 1386 |
1387 */ | 1387 */ |
1388 void mfw_audio_device_indication( U8 notify) | 1388 void mfw_audio_device_indication( U8 notify) |
1389 { | 1389 { |
1390 TRACE_FUNCTION("mfw_audio_device_indication()"); | 1390 TRACE_FUNCTION("mfw_audio_device_indication()"); |
1391 | 1391 |
1392 TRACE_EVENT_P1(" Indication Type == %d",notify); | 1392 TRACE_EVENT_P1(" Indication Type == %d",notify); |
1393 switch(notify) | 1393 switch(notify) |
1394 { | 1394 { |
1395 case AUDIO_HEADSET_PLUGGED: | 1395 case AUDIO_HEADSET_PLUGGED: |
1396 if(currAudioDevice != MFW_AUD_HEADSET) | 1396 if(currAudioDevice != MFW_AUD_HEADSET) |
1397 { | 1397 { |
1398 mfw_audio_set_device(MFW_AUD_HEADSET); | 1398 mfw_audio_set_device(MFW_AUD_HEADSET); |
1399 headsetInserted = TRUE; | 1399 headsetInserted = TRUE; |
1400 } | 1400 } |
1401 break; | 1401 break; |
1402 case AUDIO_HEADSET_UNPLUGGED: | 1402 case AUDIO_HEADSET_UNPLUGGED: |
1403 if( currAudioDevice == MFW_AUD_HEADSET) | 1403 if( currAudioDevice == MFW_AUD_HEADSET) |
1404 { | 1404 { |
1405 mfw_audio_set_device(MFW_AUD_HANDHELD ); | 1405 mfw_audio_set_device(MFW_AUD_HANDHELD ); |
1406 | 1406 |
1407 } | 1407 } |
1408 headsetInserted = FALSE; | 1408 headsetInserted = FALSE; |
1409 break; | 1409 break; |
1410 case AUDIO_HEADSET_HOOK_DETECT: | 1410 case AUDIO_HEADSET_HOOK_DETECT: |
1411 break; | 1411 break; |
1412 case AUDIO_CARKIT_PLUGGED: | 1412 case AUDIO_CARKIT_PLUGGED: |
1413 if(currAudioDevice != MFW_AUD_CARKIT) | 1413 if(currAudioDevice != MFW_AUD_CARKIT) |
1414 { | 1414 { |
1415 mfw_audio_set_device(MFW_AUD_CARKIT); | 1415 mfw_audio_set_device(MFW_AUD_CARKIT); |
1416 carkitInserted = TRUE; | 1416 carkitInserted = TRUE; |
1417 } | 1417 } |
1418 break; | 1418 break; |
1419 case AUDIO_CARKIT_UNPLUGGED: | 1419 case AUDIO_CARKIT_UNPLUGGED: |
1420 if( currAudioDevice == MFW_AUD_CARKIT) | 1420 if( currAudioDevice == MFW_AUD_CARKIT) |
1421 { | 1421 { |
1422 if(headsetInserted == TRUE) | 1422 if(headsetInserted == TRUE) |
1423 { | 1423 { |
1424 mfw_audio_set_device (MFW_AUD_HEADSET); | 1424 mfw_audio_set_device (MFW_AUD_HEADSET); |
1425 } | 1425 } |
1426 else | 1426 else |
1427 { | 1427 { |
1428 mfw_audio_set_device (MFW_AUD_HANDHELD); | 1428 mfw_audio_set_device (MFW_AUD_HANDHELD); |
1429 } | 1429 } |
1430 } | 1430 } |
1431 carkitInserted = FALSE; | 1431 carkitInserted = FALSE; |
1432 break; | 1432 break; |
1433 default: | 1433 default: |
1434 break; | 1434 break; |
1435 } | 1435 } |
1436 } | 1436 } |
1437 /* | 1437 /* |
1438 +--------------------------------------------------------------------+ | 1438 +--------------------------------------------------------------------+ |
1439 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | | 1439 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | |
1440 | STATE : code ROUTINE : mfw_audio_headSet_indication | | 1440 | STATE : code ROUTINE : mfw_audio_headSet_indication | |
1441 +--------------------------------------------------------------------+ | 1441 +--------------------------------------------------------------------+ |
1442 | 1442 |
1443 PURPOSE :This function handles the switch between the handheld and loudspeaker. | 1443 PURPOSE :This function handles the switch between the handheld and loudspeaker. |
1444 The type of device to be loaded will be posted from the menu selection | 1444 The type of device to be loaded will be posted from the menu selection |
1445 When the profile changes if there is any other media played then the | 1445 When the profile changes if there is any other media played then the |
1446 speaker should be set to stereo speaker | 1446 speaker should be set to stereo speaker |
1447 | 1447 |
1448 */ | 1448 */ |
1449 void mfw_audio_set_device(int type) | 1449 void mfw_audio_set_device(int type) |
1450 { | 1450 { |
1451 /*Description: this array holds the file names on the ffs in which the audio profiles are stored. | 1451 /*Description: this array holds the file names on the ffs in which the audio profiles are stored. |
1452 The file names are yet to be confirmed from the audio services group*/ | 1452 The file names are yet to be confirmed from the audio services group*/ |
1453 //char aud_cg_file[4][15] = {"handheld","loudspeaker","headset","carkit"}; | 1453 //char aud_cg_file[4][15] = {"handheld","loudspeaker","headset","carkit"}; |
1454 TRACE_FUNCTION("mfw_audio_set_device()"); | 1454 TRACE_FUNCTION("mfw_audio_set_device()"); |
1455 | 1455 |
1456 TRACE_EVENT_P1("type of device = %d",type); | 1456 TRACE_EVENT_P1("type of device = %d",type); |
1457 switch(type) | 1457 switch(type) |
1458 { | 1458 { |
1459 case MFW_AUD_HANDHELD: | 1459 case MFW_AUD_HANDHELD: |
1460 audio_set_device((char*)HANDHELD);// (aud_cg_file[HANDHELD] ); | 1460 audio_set_device((char*)HANDHELD);// (aud_cg_file[HANDHELD] ); |
1461 currAudioDevice = MFW_AUD_HANDHELD; | 1461 currAudioDevice = MFW_AUD_HANDHELD; |
1462 break; | 1462 break; |
1463 case MFW_AUD_LOUDSPEAKER: | 1463 case MFW_AUD_LOUDSPEAKER: |
1464 audio_set_device((char*) LOUDSPEAKER);//(aud_cg_file[LOUDSPEAKER]); | 1464 audio_set_device((char*) LOUDSPEAKER);//(aud_cg_file[LOUDSPEAKER]); |
1465 currAudioDevice = MFW_AUD_LOUDSPEAKER; | 1465 currAudioDevice = MFW_AUD_LOUDSPEAKER; |
1466 break; | 1466 break; |
1467 case MFW_AUD_HEADSET: | 1467 case MFW_AUD_HEADSET: |
1468 audio_set_device((char*)HEADSET);//(aud_cg_file[HEADSET]); | 1468 audio_set_device((char*)HEADSET);//(aud_cg_file[HEADSET]); |
1469 currAudioDevice = MFW_AUD_HEADSET; | 1469 currAudioDevice = MFW_AUD_HEADSET; |
1470 break; | 1470 break; |
1471 case MFW_AUD_CARKIT: | 1471 case MFW_AUD_CARKIT: |
1472 audio_set_device((char*)CARKIT);//(aud_cg_file[CARKIT]); | 1472 audio_set_device((char*)CARKIT);//(aud_cg_file[CARKIT]); |
1473 currAudioDevice = MFW_AUD_CARKIT; | 1473 currAudioDevice = MFW_AUD_CARKIT; |
1474 default: | 1474 default: |
1475 break; | 1475 break; |
1476 } | 1476 } |
1477 if(TRUE == mfwAudPlay) | 1477 if(TRUE == mfwAudPlay) |
1478 mfw_set_stereo_path(currAudioDevice); | 1478 mfw_set_stereo_path(currAudioDevice); |
1479 | 1479 |
1480 } | 1480 } |
1481 | 1481 |
1482 #ifdef ISAMPLE | 1482 #ifdef ISAMPLE |
1483 /* OMAPS00057367, 3 Dec 2005, nekkareb : start */ | 1483 /* OMAPS00057367, 3 Dec 2005, nekkareb : start */ |
1484 /* Function mfw_get_current_audioDevice modified to read the | 1484 /* Function mfw_get_current_audioDevice modified to read the |
1485 current audio device using the audio service entity function | 1485 current audio device using the audio service entity function |
1486 audio_full_access_read. This solves some synchronisation | 1486 audio_full_access_read. This solves some synchronisation |
1487 problems b/n Audio & MMI for the DR OMAPS00057367 */ | 1487 problems b/n Audio & MMI for the DR OMAPS00057367 */ |
1488 /*returns the current active audio device*/ | 1488 /*returns the current active audio device*/ |
1489 int mfw_get_current_audioDevice() | 1489 int mfw_get_current_audioDevice() |
1490 { | 1490 { |
1491 T_AUDIO_FULL_ACCESS_READ read; | 1491 T_AUDIO_FULL_ACCESS_READ read; |
1492 INT8 speaker; | 1492 INT8 speaker; |
1493 | 1493 |
1494 read.variable_indentifier = AUDIO_SPEAKER_MODE; | 1494 read.variable_indentifier = AUDIO_SPEAKER_MODE; |
1495 read.data = &speaker; | 1495 read.data = &speaker; |
1496 | 1496 |
1497 TRACE_FUNCTION("mfw_get_current_audioDevice()"); | 1497 TRACE_FUNCTION("mfw_get_current_audioDevice()"); |
1498 audio_full_access_read(&read ); | 1498 audio_full_access_read(&read ); |
1499 | 1499 |
1500 switch(speaker) | 1500 switch(speaker) |
1501 { | 1501 { |
1502 case AUDIO_SPEAKER_NONE: | 1502 case AUDIO_SPEAKER_NONE: |
1503 TRACE_EVENT("mfw_get_current_audioDevice() - SPEAKER PATH NOT CONFIGURED"); | 1503 TRACE_EVENT("mfw_get_current_audioDevice() - SPEAKER PATH NOT CONFIGURED"); |
1504 currAudioDevice = MFW_AUD_HANDHELD; //Need to check the mapping | 1504 currAudioDevice = MFW_AUD_HANDHELD; //Need to check the mapping |
1505 break; | 1505 break; |
1506 case AUDIO_SPEAKER_HANDHELD: | 1506 case AUDIO_SPEAKER_HANDHELD: |
1507 currAudioDevice = MFW_AUD_HANDHELD; | 1507 currAudioDevice = MFW_AUD_HANDHELD; |
1508 break; | 1508 break; |
1509 case AUDIO_SPEAKER_HEADSET: | 1509 case AUDIO_SPEAKER_HEADSET: |
1510 currAudioDevice = MFW_AUD_HEADSET; | 1510 currAudioDevice = MFW_AUD_HEADSET; |
1511 break; | 1511 break; |
1512 case AUDIO_SPEAKER_AUX: | 1512 case AUDIO_SPEAKER_AUX: |
1513 currAudioDevice = MFW_AUD_LOUDSPEAKER; //Need to check the mapping | 1513 currAudioDevice = MFW_AUD_LOUDSPEAKER; //Need to check the mapping |
1514 break; | 1514 break; |
1515 case AUDIO_SPEAKER_CARKIT: | 1515 case AUDIO_SPEAKER_CARKIT: |
1516 currAudioDevice = MFW_AUD_CARKIT; | 1516 currAudioDevice = MFW_AUD_CARKIT; |
1517 break; | 1517 break; |
1518 case AUDIO_SPEAKER_HANDFREE: | 1518 case AUDIO_SPEAKER_HANDFREE: |
1519 case AUDIO_SPEAKER_HANDFREE_CLASS_D: | 1519 case AUDIO_SPEAKER_HANDFREE_CLASS_D: |
1520 currAudioDevice = MFW_AUD_LOUDSPEAKER; | 1520 currAudioDevice = MFW_AUD_LOUDSPEAKER; |
1521 break; | 1521 break; |
1522 case AUDIO_SPEAKER_INVERTED_VOICE: | 1522 case AUDIO_SPEAKER_INVERTED_VOICE: |
1523 currAudioDevice = MFW_AUD_HEADSET; //Need to check the mapping | 1523 currAudioDevice = MFW_AUD_HEADSET; //Need to check the mapping |
1524 break; | 1524 break; |
1525 } | 1525 } |
1526 | 1526 |
1527 return currAudioDevice; | 1527 return currAudioDevice; |
1528 } | 1528 } |
1529 /* OMAPS00057367, 3 Dec 2005, nekkareb : end */ | 1529 /* OMAPS00057367, 3 Dec 2005, nekkareb : end */ |
1530 #else | 1530 #else |
1531 /*returns the current active audio device*/ | 1531 /*returns the current active audio device*/ |
1532 int mfw_get_current_audioDevice() | 1532 int mfw_get_current_audioDevice() |
1533 { | 1533 { |
1534 TRACE_FUNCTION("mfw_get_current_audioDevice()"); | 1534 TRACE_FUNCTION("mfw_get_current_audioDevice()"); |
1535 return currAudioDevice; | 1535 return currAudioDevice; |
1536 } | 1536 } |
1537 #endif //ISAMPLE | 1537 #endif //ISAMPLE |
1538 #endif | 1538 #endif |
1539 | 1539 |
1540 | 1540 |