diff options
author | jerry tan <jerry.tan@sun.com> | 2007-04-12 11:37:50 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-04-12 11:37:50 +0000 |
commit | a7efc5ceb7653a54c6ba29352c0f2c6df1d82555 (patch) | |
tree | 83d0819629db17557bc36bcc0042f1ba9b639ccc /sys/sunaudio | |
parent | eae68a64fa982bd8c0eb1d4c941d1bcac3d38b1a (diff) |
sys/sunaudio/gstsunaudiosrc.c: it is the application's responsibility to make sure it open the device once.
Original commit message from CVS:
Patch by: jerry tan <jerry dot tan at sun dot com>
* sys/sunaudio/gstsunaudiosrc.c: (gst_sunaudiosrc_open):
remove the call of ioctl (fd, AUDIO_MIXER_MULTIPLE_OPEN), it is the
application's responsibility to make sure it open the device once.
Remove a careless error if AUDIODEV is set. Fixes #392620.
Diffstat (limited to 'sys/sunaudio')
-rw-r--r-- | sys/sunaudio/gstsunaudiosrc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/sunaudio/gstsunaudiosrc.c b/sys/sunaudio/gstsunaudiosrc.c index e0fdcd42..c2fd12e9 100644 --- a/sys/sunaudio/gstsunaudiosrc.c +++ b/sys/sunaudio/gstsunaudiosrc.c @@ -234,12 +234,11 @@ static gboolean gst_sunaudiosrc_open (GstAudioSrc * asrc) { GstSunAudioSrc *sunaudiosrc = GST_SUNAUDIO_SRC (asrc); - int fd, ret, err; + int fd, ret; fd = open (sunaudiosrc->device, O_RDONLY); - err = ioctl (fd, AUDIO_MIXER_MULTIPLE_OPEN); - if (fd == -1 || err == -1) { + if (fd == -1) { GST_ELEMENT_ERROR (sunaudiosrc, RESOURCE, OPEN_READ, (NULL), ("can't open connection to Sun Audio device %s", sunaudiosrc->device)); @@ -284,7 +283,7 @@ gst_sunaudiosrc_open (GstAudioSrc * asrc) if (audiodev == NULL) { sunaudiosrc->mixer = gst_sunaudiomixer_ctrl_new ("/dev/audioctl"); } else { - gchar *device = g_strdup_printf ("/dev/%sctl", audiodev); + gchar *device = g_strdup_printf ("%sctl", audiodev); sunaudiosrc->mixer = gst_sunaudiomixer_ctrl_new (device); g_free (device); |