WaveRT Pull mode driver for USB audio device RRS feed

  • Question

  • Dears,

          1. Now I'm working on supporting WaveRT Pull Mode in my USB audio driver, but I'm not clear how to update the buffer and always get "pop" noiese (data drop).

          2. Per my understanding there is no HW DMA can be used to mapped user-mode for USB audio device, because USB audio device is a device class of USB, its driver lays a high level stack over USB bus driver, we only send USB Control/ISO IRP to lower driver stack to load USB audio device and to do capture/render. So I allocate continuous virtual memory in kernel space (AllocatePagesForMdl) and map it to user space. Then miniport driver writes/reads audio data to/from USB (every time 10 ms ISO packets size data). 
          3. For USB audio device, the NotificationCount value is 2, so it thought the cyclic buffer is a Ping-Pang buffer. I just divide the cyclic buffer as 2 equal part, and set the notification event while the elapsed time equals/is larger than half cyclic buffer time. I'm not whether it's correct way. If it's a wrong way, could you share any experience about notifying audio engine while it's exchanging audio data with USB ISO pipe under WaveRT Pull Mode (Event Driver Mode)driver?

    Steven Li

    Wednesday, October 17, 2018 3:07 PM


  • Why are you doing this?  WaveRT is designed for hardware that has a shared circular buffer.  USB doesn't work that way, so WaveRT is the wrong model.

    Why are you writing your own USB audio driver in the first place?  The Microsoft standard usbaudio.sys driver has had literally hundreds of man-years of research, development, debugging, and real-world use over the past 20 years.  You aren't going to be able to do any better.

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Wednesday, October 17, 2018 6:33 PM