Skip to content

skip the test on Echo Reference pipeline - #871

Merged
marc-hb merged 2 commits into
mainfrom
skipEC
Mar 8, 2022
Merged

marc-hb merged 2 commits into
mainfrom
skipEC

Conversation

@keqiaozhang

@keqiaozhang keqiaozhang commented Mar 1, 2022 •

Copy link
Copy Markdown
Contributor

Skip the Echo Reference pipeline test in multiple-pause-resume and multiple-pipeline.

Comment thread test-case/multiple-pause-resume.sh Outdated

tplg=${OPT_VAL['t']}
func_pipeline_export "$tplg" "type:any"
func_pipeline_export "$tplg" "type:any & ~cap_name:Smart Amplifier Playback 2,Echo Reference Capture 3"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

are we going to skip the combinations of pipeline 2 and other pipelines

@XiaoyunWu6666 XiaoyunWu6666 Mar 1, 2022 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am wondering whether it will be better to skip the combination of pipeline 2 and pipeline 3 when constructing pipeline_combine_lst

If yes , the filter "type:any & smart_amp" can help us to get all pipelines that are using smart_amp

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, we can only skip the combination of smart_amp pipeline, but I wonder if such a test would make sense.
eg. check the echo reference capture pipeline with other normal playback pipelines, this is not a reasonable use case.

@keqiaozhang
keqiaozhang force-pushed the skipEC branch 2 times, most recently from eda33b2 to 7f84fb6 Compare March 1, 2022 16:18
Comment thread test-case/multiple-pause-resume.sh Outdated

tplg=${OPT_VAL['t']}
func_pipeline_export "$tplg" "type:any"
func_pipeline_export "$tplg" "type:any & ~smart_amp"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if you are going to filter something, it should be the echo reference. That's a clear case of a useless test. pause on playback makes a lot more sense.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agree, let only skip the Echo Reference pipeline and keep the Smart Amp pipeline in the test.

@keqiaozhang keqiaozhang changed the title multiple-pause-resume: skip PAUSE/RELEASE test on Smart Amp playback skip the test on Echo Reference pipeline Mar 2, 2022
marc-hb
marc-hb previously requested changes Mar 2, 2022
Comment thread test-case/multiple-pipeline.sh Outdated
dlogi "Testing: $pcm [$dev]"

"${APP_LST[$1]}" -D "$dev" -c "$channel" -r "$rate" -f "$fmt" "${DEV_LST[$1]}" -q &
"${APP_LST[${1%% *}]}" -D "$dev" -c "$channel" -r "$rate" -f "$fmt" "${DEV_LST[${1%% *}]}" -q &

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good idea but this is really too cryptic, it took me several minutes to understand what this does. Please use more English like this instead:

# args: $1: playback or capture
#          $2: optional filter

func_run_pipeline_with_type()
{
     local direction="$1"
     local opt_filter
     if [ -n "$2" ]; then opt_filter="& $2"; fi
     ...
     func_pipeline_export "$tplg" "type:$direction $opt_filter"
     ...
    "${APP_LST[$direction]}" -D "$dev" -c "$channel" -r "$rate" -f "$fmt" "${DEV_LST[$direction]}" -q &
     ...
}


func_run_pipeline_with_type 'capture'  '~pcm:Amplifier Reference'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks Marc. it's simple and easy to understand. I have pushed a new version.

@marc-hb
marc-hb dismissed their stale review March 3, 2022 05:50

Thanks, the code style looks good to me. @plbossart can you please approve the logic?


tplg=${OPT_VAL['t']}
func_pipeline_export "$tplg" "type:any"
func_pipeline_export "$tplg" "type:any & ~pcm:Amplifier Reference"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would go one step further and remove 'Amplifier'.

We've seen cases where we talk about 'Echo Reference'.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@plbossart , so you mean that we should remove both smart amplifier pipeline and echo reference pipeline form the test?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"amplifier reference' and 'echo reference' are the same thing, aren't they?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I meant use ~pcm:Reference

