Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fredoh9
Copy link
Collaborator

@fredoh9 fredoh9 commented Oct 12, 2022

alsaclt init will try to initialize all sound devices to a default state. It doesn't guarantee to set default for all, but good to start with when proper alsa settings are desired.

Signed-off-by: Fred Oh fred.oh@linux.intel.com

alsaclt init will try to initialize all sound devices to a default state.
It doesn't guarantee to set default for all, but good to start with when
proper alsa settings are desired.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
@fredoh9 fredoh9 requested a review from a team as a code owner October 12, 2022 07:42

# Initialize alsa settings first
alsactl init

Copy link
Contributor

Choose a reason for hiding this comment

The 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:
https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf

The "True.BootSequence" sections should be executed to put the card into a sane default state.

FYI @greg-intel @marc-hb

@greg-intel
Copy link
Contributor

One of the device failures was related to org.gnome.Shell@x11.service

@@ -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
Copy link
Contributor

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.

Copy link
Collaborator

@marc-hb marc-hb Oct 13, 2022

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:

-  alsactl init
+  alsactl --debug init

EDIT: no, --debug is too verbose. A dlogi would be great.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So either a new dlogi or maybe just this...

@fredoh9 , ping?

Copy link
Collaborator Author

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

@marc-hb
Copy link
Collaborator

marc-hb commented Dec 19, 2022

Merging this during the holiday season looks risky to me. Also, Fred is on vacation for a couple weeks.

@marc-hb
Copy link
Collaborator

marc-hb commented Jul 16, 2024

SOFCI TEST

@marc-hb
Copy link
Collaborator

marc-hb commented Jul 17, 2024

LNL failure in https://sof-ci.01.org/softestpr/PR966/build659/devicetest/index.html is unrelated (thesofproject/linux#5109)

The MTL timeout in https://sof-ci.01.org/softestpr/PR966/build657/devicetest/index.html is very unusual but can't possibly be related either. EDIT: hard, completely silent crash that happened on ba-mtlp-rvp-nocodec-03 short after a test was finished, exactly like a power outage. Zero clue why in the system logs :-(

Everything else is 100% green.

@fredoh9 , @plbossart , @ujfalusi , @kv2019i do we still want this alsactl init before every test? Single-line change, super easy to revert if needed.

Maybe this could help with some of the MAX volume issues? (e.g. thesofproject/linux#5048, thesofproject/linux#3766, etc.)

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