Search results

  1. mcginty

    USB Audio Frame Sync on Teensy 4.0

    Just tried 44.1kHz with 128 sample blocks and didn't notice any problems. Haven't left it running overnight, though :).
  2. mcginty

    USB Audio Frame Sync on Teensy 4.0

    Hah, well let me know how that goes as it continues to not be a sausage. I left the teensy on overnight at 8x 96kHz 16bit and no over/under runs and a relatively stable Momentary Frequency hovering around 96001 and 96002Hz. I also added some experimental code to have a "flood gate" that won't...
  3. mcginty

    USB Audio Frame Sync on Teensy 4.0

    Quick update, I'm now able to stream 8 channels of 96kHz 16-bit audio with no overruns/underruns and a pretty stable "momentary frequency." Pushed my code to my repository
  4. mcginty

    USB Audio Frame Sync on Teensy 4.0

    Sorry I missed your PR from a couple days ago! I'll check it out. FWIW, I was spending time myself with various levels of complexity in trying to fix the feedback overrun/underrun problem, and have ended up with this...
  5. mcginty

    USB Audio Frame Sync on Teensy 4.0

    Yep, I'm talking about the AUDIO_BLOCK_SAMPLES define.
  6. mcginty

    USB Audio Frame Sync on Teensy 4.0

    Is your glitching at 96kHz, or the library-standard 44.1kHz? While I observe that drift there were no underflows or overflows, so the feedback code works but could maybe be improved to not allow that slow drift (one "period" between 47990 and 48010 was on the order of 60 seconds at 48kHz). It's...
  7. mcginty

    USB Audio Frame Sync on Teensy 4.0

    Yes sorry, by "could" i meant that according to the USB specification, the Teensy has the *option* of reacting to explicit sink feedback, but is not currently. Strangely, grepping for uses of "usb_audio_sync_feedback", that variable is modified in tx_event() but never used, which indicates that...
  8. mcginty

    USB Audio Frame Sync on Teensy 4.0

    Sorry just to clarify, in your application are you using AudioInputUSB, AudioOutputUSB, or both? sync_event() is only called for AudioInputUSB, as AudioOutputUSB reports itself as an adaptive endpoint and has no associate bSynchAddress set. While I haven't fully grokked the role of an adaptive...
  9. mcginty

    USB Audio Frame Sync on Teensy 4.0

    Oops, thank you for correcting me there. Sorry, I'm very new to developing with USB. Well, the poll interval of 125µs did seem to work just fine which is good news :). I suppose it makes sense, as the buffers just get filled up as data comes in, and the async feedback mechanism as you noted is...
  10. mcginty

    USB Audio Frame Sync on Teensy 4.0

    Sorry for my late reply (I've been focusing on my PCB design this last week)! Thanks for the followup. I instrumented with a mix of Linux's ALSA debugging info and Serial4 output on the Teensy (using the debug printf solution scattered around the library). sync_event is called at a regular...
  11. mcginty

    USB Audio Frame Sync on Teensy 4.0

    edit: some corrections. I misunderstood (apologies), and the Audio Input is indeed giving feedback to the host, and you can look at ALSA's current frequency based on the feedback from the device, for example: grep "Momentary freq" /proc/asound/card1/stream0 At least for me, the momentary...
  12. mcginty

    USB Audio Frame Sync on Teensy 4.0

    If my research in https://github.com/mcginty/teensy-cores/pull/4 is correct, the reason `sync_event` is never called again is because the USB output is registered as an "adaptive" type audio endpoint, rather than "asynchronous" - the latter being what uses the feedback mechanism. EDIT: Adaptive...
  13. mcginty

    USB interface for multi channel outputs, not just stereo

    @h4yn0nnym0u5e, I've started the arduous work of reading through the USB Audio Spec and comparing it to the descriptor as well as documenting more: https://github.com/mcginty/teensy-cores/pull/4 Interestingly, while the input side of the Teensy's USB descriptor is an Asynchronous Isochronous...
  14. mcginty

    USB interface for multi channel outputs, not just stereo

    Awesome! This is really coming together. I'll review the PRs when I'm back home later today @h4yn0nnym0u5e! That makes sense @acumartini, and very likely where my mixer's code is going to end up too to minimize latency. Thanks for the code samples, this makes sense. And also going back to your...
  15. mcginty

    USB interface for multi channel outputs, not just stereo

    Alrighty, I've refactored the work and now have the cores fork at https://github.com/mcginty/teensy-cores. I'll continue to update it with changes as we go. @h4yn0nnym0u5e, if you're interested in doing some performance research and optimization that would be most most welcome! I'm sure there...
  16. mcginty

    USB interface for multi channel outputs, not just stereo

    Excellent work @acumartini! Apologies for my quietness the last week, I'm back on working on these software changes and my schematics for the mixer this week. I'll start by refactoring these changes into an easy-to-consume fork of the "cores" repository to open up contributions and...
  17. mcginty

    USB interface for multi channel outputs, not just stereo

    Cool, give me a couple days to finish up my current experimentation and then I'll be re-canonicalizing it to make it easier to contribute to and see clean diffs for. I just posted this code as it lay on my FS (hacked together for my temporary convenience).
  18. mcginty

    USB interface for multi channel outputs, not just stereo

    https://github.com/mcginty/teensy4-studio-audio <- the repo is in the code block. Feel free to share your PlatformIO config, would be interesting to make this usable in that environment.
  19. mcginty

    USB interface for multi channel outputs, not just stereo

    Here's what I've got so far, again just with USB multichannel *input* working so far, as well as code in main.cpp to route each of the stereo pairs to an output jack on the CS42448. If it wasn't obvious, this is not cleaned up code and more like a "playground", which I made more obvious by...
  20. mcginty

    USB interface for multi channel outputs, not just stereo

    Hi all! I just noticed this thread and thought I'd post - I've been modifying the Teensy 4 core library to support 8 in/8 out USB Audio for an audio project I just started. It currently works as far as my computer being able to send 8-channel audio to the Teensy, and the Teensy then splitting...
Back
Top