[gst-devel] SNDCTL_DSP_SETFRAGMENT ioctl problem with osssink

Markus Heidelberg markus.heidelberg at web.de
Mon Nov 24 06:29:48 CET 2008


Markus Heidelberg, 19.11.2008:
> Hello,
> 
> I'm using GStreamer 0.10.21 on an AVR32 based board with the at32_abdac
> OSS driver (Linux 2.6.26 with patches from Atmel). There is only
> /dev/dsp, no /dev/mixer and no /dev/snd/.
> 
> For testing the sound I tried this command from the FAQ:
>   gst-launch audiotestsrc ! audioconvert !  audioresample ! osssink
> 
> It prints the following messages and aborts:
> 
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> GLib: Cannot convert message: Conversion from character set 'UTF-8' to 'ASCII' is not supported
> ERROR: from element /GstPipeline:pipeline0/GstOssSink:osssink0: Could not get/set settings from/on resource.
> Additional debug info:
> gstosssink.c(482): gst_oss_sink_prepare (): /GstPipeline:pipeline0/GstOssSink:osssink0:
> Unable to set param SETFRAGMENT: unknown error (22)
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...
> FREEING pipeline ...
> 
> I removed the line
>   SET_PARAM (oss, SNDCTL_DSP_SETFRAGMENT, tmp, "SETFRAGMENT");
> from the file gst-plugins-good-0.10.11/sys/oss/gstosssink.c and it's
> working, though somewhat overdriven.
> 
> The SNDCTL_DSP_SETFRAGMENT ioctl isn't implemented in the at32_abdac
> driver. MPlayer doesn't use this ioctl and playing audio is fine with
> it. I'm not well versed in the sound parts and don't know what this
> ioctl is doing and why MPlayer doesn't use it.
> 
> So can you give me some hints, how to handle this problem?
> 
> Markus

Looking at the manual at
http://manuals.opensound.com/developer/SNDCTL_DSP_SETFRAGMENT.html it
says that the use of this ioctl is not recommended and this call is only
setting a size hint that probably will be ignored. So is there really a
need to refuse playback when this ioctl is failing?
In Qt for Embedded Linux they just print out a warning in this case
(src/gui/embedded/qsoundqss_qws.cpp).





More information about the gstreamer-devel mailing list