623 TRACE_PRN_FN_EXT; |
623 TRACE_PRN_FN_EXT; |
624 return status; |
624 return status; |
625 } |
625 } |
626 |
626 |
627 // ----------------------------------------------------------------------------- |
627 // ----------------------------------------------------------------------------- |
628 // TMSCallIPAdpt::GetGlobalMaxVolume |
|
629 // |
|
630 // ----------------------------------------------------------------------------- |
|
631 // |
|
632 gint TMSCallIPAdpt::GetGlobalMaxVolume(guint& volume) |
|
633 { |
|
634 TRACE_PRN_FN_ENT; |
|
635 gint status(TMS_RESULT_INVALID_STATE); |
|
636 if (iIPDownlink && iDnlState != EIdle) |
|
637 { |
|
638 status = iIPDownlink->GetMaxVolume(volume); |
|
639 iMaxVolume = volume; |
|
640 TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt::GetGlobalMaxVolume [%d]"), volume); |
|
641 } |
|
642 TRACE_PRN_FN_EXT; |
|
643 return status; |
|
644 } |
|
645 |
|
646 // ----------------------------------------------------------------------------- |
|
647 // TMSCallIPAdpt::SetGlobalVolume |
|
648 // |
|
649 // ----------------------------------------------------------------------------- |
|
650 // |
|
651 gint TMSCallIPAdpt::SetGlobalVolume(const guint volume) |
|
652 { |
|
653 TRACE_PRN_FN_ENT; |
|
654 gint status(TMS_RESULT_INVALID_STATE); |
|
655 //iGlobalVol = volume; |
|
656 if (iIPDownlink && iDnlState != EIdle) |
|
657 { |
|
658 status = iIPDownlink->SetVolume(volume); |
|
659 } |
|
660 TRACE_PRN_FN_EXT; |
|
661 return status; |
|
662 } |
|
663 |
|
664 // ----------------------------------------------------------------------------- |
|
665 // TMSCallIPAdpt::GetGlobalVolume |
|
666 // |
|
667 // ----------------------------------------------------------------------------- |
|
668 // |
|
669 gint TMSCallIPAdpt::GetGlobalVolume(guint& volume) |
|
670 { |
|
671 TRACE_PRN_FN_ENT; |
|
672 gint status(TMS_RESULT_INVALID_STATE); |
|
673 if (iIPDownlink && iDnlState != EIdle) |
|
674 { |
|
675 status = iIPDownlink->GetVolume(volume); |
|
676 } |
|
677 TRACE_PRN_FN_EXT; |
|
678 return status; |
|
679 } |
|
680 |
|
681 // ----------------------------------------------------------------------------- |
|
682 // TMSCallIPAdpt::GetGlobalMaxGain |
|
683 // |
|
684 // ----------------------------------------------------------------------------- |
|
685 // |
|
686 gint TMSCallIPAdpt::GetGlobalMaxGain(guint& gain) |
|
687 { |
|
688 TRACE_PRN_FN_ENT; |
|
689 gint status(TMS_RESULT_INVALID_STATE); |
|
690 if (iIPUplink && iUplState != EIdle) |
|
691 { |
|
692 status = iIPUplink->GetMaxGain(gain); |
|
693 iMaxGain = gain; |
|
694 TRACE_PRN_N1(_L("TMS->TMSCallIPAdpt::GetGlobalMaxGain [%d]"), gain); |
|
695 } |
|
696 TRACE_PRN_FN_EXT; |
|
697 return status; |
|
698 } |
|
699 |
|
700 // ----------------------------------------------------------------------------- |
|
701 // TMSCallIPAdpt::SetGlobalGain |
|
702 // |
|
703 // ----------------------------------------------------------------------------- |
|
704 // |
|
705 gint TMSCallIPAdpt::SetGlobalGain(const guint gain) |
|
706 { |
|
707 TRACE_PRN_FN_ENT; |
|
708 gint status(TMS_RESULT_INVALID_STATE); |
|
709 //iGlobalGain = gain; |
|
710 if (iIPUplink && iUplState != EIdle) |
|
711 { |
|
712 status = iIPUplink->SetGain(gain); |
|
713 } |
|
714 TRACE_PRN_FN_EXT; |
|
715 return status; |
|
716 } |
|
717 |
|
718 // ----------------------------------------------------------------------------- |
|
719 // TMSCallIPAdpt::GetGlobalGain |
|
720 // |
|
721 // ----------------------------------------------------------------------------- |
|
722 // |
|
723 gint TMSCallIPAdpt::GetGlobalGain(guint& gain) |
|
724 { |
|
725 TRACE_PRN_FN_ENT; |
|
726 gint status(TMS_RESULT_INVALID_STATE); |
|
727 if (iIPUplink && iUplState != EIdle) |
|
728 { |
|
729 status = iIPUplink->GetGain(gain); |
|
730 } |
|
731 TRACE_PRN_FN_EXT; |
|
732 return status; |
|
733 } |
|
734 |
|
735 // ----------------------------------------------------------------------------- |
|
736 // TMSCallIPAdpt::GetCodecMode |
628 // TMSCallIPAdpt::GetCodecMode |
737 // |
629 // |
738 // ----------------------------------------------------------------------------- |
630 // ----------------------------------------------------------------------------- |
739 // |
631 // |
740 gint TMSCallIPAdpt::GetCodecMode(const TMSFormatType fmttype, |
632 gint TMSCallIPAdpt::GetCodecMode(const TMSFormatType fmttype, |
988 |
880 |
989 // Clients must have MultimediaDD capability to use this priority/pref. |
881 // Clients must have MultimediaDD capability to use this priority/pref. |
990 // TODO: Also, TMS will monitor for emergency call and if detected it |
882 // TODO: Also, TMS will monitor for emergency call and if detected it |
991 // will deny access to audio resources. |
883 // will deny access to audio resources. |
992 |
884 |
993 /* Clarify with adaptation team which prio/pref values should be used. |
|
994 * 1) KAudioPrefUnknownVoipAudioDownlink -3rd party VoIP? |
|
995 * KAudioPriorityUnknownVoipAudioDownlink -3rd party VoIP? |
|
996 * 2) KAudioPrefVoipAudioDownlink -NOK native VoIP? |
|
997 * KAudioPriorityVoipAudioDownlink -NOK native VoIP? |
|
998 */ |
|
999 iPriority.iPref = KAudioPrefVoipAudioDownlink; |
885 iPriority.iPref = KAudioPrefVoipAudioDownlink; |
1000 iPriority.iPriority = KAudioPriorityVoipAudioDownlink; |
886 iPriority.iPriority = KAudioPriorityVoipAudioDownlink; |
1001 |
887 |
1002 delete iIPDownlink; |
888 delete iIPDownlink; |
1003 iIPDownlink = NULL; |
889 iIPDownlink = NULL; |
1032 gint TMSCallIPAdpt::OpenUplink(const RMessage2& message, const gint retrytime) |
918 gint TMSCallIPAdpt::OpenUplink(const RMessage2& message, const gint retrytime) |
1033 { |
919 { |
1034 TRACE_PRN_FN_ENT; |
920 TRACE_PRN_FN_ENT; |
1035 gint status(TMS_RESULT_SUCCESS); |
921 gint status(TMS_RESULT_SUCCESS); |
1036 |
922 |
1037 // Clients must have MultimediaDD capability to use this priority/pref |
923 // Clients must have MultimediaDD capability to use this priority/pref. |
1038 |
924 // KAudioPrefVoipAudioUplinkNonSignal must be used to allow DTMF mixing. |
1039 /* Clarify with adaptation team which prio/pref values should be used. |
|
1040 * 1) KAudioPrefUnknownVoipAudioUplink -3rd party VoIP? |
|
1041 * KAudioPriorityUnknownVoipAudioUplink -3rd party VoIP? |
|
1042 * 2) KAudioPrefVoipAudioUplink -NOK native VoIP? |
|
1043 * KAudioPriorityVoipAudioUplink -NOK native VoIP? |
|
1044 */ |
|
1045 iPriority.iPref = KAudioPrefVoipAudioUplinkNonSignal; |
925 iPriority.iPref = KAudioPrefVoipAudioUplinkNonSignal; |
1046 iPriority.iPriority = KAudioPriorityVoipAudioUplink; |
926 iPriority.iPriority = KAudioPriorityVoipAudioUplink; |
1047 |
927 |
1048 delete iIPUplink; |
928 delete iIPUplink; |
1049 iIPUplink = NULL; |
929 iIPUplink = NULL; |
1256 } |
1136 } |
1257 return status; |
1137 return status; |
1258 } |
1138 } |
1259 |
1139 |
1260 // ----------------------------------------------------------------------------- |
1140 // ----------------------------------------------------------------------------- |
1261 // TMSCallIPAdpt::FrameModeRequiredForEC |
1141 // TMSCallIPAdpt::SetOutput |
1262 // |
1142 // |
1263 // ----------------------------------------------------------------------------- |
1143 // ----------------------------------------------------------------------------- |
1264 // |
1144 // |
1265 gint TMSCallIPAdpt::FrameModeRqrdForEC(gboolean& frmodereq) |
1145 gint TMSCallIPAdpt::SetOutput(TMSAudioOutput output) |
1266 { |
1146 { |
1267 gint status(TMS_RESULT_INVALID_STATE); |
1147 TRACE_PRN_FN_ENT; |
1268 if (iIPDownlink && iDnlState == EInitialized) |
|
1269 { |
|
1270 status = iIPDownlink->FrameModeRqrdForEC(frmodereq); |
|
1271 } |
|
1272 return status; |
|
1273 } |
|
1274 |
|
1275 // ----------------------------------------------------------------------------- |
|
1276 // TMSCallIPAdpt::SetFrameMode |
|
1277 // |
|
1278 // ----------------------------------------------------------------------------- |
|
1279 // |
|
1280 gint TMSCallIPAdpt::SetFrameMode(const gboolean frmode) |
|
1281 { |
|
1282 gint status(TMS_RESULT_INVALID_STATE); |
|
1283 if (iIPDownlink && iDnlState == EInitialized) |
|
1284 { |
|
1285 status = iIPDownlink->SetFrameMode(frmode); |
|
1286 } |
|
1287 return status; |
|
1288 } |
|
1289 |
|
1290 // ----------------------------------------------------------------------------- |
|
1291 // TMSCallIPAdpt::GetFrameMode |
|
1292 // |
|
1293 // ----------------------------------------------------------------------------- |
|
1294 // |
|
1295 gint TMSCallIPAdpt::GetFrameMode(gboolean& frmode) |
|
1296 { |
|
1297 gint status(TMS_RESULT_INVALID_STATE); |
1148 gint status(TMS_RESULT_INVALID_STATE); |
1298 if (iIPDownlink && iDnlState != EIdle) |
1149 if (iIPDownlink && iDnlState != EIdle) |
1299 { |
1150 { |
1300 status = iIPDownlink->GetFrameMode(frmode); |
1151 TRAP(status, iIPDownlink->SetAudioDeviceL(output)); |
1301 } |
1152 } |
1302 return status; |
1153 TRACE_PRN_FN_EXT; |
1303 } |
1154 return status; |
1304 |
1155 } |
1305 // ----------------------------------------------------------------------------- |
1156 |
1306 // TMSCallIPAdpt::ConcealErrorForNextBuffer |
1157 // ----------------------------------------------------------------------------- |
1307 // ----------------------------------------------------------------------------- |
1158 // TMSCallIPAdpt::GetOutput |
1308 // |
1159 // |
1309 gint TMSCallIPAdpt::ConcealErrorForNextBuffer() |
1160 // ----------------------------------------------------------------------------- |
1310 { |
1161 // |
1311 gint status(TMS_RESULT_INVALID_STATE); |
1162 gint TMSCallIPAdpt::GetOutput(TMSAudioOutput& output) |
1312 if (iIPDownlink && iDnlState == EActivated) |
|
1313 { |
|
1314 status = iIPDownlink->ConcealErrorForNextBuffer(); |
|
1315 } |
|
1316 return status; |
|
1317 } |
|
1318 |
|
1319 // ----------------------------------------------------------------------------- |
|
1320 // TMSCallIPAdpt::BadLsfNextBuffer |
|
1321 // |
|
1322 // ----------------------------------------------------------------------------- |
|
1323 // |
|
1324 gint TMSCallIPAdpt::BadLsfNextBuffer() |
|
1325 { |
|
1326 gint status(TMS_RESULT_INVALID_STATE); |
|
1327 if (iIPDownlink && iDnlState == EActivated) |
|
1328 { |
|
1329 status = iIPDownlink->BadLsfNextBuffer(); |
|
1330 } |
|
1331 return status; |
|
1332 } |
|
1333 |
|
1334 // ----------------------------------------------------------------------------- |
|
1335 // TMSCallIPAdpt::SetOutput |
|
1336 // |
|
1337 // ----------------------------------------------------------------------------- |
|
1338 // |
|
1339 gint TMSCallIPAdpt::SetOutput(TMSAudioOutput output) |
|
1340 { |
1163 { |
1341 TRACE_PRN_FN_ENT; |
1164 TRACE_PRN_FN_ENT; |
1342 gint status(TMS_RESULT_INVALID_STATE); |
1165 gint status(TMS_RESULT_INVALID_STATE); |
1343 if (iIPDownlink && iDnlState != EIdle) |
1166 if (iIPDownlink && iDnlState != EIdle) |
1344 { |
1167 { |
1345 TRAP(status, iIPDownlink->SetAudioDeviceL(output)); |
|
1346 } |
|
1347 TRACE_PRN_FN_EXT; |
|
1348 return status; |
|
1349 } |
|
1350 |
|
1351 // ----------------------------------------------------------------------------- |
|
1352 // TMSCallIPAdpt::GetOutput |
|
1353 // |
|
1354 // ----------------------------------------------------------------------------- |
|
1355 // |
|
1356 gint TMSCallIPAdpt::GetOutput(TMSAudioOutput& output) |
|
1357 { |
|
1358 TRACE_PRN_FN_ENT; |
|
1359 gint status(TMS_RESULT_INVALID_STATE); |
|
1360 if (iIPDownlink && iDnlState != EIdle) |
|
1361 { |
|
1362 TRAP(status, iIPDownlink->GetAudioDeviceL(output)); |
1168 TRAP(status, iIPDownlink->GetAudioDeviceL(output)); |
1363 } |
1169 } |
1364 TRACE_PRN_FN_EXT; |
1170 TRACE_PRN_FN_EXT; |
1365 return status; |
1171 return status; |
1366 } |
1172 } |
1378 // ----------------------------------------------------------------------------- |
1184 // ----------------------------------------------------------------------------- |
1379 // TMSCallIPAdpt::GetAvailableOutputsL |
1185 // TMSCallIPAdpt::GetAvailableOutputsL |
1380 // |
1186 // |
1381 // ----------------------------------------------------------------------------- |
1187 // ----------------------------------------------------------------------------- |
1382 // |
1188 // |
1383 gint TMSCallIPAdpt::GetAvailableOutputsL(gint& /*count*/, |
1189 gint TMSCallIPAdpt::GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf) |
1384 CBufFlat*& /*outputsbuf*/) |
1190 { |
1385 { |
1191 RBufWriteStream stream; |
1386 //TODO: return public & private |
1192 stream.Open(*outputsbuf); |
1387 return TMS_RESULT_FEATURE_NOT_SUPPORTED; |
1193 CleanupClosePushL(stream); |
|
1194 stream.WriteUint32L(TMS_AUDIO_OUTPUT_PUBLIC); |
|
1195 stream.WriteUint32L(TMS_AUDIO_OUTPUT_PRIVATE); |
|
1196 CleanupStack::PopAndDestroy(&stream); |
|
1197 count = 2; |
|
1198 return TMS_RESULT_SUCCESS; |
1388 } |
1199 } |
1389 |
1200 |
1390 // ----------------------------------------------------------------------------- |
1201 // ----------------------------------------------------------------------------- |
1391 // TMSCallIPAdpt::DownlinkInitCompleted |
1202 // TMSCallIPAdpt::DownlinkInitCompleted |
1392 // From TMSIPDevSoundObserver |
1203 // From TMSIPDevSoundObserver |