diff -urN gst-plugins-base-0.10.5.org/ext/alsa/gstalsamixer.c gst-plugins-base-0.10.5/ext/alsa/gstalsamixer.c
--- gst-plugins-base-0.10.5.org/ext/alsa/gstalsamixer.c	2006-03-07 20:18:15.000000000 +0100
+++ gst-plugins-base-0.10.5/ext/alsa/gstalsamixer.c	2006-05-08 18:11:18.000000000 +0200
@@ -121,8 +121,6 @@
 {
   gint i, count;
   snd_mixer_elem_t *element;
-  GstMixerTrack *track;
-  GstMixerOptions *opts;
   gboolean first = TRUE;
 
   g_return_if_fail (mixer->handle != NULL);
@@ -133,21 +131,17 @@
   count = snd_mixer_get_count (mixer->handle);
   element = snd_mixer_first_elem (mixer->handle);
 
-  /* build track list */
+  /* build track list
+    
+     Some ALSA tracks may have playback and capture capabilities. Here we model 
+     them as two seperate GStreamer tracks.
+  */
+  
   for (i = 0; i < count; i++) {
     GList *item;
-    gint channels = 0, samename = 0;
-    gint flags = GST_MIXER_TRACK_OUTPUT;
-    gboolean got_it = FALSE;
-
-    if (snd_mixer_selem_has_capture_switch (element)) {
-      if (!(mixer->dir & GST_ALSA_MIXER_CAPTURE))
-        goto next;
-      flags = GST_MIXER_TRACK_INPUT;
-    } else {
-      if (!(mixer->dir & GST_ALSA_MIXER_PLAYBACK))
-        goto next;
-    }
+    GstMixerTrack *play_track = NULL;
+    GstMixerTrack *cap_track = NULL;
+    gint samename = 0;
 
     /* prevent dup names */
     for (item = mixer->tracklist; item != NULL; item = item->next) {
@@ -163,49 +157,77 @@
         samename++;
     }
 
-    if (snd_mixer_selem_has_capture_volume (element)) {
-      while (snd_mixer_selem_has_capture_channel (element, channels))
-        channels++;
-      track = gst_alsa_mixer_track_new (element, samename,
-          i, channels, flags, GST_ALSA_MIXER_TRACK_CAPTURE);
-      mixer->tracklist = g_list_append (mixer->tracklist, track);
-      got_it = TRUE;
-
-      /* there might be another volume slider; make that playback */
-      flags &= ~GST_MIXER_TRACK_INPUT;
-      flags |= GST_MIXER_TRACK_OUTPUT;
-    }
-
-    if (snd_mixer_selem_has_playback_volume (element)) {
-      while (snd_mixer_selem_has_playback_channel (element, channels))
-        channels++;
-      if (first) {
-        first = FALSE;
-        flags |= GST_MIXER_TRACK_MASTER;
-      }
-      track = gst_alsa_mixer_track_new (element, samename,
-          i, channels, flags, GST_ALSA_MIXER_TRACK_PLAYBACK);
-      mixer->tracklist = g_list_append (mixer->tracklist, track);
-      got_it = TRUE;
-    }
-
-    if (snd_mixer_selem_is_enumerated (element)) {
-      opts = gst_alsa_mixer_options_new (element, i);
-      mixer->tracklist = g_list_append (mixer->tracklist, opts);
-      got_it = TRUE;
-    }
-
-    if (!got_it) {
-      if (flags == GST_MIXER_TRACK_OUTPUT &&
-          snd_mixer_selem_has_playback_switch (element)) {
+    if (mixer->dir & GST_ALSA_MIXER_PLAYBACK) {
+      
+      if (snd_mixer_selem_has_playback_volume (element)) {
+        gint flags = GST_MIXER_TRACK_OUTPUT;  
+        gint channels = 0;
+      
+        while (channels < GST_ALSA_MAX_CHANNELS &&
+               snd_mixer_selem_has_playback_channel (element, channels))
+        {
+          channels++;
+        }
+      
+        if (first) {
+          first = FALSE;
+          flags |= GST_MIXER_TRACK_MASTER;
+        }
+        play_track = gst_alsa_mixer_track_new (element, samename,
+            i, channels, flags, GST_ALSA_MIXER_TRACK_PLAYBACK, NULL, FALSE);
+      
+      } else if (snd_mixer_selem_has_playback_switch (element)) {
         /* simple mute switch */
-        track = gst_alsa_mixer_track_new (element, samename,
-            i, 0, flags, GST_ALSA_MIXER_TRACK_PLAYBACK);
-        mixer->tracklist = g_list_append (mixer->tracklist, track);
+        play_track = gst_alsa_mixer_track_new (element, samename,
+            i, 0, GST_MIXER_TRACK_OUTPUT, GST_ALSA_MIXER_TRACK_PLAYBACK,
+            NULL, FALSE);
+      }
+      
+      
+      if (snd_mixer_selem_is_enumerated (element)) {
+        GstMixerOptions *opts = opts = gst_alsa_mixer_options_new (element, i);
+        mixer->tracklist = g_list_append (mixer->tracklist, opts);
       }
     }
 
-  next:
+    if (mixer->dir & GST_ALSA_MIXER_CAPTURE) {
+
+      if (snd_mixer_selem_has_capture_volume (element) &&
+          !snd_mixer_selem_has_common_volume(element))
+      {
+        gint channels = 0;
+
+        while (channels < GST_ALSA_MAX_CHANNELS &&
+               snd_mixer_selem_has_capture_channel (element, channels))
+        {
+          channels++;
+        }
+
+        cap_track = gst_alsa_mixer_track_new (element, samename,
+            i, channels, GST_MIXER_TRACK_INPUT, GST_ALSA_MIXER_TRACK_CAPTURE,
+            NULL, play_track != NULL);
+      
+      } else if (snd_mixer_selem_has_capture_switch (element) &&
+                 !snd_mixer_selem_has_common_switch (element))
+      {
+        cap_track = gst_alsa_mixer_track_new (element, samename,
+            i, 0, GST_MIXER_TRACK_INPUT, GST_ALSA_MIXER_TRACK_CAPTURE,
+            NULL, play_track != NULL);
+      }
+    }
+
+    
+    if (play_track && cap_track) {
+        GST_ALSA_MIXER_TRACK(play_track)->shared_audible = GST_ALSA_MIXER_TRACK(cap_track);
+        GST_ALSA_MIXER_TRACK(cap_track)->shared_audible = GST_ALSA_MIXER_TRACK(play_track);
+    }
+    
+    if (play_track)
+      mixer->tracklist = g_list_append (mixer->tracklist, play_track);  
+    
+    if (cap_track)
+      mixer->tracklist = g_list_append (mixer->tracklist, cap_track);  
+    
     element = snd_mixer_elem_next (element);
   }
 }
@@ -276,59 +298,151 @@
   return (const GList *) mixer->tracklist;
 }
 
+
+static void
+gst_alsa_mixer_set_audible_flag (GstMixerTrack * track, gboolean audible)
+{
+    if (audible) {
+        if (track->flags & GST_MIXER_TRACK_OUTPUT)
+            track->flags &= ~GST_MIXER_TRACK_MUTE;
+        else if (track->flags & GST_MIXER_TRACK_INPUT)
+            track->flags |= GST_MIXER_TRACK_RECORD;
+    } else {
+        if (track->flags & GST_MIXER_TRACK_OUTPUT)
+            track->flags |= GST_MIXER_TRACK_MUTE;
+        else if (track->flags & GST_MIXER_TRACK_INPUT)
+            track->flags &= ~GST_MIXER_TRACK_RECORD;
+    }
+}
+
+
+inline static void
+gst_alsa_mixer_update_set_audible_flag (GstAlsaMixerTrack * alsa_track, gboolean audible)
+{
+  gst_alsa_mixer_set_audible_flag ((GstMixerTrack *)alsa_track, audible);
+
+  if (alsa_track->shared_audible)
+    gst_alsa_mixer_set_audible_flag ((GstMixerTrack *)(alsa_track->shared_audible), audible);
+}
+
+
+inline static gboolean
+gst_alsa_mixer_is_audible_flag_set (GstMixerTrack * track)
+{
+    if (track->flags & GST_MIXER_TRACK_OUTPUT)
+        return !(track->flags & GST_MIXER_TRACK_MUTE);
+    else if (track->flags & GST_MIXER_TRACK_INPUT)
+        return track->flags & GST_MIXER_TRACK_RECORD;
+    
+    return FALSE;
+}
+
+
 static void
 gst_alsa_mixer_update (GstAlsaMixer * mixer, GstAlsaMixerTrack * alsa_track)
 {
   GstMixerTrack *track = (GstMixerTrack *) alsa_track;
-  int v = 0;
-
+  
   snd_mixer_handle_events (mixer->handle);
   if (!alsa_track)
     return;
 
   /* Any updates in flags? */
   if (snd_mixer_selem_has_playback_switch (alsa_track->element)) {
-    snd_mixer_selem_get_playback_switch (alsa_track->element, 0, &v);
-    if (v)
-      track->flags &= ~GST_MIXER_TRACK_MUTE;
-    else
-      track->flags |= GST_MIXER_TRACK_MUTE;
+    int playsw = 0;
+    snd_mixer_selem_get_playback_switch (alsa_track->element, 0, &playsw);
+    gst_alsa_mixer_update_set_audible_flag (alsa_track, playsw);  
+  
+  } else if (snd_mixer_selem_has_playback_volume (alsa_track->element) &&
+             !gst_alsa_mixer_is_audible_flag_set (track))
+  {
+    // check if user has raised volume with a parallel running application
+
+    gint i;  
+      
+    for (i = 0; i < track->num_channels; i++) {    
+      long vol = 0;
+      snd_mixer_selem_get_playback_volume (alsa_track->element, i, &vol);
+        
+      if (vol > track->min_volume) {
+        gst_alsa_mixer_update_set_audible_flag (alsa_track, TRUE);
+        break;
+      }
+    }   
   }
+  
   if (alsa_track->alsa_flags & GST_ALSA_MIXER_TRACK_CAPTURE) {
-    snd_mixer_selem_get_capture_switch (alsa_track->element, 0, &v);
-    if (!v)
-      track->flags &= ~GST_MIXER_TRACK_RECORD;
+    gboolean muted = track->flags & GST_MIXER_TRACK_MUTE;
+      
+    if (snd_mixer_selem_has_capture_switch (alsa_track->element)) {
+        int recsw = 0;
+        snd_mixer_selem_get_capture_switch (alsa_track->element, 0, &recsw);
+        muted = !recsw;
+    } else if (muted &&
+               snd_mixer_selem_has_capture_volume (alsa_track->element))
+    {
+      gint i;
+        
+      for (i = 0; i < track->num_channels; i++) {    
+        long vol = 0;
+        snd_mixer_selem_get_capture_volume (alsa_track->element, i, &vol);
+        
+        if (vol > track->min_volume) {
+          muted = FALSE;
+          break;
+        }
+      }   
+    }
+    
+    if (muted)
+      track->flags |= GST_MIXER_TRACK_MUTE;
     else
-      track->flags |= GST_MIXER_TRACK_RECORD;
+      track->flags &= ~GST_MIXER_TRACK_MUTE;
   }
 }
 
+
 void
 gst_alsa_mixer_get_volume (GstAlsaMixer * mixer, GstMixerTrack * track,
     gint * volumes)
 {
   gint i;
   GstAlsaMixerTrack *alsa_track = GST_ALSA_MIXER_TRACK (track);
-
+    
   g_return_if_fail (mixer->handle != NULL);
 
   gst_alsa_mixer_update (mixer, alsa_track);
 
-  if (track->flags & GST_MIXER_TRACK_MUTE &&
-      !snd_mixer_selem_has_playback_switch (alsa_track->element)) {
-    for (i = 0; i < track->num_channels; i++)
-      volumes[i] = alsa_track->volumes[i];
-  } else {
-    for (i = 0; i < track->num_channels; i++) {
-      long tmp = 0;
-
-      if (alsa_track->alsa_flags & GST_ALSA_MIXER_TRACK_PLAYBACK) {
+  if (track->flags & GST_MIXER_TRACK_OUTPUT) {      // return playback volume
+    
+    // Is emulated mute flag activated?
+    if (track->flags & GST_MIXER_TRACK_MUTE &&
+        !snd_mixer_selem_has_playback_switch (alsa_track->element))
+    {
+      for (i = 0; i < track->num_channels; i++)
+        volumes[i] = alsa_track->volumes[i];
+    } else {
+      for (i = 0; i < track->num_channels; i++) {    
+        long tmp = 0;
         snd_mixer_selem_get_playback_volume (alsa_track->element, i, &tmp);
-      } else if (alsa_track->alsa_flags & GST_ALSA_MIXER_TRACK_CAPTURE) {
+        alsa_track->volumes[i] = volumes[i] = (gint) tmp;
+      }
+    }
+      
+  } else if (track->flags & GST_MIXER_TRACK_INPUT) {  // return capture volume
+      
+    // Is emulated mute flag activated?
+    if (track->flags & GST_MIXER_TRACK_MUTE &&
+        !snd_mixer_selem_has_capture_switch (alsa_track->element))
+    {
+      for (i = 0; i < track->num_channels; i++)
+        volumes[i] = alsa_track->volumes[i];
+    } else {
+      for (i = 0; i < track->num_channels; i++) {
+        long tmp = 0;
         snd_mixer_selem_get_capture_volume (alsa_track->element, i, &tmp);
+        alsa_track->volumes[i] = volumes[i] = (gint) tmp;
       }
-
-      alsa_track->volumes[i] = volumes[i] = (gint) tmp;
     }
   }
 }
@@ -338,64 +452,130 @@
     gint * volumes)
 {
   gint i;
+  gboolean update_alsa_vol;  
   GstAlsaMixerTrack *alsa_track = GST_ALSA_MIXER_TRACK (track);
 
   g_return_if_fail (mixer->handle != NULL);
 
   gst_alsa_mixer_update (mixer, alsa_track);
 
-  /* only set the volume with ALSA lib if the track isn't muted. */
-  for (i = 0; i < track->num_channels; i++) {
-    alsa_track->volumes[i] = volumes[i];
-
-    if (!(track->flags & GST_MIXER_TRACK_MUTE) ||
-        snd_mixer_selem_has_playback_switch (alsa_track->element)) {
-      if (alsa_track->alsa_flags & GST_ALSA_MIXER_TRACK_PLAYBACK) {
-        snd_mixer_selem_set_playback_volume (alsa_track->element, i,
-            (long) volumes[i]);
-      } else if (alsa_track->alsa_flags & GST_ALSA_MIXER_TRACK_CAPTURE) {
-        snd_mixer_selem_set_capture_volume (alsa_track->element, i,
-            (long) volumes[i]);
+
+  if (track->flags & GST_MIXER_TRACK_OUTPUT) {
+    if (snd_mixer_selem_has_playback_switch (alsa_track->element))
+      update_alsa_vol = TRUE;
+    else
+      update_alsa_vol = !(track->flags & GST_MIXER_TRACK_MUTE);
+      
+    for (i = 0; i < track->num_channels; i++) {
+      alsa_track->volumes[i] = volumes[i];
+
+      if (update_alsa_vol) {
+          snd_mixer_selem_set_playback_volume (alsa_track->element, i,
+          (long) volumes[i]);
+      }
+    }
+    
+  } else if (track->flags & GST_MIXER_TRACK_INPUT) {
+    if (snd_mixer_selem_has_capture_switch (alsa_track->element))
+      update_alsa_vol = TRUE;
+    else
+      update_alsa_vol = !(track->flags & GST_MIXER_TRACK_MUTE);
+      
+    for (i = 0; i < track->num_channels; i++) {
+      alsa_track->volumes[i] = volumes[i];
+
+      if (update_alsa_vol) {
+          snd_mixer_selem_set_capture_volume (alsa_track->element, i,
+          (long) volumes[i]);
       }
     }
   }
 }
 
+
+static gboolean
+gst_alsa_mixer_same_excl_capture_group(GstAlsaMixerTrack *a, GstAlsaMixerTrack *b)
+{
+    if (snd_mixer_selem_has_capture_switch_exclusive(a->element) &&
+        snd_mixer_selem_has_capture_switch_exclusive(b->element))
+    {
+        return snd_mixer_selem_get_capture_group(a->element) ==
+               snd_mixer_selem_get_capture_group(b->element);
+    }
+    
+    return FALSE;
+}
+
+
 void
 gst_alsa_mixer_set_mute (GstAlsaMixer * mixer, GstMixerTrack * track,
     gboolean mute)
 {
-  gint i;
   GstAlsaMixerTrack *alsa_track = GST_ALSA_MIXER_TRACK (track);
 
   g_return_if_fail (mixer->handle != NULL);
 
   gst_alsa_mixer_update (mixer, alsa_track);
 
-  if (mute) {
-    track->flags |= GST_MIXER_TRACK_MUTE;
-  } else {
-    track->flags &= ~GST_MIXER_TRACK_MUTE;
-  }
+  if ((mute > 0) == ((track->flags & GST_MIXER_TRACK_MUTE) > 0))
+    return;
 
-  if (snd_mixer_selem_has_playback_switch (alsa_track->element)) {
-    snd_mixer_selem_set_playback_switch_all (alsa_track->element, mute ? 0 : 1);
-  } else {
-    for (i = 0; i < track->num_channels; i++) {
-      long vol = mute ? 0 : alsa_track->volumes[i];
+  
+  if (track->flags & GST_MIXER_TRACK_OUTPUT) {
+    
+    if (snd_mixer_selem_has_playback_switch (alsa_track->element)) {
+      snd_mixer_selem_set_playback_switch_all (alsa_track->element, mute ? 0 : 1);
+    } else {
+      gint i;  
+      for (i = 0; i < track->num_channels; i++) {
+        long vol = mute ? track->min_volume : alsa_track->volumes[i];
+        snd_mixer_selem_set_playback_volume (alsa_track->element, i, vol);
+      }
+    }
+
+    gst_alsa_mixer_update_set_audible_flag (alsa_track, !mute);
+    
+  } else if (track->flags & GST_MIXER_TRACK_INPUT) {
+    if (mute) {
+      track->flags |= GST_MIXER_TRACK_MUTE;
+    } else {
+      track->flags &= ~GST_MIXER_TRACK_MUTE;
+    }
+    
+    if (snd_mixer_selem_has_capture_switch (alsa_track->element)) {
+      snd_mixer_selem_set_capture_switch_all (alsa_track->element, mute ? 0 : 1);
+        
+      // update all tracks in same exlusive cswitch group
+      if (snd_mixer_selem_has_capture_switch_exclusive(alsa_track->element)) {
+        GList *item;
+        
+        for (item = mixer->tracklist; item != NULL; item = item->next) {
+        
+          if (GST_IS_ALSA_MIXER_TRACK (item->data)) {
+            GstAlsaMixerTrack *item_alsa_track = GST_ALSA_MIXER_TRACK (item->data);
+
+            if (gst_alsa_mixer_same_excl_capture_group(alsa_track, item_alsa_track))
+                gst_alsa_mixer_update (mixer, item_alsa_track);
+          }
+        }
+      }
 
-      if (alsa_track->alsa_flags & GST_ALSA_MIXER_TRACK_CAPTURE) {
+    } else {
+      gint i;  
+      for (i = 0; i < track->num_channels; i++) {
+        long vol = mute ? track->min_volume : alsa_track->volumes[i];
         snd_mixer_selem_set_capture_volume (alsa_track->element, i, vol);
-      } else if (alsa_track->alsa_flags & GST_ALSA_MIXER_TRACK_PLAYBACK) {
-        snd_mixer_selem_set_playback_volume (alsa_track->element, i, vol);
       }
     }
+    
   }
+
 }
 
+
 void
-gst_alsa_mixer_set_record (GstAlsaMixer * mixer,
-    GstMixerTrack * track, gboolean record)
+gst_alsa_mixer_set_record (GstAlsaMixer * mixer, GstMixerTrack * track,
+    gboolean record)
 {
   GstAlsaMixerTrack *alsa_track = GST_ALSA_MIXER_TRACK (track);
 
@@ -403,13 +583,27 @@
 
   gst_alsa_mixer_update (mixer, alsa_track);
 
-  if (record) {
-    track->flags |= GST_MIXER_TRACK_RECORD;
-  } else {
-    track->flags &= ~GST_MIXER_TRACK_RECORD;
-  }
+  if (!(track->flags & GST_MIXER_TRACK_INPUT))
+    return;
+  
+  if ((record > 0) == ((track->flags & GST_MIXER_TRACK_RECORD) > 0))
+    return;
+  
 
-  snd_mixer_selem_set_capture_switch_all (alsa_track->element, record ? 1 : 0);
+  if (snd_mixer_selem_has_playback_switch (alsa_track->element)) {
+    snd_mixer_selem_set_playback_switch_all (alsa_track->element, record ? 1 : 0);
+  } else if (alsa_track->shared_audible) {
+    gint i;
+    GstAlsaMixerTrack *play_alsa_track = alsa_track->shared_audible;
+    GstMixerTrack *play_track = (GstMixerTrack *)play_alsa_track;  
+    
+    for (i = 0; i < play_track->num_channels; i++) {
+      long vol = record ? play_alsa_track->volumes[i] : play_track->min_volume;
+      snd_mixer_selem_set_playback_volume (play_alsa_track->element, i, vol);
+    }
+  }
+  
+  gst_alsa_mixer_update_set_audible_flag (alsa_track, record);
 }
 
 void
diff -urN gst-plugins-base-0.10.5.org/ext/alsa/gstalsamixertrack.c gst-plugins-base-0.10.5/ext/alsa/gstalsamixertrack.c
--- gst-plugins-base-0.10.5.org/ext/alsa/gstalsamixertrack.c	2004-10-25 17:58:35.000000000 +0200
+++ gst-plugins-base-0.10.5/ext/alsa/gstalsamixertrack.c	2006-05-08 15:27:11.000000000 +0200
@@ -71,15 +71,17 @@
 
 GstMixerTrack *
 gst_alsa_mixer_track_new (snd_mixer_elem_t * element,
-    gint num, gint track_num, gint channels, gint flags, gint alsa_flags)
+    gint num, gint track_num, gint channels, gint flags, gint alsa_flags,
+    GstAlsaMixerTrack * shared_audible_track, gboolean append_capture)
 {
-  gint i;
+  int i;
   long min = 0, max = 0;
   struct
-  {
+  { 
     gchar *orig, *trans;
   } alsa_track_labels[] = {
     {
+    "Capture", _("Capture")}, {
     "Master", _("Master")}, {
     "Bass", _("Bass")}, {
     "Treble", _("Treble")}, {
@@ -90,39 +92,39 @@
     "Mic", _("Microphone")}, {
     "PC Speaker", _("PC Speaker")}, {
     "Playback", _("Playback")}, {
-    "Capture", _("Capture")}, {
     NULL, NULL}
   };
 
   GstMixerTrack *track = g_object_new (GST_ALSA_MIXER_TRACK_TYPE, NULL);
   GstAlsaMixerTrack *alsa_track = (GstAlsaMixerTrack *) track;
 
-  /* set basic information */
-  if (num == 0)
-    track->label = g_strdup (snd_mixer_selem_get_name (element));
-  else
-    track->label = g_strdup_printf ("%s %d",
-        snd_mixer_selem_get_name (element), num + 1);
-  i = 0;
-  while (alsa_track_labels[i].orig != NULL) {
-    if (!g_utf8_collate (snd_mixer_selem_get_name (element),
-            alsa_track_labels[i].orig)) {
-      g_free (track->label);
-      if (num == 0)
-        track->label = g_strdup (alsa_track_labels[i].trans);
-      else
-        track->label = g_strdup_printf ("%s %d",
-            alsa_track_labels[i].trans, num);
+  const gchar* label = snd_mixer_selem_get_name (element);
+  
+  for (i = 0; alsa_track_labels[i].orig != NULL; ++i) {
+    if (!g_utf8_collate (label, alsa_track_labels[i].orig)) {
+      label = alsa_track_labels[i].trans;
       break;
     }
-    i++;
   }
+
+  if (num == 0) {
+    track->label = g_strdup_printf ("%s%s%s", label,
+                                    append_capture ? " " : "",
+                                    append_capture ? alsa_track_labels[0].trans : "");
+  } else {
+    track->label = g_strdup_printf ("%s%s%s %d", label,
+                                    append_capture ? " " : "",
+                                    append_capture ? alsa_track_labels[0].trans : "",
+                                    num);
+  }
+  
   track->num_channels = channels;
   track->flags = flags;
   alsa_track->element = element;
   alsa_track->alsa_flags = alsa_flags;
   alsa_track->track_num = track_num;
-
+  alsa_track->shared_audible = shared_audible_track;
+  
   /* set volume information */
   if (channels) {
     if (alsa_flags & GST_ALSA_MIXER_TRACK_PLAYBACK) {
@@ -154,11 +156,16 @@
   }
 
   if (flags & GST_MIXER_TRACK_INPUT) {
-    int val = 0;
-
-    snd_mixer_selem_get_capture_switch (element, 0, &val);
-    if (val)
-      track->flags |= GST_MIXER_TRACK_RECORD;
+      
+    if (snd_mixer_selem_has_capture_switch (element)) {
+        int val = 0;
+
+        snd_mixer_selem_get_capture_switch (element, 0, &val);
+        if (val)
+            track->flags |= GST_MIXER_TRACK_RECORD;
+    } else {
+        track->flags |= GST_MIXER_TRACK_RECORD;
+    }
   }
 
   return track;
diff -urN gst-plugins-base-0.10.5.org/ext/alsa/gstalsamixertrack.h gst-plugins-base-0.10.5/ext/alsa/gstalsamixertrack.h
--- gst-plugins-base-0.10.5.org/ext/alsa/gstalsamixertrack.h	2005-12-06 20:41:55.000000000 +0100
+++ gst-plugins-base-0.10.5/ext/alsa/gstalsamixertrack.h	2006-05-08 15:27:13.000000000 +0200
@@ -41,10 +41,11 @@
 #define GST_ALSA_MIXER_TRACK_CAPTURE  (1<<0)
 #define GST_ALSA_MIXER_TRACK_PLAYBACK (1<<1)
 
-#define GST_ALSA_MAX_CHANNELS   32 /* tracks can have up to 32 channels */
+#define GST_ALSA_MAX_CHANNELS   (SND_MIXER_SCHN_LAST+1)
 struct _GstAlsaMixerTrack {
   GstMixerTrack          parent;
   snd_mixer_elem_t      *element; /* the ALSA mixer element for this track */
+  GstAlsaMixerTrack     *shared_audible;  
   gint                  track_num;
   gint                  alsa_flags;
   gint                  volumes[GST_ALSA_MAX_CHANNELS];
@@ -60,7 +61,9 @@
                                                  gint                   track_num,
                                                  gint                   channels,
                                                  gint                   flags,
-                                                 gint                   alsa_flags);
+                                                 gint                   alsa_flags,
+                                                 GstAlsaMixerTrack *    shared_audible_track,
+                                                 gboolean               append_capture);
 
 
 G_END_DECLS
