[wdmaudiodev] Re: Modified kernel streaming example

  • From: User for realtime audio <audiodev@xxxxxxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 17 Dec 2003 12:20:55 +0100

Well, still suffering the same problem I have found out something new:

It seems that my problem is correlated to the order of the buffers being processed
by the driver:
If using 8 Buffers to flush the order to write the buffers should be 0..7 according to the
first write-accesses to the driver. And that should be the order of the signalled events.


Whenever using buffers with critical sizes the order in which the buffer-writes have been
completed are kind of arbitrary, e.g. 0 5 3 7 0 2 5 6.


In case of those buffersizes that function propperly, the order is as expected 0..7.
Thus it seems that the driver somehow writes the buffers to the hardware in a wrong order, thus my question:


Do I have to use a field in KSSTREAM_HEADER, e.g. field PresentationTime, to tell the driver which buffer to process in what order?
As from the directKS example it seemed that there is no need to specify any value (numerator = denominator = 1).


I appreciate any comments,
best regards, Hauke



User for realtime audio wrote:



Silvio Baccari wrote:

Your driver copy then input on output?


Yes, simple talkthrough but I copy data in host and pass it back to driver. Roughly speaking I simply read a
buffer from device, copy buffer and write back the copied buffer to driver.



Maybe that I have to use the KSALLOCATOR_FRAMING/KSALLOCATOR_FRAMINGEX
mechanisms to tell the driver how long the buffers to process will be?
If so, how do I combine CONNECTION_HANDLE (used in ksCreateAllocator ) with handle for PIN (ksCreatePin)?
Best Regards,
Hauke




User for realtime audio wrote:

Hello Community,
I have modified the kernel streaming example (directKS.zip) to create a directKS host for audio processing
(input -> output) with low latency. I am using three different soundcards and have observed different
behaviors. One is however very strange:


I am using Win XP, 2 GHz PC, flushing 2 buffers with variable length for reading/writing in ONE thread,
using the EGO SYS U2A the result depends very much on the selected buffersize:
At 32 kHz samplerate, using buffersizes below 512 does not work (which is what I actually expected) but also
setting the size to more than 1024 also fails. In this case the read-process for buffer1 always immediately returns although
only in the very first case the buffer is really filled with audio data. After that the buffers contain the same data always. This
results in playing back the same buffer always.
The read-process terminates whenever coming to the position in the software, that is I get multiple reads while only one write thread
is indicated to being completed.


The same software works for SoundMax for any buffersize and for Terratec EWS 88 MT (even though I can not get any sound from
that card but at least write and read are completed one after another). Also talkthrough works fine with 512 <= buffersize <= 1024 for U2A.


Is there a way to obtain a range for supported range of buffersizes (as for samplingrates ) in directKS API?
Has anybody got this behavior before and found a solution?


Best Regards,
Hauke


******************


WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx


URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/




******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx


URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/






******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx


URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/






******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/

Other related posts: