From: "Richard Cooper" <generic@xersedefixion.com>
To: linux-assembly@vger.kernel.org
Subject: Re: OSS ioctls...
Date: Wed, 22 Dec 2004 19:18:19 -0500 [thread overview]
Message-ID: <opsjfpstznuqea3r@sucks.airplane.fire> (raw)
In-Reply-To: <41C9E536.11EBD867@wp.pl>
> Did you tried the linuxassembly.org/articles/audio.html? Your code looks
> very similar and %define's seems to be different.
I must have skimmed throught the list too fast, I didn't realize there was
an article. Otherwise I would have read that instead of the massive PDF
than is the OSS documentation. It's really quite nice documentation. It
just naturally doesn't define the IOCTL numbers. It's at
http://www.opensound.com/pguide/oss.pdf if anyone's interested.
But anyway, looking at the example I see there's a $C0040000 or'ed with
most of the ioctl numbers, and adding that to my numbers fixed everything
up.
Looking back at the header file I see that some of the IOCTL numbers go
through a different macro...
#define SNDCTL_DSP_SETFRAGMENT _SIOWR('P',10, int)
#define _SIOWR(x,y,t) ((int)(SIOC_INOUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
#define SIOC_INOUT (SIOC_IN|SIOC_OUT)
#define SIOC_OUT 0x20000000 /* copy out parameters */
#define SIOC_IN 0x40000000 /* copy in parameters */
Now as I see it, that should make those IOCTL numbers begin with $6004,
not $C004, but $6004 doesn't work, only $C004 works. So I still don't see
where the $C004 is coming from, but at least I know how to make it work
now.
Thanks for your help. I probably wouldn't have figured that out on my own
until next year or the year after when I happen to stumble upon the
linuxassembly article, seeing as the header file isn't even correct.
next prev parent reply other threads:[~2004-12-23 0:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-22 14:47 Where's Konstantin? Frank Kotler
2004-12-22 17:44 ` OSS ioctls Richard Cooper
2004-12-22 20:40 ` Maciej Hrebien
2004-12-22 21:20 ` Maciej Hrebien
2004-12-23 0:18 ` Richard Cooper [this message]
2004-12-23 9:25 ` Maciej Hrebien
2004-12-22 21:45 ` Maciej Hrebien
2004-12-22 23:58 ` Where's Konstantin? Brian Raiter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=opsjfpstznuqea3r@sucks.airplane.fire \
--to=generic@xersedefixion.com \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).