diff --git a/sflphone-common/src/audio/pulseaudio/audiostream.cpp b/sflphone-common/src/audio/pulseaudio/audiostream.cpp
index 0ff3956bb156d8d99a8e999041e8c203014f1dde..b701889de845f6988940bfa847d1f79c32f0fe90 100644
--- a/sflphone-common/src/audio/pulseaudio/audiostream.cpp
+++ b/sflphone-common/src/audio/pulseaudio/audiostream.cpp
@@ -226,7 +226,11 @@ AudioStream::createStream (pa_context* c, std::string *deviceName)
       attributes->minreq = (uint32_t) -1;
 
       pa_threaded_mainloop_lock(_mainloop);
-      pa_stream_connect_playback(s, NULL, attributes, (pa_stream_flags_t) (PA_STREAM_ADJUST_LATENCY|PA_STREAM_AUTO_TIMING_UPDATE), NULL, NULL);
+      if(deviceName)
+	pa_stream_connect_playback(s, deviceName->c_str(), attributes, (pa_stream_flags_t) (PA_STREAM_ADJUST_LATENCY|PA_STREAM_AUTO_TIMING_UPDATE), NULL, NULL);
+      else
+	pa_stream_connect_playback(s, NULL, attributes, (pa_stream_flags_t) (PA_STREAM_ADJUST_LATENCY|PA_STREAM_AUTO_TIMING_UPDATE), NULL, NULL);
+
       pa_threaded_mainloop_unlock(_mainloop);
 
     } else if (_streamType == UPLOAD_STREAM) {
diff --git a/sflphone-common/src/audio/pulseaudio/pulselayer.cpp b/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
index e6b3c905be06c4511e750da771b2d903d73c1d4b..c739b55c3f080a67eaf6d0f0b69ec42d2fa96a5b 100644
--- a/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
+++ b/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
@@ -506,7 +506,7 @@ bool PulseLayer::createStreams (pa_context* c)
     // pa_stream_set_suspended_callback(record->pulseStream(), stream_suspended_callback, this);
     pa_stream_set_moved_callback(record->pulseStream(), stream_moved_callback, this);
     delete recordParam;
-    
+  
     PulseLayerType * ringtoneParam = new PulseLayerType();
     ringtoneParam->context = c;
     ringtoneParam->type = RINGTONE_STREAM;