-
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
lib.sh: initialize with alsactl before setting proper alsa settings #966
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -802,6 +802,10 @@ set_alsa_settings() | |
{ | ||
# ZEPHYR platform shares same tplg, remove '_ZEPHYR' from platform name | ||
local PNAME="${1%_ZEPHYR}" | ||
|
||
# Initialize alsa settings first | ||
alsactl init | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fredoh9 Note, this should also get the UCM defaults, but it is worth double-checking this does happen (alsactl also has " -D,--ucm-defaults execute also the UCM 'defaults' section" option but AFAIK this should not be needed) Example default mixer settings for SOF HDA cards are here in alsa-ucm: The "True.BootSequence" sections should be executed to put the card into a sane default state. FYI @greg-intel @marc-hb |
||
dlogi "Run alsa setting for $PNAME" | ||
case $PNAME in | ||
APL_UP2_NOCODEC | CML_RVP_NOCODEC | JSL_RVP_NOCODEC | TGLU_RVP_NOCODEC | ADLP_RVP_NOCODEC | TGLH_RVP_NOCODEC) | ||
|
@@ -825,6 +829,9 @@ set_alsa_settings() | |
|
||
reset_PGA_volume() | ||
{ | ||
# Initialize alsa settings first | ||
alsactl init | ||
|
||
# set all PGA* volume to 0dB | ||
amixer -Dhw:0 scontrols | sed -e "s/^.*'\(.*\)'.*/\1/" |grep PGA | | ||
while read -r mixer_name | ||
|
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.
Maybe this can be an echo rather than a comment? Likewise with the other comment below. The only
set -x
I saw in this file were wrapped in sub-shells. Approving regardless.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.
I agree with @greg-intel , this looks like a big change and it seems very "quiet": I tried this command on my system and absolutely nothing was printed. Also,
dlogi "Run alsa setting for $PNAME"
runs AFTER this, could be confusing.So either a new
dlogi
or maybe just this:EDIT: no,
--debug
is too verbose. Adlogi
would be great.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.
@fredoh9 , ping?
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.
I lost the momentum, need to review what was my intention at first