All of lore.kernel.org
 help / color / mirror / Atom feed
* Scatter-Gather buffer allocation before running on HDSP-MADI ?
@ 2003-10-04 16:15 Winfried Ritsch
  2003-10-05 19:01 ` Jaroslav Kysela
  0 siblings, 1 reply; 12+ messages in thread
From: Winfried Ritsch @ 2003-10-04 16:15 UTC (permalink / raw)
  To: alsa-devel


Hello !

(A question from an newbie-developer to make it perfect ;-)

I am writing an ALSA-lowleveldriver for the RME HDSP-MADI card.
(which have 64Audion in and out and an 128in64(= 8192Fader) Mixer
see http://www.rme-audio.de/hdsp/hdspmadi.htm ) Coding is quite
complete but I have trouble with the memory management.

The Card uses ScatterGather Buffer, each channel 64kB and this
has to be asigned (to be safe) before activation, so I want
to allocate SGbuffer (64+64)*64*1024=8388608 in 4k-blocks.

I do a 

snd_pcm_lib_preallocate_pci_pages_for_all(hdspm->pci, pcm,8388608l,8388608l)

after making the pcm_device.

Here the questions: 

1) How can I get the sgbuf pointer ? 

... since in the streams runtime is not set and therefore (besides the
Documentation says is (snd_pcm_sgbuf_t*)substream->dma_private which I
couldnt find)

 sgbuf = (snd_pcm_sgbuf_t*)substream->runtime->dma_private;

is not assigned.
 
but when I activate the card (for MIDI for example) there must be
memory asigned und I think doing it in hw_params is to late.

2) If it is bound to substream is always the same substream the
capture or playback or are the assigned dynamically on calling ?


mfg winfried ritsch


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

end of thread, other threads:[~2003-10-10 15:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-04 16:15 Scatter-Gather buffer allocation before running on HDSP-MADI ? Winfried Ritsch
2003-10-05 19:01 ` Jaroslav Kysela
2003-10-06 13:50   ` Takashi Iwai
2003-10-06 17:19     ` ritsch
2003-10-06 17:38       ` Takashi Iwai
2003-10-07 16:25         ` Winfried Ritsch
2003-10-07 16:43           ` Takashi Iwai
     [not found]             ` <1065776616.3f8675e8b202e@iem.at>
2003-10-10 11:39               ` Takashi Iwai
2003-10-10 11:57                 ` Jaroslav Kysela
2003-10-10 12:06                   ` Takashi Iwai
2003-10-10 12:15                     ` Jaroslav Kysela
2003-10-10 15:23                     ` Winfried Ritsch

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.