SNDCTL_DSP_SETFRAGMENT ioctl problem with osssink

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SNDCTL_DSP_SETFRAGMENT ioctl problem with osssink

Markus Heidelberg
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


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: SNDCTL_DSP_SETFRAGMENT ioctl problem with osssink

Markus Heidelberg
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).


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel