PCI Programming

PCI Programming

Post by Mad Mat » Mon, 23 Aug 1999 04:00:00



Hiya,

Is it all possible to do any programming regards the PCI bus? I've seen
the <linux/pci.h> file which contains everything I need, but knocking up
a small program just lists errors about not finding these functions, and
I haven't a clue which libs, if any, contain them.

The only reason I ask, is that I have finally found how to get my
blasted soundcard working under linux, (an ESS 1978). All I need to do
is change one bit in the PCI configuration space to enable the SB legacy
support.

Can anyone offer any advice? If I can't do it this way, are there any
alternatives?

Thanks in advance

Matt

 
 
 

PCI Programming

Post by Philip Armstro » Mon, 23 Aug 1999 04:00:00




Quote:>The only reason I ask, is that I have finally found how to get my
>blasted soundcard working under linux, (an ESS 1978). All I need to do
>is change one bit in the PCI configuration space to enable the SB legacy
>support.

>Can anyone offer any advice? If I can't do it this way, are there any
>alternatives?

setpci / lspci may do what you need

part of the pciutils package under debian.

Phil
--
nosig

 
 
 

PCI Programming

Post by Keith Wrigh » Tue, 24 Aug 1999 04:00:00



> Hiya,

> Is it all possible to do any programming regards the PCI bus? I've seen
> the <linux/pci.h> file which contains everything I need, but knocking up
> a small program just lists errors about not finding these functions, and
> I haven't a clue which libs, if any, contain them.

No libs, the procedures in there are part of the kernel, so
you can't get them in a user mode program.  You need to write
a kernel module (not really difficult, but too much to type
in here.  Alasandro Rubini's book is the answer, or maybe
the Kernel Hackers Guide.

--

Programmer in Chief, Free Computer Shop <http://www.free-comp-shop.com>
         ---  Food, Shelter, Source code.  ---

 
 
 

PCI Programming

Post by Peter Samuels » Tue, 24 Aug 1999 04:00:00



Quote:> No libs, the procedures in there are part of the kernel, so you can't
> get them in a user mode program.  You need to write a kernel module

Correct, but in this case, as another poster pointed out, the user-mode
program `setpci' can already do what he wants.

--
Peter Samuelson
<sampo.creighton.edu!psamuels>

 
 
 

PCI Programming

Post by Mad Mat » Fri, 27 Aug 1999 04:00:00



| Correct, but in this case, as another poster pointed out, the user-mode
| program `setpci' can already do what he wants.

Thanks for the help everyone. I got the pciutils compiled and using a
PCI config viewer under DOS I managed to knock up a script that changed
the register(s), (I noticed a few more that needed fiddling with), so
that the config space was identical under both OS'. But whenever I try
to insert the sb module, linux complains about the IRQ conflicting but
it still continues. Sound won't work, I get DMA timeouts, but the mixer
_does_ work 'cos CD's play OK. I even tried warm-booting from DOS, the
module inserts with no warnings, but I get no other benefits.

Looks like I _will_ have to write a module, I'll do it for the cards
native mode if anything, ALSA already supports a similar ESS card so
there can't be much work needed, (fingers crossed).

Thanks again,

Matt

 
 
 

1. Want DMA and PCI programming resources

I have a project that is evaluating potential OSes for a real-time
system.  I know about RT-Linux and it looks very promising for our
application.  Mainly because of the ability to use the Linux kernel for
all the non-real-time stuff (networking, telnet, PPP, GUI), and it is
FREE.  I was wondering how to access the DMA channels and PCI bus.  And,
can this be done from RT-Linux.

Does anyone know where I can find some programming resources for
accessing the DMA channels and the PCI bus?  I have two main questions:

1)  Can a user program control the DMA channels directly?  Or do you
have to do this through a device driver or the Linux kernel?
2)  What properties does the PCI bus have (besides high bandwidth)?  Can
a PCI bus device generate interrupts?  Any limitations to keep in mind?

Thanks.

2. WWW Log Analyser

3. PCI programming

4. slow tftp

5. PCI programming tools?

6. noteedit can record directly from MIDI keyboard

7. PCI programming

8. mounting RAID on new box + advfs

9. PCI Programming Question

10. PCI Programming in Linux

11. General PCI question: Does Linux permit PCI-PCI DMA Transfers

12. "Mary had a neat program...neat program...neat program...

13. Programming PCI devices