diff options
author | Benny Prijono <bennylp@teluu.com> | 2014-03-05 10:16:55 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2014-03-05 10:16:55 +0000 |
commit | 0930be14e223c23242676c3a2f2ef71e0ef99568 (patch) | |
tree | 082a1038ed5b75c496f731a58e4c13491acdc4f8 | |
parent | f91fadb7c5571eabc50f56780e638bfed98a725c (diff) |
Fixed #1743: Unplugging the earpeace while audio is running would cause audio to stop in BB10 10.2.1. This also fix the issue in #1732HEADmaster
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4778 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjmedia/src/pjmedia-audiodev/bb10_dev.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pjmedia/src/pjmedia-audiodev/bb10_dev.c b/pjmedia/src/pjmedia-audiodev/bb10_dev.c index 32466148..3d72a0fa 100644 --- a/pjmedia/src/pjmedia-audiodev/bb10_dev.c +++ b/pjmedia/src/pjmedia-audiodev/bb10_dev.c @@ -499,7 +499,8 @@ static int pb_thread_func (void *arg) status.status)); if (status.status == SND_PCM_STATUS_READY || status.status == SND_PCM_STATUS_UNDERRUN || - status.status == SND_PCM_STATUS_ERROR ) + status.status == SND_PCM_STATUS_ERROR || + status.status == SND_PCM_STATUS_CHANGE) { if (snd_pcm_plugin_prepare (stream->pb_pcm, SND_PCM_CHANNEL_PLAYBACK) < 0) @@ -583,7 +584,8 @@ static int ca_thread_func (void *arg) * after */ if (status.status == SND_PCM_STATUS_READY || status.status == SND_PCM_STATUS_OVERRUN || - status.status == SND_PCM_STATUS_ERROR) + status.status == SND_PCM_STATUS_ERROR || + status.status == SND_PCM_STATUS_CHANGE) { if (snd_pcm_plugin_prepare (stream->ca_pcm, SND_PCM_CHANNEL_CAPTURE) < 0) @@ -1034,6 +1036,11 @@ static pj_status_t bb10_stream_set_cap(pjmedia_aud_stream *strm, PJ_ASSERT_RETURN(value, PJ_EINVAL); /* OS 10.2.1 requires pausing audio stream */ + /* No longer necessary! + * See https://trac.pjsip.org/repos/ticket/1743 + */ + need_restart = PJ_FALSE; + /* need_restart = (stream->pb_thread != NULL); if (need_restart) { PJ_LOG(4,(THIS_FILE, "pausing audio stream..")); @@ -1043,6 +1050,7 @@ static pj_status_t bb10_stream_set_cap(pjmedia_aud_stream *strm, return ret; } } + */ route = *((pjmedia_aud_dev_route*)value); PJ_LOG(4,(THIS_FILE, "setting audio route to %d..", route)); |