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...
Type: Posts; User: alex6679
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...
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.
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...
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....
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...
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.
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...
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...
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...
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...
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...
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...
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...
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...
Thanks for sharing the result.
I could only test the algorithm with my hardware and until now nobody else posted results of some tests. So there is not much empirical data. I assumed that
the results are much better than with...
Good, that you were able to fix the problem.
That does really not look good. Can you have a look at the signal on the Teensy without resampling?
I only had a brief look at you code, but I think replacing the AsyncAudioInputSPDIF3 object with...
Hi,
you don't need to change the sample freuqency of the library. From 48kHz to 44.1kHz is no problem.
The the resampling algorithm, that I implemented, is quite simple. It is described here:...
@Bill Glass: I was also pleasantly surprised about the low distortion and I am curious about your results. Two things that you need to take into account: When the resampler is initialized, it uses...
That's difficult to answer. Some months back, I did some tests in which I want to get a feeling about the amount of jitter of the Teensy spdif-output.
I can share the results although they don't...
Hi,
I don't know/own an audio board, but I can tell you how I interface the Teensy with an optical cable.
I use this optical receiver:
https://www.cliffuk.co.uk/products/optical/FCR684205R.pdf
On...
Great. I'm glad to hear that.
@JayShoe: Unfortunately I have no experience with the TDM signals and the ESP32. I use 8 channel TDM to exchange sound data between four Teensy 4. I use SAI2 for...
I don't see a reason why SAI1 in master mode and SAI2 in slave mode wouldn't work together. I use them together the other way around: SAI2 in master mode and SAI1 in slave mode and it works.
I have no experience with the audioshield, but you could search or make an example at which a sine wave is generated on the Teensy and send to the audioshield. If that works, you can replace the sine...
I just tested example 4 and 6. They both worked here. Here is the result of example 6:
25912
At example 6 you can ignore the 'glitches' within the first few seconds. They occure since the incoming...
At example 6 only one channel of the input is connected to the plotter. That's the reason for the missing data.
I'll try to reproduce the other problem.
Nice, we expected of course some distortion. Have you also tried examples 4 and 6 yet? Maybe they already work.
I just saw that yesterday I reset the bit clock divider back to the value for 32bit samples. I fixed that (again).
Can you please give it a last try. Tomorrow I'll be back home and if my fix is not...
I don't know what you planned to test, but you can connect up to 8 channels to the plotter.
Regarding the shifting the bits: The input works for at SAI1 and I just used the same configuration at...
Ok I might found something: At SAI2 the receiver needs to run in sync with the transmitter (at SAI1 its the other way around). I configured the receiver bit clock for 16bit, but it uses the bit clock...
I should have explained my commit more clearly: It only changed the behavior of example 5, where the Teensy is master. I hope that it works now.
I would like to first get example 5 running (smallest...
I forgot to adapt the bit clock divider for example5. But I just fixed that and chances are good that it works now.
Example 4: If the plotter shows something, then at least the isr of SAI2 is...
I committed 3 examples for SAI2:
example4: Teensy is slave
example5: Teensy is master
example6: Teensy is slave + resampling
All I can say is that they compile. Let me know if they also work.
...
I forgot to commit that I removed that typedef in async_inputs.h. It should work now if you get the latest files from teensy-4-async-inputs.
I was only asking JoyShoe for the Teensyduino version because of the compiler error that he postet. The compiler is complaining about the interface of the Resampler class. That interface changed some...
I am glad that it works now for both of you. What were the problems? Did you have to change something in the example code? I would add all useful information to the documentation of the examples.
...
Great, I am glad that it works now.
I think it is not that simple. Currently SAI1 is clocked bei Teensys PLL4 and if we us SAI2 in slave mode it will be clocked by the ESP32. Since the clocks of...
Since you both have problems with the examples, I will double check tomorrow evening if I messed something up when I committed the files. Although I can't imagine that I committed the wrong files. I...
Sorry, I completely forgot about that. I use Visual Studio Code + VisualTeensy to compile my projects. That's the reason why I have main.cpp files instead of .ino files. As SomeoneFromGermany...
Which pins do you use at the Teensy? With my code it should be IN1, BCLK1, LRCLK1. I am just asking because at one point you used AudioInputI2SQuad and I am wondering if you used connected the second...
Maybe your speaker was playing the signal of your screenshot. The signal is just very quite. Anyway, there is a problem. Can you remove the audioshield for now and just concentrate on receiving the...
Qick update: I had a closer look at the signal in case the Teensy is I2S master. Indeed there is still problem, when the ESP32 is I2S slave
25827
I think I also got a working example with the Teensy as I2S master: https://github.com/alex6679/ESP32_I2S_Teensy4/tree/main/example2
I only change a single line of code at the ESP32:
static...
I just committed a first working example of an I2S stream from the ESP32 to the Teensy 4:
https://github.com/alex6679/ESP32_I2S_Teensy4/tree/main/example1
ESP32 side:
I used the...
Yes, the code above is part of the I2S config on the Teensy, that I used. The problem is that it is part of a quite large project. Posting the complete project would not help much, since the project...
Ok, I got your example code on the ESP32 working. I googled for the esp32_bt_music_receiver.h header and found this bluetooth receiver class: https://github.com/dvxlab/esp32_bt_music_receiver. So I...
I don't think that the problem is caused by the bit numbering. I use MSB and it works. Here is my I2S configuration on the ESP32
i2s_config_t i2s_config = {
.mode = I2S_MODE_MASTER |...
I just noticed that you use AudioInputI2SQuad. Do you try to receive 4 audio channels from the ESP32?
Hi, maybe I can help you with your problem. I have a working setup with an ESP32 as bluetooth receiver and a T4 that receives the sound from the ESP32 via I2S. I don't have an audio shield and right...