-
Notifications
You must be signed in to change notification settings - Fork 349
Audio: SRC: Increase stage buffer size and change copy() run condition #6688
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
Conversation
a9b640d to
029cb30
Compare
029cb30 to
d31fdc8
Compare
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve the C part.
|
This PR indeed fix hang issue, but I tested src_test.sh on the default SOF and it didn't pass all the test cases. |
Thanks for report! I ran the 32 bit test. There is likely some pass criteria that the 16 bit version cannot pass, I'll try to address it. Please use meanwhile 24 or 32 bit tests. |
This patch increases the buffer between stage 1 and stage 2 by factor 1/8. It prevents a freeze that happens with conversion from 11025 to 8000 Hz. Also the SRC is let run if stage 1 can consume samples or stage 2 can produce samples. There is no need to prevent run if both can't happen. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
I disabled 16 bit and only test 24bit and 32bit, all passed. |
This patch adds the missing saturation to rounding in function src_polyphase_stage_cir_s16(). The error was caught with "src_test(16, 16, [176400 192000], 8000)" where both conversions made an overflow in chirp test. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This prevents testbench run freeze from src_test.m. Function test_run_src() passes to testbench option -C that limits the number iterations to 300k that corresponds to 5 min of audio. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
These prints are normally not useful and slow down test with a lot of scrolled text output. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This speeds up src_test.m with no plot window opening for rate that is not supported in the conversions matrix. No output file returns failure -1. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Octave errors if plot handle is empty, Matlab doesn't. This can happen if frequency response test data read fails. In that case an empty plot window is stored as indication of error. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
If the rates are an empty vector [] the default rates are used. This allows test command "src_test(32, 32, [], [], 0, 0);" to do a quick test without plots with default 8 - 192 kHz in/out matrix. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
d31fdc8 to
b73f584
Compare
|
@gongjun-song @lgirdwood The 16 bit issue was a real bug, good catch! I added as 2nd commit the bug fix to polyphase filter where the saturation was missing for 16 bit audio data round. |
|
New commits have fixed 16-bit issue, all passed! |
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gongjun-song thanks for the test results.
The main changes are commits 1 and 2 to SRC code. First prevents a pipeline freeze. The second fixes an overflow with 16 bit audio data.
The rest of changes are improvements to src_test.m script. E.g. call testbench with copy limit of 5 min to stop frozen SRC and minor issues fixes and speedup with reduce of printing and plot window opening.