--- gstsunaudiosrc.c.orig	2006-08-09 16:33:05.021871000 +0800
+++ gstsunaudiosrc.c	2006-08-09 16:28:42.546907000 +0800
@@ -46,6 +46,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <stropts.h>
+#include <sys/mixer.h>
 
 #include "gstsunaudiosrc.h"
 
@@ -237,9 +238,10 @@
   GstSunAudioSrc *sunaudiosrc = GST_SUNAUDIO_SRC (asrc);
   int fd, ret,err;
 
-  fd = open (sunaudiosrc->device, O_RDWR | O_NONBLOCK);
+  fd = open (sunaudiosrc->device, O_RDONLY);
+  err = ioctl(fd, AUDIO_MIXER_MULTIPLE_OPEN);
 
-  if (fd == -1 ) {
+  if (fd == -1 || err == -1) {
     GST_ELEMENT_ERROR (sunaudiosrc, RESOURCE, OPEN_READ, (NULL),
         ("can't open connection to Sun Audio device %s", sunaudiosrc->device));
 

