That table has invalid control values in it - anything above 0x7F would be interpreted as a command byte. However, the MIDI library prevents you sending those values, so your volume setting will actually send a value of 0x7F.
I suggest you try...
I suspect not.
I'm guessing slightly here, but it appears that because FreeRTOS doesn't have a loop(), the yield and EventResponder::runFromInterrupt behaviour are emulated by creating two tasks. If you smash the record of the task handle, the...
I think you’re probably right, but it’s clearly causing issues when used with pre-emptive multitasking.
The specific issue I had was with yield calls deep inside the SdFat library interacting with my EventResponder response functions … which...
As FreeRTOS has already overridden yield(), that’s not going to work, just cause a linker error…
I’m not a big fan of all the yield calls buried in the various libraries. I believe the reasoning is that they ensure some (rather specific) set of...
I wonder if they're sanding the labelling off 1.8V parts? That would probably cause issues, which might take a while to show up. It doesn't really matter - I'd be contacting DigiKey for a refund, they really shouldn't be shipping sanded-off chips...
Quick test - seems the p#127 code - two T_4.1's 16 and 16+16 PSRAM installed by @KenHahn:
EXTMEM Memory Test, 32 MByte (16+16)
CCM_CBCMR=95AE8304 (105.6 MHz)
Pre-fetch is disabled
...
test ran for 145.28 seconds
All memory tests passed :)...
I am running your test in post #20 on a setup with an 8MB PSRAM and the same Flash as you have.
It has been running for 45 minutes so far without any issue. I'll let it run for awhile to see if anything shows up.
The PSRAM that Adafruit...
But does the part actually have any marking on it? Do you have any more to check, since it seems the ones you’re testing have been repeatedly soldered and de-soldered?
Your “basic connection test” only tells you about the status at boot time...
I've come back to this to see if I can make things work as expected. So far, I've failed miserably :mad:
I've adapted the code from post #45 slightly (you have to do the pinMode() call first, then the Alt-mode to output the S/PDIF clock). I'm...
You haven't yet said which Teensyduino version you're using - this is quite important.
Also, looking at your image of the parts you've fitted, the PSRAM part number is unreadable, so much so that it appears to have been deliberately removed. I...
For the 8MB parts, the datasheet says:
For the ISSI 16MB parts, we're told:
So the stress test needs to ensure that there are plenty of burst reads or writes which could cross the 1024-byte page boundaries. The original PSRAM test doesn't...
I would say not, then. Until there's wider availability of the 16MB parts so @jmarsh can test his PR#708, the prefetch optimisation will have to wait for another Teensyduino cycle.
Yes indeed. My PR on your PR shows the register settings needed to keep the ISSI part happy, but they’re macro-controlled rather than based on detecting the part at run-time, which would be the correct solution. I was aiming to let you make those...
After a number of frustrating delays, these 16MB PSRAM parts are finally available. The chip mfr had to do a chip run to complete the order which took longer than they originally planned.
ProtoSupplies.com will add these as additional order...
Nope, the 16MB ones are IS66WVS16M8FBLL-104NLI - I don't think any other vendor makes a comparable part.
Good point. If it is, then the QPI bus speed has been increased compared to 1.59, which ought to work but ... maybe not?
I found that the "clear all blocks" code was causing lasting problems with small block sizes, because the ring buffer could never accumulate enough blocks to fill a USB packet - it kept failing the !USBAudioOutInterface::isBlockReady(tBIdx,0)...
This page may also be helpful in describing what goes on with RPNs and NRPNs.
MIDI control change commands start with a hex value Bn, where n is MIDI channel minus one; they’re followed by a control number in the range 00 to 7F; then a control...
Pin 8 to 5V is fine, pin 6 can only pull down (open collector output) and the 470R resistor pulls the Teensy input up to a safe 3V3.
There’s a note on the page you linked that some opto-isolators need pin 7 pulled down to work properly - see...
I got kinda intrigued, so had a look at the “small blocks” issue. This has resulted in a PR which I think fixes it. I’ve tested 44k/2ch/16-samples, plus 44/8/16 and 96/8/16, output and input (limited to first two channels). By no means...
I forgot, you already pointed out a suspicious section of the code. I’ll look into it over the weekend, and I’m sure I’ll also find some time to fix the spelling error. 😅
I’d think 64-poly is a bit of a stretch, but you never know until you try! I’ve benchmarked up to 16 open files at once, and with a reasonable read size (chunks of 4kB at a time) and a decent SD card, like a fast SanDisk, you can get around...
There’s a chunk of this thread starting here which worked out OK for effectively doing a preload using existing library capabilities.
In essence, you set the playback speed to 0.0, play the file, then when you’re ready for audio to start, change...
I just knew you'd be on top of the feedback mechanism!
I have a suspicion that the issue with small block sizes is not the block count in the ring buffer, but that very small blocks are smaller than the USB packet sizes. Your block count...
Hi @alex6679. Yes, absolutely appreciate it's not an easy problem!
I think we're all pretty much agreeing with one another about (a) the clocks will never exactly match, and (b) there are issues with the stock implementation of asynchronous...
Well, knowing how the original code works is a benchmark, though any deep discussion might be better reserved for a thread of its own, rather than a thread that's specifically addressing improvements...
I agree, the IntervalTimer thing is a...
No it won’t. There are mechanisms in place to feed back the drift amount to the host, so it accommodates the mismatch in clock speeds. This is what Paul’s original code failed to do, and @alex6679 has managed to accomplish.
Any two clocks are...
OK, so in the Interests Of Science (or at least, vaguely reproducible results), I've done a bit of testing.
Teensy 4.0 or Teensy 3.2
Current "master" AudioStream sources, or alex6679's modified ones
slightly modified to toggle a pin on every...
I defer to @alex6679 for the fine detail, but I'm pretty sure it's the Teensy which dictates the sample rate, leaving the host to do any resampling required to match its internal clock. This is one of the major contributions he's made, getting...
Well, it’s better than the old Teensy 3.x which could only manage 44117.647Hz or so. The PIT has a 24MHz clock, which I think means the sample rate ends up being about 44100.547Hz. Of course, that means that AUDIO_SAMPLE_RATE_EXACT is not exact...
Recent versions (1.58 onwards) of Teensyduino spot the lack of an object with “update responsibility“ and put in an IntervalTimer to trigger updates.
Has the documentation been updated to match? Guess…
That's interesting - pity it seems to peter out without reaching a conclusion. I wonder if one might get better results using an I²S board which doesn't need MCLK?
Hmm ... looks like I must have worked from an old revision of the Reference Manual. Which might be why I was getting the occasional clicking, and the clock routing was removed from the Rev 3 manual
But then the Rev 3 change list has
I think I...
Thanks for testing. I think I should first fix it for Windows 11. I assume it will then also work for other operating systems.
I'll have a look at that.
Wow, that’s a blast from the past :D do let us all know if it works for you. I never did figure out why the SAI1 glitches when synced to S/PDIF… Maybe I should have another look.
Odd about the data sheet difference.
I've just been playing with the multi-channel USB code, since I know the stock audio library does not work with the reduced audio block size needed for low latency. As it stands right now it's not working with super-small blocks, but it appears...
Thanks for your input and tips. That's encouraging to hear.
Yes, I realize recording to SD is a finicky business, glad to know there's a solid library out there. I'll be sure to check it out.
The low latency setting for the PCM51xx chips is...
OK, input tested; 64-sample blocks work, 32 gives a sort of fizzing sound, 16 is silent. Just using the HardwareTesting/PassThroughUSB example, with the audio blocks bumped to 70, and selecting the Teensy as the PC's audio output. That was...
I didn’t test input, but I can later today.
I’ve taken another look, and am wondering if the way you deal with underflow might be the issue. If there isn’t enough audio data for the USB packet, everything gets dumped, whereas maybe the answer is...
That’s what the documentation states. 67cm cable length seems too long for high quality, though, since the cable doesn’t appear to be shielded.
I’d set the level as high as it will go without overloading the amp input. You can consult the data...
Yes. The headphone jack is only suitable for connecting headphones. Its “ground” connection is not a true ground but a virtual ground sitting at about 1.65V, and if accidentally connected to true ground may do anything from stopping working...
@alex6679, just a quick observation relating to another thread started where the user may want to use USB, and does state a low-latency requirement ...
I had a quick play with your latest updated code (knowing full well that the existing USB...
I just had a bit of a play. Reducing the block size to 16 samples I got the in-to-out latency down to about 1.3ms. I think just under half of that is down to the SGTL5000, so as noted you may get differing results with other hardware.
I also...
The stock audio library, using the PJRC Audio Adapter, has an in to out latency of about 6.4ms. I know this from measuring it myself. Obviously you’d need to reduce the audio block size to get to your desired latency, as you say, but 32 samples...
You could take a look at (the later pages of) this thread. Unfortunately it’s a bit hard to install as it stands, and previously suffered from a bunch of people who offered to help or did development, then didn’t follow through. However, the new...
The design intent of this branch was to preserve the original functionality, while adding abilities to bend pitch and get to lower notes. (There’s even a TODO comment in Paul’s original code about the latter.) A side-effect of bending the pitch...