Skip to content
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

Read in samples from channels in one go #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sflower
Copy link

@sflower sflower commented Aug 11, 2015

I'm looking for some feedback on a modification I have had to make in order to integrate ADAT TX functionality into our products. I have just made the changes in the adat_transmit_port_until_ct_4x function as an example, but they would also be required for adat_transmit_port_until_ct_2x and adat_transmit_port_until_ct_1x.

Currently the non-ADAT_TX_USE_SHARED_BUFF implementation will take almost a whole sample period to consume 8 samples from the delivery thread, this is because it consumes and transmits two samples at a time.

These changes make it consume all 8 samples from the channel at the start of the loop, then transmit the 8 samples. This reduces the amount of time required to send all 8 samples from the delivery thread by an order of magnitude.

These changes would bring the performance much more inline with the ADAT_TX_USE_SHARED_BUFF implementation.

* Makes ADAT TX functionality easier to implement in a delivery loop
@sflower
Copy link
Author

sflower commented Aug 12, 2015

Thanks Henk - that all makes a lot of sense.

I've just done some further testing of the new implementation, and I'm not seeing any data corruption. I'm feeding the ADAT TX thread fixed values - 0xCCCCCC00, and then from another product that uses the ADAT RX module, reading in 1024 sample at a time. Once the ADAT RX thread has locked on, I have not seen one sample come in with an incorrect value at 44.1kHz or 48kHz.

I have also just recorded the ADAT data to an audio file, so I could check over a longer period of time. So far over a 2 minute period, I have not been able to find any errors.

For this testing and in the actual production firmware I've been using a 50MIPS thread, and the adat_transmit_port_until_ct_2x function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants