-
Notifications
You must be signed in to change notification settings - Fork 40
Feature/32bit quad i2s: Begin making switchable 16/32 which fixes RevD #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
@cab-creare-com , as discussed, I made a base class from which all the I2S classes inherit. This base class holds the static variable transfer32bits. As an aside, I also started to apply the 32-bit modifications the stereo output class (output_i2s_F32.h). I think that I increased the size of the i2s_tx_buffer and I started to make the necessary changes to isr() and update(). I don't think that I finished. I certainly didn't touch the DMA or I2S setup, which are your parts. It does still currently work correctly when in 16-bit mode. I don't believe that I touched any of the other non-Quad I2S classes other than to add the required inheritance. |
…ympan/Tympan_Library into feature/32bit_quad_I2s_unified
MOTIVATION: While the long-term plan is to make all of the I2S classes be 32-bits, I don't think that anyone is planning on digging into the I2S and DMA settings for the older Tympan RevD. Because I don't yet want to abandon RevD, we need to continue to support 16-bit transfers for RevD.
CHANGES: For the Quad classes, I've altered the classes so that they know whether they were configured for 32 bit (Rev E/F) or 16 bit (Rev D). Currently, Rev E/F is always configured for 32-bit and RevD is always configured for 16-bit. The isr() and update() methods then work correctly based on the internal flag denoting the data size.
TESTING: I've tested these changes using the attached version of the ChangeSampleRate example. I injected a 1kHz tone produced by my PC and listened via the Tympan's headphone output. I tested on a RevD and on a RevE. I tested using the Quad and Stereo versions of the I2S classes. I tested 44kHz and 96kHz. All of the tests sounded fine to me.
ChangeSampleRate_Quad.zip
NEXT STEPS: I'm just asking for a quick visual review to confirm that my changes don't interfere with your own work. You're welcome to do a deeper review, if you want, but I'm mainly trying to make sure that I didn't do something that messes up your work. If it looks like it won't affect your work, feel free to accept the pull request so that it gets pulled in to the develop branch.