Linux Sound subsystem development
 help / color / mirror / Atom feed
* Driver Writer's Questions
@ 1999-03-16 22:57 Bob Miller
  1999-03-17 10:38 ` Thomas Sailer
  1999-03-17 14:33 ` Bob Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Bob Miller @ 1999-03-16 22:57 UTC (permalink / raw)
  To: linux-sound

Hi.  I am trying to write a Linux sound driver.  I have some questions
that I hope someone here can answer.

1. (the big question) This device requires a single DMA buffer of up
   to 8 Kb in main memory.  It reads/writes the buffer circularly.  It
   can't chain buffers.  Can I use the OSS DMA routines to set that
   up somehow (how?), or do I have to write a non-OSS driver?
   What does this imply for mmap?
   
2. This device is capable of telling how many samples it has
   read/written, with an accuracy of 1 sample.  I'd like to export
   that via the SNDCTL_DSP_GET{I,O}PTR, ioctls, but I can't see how
   my driver can get control on those ioctls.

3. This device has memory-mapped registers.  I want to write a probe
   routine that can verify that the device is there at the address
   it's supposed to be.  Is there a Linux routine to "read memory and
   trap any fault"?

4. The mixer doesn't have a capability that corresponds to
   SOUND_MIXER_VOLUME.  If I don't implement SOUND_MIXER_VOLUME, will
   I be incompatible with 99% of the apps?  If I have to, I can fake
   it -- maintain a SW volume setting and merge it into the level
   I send to all the other faders...

That's enough questions for now.  Hopefully, these are easy for
someone who's familiar with the Linux sound architecture.

Thanks for any help.

					K<bob>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Driver Writer's Questions
  1999-03-16 22:57 Driver Writer's Questions Bob Miller
@ 1999-03-17 10:38 ` Thomas Sailer
  1999-03-17 14:33 ` Bob Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Sailer @ 1999-03-17 10:38 UTC (permalink / raw)
  To: linux-sound

Bob Miller wrote:
> 1. (the big question) This device requires a single DMA buffer of up
>    to 8 Kb in main memory.  It reads/writes the buffer circularly.  It
>    can't chain buffers.  Can I use the OSS DMA routines to set that
>    up somehow (how?), or do I have to write a non-OSS driver?

If the device is not ISA, I wouldn't bother fitting it into the
OSS framework, a stand alone driver (like I did for some
PCI cards) is easier to do and more maitainable.

>    What does this imply for mmap?

That the DMA buffer mappable is 8k max. The mmap interface is
deprecated anyway. I've tried once to emulate the mmap interface
on top of read/write, but it never worked well, if you don't want
huge latencies.

> 2. This device is capable of telling how many samples it has
>    read/written, with an accuracy of 1 sample.  I'd like to export
>    that via the SNDCTL_DSP_GET{I,O}PTR, ioctls, but I can't see how
>    my driver can get control on those ioctls.

Take a look at eg. the es1370 driver

> 4. The mixer doesn't have a capability that corresponds to
>    SOUND_MIXER_VOLUME.  If I don't implement SOUND_MIXER_VOLUME, will
>    I be incompatible with 99% of the apps?  If I have to, I can fake

Unlikely

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Driver Writer's Questions
  1999-03-16 22:57 Driver Writer's Questions Bob Miller
  1999-03-17 10:38 ` Thomas Sailer
@ 1999-03-17 14:33 ` Bob Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Bob Miller @ 1999-03-17 14:33 UTC (permalink / raw)
  To: linux-sound

I asked:

> > 1. (the big question) This device requires a single DMA buffer of up
> >    to 8 Kb in main memory.  It reads/writes the buffer circularly.  It
> >    can't chain buffers.  Can I use the OSS DMA routines to set that
> >    up somehow (how?), or do I have to write a non-OSS driver?

Thomas Sailer replied:

> If the device is not ISA, I wouldn't bother fitting it into the
> OSS framework, a stand alone driver (like I did for some
> PCI cards) is easier to do and more maitainable.

Thanks a lot for answering!

> > 2. This device is capable of telling how many samples it has
> >    read/written, with an accuracy of 1 sample.  I'd like to export
> >    that via the SNDCTL_DSP_GET{I,O}PTR, ioctls, but I can't see how
> >    my driver can get control on those ioctls.

> Take a look at eg. the es1370 driver

Is the es1370 driver non-OSS, then?  Would it be a good model for
how to structure a non-OSS driver?  My device also has no synth...

					K<bob>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-03-17 14:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-03-16 22:57 Driver Writer's Questions Bob Miller
1999-03-17 10:38 ` Thomas Sailer
1999-03-17 14:33 ` Bob Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox