Possibly inappropiate SNDCTL_DSP_SETTRIGGER ioctl for OSS backend

View: New views
2 Messages — Rating Filter:   Alert me  

Possibly inappropiate SNDCTL_DSP_SETTRIGGER ioctl for OSS backend

by Andrew Thompson-15 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've been tracking down why Portaudio v19 in FreeBSD/DragonFlyBSD is somewhat failure
prone when running certain tests (and real-life code). I've determined
that the SNDCTL_DSP_SETTRIGGER ioctls in OpenDevixes in pa_unix_oss.c
are being executed before the  SNDCTL_DSP_SETFRAGMENT and
SNDCTL_DSP_SETDUPLEX ioctls, which is incorrect according to the OSS
developer documentation at:

http://manuals.opensound.com/developer/callorder.html

As you can see, they say that the startup state ioctls calculate the
fragment size, so trying to change it afterwards isn't valid and leads
to failures like those reported at:

http://techweb.rfa.org/pipermail/portaudio/2007-May/007045.html

and

http://techweb.rfa.org/pipermail/portaudio/2007-June/007149.html

From my limited testing, commenting out the ioctls in question fixes
this issue but, not being an OSS/Portaudio developer (or having any real
experience in sound programming at all), the fix may not be that simple.

On a somewhat unrelated matter, the Portaudio config.guess file is a bit
dated. It was unable to guess defaults for my DragonflyBSD system. I
just did the libtoolize --copy --force; aclocal; autoconf dance to fix
it though, and it seems to have worked out.

Please let me know if there's any more information/testing I can
provide. This issue is confirmed on FreeBSD and DragonFlyBSD. I haven't
tested with Linux's OSS implementation, maybe it's not a problem there?

Andrew
_______________________________________________
Portaudio mailing list
Portaudio@...
http://techweb.rfa.org/mailman/listinfo/portaudio

Re: Possibly inappropiate SNDCTL_DSP_SETTRIGGER ioctl for OSS backend

by Arve Knudsen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Andrew

Thanks for making us aware of this issue, I think I've fixed the problem  
in the latest svn revision.

Arve

On Tue, 03 Jun 2008 23:59:23 +0200, Andrew Thompson <andrew@...>  
wrote:

> Hi,
>
> I've been tracking down why Portaudio v19 in FreeBSD/DragonFlyBSD is  
> somewhat failure
> prone when running certain tests (and real-life code). I've determined
> that the SNDCTL_DSP_SETTRIGGER ioctls in OpenDevixes in pa_unix_oss.c
> are being executed before the  SNDCTL_DSP_SETFRAGMENT and
> SNDCTL_DSP_SETDUPLEX ioctls, which is incorrect according to the OSS
> developer documentation at:
>
> http://manuals.opensound.com/developer/callorder.html
>
> As you can see, they say that the startup state ioctls calculate the
> fragment size, so trying to change it afterwards isn't valid and leads
> to failures like those reported at:
>
> http://techweb.rfa.org/pipermail/portaudio/2007-May/007045.html
>
> and
>
> http://techweb.rfa.org/pipermail/portaudio/2007-June/007149.html
>
> From my limited testing, commenting out the ioctls in question fixes
> this issue but, not being an OSS/Portaudio developer (or having any real
> experience in sound programming at all), the fix may not be that simple.
>
> On a somewhat unrelated matter, the Portaudio config.guess file is a bit
> dated. It was unable to guess defaults for my DragonflyBSD system. I
> just did the libtoolize --copy --force; aclocal; autoconf dance to fix
> it though, and it seems to have worked out.
>
> Please let me know if there's any more information/testing I can
> provide. This issue is confirmed on FreeBSD and DragonFlyBSD. I haven't
> tested with Linux's OSS implementation, maybe it's not a problem there?
>
> Andrew
> _______________________________________________
> Portaudio mailing list
> Portaudio@...
> http://techweb.rfa.org/mailman/listinfo/portaudio


_______________________________________________
Portaudio mailing list
Portaudio@...
http://techweb.rfa.org/mailman/listinfo/portaudio
LightInTheBox - Buy quality products at wholesale price