-
Notifications
You must be signed in to change notification settings - Fork 48
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
Reset all PGA volume to 0dB #953
Conversation
Can you clarify the relationship with |
I think #951 is only reset the volume for nocodec devices. But we found the plain arecord issue(thesofproject/linux#3804) on many other models recently: |
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.
What do you think of this warning? I know it's off-topic but it looks like a serious bug; serious enough to require fixing before changing other, more minor problems.
In test-case/volume-basic-test.sh line 65:
for i in $(seq 1 $maxloop)
^-^ SC2167: This parent loop has its index variable overridden.
In test-case/volume-basic-test.sh line 70:
for i in "${pgalist[@]}"
^-^ SC2165: This nested loop overrides the index variable of its parent.
Signed-off-by: Keqiao Zhang <[email protected]>
After the volume test, all PGA* volume will be set to MAX. This affects other cases, such as pause/resume related tests(SOF#3804) To avoid such issue, we need to reset all PGA volume to default 0dB after the volume test. Signed-off-by: Keqiao Zhang <[email protected]>
I will fix these warnings in another PR next. |
f04808e
to
6c5ed28
Compare
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.
Thank you for finding the root cause why all PGAs are 100%, I totally forgot about volume test. Resetting to 0 db works.
And shellcheck fixes are also good catch.
Let volume test run first before alsabat test after this.
Thanks for the fix. I haven't read the code but it looks like a very serious fix? Maybe the title of the commit message should not be "fix shellcheck warning" like it's just pleasing shellcheck and nothing else. The reason why we use shellcheck is because sometimes it can find serious bugs like this one and it's worth all the other times when it reports non-serious issues. |
First, the pid is never assigned, replace it with aplay. second, replace the index name to kctl for the nested loop it may overrides the index variable of its parent. Signed-off-by: Keqiao Zhang <[email protected]>
6c5ed28
to
995ee7b
Compare
I will change the test case order. |
I have revised the commit message. |
reset_PGA_volume() | ||
{ | ||
# set all PGA* volume to 0dB | ||
amixer -Dhw:0 scontrols | sed -e "s/^.*'\(.*\)'.*/\1/" |grep PGA | |
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.
for IPC4 the volume control are named as gain, I think you should also grep gain here.
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.
Yes, you are right. But the volume-base-test.sh only support PGA control ATM. The volume test is skipped on all our IPC4 platforms. I can submit another PR for IPC4.
merge for v2.3 test. |
No description provided.