@keqiaozhang keqiaozhang Mar 4, 2022 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

here is the output of these 2 pipelines parsed by sof-tplgreader.py:

pcm=Speaker;id=2;type=playback;cap_name=Smart Amplifier Playback 2;fmts=S16_LE S24_LE S32_LE;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;rate=48000;channel=2;dev=hw:0,2;snd=/dev/snd/pcmC0D2p;smart_amp=SMART_AMP3.0;
pcm=Amplifier Reference;id=3;type=capture;cap_name=Echo Reference Capture 3;fmts=S16_LE S24_LE S32_LE;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;rate=48000;channel=2;dev=hw:0,3;snd=/dev/snd/pcmC0D3c;smart_amp=SMART_AMP3.0;

if we want to skip them all, we can use ~smart_amp

@marc-hb

marc-hb commented Mar 4, 2022

Copy link
Copy Markdown
Collaborator

Screenshot 2022-03-03 at 20 58 30

@keqiaozhang

Copy link
Copy Markdown
Contributor Author

I have updated my PR to skip both Smart Amplifier playback pipeline and Echo Reference capture pipeline in the tests.

@plbossart

Copy link
Copy Markdown
Member

I have updated my PR to skip both Smart Amplifier playback pipeline and Echo Reference capture pipeline in the tests.

Have you tried skipping ~Reference only as I mentioned above. I don't think it's necessary to skip all tests.

@keqiaozhang

Copy link
Copy Markdown
Contributor Author

I have updated my PR to skip both Smart Amplifier playback pipeline and Echo Reference capture pipeline in the tests.

Have you tried skipping ~Reference only as I mentioned above. I don't think it's necessary to skip all tests.

~pcm:Reference and ~pcm:Amplifier Reference are same, these all skip the Echo Reference capture pipeline but keep the Smart Amplifer playback pipeline(speaker) in the tests. if that's want you want, we can also use ~cap_name:Echo Reference Capture to avoid the misunderstanding. So which one do you prefer? The ’sof-tplgreader.py‘ output of this pipeline:

pcm=Amplifier Reference;id=3;type=capture;cap_name=Echo Reference Capture 3;fmts=S16_LE S24_LE S32_LE;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;rate=48000;channel=2;dev=hw:0,3;snd=/dev/snd/pcmC0D3c;smart_amp=SMART_AMP3.0;

@plbossart

Copy link
Copy Markdown
Member

@keqiaozhang I have no preference, as long as you keep testing the playback path I am happy.

…line

Smart Amp playback pipeline and Echo Reference capture pipeline are
interdependent, so random pause/release 1 or 2 of them will cause an
invalid bug #4434. This patch filters out the Echo Reference capture
pipeline for the pause/resume test, it's not a valid use case.

Signed-off-by: Keqiao Zhang <keqiao.zhang@intel.com>
In this case, if we test all capture pipelines at same time, but
capture pipeline count is less than requested count defined by
-c option, playback pipeline will be started to ensure requested
number of pipelines are running in parallel.

Considering this scenario, the capture pipeline count is less than
requested count and the tplg contains both Smart Amp pipeline and
Echo reference pipeline, if the Echo reference pipeline start first
and Smart Amp pipeline start next, this will cause the ipc tx times
out. This patch skips the Echo reference pipeline to avoid such case

Signed-off-by: Keqiao Zhang <keqiao.zhang@intel.com>
@keqiaozhang

Copy link
Copy Markdown
Contributor Author

~pcm:Amplifier Reference

@plbossart , I have updated the PR to skip the echo reference capture pipeline and keep the smart amplifier playback pipeline in the tests.

@marc-hb
marc-hb merged commit 96bca11 into main Mar 8, 2022
@marc-hb

marc-hb commented Mar 9, 2022

Copy link
Copy Markdown
Collaborator

This made PIPELINE_COUNT out of sync, fixed submitted by @miRoox in #875

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.

4 participants