All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciej Hrebien <m_hrebien@wp.pl>
To: linux-assembly@vger.kernel.org
Subject: Re: OSS ioctls...
Date: Wed, 22 Dec 2004 22:20:54 +0100	[thread overview]
Message-ID: <41C9E536.11EBD867@wp.pl> (raw)
In-Reply-To: 41C9DBB4.C82BDD71@wp.pl

Maciej Hrebien wrote:
> 
> Richard Cooper wrote:
> >
> > I am going to go insane...  Please help...
> >
> > Here's my code:
> >
> >    section .text
> >
> >    %define SNDCTL_DSP_RESET 0x5000
> >    %define SNDCTL_DSP_SPEED 0x5002
> >    %define SNDCTL_DSP_SETFMT 0x5005
> >    %define SNDCTL_DSP_GETFMTS 0x500B
> >    %define SNDCTL_DSP_CHANNELS 0x5006
> >    %define SNDCTL_DSP_POST 0x5008
> >    %define SNDCTL_DSP_SETFRAGMENT 0x500A
> >    %define AFMT_S16_LE 0x0010
> >
> >    sys sys_open, dev_dsp, O_WRONLY; systrap "opening /dev/dsp"
> >    mov [out_desc], eax
> >
> >    sys sys_ioctl, [out_desc], SNDCTL_DSP_RESET, 0;               systrap
> > "resetting dsp"
> >    sys sys_ioctl, [out_desc], SNDCTL_DSP_GETFMTS, formats;       systrap
> > "getting dsp formats"
> >    sys sys_ioctl, [out_desc], SNDCTL_DSP_CHANNELS, channels;     systrap
> > "setting dsp channels"
> >    sys sys_ioctl, [out_desc], SNDCTL_DSP_SPEED, speed;           systrap
> > "setting dsp speed"
> >    sys sys_ioctl, [out_desc], SNDCTL_DSP_SETFMT, format;         systrap
> > "setting dsp format"
> >    sys sys_ioctl, [out_desc], SNDCTL_DSP_SETFRAGMENT, fragment;  systrap
> > "setting dsp fragment size"
> >
> >    section .data
> >
> >    channels dd 1
> >    speed dd 8000
> >    format dd AFMT_S16_LE
> >    formats dd 0
> >    fragment dd $00080006
> >    ass dd 0
> >
> 
> [cut]
> 
> Correct me if i'm wrong but as i remember the ioctl gets an
> int (dd) as an argument - not an address. So [] is needed.

What am i talking about? sorry! Did you tried the
linuxassembly.org/articles/audio.html? Your code looks very similar and
%define's seems to be different.

-- 
Maciej Hrebien


  reply	other threads:[~2004-12-22 21:20 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 [this message]
2004-12-23  0:18       ` Richard Cooper
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=41C9E536.11EBD867@wp.pl \
    --to=m_hrebien@wp.pl \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.