Repository navigation
test-case: add case for DSM feature test - #296
Conversation
aiChaoSONG
commented
Jul 27, 2020
- add a wavetool for DSM/WOV/EchoReference feature test (used to analyze wave)
- add DSM test case.
af7d945 to
6540bdd
Compare
f92c2c2 to
d91f562
Compare
b3a0305 to
de0ffec
Compare
There was a problem hiding this comment.
Before we spend too much time reviewing it, what does this new Python tool do that ALSA BAT doesn't already do?
https://github.com/alsa-project/alsa-utils/blob/master/bat/alsabat.1
https://www.alsa-project.org/wiki/BAT
This tool is intended for DSM/WOV test.
|
|
I'm still a bit surprised that tool(s) to perform these sorts of analysis don't already exist but I'm new to this project. It's nice to split the new tool and the test case in two different commits but I think this doesn't go far enough. Creating a generic tool like this from scratch is a pretty big, long term commitment so it should be more visible and deserves its own PR, not semi-hidden behind the addition of a new test case. Maybe it should be located in |
|
@marc-hb I'd like to remove |
|
@marc-hb Almost every function in wavetool use command line parameters, pass a argparse Namespace class is no better than pass a python dict. at least **cmd denote multiple parameters. I suggest we keep the dict implemetation. |
I agree there's probably not much technical difference (the dict implementation is just a bit more verbose); the problem is serious reader confusion. It took me a very long time and multiple rounds of reviews before I realized all these dictionaries were actually just
That's exactly what took me a very long time to realize. In fact it would be clearer if these functions didn't even take
I suggest a large but very simple and mechanical search/replace requiring very little testing. Finally, based on the commit message you seem to want this new tool to last and grow: So let's start with a "clean slate" |
marc-hb
left a comment
There was a problem hiding this comment.
2's complement underflow bug below
d0237bb to
1b2fac0
Compare
singalsu
left a comment
There was a problem hiding this comment.
The silence trim needs some work. My other comments are minor or questions because I'm not familiar with this test.
|
@singalsu Three procedures in the DSM test case:
There is no processing in the DSM component, just copy the playback data back to the capture pipeline. What the wavetool.py did is just to do binary comparison, to be short, compare S16/S24/S32 value sample by sample. |
The wavetool is designed to be used in test case which requires complex wave analysis. This patch adds the initial version of wavetool, and the wavetool now supports sinusoid generation, and smart amplifier test case verdict. Refer to "-h" for more help. Signed-off-by: Amery Song <chao.song@intel.com>
This case test smart amplifier with customized wavetool.py. Test procedures: 1. acquire playback & capture pipelines with smart_amp component 2. generate playback wave file 3. play reference wave file through smart_amp playback pipeline and record it back through smart_amp capture pipeline 4. compare channel 0/1, 2/3 of recorded wave with reference wave Fixes: thesofproject#271 Signed-off-by: Amery Song <chao.song@intel.com>
review all closed
|
Thanks Marc, Seppo for very useful reviews, educated me a lot. I am going to merge this as WOV test case is en route. Any further review will be applied as bug fix or improvement. Thank you all. |
|
I just tried to generate a signal and compare it with itself and it fails like this. @aiChaoSONG how did you test this? |
|
@marc-hb I guess your waves are both 2 channels, right? For the DSM, the recorded wave is 4 channels, so you need |
You don't need to guess, you can just run the command I gave.
Indeed That's quite confusing, I thought this wavetool was meant to become less specialized. Now I understand the duplication in |