pulseaudio: Add print for pulsesink / pulsesrc

- not set NOAUTOSPAWN flag in pulsesink
- Add print to notify current sink / source device

i.MX specific

Signed-off-by: Lyon Wang <lyon.wang@nxp.com>
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
old mode 100644
new mode 100755
index 931f1c8..222e9ee
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -544,12 +544,14 @@
     pa_context_set_subscribe_callback (pctx->context,
         gst_pulsering_context_subscribe_cb, pctx);
 
-    /* try to connect to the server and wait for completion, we don't want to
-     * autospawn a deamon */
+    /* try to connect to the server and wait for completion, we want to
+     * make pulsesink as default audiosink, so here not set NOAUTOSPAWN flag  */
     GST_LOG_OBJECT (psink, "connect to server %s",
         GST_STR_NULL (psink->server));
+    /* if (pa_context_connect (pctx->context, psink->server,
+            PA_CONTEXT_NOAUTOSPAWN, NULL) < 0) */
     if (pa_context_connect (pctx->context, psink->server,
-            PA_CONTEXT_NOAUTOSPAWN, NULL) < 0)
+            PA_CONTEXT_NOFLAGS, NULL) < 0)
       goto connect_failed;
   } else {
     GST_INFO_OBJECT (psink,
@@ -1015,6 +1017,8 @@
   g_free (psink->device);
   psink->device = g_strdup (pa_stream_get_device_name (pbuf->stream));
 
+  g_print ("\n===!!! Current pulsesink device is %s !!!===\n\n", psink->device);
+
 #ifndef GST_DISABLE_GST_DEBUG
   pa_format_info_snprint (print_buf, sizeof (print_buf),
       pa_stream_get_format_info (pbuf->stream));
diff --git a/ext/pulse/pulsesrc.c b/ext/pulse/pulsesrc.c
old mode 100644
new mode 100755
index 7af74ee..d0d7a20
--- a/ext/pulse/pulsesrc.c
+++ b/ext/pulse/pulsesrc.c
@@ -1089,6 +1089,8 @@
     g_object_notify (G_OBJECT (pulsesrc), "volume");
     g_object_notify (G_OBJECT (pulsesrc), "mute");
     g_object_notify (G_OBJECT (pulsesrc), "current-device");
+    g_print ("\n=== !!! Current pulsesrc device is %s !!!===\n",
+      gst_pulsesrc_get_current_device (pulsesrc));
   }
 
   pa_threaded_mainloop_lock (pulsesrc->mainloop);