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

nrf5x: Fix reception of large ISO packets #1642

Merged

Conversation

kasjer
Copy link
Collaborator

@kasjer kasjer commented Sep 13, 2022

Describe the PR
ISO packet size is up to 1023 for full speed device. Upon completion of ISO reception, reported length of incoming packet was truncated to one byte only.
This results in incorrect data stream for higher bit rates 48 samples * 4 bytes per sample * 2 channels = 384 bytes of data and 128 was reported.

There is no change in logic extending xact_len to uint16_t fixes the issue.

ISO packet size is up to 1023 for full speed device.
Upon completion of ISO reception, reported length of incoming packet
was truncated to one byte only.
This results in incorrect data stream for higher bit rates
48 samples * 4 bytes per sample * 2 channels = 384 bytes of data
and 128 was reported.

There is no change in logic extending xact_len to uint16_t fixes the issue.
Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

superb!! thank you for the fix. Sorry for these type of issue, it should be avoidable. I could imagine you having hard time to troubleshoot this.

@hathach hathach merged commit 7ba950c into hathach:master Sep 13, 2022
@kasjer kasjer deleted the kasjer/nrf5x-fix-out-iso-packet-size-report branch September 13, 2022 08:08
@kasjer
Copy link
Collaborator Author

kasjer commented Sep 13, 2022

superb!! thank you for the fix. Sorry for these type of issue, it should be avoidable. I could imagine you having hard time to troubleshoot this.

Thank you for quick response. No need to be sorry, ISO support was added late.
16 bit PCM was good enough so far but I tried to use AUDIO_DATA_FORMAT_TYPE_I_IEEE_FLOAT and that change subslot size to 4 hence error.

@hathach
Copy link
Owner

hathach commented Sep 14, 2022

thanks for the fix and the extra info :)

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