Search results

  1. A

    USB interface for multi channel outputs, not just stereo

    @AntiLoop Thank you very much for testing. Out of curiosity: Which operating system is running on your usb host?
  2. A

    USB interface for multi channel outputs, not just stereo

    Just merged your pull request. Thanks for writing the extensive documentation.
  3. A

    USB interface for multi channel outputs, not just stereo

    @h4yn0nnym0u5e and @rtms: Thanks for finding out what the problem was. I added the info about the Arduino IDE version to the readme file for now. I think I will further extend the readme file next weekend since it's there is no information about how to use/integrate h4yn0nnym0u5e's contriburions...
  4. A

    USB interface for multi channel outputs, not just stereo

    @h4yn0nnym0u5e: I am happy with the code for now, but I am open for suggestions for improvement. Currently, I'm not aware of any issues. @Paul: In case you are interested in merging our changes into the T4 core/ Audio master: Is there anything that we should improve or change?
  5. A

    USB interface for multi channel outputs, not just stereo

    Ok, maybe I solved the problem: I removed the midi interface again from the audio interface collection again. (Just as in the original implementation). But I kept the interface order as descripted in the usb audio specification. When I then tested the implementation in Windows, the Midi...
  6. A

    USB interface for multi channel outputs, not just stereo

    I downloaded MidiEditor and I can reproduce the problem: with the new usb audio interface there is no midi device showing up in MidiEditor. Isn't UAC2 much older than Midi v2.0? I don't think the UAC2 standard demands Midi v2.0. Let's see what I can find out.
  7. A

    USB interface for multi channel outputs, not just stereo

    Thank you for testing. I had a closer look at the output of USBTreeView you posted and it looks plausible to me, since I moved the midi stuff down after the usb audio streaming descriptors in usb_desc.c. The new IAD descriptor in line 292 of your USBTreeView output now lists 4 interfaces...
  8. A

    USB interface for multi channel outputs, not just stereo

    Thank you for offering your help. I changed the interface numbers now for the interface combinations USB_MIDI_AUDIO_SERIAL, USB_MIDI16_AUDIO_SERIAL and USB_EVERYTHING. However, USB_EVERYTHING doesn't not work for Teensy 4 and I was not able to test it. USB_MIDI_AUDIO_SERIAL and...
  9. A

    USB interface for multi channel outputs, not just stereo

    The bug I fixed was in the AudioInputUsb class. The first time usb_audio_receive_callback was called, the buffer audio blocks were not initialized but the blocks were used anyway and data was just copied to wherever the data pointer was pointing. I am wondering if you even used the usb audio...
  10. A

    USB interface for multi channel outputs, not just stereo

    On Sunday I committed some changes. Did you already use this code? Can you post a short example that I can use to reproduce the problem?
  11. A

    USB interface for multi channel outputs, not just stereo

    @toyosm: Thank you for testing the interface. I'm glad that it also works with on a Mac. @h4yn0nnym0u5e: I think there was a missunderstanding. It was already quite late when I wrote the post and I didn't want to go into the details. The issue I want to improve/solve is: At one point I got the...
  12. A

    USB interface for multi channel outputs, not just stereo

    Ok, after I quite excessively tested the new version, I pushed the changes. Even if I mostly only moved code around, I was worried that I messed something up. Indeed it did not work at the beginning and I found a bug that was not related to my changes, but was in the code for probably quite some...
  13. A

    USB interface for multi channel outputs, not just stereo

    @h4yn0nnym0u5e: This are good news. Thanks also for fixing the include of AudioStream.h in usb_desc.h. I am currently testing some changes I made to the AudioInputUSB and AudioOutputUSB (not pushed yet). To understand my changes some background info is needed: In my projects I don't use the...
  14. A

    USB interface for multi channel outputs, not just stereo

    Good to hear that the usb interface works also with 8 channel 96kHz. Regarding a pull request: I also have some things that I still need to clean up first (besides AudioData.h). When I find some time the next days I'll have a look at the issues. Maybe I'll need to come back to you for some advice.
  15. A

    USB interface for multi channel outputs, not just stereo

    You would need use Teensyduino 1.59 and unfortunately you have to change your Teensy 4 core file in cores/Teensy4 for that. (Maybe first make a copy of that folder.) Copy the content of https://github.com/alex6679/teensy-4-usbAudio/tree/main/changedCorefiles into your core file folder. Then you...
  16. A

    USB interface for multi channel outputs, not just stereo

    I don't know. There are several things that could cause problems. E.g. can your IPhone act as usb host? If yes, then I am still not sure if my code will work with an IPhone. I used my Windows 11 notebook for testing during the develpement and at a first test with an Ubuntu PC there were of...
  17. A

    AudioInputSPDIF3 to a SPDIF output

    Hi, I don't think that it is hopeless and if I remember correctly somebody did that in this thread: https://forum.pjrc.com/index.php?threads/modify-audio-on-the-fly-can-do.70814/ Also, the reference manual describes how to use the spdif input to clock other peripherals like the spdif output...
  18. A

    Linux Usb audio issue with Teensy 4.1

    Thanks, I will try that out.
  19. A

    Linux Usb audio issue with Teensy 4.1

    There was no specific reason for 0x18B5. I just changed it, because I wanted Windows to update its information about the Teensy. But I will follow h4yn0nnym0u5e's advice and change 'usb_string_serial_number' the next time I need to do that. If you want the original product id, you can either set...
  20. A

    Linux Usb audio issue with Teensy 4.1

    I also can only imagine that the cause is the changed PRODUCT_ID in usb_desc.h. In Windows I have to change the Id everytime I change the usb descriptors. Otherwise Windows seems to use some cached information. Anyway, I committed to the original Id again.
  21. A

    Linux Usb audio issue with Teensy 4.1

    I am glad that it works now. I have to admit I wasn't able to fully test the code. Even with the original usb input and output I wasn't able to e.g. generate a simple waveform that I can capture in my Ubuntu. In the end, I decided that the reason is probably related to my Ubuntu and not to the...
  22. A

    Linux Usb audio issue with Teensy 4.1

    That log output helped. I changed some things in the usb descriptors and now the my code provides similar results compared to the original code in the dmesg file. That means the 'bogus bTerminalLink' errors are solved and the Teensy is listed as device when I run 'arecord -l' or also 'aplay -l'...
  23. A

    Linux Usb audio issue with Teensy 4.1

    I was a little bit impatient yesterday and already downloaded an Ubuntu image (kernel 6.5 ubuntu 22.04). I thought chances are high that it is not so critical which Ubuntu version I use and indeed the usb input and output do not work. I had a look into the log file /var/log/dmesg and found two...
  24. A

    Linux Usb audio issue with Teensy 4.1

    It would have been too good if my implementation had just worked on Linux as well. Which Ubuntu version do you have? Maybe I can reproduce the problem in a virtual machine. Changing my usb in- and output to 48kHz is quite simple. Just change AUDIO_SAMPLE_RATE_EXACT and AUDIO_SAMPLE_RATE_I in...
  25. A

    Linux Usb audio issue with Teensy 4.1

    Hi, at the screenshot it looks like you encounter buffer overruns on the the teensy. That means the Teensy generates audio samples too fast, the buffer of the usb output on the Teensy fills up until some samples need to be discarded. If that is true, then there is not much you can do about it...
  26. A

    USB interface for multi channel outputs, not just stereo

    Sure, I expressed myself unclearly. I was just thinking about how we could prepare the code so that there is the chance that Paul accepts a pull request. I have to admit, I have never used the Design Tool, but I would give it a try and test the changes you made to the USB object.
  27. A

    USB interface for multi channel outputs, not just stereo

    Regarding a pull request: I am not sure how to proceed. I changed a lot compared to the original code like the update to the usb2 specification. Unfortunatley it is not possible for me to test it with many different hosts and it would therefore be very risky to merge it into the main branch...
  28. A

    USB interface for multi channel outputs, not just stereo

    I tested you suggestion: There is now the variable 'async' in line 789 in usb_audio.cpp. (I will change that later, but for now for some quick tests it should be fine). If async is set to false, the usb audio output sends always the expect number of samples. (E.g. 9 times 44 samples and then...
  29. A

    USB interface for multi channel outputs, not just stereo

    I have to admit, I need to clean that part of my implementation up. My focus was on the usb input and I only adapted the usb output, because my changes of course broke the original two channel code. When I have some time within the next days, I will try out your suggestion. Maybe we should also...
  30. A

    USB interface for multi channel outputs, not just stereo

    I tested the usb input now also with 48kHz and I fixed a small bug (unrelated to the sampling frequency), that caused sometimes a nearly empty buffer at the beginning of a stream. As far as I can tell, the usb input also works for 48kHz.
  31. A

    USB interface for multi channel outputs, not just stereo

    I didn't test different sampling frequencies yet, but I want to try out 48kHz in the next days. I tested different bIntervals by just changing the value AUDIO_POLLING_INTERVAL_480 in usb_desk.h for testing purposes (Manually setting the value is normally not necessary). Or also by setting the...
  32. A

    USB interface for multi channel outputs, not just stereo

    Since I found some time, I want to describe my changes to the usb input, especiall how I changed the feedback: - I don't only use the raw number of samples that are currently stored in the buffer for the feedback computation. Instead I also measure the time of the last packet of samples that...
  33. A

    USB interface for multi channel outputs, not just stereo

    Hi, I finally also gave it try and implemented a multichannel version of the usb in- and output. Escpecially the usb input seems to work on my Windows 11 notebook nicely, but I would be glad if somebody else could also test my implementation. If somebody is interested, the code can be found...
  34. A

    Modify audio on the fly, can do?

    Ah sorry. I missed the information that the sample rate of the input sample rate will always be 44.1kHz.
  35. A

    Modify audio on the fly, can do?

    Hi, just a short remark: If you manage to avoid the resampling and use the incoming clock for the spdif output, you might still encounter problems. Filters and effects normally depend on the sampling rate of the signal and at the algorithms and filters of the audio library it is assumed the the...
  36. A

    Teensy 4.1 Audio Board and ESP32 I2S Audio

    Hi, at the example https://github.com/JayShoe/esp32_T4_bt_music_receiver of JayShoe the Teensy input I2S slave and the ESP32 is master. I also think that the ESP32 does something to the clock lines, when it is paused. I think it would not be a problem if the bit and word clock of the ESP32...
  37. A

    New project to verify an asrc using polynomial approximations for its coefficients

    Right, the large look up table that contains the filter coefficients, is probably the largest drawback of my implementation. Anyway, good that you were abe to perform all your evaluations in the end.
  38. A

    New project to verify an asrc using polynomial approximations for its coefficients

    Hi, I finally found some time to have a look at the processor usage. The problem is that the processor usage depends on input frequency. A high input frequency needs a longer filter to achieve the requested anti-aliasing attenuation. Therefore I tested different input frequencies. Then there are...
  39. A

    New project to verify an asrc using polynomial approximations for its coefficients

    Hi, Not for the spdif input. But it can be useful for the multichannel i2s slave inputs. I implemented a template class that makes it relatively easy to add the resampling to an arbitrary input. It also works for the multichannel inputs: https://github.com/alex6679/teensy-4-async-inputs The...
  40. A

    New project to verify an asrc using polynomial approximations for its coefficients

    I am sorry, but at the moment I don't have time to dive deep into your code. However, I had a brief look at your code. So let's see I a can help you. I assume you need to call 'fillFIFOstereo' and 'SrcblockStereoFIFO' if you want to resample data and currently you are polling in 'loop' if there...
  41. A

    New project to verify an asrc using polynomial approximations for its coefficients

    I think the most common sample rates are 44.1kHz and 48kHz and therefore fsin >= fsout most of the time. Yes, you can call your src algorithm in 'update' of your class.
  42. A

    New project to verify an asrc using polynomial approximations for its coefficients

    The data from spdif input is written into spdif_rx_buffer via dma transfer. daddr is just the address at which the dma transfer currently writes data. It is not calculated. The dma transfer calls the isr after the first half of spdif_rx_buffer is filled and after the complete array is filled...
  43. A

    New project to verify an asrc using polynomial approximations for its coefficients

    Glad that you didn't give up. That is the approach I had in mind. I haven't checked the details, but as far as I understand your code, you fill a buffer in the isr method. The buffer is only AUDIO_BLOCK_SAMPLES long and you would need to make it much larger. If the input frequency is for example...
  44. A

    Teensy 4 SPDIF input + ASRC

    The other improvements concern the distortion and noise of the resampling algorithm. At first I briefly want describe how I measured THD+N: I wasn't sure about which notch filter to use in order to remove the fundamental. I therefore subtracted a sine wave in time domain from the result signal...
  45. A

    Teensy 4 SPDIF input + ASRC

    As mentioned above, I spent some in December to evaluate the algorithms of the AsyncAudioInputSPDIF3. I was able to improve several points and finally found some time to share my results here. The buffer, in which incoming samples are stored, is constantly monitored and the step width at which...
  46. A

    New project to verify an asrc using polynomial approximations for its coefficients

    I guess it doesn't make sense to connect AudioInputSPDIF3 to anything if it is not the master. But if it is in master mode, you could for example record audio data. If you want to resample data from the spdif input, then I think the best way to test your asrc code is to write an own audio...
  47. A

    New project to verify an asrc using polynomial approximations for its coefficients

    Hi, Unfortunately that won't work. There is alway only 1 block that clocks the audio pipeline (triggers the call of the update function of all blocks). Depending on the order of the constructors in your program, it will either be the spdif3_1 or i2s1. In any case at the block that doesn't...
  48. A

    Teensy 4 SPDIF input + ASRC

    Hi, yes, there are really 20481 coefficients (32bit float). Why not? If your algorithm is e. g. not slower and doesn't need more memory, but at the same time has lower distortion, then I would replace my implementation with yours if you share your code- at least in my projects. Luckily, it is...
  49. A

    Teensy 4 SPDIF input + ASRC

    You are right, two things are happening: 1. The resampling of the signal. 2. Every 128 samples/ at each call of the update function, the number of samples in the input buffer is monitored (the 'buffered time' that you see in your serial monitor output.). Based on this buffered time, the step...
  50. A

    Teensy 4 SPDIF input + ASRC

    Thanks for sharing the result.
Back
Top