Commit 6c58a6ba authored by Jerry Tan's avatar Jerry Tan Committed by Jan Schmidt
Browse files

sys/sunaudio/gstsunaudiosrc.c: Apply patch to open the mixer control and set...

sys/sunaudio/gstsunaudiosrc.c: Apply patch to open the mixer control and set the MULTIPLE_OPEN ioctl. On solaris, the...

Original commit message from CVS:
* sys/sunaudio/gstsunaudiosrc.c: (gst_sunaudiosrc_open):
Apply patch to open the mixer control and set the MULTIPLE_OPEN
ioctl. On solaris, the mixer device doesn't need opening non-blocking
- it can be opened by multiple processes by default, but needs the ioctl 	for multiple opens within 1 process.
Patch by: Jerry Tan <jerry.tan at sun dot com>
Fixes: #349015
parent 6b01538b
2006-12-08 Jan Schmidt <thaytan@mad.scientist.com>
* sys/sunaudio/gstsunaudiosrc.c: (gst_sunaudiosrc_open):
Apply patch to open the mixer control and set the MULTIPLE_OPEN
ioctl. On solaris, the mixer device doesn't need opening non-blocking
- it can be opened by multiple processes by default, but needs the ioctl for multiple opens within 1 process.
Patch by: Jerry Tan <jerry.tan at sun dot com>
Fixes: #349015
2006-12-07 Wim Taymans <wim@fluendo.com>
* gst/smpte/gstmask.h:
......
......@@ -46,6 +46,7 @@
#include <string.h>
#include <unistd.h>
#include <stropts.h>
#include <sys/mixer.h>
#include "gstsunaudiosrc.h"
......@@ -241,11 +242,12 @@ static gboolean
gst_sunaudiosrc_open (GstAudioSrc * asrc)
{
GstSunAudioSrc *sunaudiosrc = GST_SUNAUDIO_SRC (asrc);
int fd, ret;
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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment