diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c
index bae86b8bd06cd02088c1fddbdb8a8e84128d1d1b..75caba25377874b320527d08cc23984507a2ab80 100644
--- a/coreapi/linphonecore.c
+++ b/coreapi/linphonecore.c
@@ -7020,13 +7020,12 @@ void linphone_core_soundcard_hint_check( LinphoneCore* lc){
 	/* check if the remaining calls are paused */
 	while( the_calls ){
 		call = the_calls->data;
-		if( call->state != LinphoneCallPausing && call->state != LinphoneCallPaused ){
+		if( call->state != LinphoneCallPausing && call->state != LinphoneCallPaused && call->state != LinphoneCallEnd && call->state != LinphoneCallError){
 			dont_need_sound = FALSE;
 			break;
 		}
 		the_calls = the_calls->next;
 	}
-
 	/* if no more calls or all calls are paused, we can free the soundcard */
 	if ( (lc->calls==NULL || dont_need_sound) && !lc->use_files && !use_rtp_io){
 		ms_message("Notifying soundcard that we don't need it anymore for calls.");
diff --git a/mediastreamer2 b/mediastreamer2
index 89a02e26d29eb400ea6dde2fbfad2e357e8b2792..52c02e402c502359b0b6c95d8afcf4435609b8ab 160000
--- a/mediastreamer2
+++ b/mediastreamer2
@@ -1 +1 @@
-Subproject commit 89a02e26d29eb400ea6dde2fbfad2e357e8b2792
+Subproject commit 52c02e402c502359b0b6c95d8afcf4435609b8ab