Changeset 4467 for pjproject/trunk
- Timestamp:
- Apr 15, 2013 10:26:58 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-audiodev/bb10_dev.c
r4340 r4467 331 331 pj_memcpy(info, &af->devs[index], sizeof(*info)); 332 332 info->caps = PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY | 333 PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY; 333 PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY | 334 PJMEDIA_AUD_DEV_CAP_EC; 334 335 335 336 return PJ_SUCCESS; … … 824 825 PLUGIN_DISABLE_MMAP)) < 0) 825 826 { 826 TRACE_(( "snd_pcm_plugin_set_disable failed: %d",ret));827 TRACE_((THIS_FILE, "snd_pcm_plugin_set_disable failed: %d",ret)); 827 828 return PJMEDIA_EAUD_SYSERR; 828 829 } … … 831 832 PLUGIN_ROUTING)) < 0) 832 833 { 833 TRACE_(( "snd_pcm_plugin_set_enable failed: %d",ret));834 TRACE_((THIS_FILE, "snd_pcm_plugin_set_enable failed: %d",ret)); 834 835 return PJMEDIA_EAUD_SYSERR; 835 836 } … … 1022 1023 return PJ_SUCCESS; 1023 1024 1025 } else if (cap==PJMEDIA_AUD_DEV_CAP_EC && 1026 (stream->param.dir & PJMEDIA_DIR_CAPTURE)) 1027 { 1028 /* EC is enablied implicitly by opening "voice" device */ 1029 *(pj_bool_t*)pval = PJ_TRUE; 1030 return PJ_SUCCESS; 1024 1031 } else { 1025 1032 return PJMEDIA_EAUD_INVCAP; … … 1036 1043 const void *value) 1037 1044 { 1038 pj_status_t ret = PJ_SUCCESS; 1045 1039 1046 struct bb10_stream *stream = (struct bb10_stream*)strm; 1040 1047 1041 if (cap != PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE || value == NULL) { 1042 TRACE_((THIS_FILE,"bb10_stream_set_cap() = PJMEDIA_EAUD_INVCAP")); 1043 return PJMEDIA_EAUD_INVCAP; 1044 1045 } else { 1046 pjmedia_aud_dev_route route = *((pjmedia_aud_dev_route*)value); 1048 if (cap==PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE && 1049 (stream->param.dir & PJMEDIA_DIR_PLAYBACK)) 1050 { 1051 pjmedia_aud_dev_route route; 1052 pj_status_t ret; 1053 1054 PJ_ASSERT_RETURN(value, PJ_EINVAL); 1055 1056 route = *((pjmedia_aud_dev_route*)value); 1047 1057 /* Use the initialization function which lazy-inits the 1048 1058 * handle for routing … … 1053 1063 ret = bb10_initialize_playback_ctrl(stream,false); 1054 1064 } 1055 } 1056 1057 if (ret != PJ_SUCCESS) { 1058 TRACE_((THIS_FILE,"bb10_stream_set_cap() = %d",ret)); 1059 } 1060 return ret; 1065 return ret; 1066 1067 } else if (cap==PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE && 1068 (stream->param.dir & PJMEDIA_DIR_PLAYBACK)) 1069 { 1070 /* EC is always enabled. Silently ignore the request */ 1071 return PJ_SUCCESS; 1072 } 1073 1074 TRACE_((THIS_FILE,"bb10_stream_set_cap() = PJMEDIA_EAUD_INVCAP")); 1075 return PJMEDIA_EAUD_INVCAP; 1061 1076 } 1062 1077
Note: See TracChangeset
for help on using the changeset viewer.