Changeset 4495


Ignore:
Timestamp:
Apr 24, 2013 1:17:40 AM (12 years ago)
Author:
bennylp
Message:

Re #1656: fixes incorporated from latest email feedback

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-audiodev/bb10_dev.c

    r4490 r4495  
    443443    TRACE_((THIS_FILE, "pb_thread_func: size = %d ", size)); 
    444444 
    445     pthread_getschedparam(pthread_self(), &policy, &param); 
    446     param.sched_priority = 18; 
    447     pthread_setschedparam (pthread_self(), policy, &param); 
     445    if (pthread_getschedparam(pthread_self(), &policy, &param) == 0) { 
     446        param.sched_priority = 18; 
     447        pthread_setschedparam (pthread_self(), policy, &param); 
     448    } 
    448449 
    449450    pj_bzero (buf, size); 
     
    538539    TRACE_((THIS_FILE, "ca_thread_func: size = %d ", size)); 
    539540 
    540     pthread_getschedparam(pthread_self(), &policy, &param); 
    541     param.sched_priority = 18; 
    542     pthread_setschedparam (pthread_self(), policy, &param); 
     541    if (pthread_getschedparam(pthread_self(), &policy, &param) == 0) { 
     542        param.sched_priority = 18; 
     543        pthread_setschedparam (pthread_self(), policy, &param); 
     544    } 
    543545 
    544546    pj_bzero (buf, size); 
     
    721723 
    722724    /* Required call from January 2013 gold OS release */ 
    723     if ((ret = snd_pcm_plugin_set_disable(stream->pb_pcm, 
    724                                           PLUGIN_DISABLE_MMAP)) < 0) 
    725     { 
    726         TRACE_((THIS_FILE, "snd_pcm_plugin_set_disable ret = %d", ret)); 
    727         return PJMEDIA_EAUD_SYSERR; 
    728     } 
     725    snd_pcm_plugin_set_disable(stream->pb_pcm, PLUGIN_DISABLE_MMAP); 
    729726 
    730727    /* Required call from January 2013 gold OS release */ 
    731     if ((ret = snd_pcm_plugin_set_enable(stream->pb_pcm, 
    732                                          PLUGIN_ROUTING)) < 0) 
    733     { 
    734         TRACE_((THIS_FILE, "snd_pcm_plugin_set_enable ret = %d", ret)); 
    735         return PJMEDIA_EAUD_SYSERR; 
    736     } 
     728    /* Feedback on 24/04/2013: should not be used for "voice" port 
     729    snd_pcm_plugin_set_enable(stream->pb_pcm, PLUGIN_ROUTING); 
     730    */ 
    737731 
    738732    memset (&pi, 0, sizeof (pi)); 
     
    828822    } 
    829823    /* Required call from January 2013 gold OS release */ 
    830     if ((ret = snd_pcm_plugin_set_disable (stream->ca_pcm, 
    831                                            PLUGIN_DISABLE_MMAP)) < 0) 
    832     { 
    833         TRACE_((THIS_FILE, "snd_pcm_plugin_set_disable failed: %d",ret)); 
    834         return PJMEDIA_EAUD_SYSERR; 
    835     } 
     824    snd_pcm_plugin_set_disable (stream->ca_pcm, PLUGIN_DISABLE_MMAP); 
     825 
    836826    /* Required call from January 2013 gold OS release */ 
    837     if ((ret = snd_pcm_plugin_set_enable(stream->ca_pcm, 
    838                                          PLUGIN_ROUTING)) < 0) 
    839     { 
    840         TRACE_((THIS_FILE, "snd_pcm_plugin_set_enable failed: %d",ret)); 
    841         return PJMEDIA_EAUD_SYSERR; 
    842     } 
     827    /* Feedback on 24/04/2013: should not be used for "voice" port 
     828    snd_pcm_plugin_set_enable(stream->ca_pcm, PLUGIN_ROUTING); 
     829    */ 
    843830 
    844831    /* sample reads the capabilities of the capture */ 
Note: See TracChangeset for help on using the changeset viewer.