-
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
Volume reset for alsabat testing #1010
Conversation
BTW there's a list of volume issues in |
@@ -833,7 +833,7 @@ reset_sof_volume() | |||
amixer -Dhw:0 scontrols | sed -e "s/^.*'\(.*\)'.*/\1/" |egrep 'PGA|gain' | | |||
while read -r mixer_name | |||
do | |||
amixer -Dhw:0 -- sset "$mixer_name" 0dB |
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.
@ujfalusi Do you have idea why 0 dB is not working?
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.
Note: In tplg1 100% could be +20 or +40 dB in some cases.
8966f04
to
a8fed1a
Compare
case-lib/lib.sh
Outdated
{ | ||
# set all PGA* volume to 0dB | ||
amixer -Dhw:0 scontrols | sed -e "s/^.*'\(.*\)'.*/\1/" |grep PGA | | ||
amixer -Dhw:0 scontrols | sed -e "s/^.*'\(.*\)'.*/\1/" |egrep 'PGA|gain' | |
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.
amixer -Dhw:0 scontrols | sed -e "s/^.*'\(.*\)'.*/\1/" |egrep 'PGA|gain' | | |
amixer -Dhw:0 scontrols | sed -e "s/^.*'\(.*\)'.*/\1/" | grep -E 'PGA|gain' | |
see shellcheck
only suspend/resume timeouts in https://sof-ci.01.org/softestpr/PR1010/build181/devicetest/index.html but some alsabat failures in https://sof-ci.01.org/softestpr/PR1010/build182/devicetest/index.html |
a8fed1a
to
fa11809
Compare
These failures will be fixed in EDIT, now: |
After more tests, I found not all gain controls can set to 0dB,
This is still a problem that needs to be clarified. |
I'm wondering if there has ever been a working dB setting in amixer. 0dB has worked but it doesn't seem accept negative values for attenuation.
The manual pages suggests that it should be possible but maybe there's some bug
It could be command line quotation issue too. Setting first to 0 dB and then decrement 6 dB works.
|
I checked with UPX set up to IPC4, works there too:
|
Maybe there's a difference in topology in working and non-working gains? |
the volume ctl name PGA is for IPC3, IPC4 uses keyword gain. so rename the function to a more generic name to cover IPC4. Signed-off-by: Keqiao Zhang <[email protected]>
No all IPC4 gain controls can set 0dB directly, maybe there're some problems there. As the alternative, use 100% for IPC4 gain. Will be unified after the problem is fixed. Signed-off-by: Keqiao Zhang <[email protected]>
We have aligned that to use 0dB for all sof volume controls in CI test. Signed-off-by: Keqiao Zhang <[email protected]>
fa11809
to
691a756
Compare
Not sure about it. Since alsabat test occasionally failed on some IPC4 platforms. So for IPC4 platforms, let's set the gain volume to |
Fixing this shellcheck warning is not trivial:
Here's one way how. Note ubuntu@sh-mtlp-rvp-hda-03:~$ mapfile pgalist < <(amixer -c"$sofcard" controls |
awk -Fname= '/PGA|gain/ { gsub(" ","_", $2 ); print $2}')
ubuntu@sh-mtlp-rvp-hda-03:~$ declare -p pgalist
declare -a pgalist=([0]=$'\'gain.1.1_1_2nd_Playback_Volume\'\n' [1]=$'\'gain.11.1_DMIC0_Capture_Volume_1\'\n' [2]=$'\'gain.15.1_Deepbuffer_Volume\'\n' [3]=$'\'gain.2.1_2_Main_Playback_Volume\'\n') |
|
CI Test passed on all platforms. Can we merge this PR? @marc-hb @singalsu @fredoh9 |
https://sof-ci.01.org/softestpr/PR1010/build194/devicetest/index.html?model=TGLU_RVP_NOCODEC_IPC4ZPH&testcase=check-alsabat-headset-playback looks like a failure (no idea why) |
It's a known issue on IPC4 nocodec platforms:thesofproject/sof#7285 |
No description provided.