--- gstalsasink.c.orig	2007-02-06 20:45:11.000000000 +0100
+++ gstalsasink.c	2007-02-07 14:56:28.000000000 +0100
@@ -253,13 +253,28 @@
       g_value_set_string (value, sink->device);
       break;
     case PROP_DEVICE_NAME:
-      if (sink->handle) {
-        snd_pcm_info_t *info;
-
-        snd_pcm_info_malloc (&info);
-        snd_pcm_info (sink->handle, info);
-        g_value_set_string (value, snd_pcm_info_get_name (info));
-        snd_pcm_info_free (info);
+      if (sink->device) {
+	char **strv;
+	snd_ctl_t *ctl;
+	snd_ctl_card_info_t *info;
+	int card;
+	char *name = NULL;
+
+	strv = g_strsplit (sink->device, ",", 2);
+	
+	if (snd_ctl_open (&ctl, strv[0], 0) == 0) {
+	  snd_ctl_card_info_malloc (&info);
+	  snd_ctl_card_info (ctl, info);
+	  card = snd_ctl_card_info_get_card (info);
+	  snd_card_get_name (card, &name);
+	  g_value_set_string (value, name);
+	  free (name);
+	  snd_ctl_card_info_free (info);
+	  snd_ctl_close (ctl);
+	} else {
+	  g_value_set_string (value, NULL);
+	}
+	g_strfreev (strv);
       } else {
         g_value_set_string (value, NULL);
       }
