After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 362673 - Playback with 4Front OSS driver not working due to blocking mode.
Playback with 4Front OSS driver not working due to blocking mode.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.4
Other FreeBSD
: Normal major
: 0.10.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-16 18:35 UTC by Marcin Koziej
Modified: 2006-10-17 14:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marcin Koziej 2006-10-16 18:35:48 UTC
I run FreeBSD 6-STABLE with OSS driver from 4Front version 3.99.4b
the driver can be found here:
http://www.4front-tech.com/
This is an oss compatible driver.

This driver works great with XMMS, but trying to play sound with GStreamer 0.10.9 produces such error:

creep@carnivore[~]:> gst-launch-0.10 --verbose filesrc location=file.mp3 '!' mad '!' audioconvert '!' osssink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/pipeline0/mad0.src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2
/pipeline0/audioconvert0.src: caps = audio/x-raw-int, width=(int)16, depth=(int)16, signed=(boolean)false, endianness=(int)1234, channels=(int)2, rate=(int)44100
/pipeline0/audioconvert0.sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2
ERROR: from element /pipeline0/osssink0: Could not get/set settings from/on resource.
Additional debug info:
gstosssink.c(441): gst_oss_sink_prepare (): /pipeline0/osssink0:
Unable to set device /dev/dsp in non blocking mode: Invalid argument
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
/pipeline0/audioconvert0.src: caps = NULL
/pipeline0/audioconvert0.sink: caps = NULL
/pipeline0/mad0.src: caps = NULL
FREEING pipeline ...
creep@carnivore[~]:>


/dev/sndstat:
----------------------------------------
Build: 200607070150
Kernel: FreeBSD 6.2-PRERELEASE #1: Wed Sep 27 20:18:33 CEST 2006
creep@carnivore:/home/src/sys/i386/compile/TRUCE


Card config:
VIA 8233 AC97 audio controller at 0x1400 irq 9

Audio devices:
0: VT8235 (DUPLEX)
1: VT8235 (shadow) (DUPLEX)
2: OSS Virtual Mixer v2.5 Playback CH #0 (GRC3)
3: OSS Virtual Mixer v2.5 Playback CH #1 (GRC3)
4: OSS Virtual Mixer v2.5 Playback CH #2 (GRC3)
5: OSS Virtual Mixer v2.5 Playback CH #3 (GRC3)
6: OSS Virtual Mixer v2.5 Playback CH #4 (GRC3)
7: OSS Virtual Mixer v2.5 Playback CH #5 (GRC3)
8: OSS Virtual Mixer v2.5 Playback CH #6 (GRC3)
9: OSS Virtual Mixer v2.5 Playback CH #7 (GRC3)

Synth devices:
0: OSS Virtual Synth v2.5

Midi devices:

Mixers:
0: VT8235 (VT1612A)
1: Virtual Mixer

History:
dsp0: pid 10979 cmd 'gst-launch-0.10' OUT
------------------------

The gstreamer code which does this is contained in gstreamer-plugins-good-0.10.3 in osssink module:
sys/oss/gstosssink.c function gst_oss_sink_prepare

lines:
397 oss = GST_OSSSINK (asink);
398
399 mode = fcntl (oss->fd, F_GETFL);
400 mode &= ~O_NONBLOCK;
401 if (fcntl (oss->fd, F_SETFL, mode) == -1)
402 goto non_block;

Seems gstreamer tries to actually disable non-blocking mode (contrary to error message it displays:
437 non_block:
438 {
439 GST_ELEMENT_ERROR (oss, RESOURCE, SETTINGS, (NULL),
440 ("Unable to set device %s in non blocking mode: %s",
441 oss->device, g_strerror (errno)));
442 return FALSE;
443 }

Seems like gstreamer is doing something it shouldn't do.
There is a faq in opensound webside dealing with blocking and other things.
http://manuals.opensound.com/developer/audio_myths.html
http://manuals.opensound.com/developer/


m.
Comment 1 Wim Taymans 2006-10-17 14:37:35 UTC
this should fix it, reopen please if it doesn't.

        * sys/oss/gstosssink.c: (gst_oss_sink_prepare):
        Some drivers do not support unsetting the non-blocking flag once the
        device is opened. In those cases, close/open the device in
        non-blocking mode. Fixes #362673.