Approve:rtl.pass
>From [EMAIL PROTECTED] Mon Sep 10 09:58:19 2001
Received: from mail.space2u.com (mail.space2u.com [62.20.1.135])
by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f8AFwIE13249
for <[EMAIL PROTECTED]>; Mon, 10 Sep 2001 09:58:18 -0600
Received: from cutangle.admeo.se ([212.162.175.15])
by mail.space2u.com (8.11.6/8.11.6) with SMTP id f8AG1OB04985
for <[EMAIL PROTECTED]>; Mon, 10 Sep 2001 18:01:24 +0200
Content-Type: text/plain;
charset="iso-8859-1"
From: David Olofson <[EMAIL PROTECTED]>
Organization: Reologica Instruments AB
To: [EMAIL PROTECTED]
Subject: Re: [rtl] rt module access from kernel and user space
Date: Mon, 10 Sep 2001 18:01:36 +0200
X-Mailer: KMail [version 1.2]
References: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Message-Id: <[EMAIL PROTECTED]>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by hq.fsmlabs.com id f8AFwJE13250
On Monday 10 September 2001 16:48, S. Ancelot wrote:
> Hi,
> 1. Is it possible to write a single PCI I/O driver module that can be
> accessible from user or kernel space ?
Yes, but it's not trivial to do it in a "nice" way.
(The "DPI" I hacked when I used RTL for real time audio replaced the
kernel driver "API" with calls that automatically detected the calling
context and used Linux or RTL calls accordingly.)
> 2. on the PCI board, I use , I would like to remap I/O pci to have
> direct memory access from user space programs directly.
> is it possible and how ?
Nice Linux specific feature: Use "ioperm()" to gain access to the ports
you need. Then use port instructions (or macros) right in your code, as
if you were running in kernel space - or under DOS. :-)
Do note that this is *direct* port access! There's no driver or anything
involved, so you have to be carefull not to run into synchronization
problems if you share the ports with some kernel driver, or multiple
threads or processes.
(If you end up in such a scenario, I'd suggest adding some ioctl()s for
your applications to use instead of direct port access. That's what I do
for our old ISA card with write-only "control bit" registers that various
"drivers" need to fiddle with; the driver shadows the registers with
internal backup variables and an Amiga style "setbits/clearbits"
interface.)
//David Olofson --- Programmer, Reologica Instruments AB
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------------> http://www.linuxdj.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> [EMAIL PROTECTED] -'
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/