-
Notifications
You must be signed in to change notification settings - Fork 59
lib.sh: Set ALSA settings from a state file #1294
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e2b114a
lib.sh: Set ALSA settings from a state file
LukaszMrugala 97b1aaf
lib.sh: set_alsa: Log ALSA state difference
golowanow 1d91eda
alsa_settings: PTL platform settings move to state
golowanow 55842f1
alsa_settings: MTL platform settings move to state
golowanow b7bd448
alsa_settings: LNLM platform settings move to state
golowanow ccf21e5
alsa_settings: Add README.md
golowanow 8f201d1
alsa_settings: Keep comments from removed scripts
golowanow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| state.sofhdadsp { | ||
| control.1 { | ||
| iface MIXER | ||
| name 'Headphone Playback Volume' | ||
| value.0 60 | ||
| value.1 60 | ||
| } | ||
| control.2 { | ||
| iface MIXER | ||
| name 'Headphone Playback Switch' | ||
| value.0 true | ||
| value.1 true | ||
| } | ||
| control.6 { | ||
| iface MIXER | ||
| name 'Capture Volume' | ||
| value.0 30 | ||
| value.1 30 | ||
| } | ||
| control.7 { | ||
| iface MIXER | ||
| name 'Capture Switch' | ||
| value.0 true | ||
| value.1 true | ||
| } | ||
| control.9 { | ||
| iface MIXER | ||
| name 'Master Playback Volume' | ||
| value 87 | ||
| } | ||
| control.10 { | ||
| iface MIXER | ||
| name 'Master Playback Switch' | ||
| value true | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| state.sofsoundwire { | ||
| control.1 { | ||
| iface MIXER | ||
| name 'rt711 FU05 Playback Volume' | ||
| value.0 80 | ||
| value.1 80 | ||
| } | ||
| control.2 { | ||
| iface MIXER | ||
| name 'rt711 FU1E Capture Switch' | ||
| value.0 true | ||
| value.1 true | ||
| } | ||
| control.3 { | ||
| iface MIXER | ||
| name 'rt711 FU0F Capture Switch' | ||
| value.0 true | ||
| value.1 true | ||
| } | ||
| control.4 { | ||
| iface MIXER | ||
| name 'rt711 FU1E Capture Volume' | ||
| value.0 25 | ||
| value.1 25 | ||
| } | ||
| control.5 { | ||
| iface MIXER | ||
| name 'rt711 FU0F Capture Volume' | ||
| value.0 25 | ||
| value.1 25 | ||
| } | ||
| control.8 { | ||
| iface MIXER | ||
| name 'rt711 GE49 Selected Mode' | ||
| value Headset | ||
| # override jack detection mode to headset | ||
| # related to https://github.com/thesofproject/linux/pull/4969 | ||
| } | ||
| control.35 { | ||
| iface MIXER | ||
| name 'Headphone Switch' | ||
| value true | ||
| } | ||
| control.36 { | ||
| iface MIXER | ||
| name 'Headset Mic Switch' | ||
| value true | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| state.sofhdadsp { | ||
| control.1 { | ||
| iface MIXER | ||
| name 'Headphone Playback Volume' | ||
| value.0 60 | ||
| value.1 60 | ||
| } | ||
| control.2 { | ||
| iface MIXER | ||
| name 'Headphone Playback Switch' | ||
| value.0 true | ||
| value.1 true | ||
| } | ||
| control.6 { | ||
| iface MIXER | ||
| name 'Capture Volume' | ||
| value.0 30 | ||
| value.1 30 | ||
| } | ||
| control.7 { | ||
| iface MIXER | ||
| name 'Capture Switch' | ||
| value.0 true | ||
| value.1 true | ||
| } | ||
| control.9 { | ||
| iface MIXER | ||
| name 'Master Playback Volume' | ||
| value 87 | ||
| } | ||
| control.10 { | ||
| iface MIXER | ||
| name 'Master Playback Switch' | ||
| value true | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| state.sofsoundwire { | ||
| control.1 { | ||
| iface MIXER | ||
| name 'rt711 FU05 Playback Volume' | ||
| value.0 80 | ||
| value.1 80 | ||
| } | ||
| control.3 { | ||
| iface MIXER | ||
| name 'rt711 FU0F Capture Switch' | ||
| value.0 true | ||
| value.1 true | ||
| } | ||
| control.5 { | ||
| iface MIXER | ||
| name 'rt711 FU0F Capture Volume' | ||
| value.0 26 | ||
| value.1 26 | ||
| } | ||
| control.8 { | ||
| iface MIXER | ||
| name 'rt711 GE49 Selected Mode' | ||
| value Headset | ||
| } | ||
| control.9 { | ||
| iface MIXER | ||
| name 'Headphone Switch' | ||
| value true | ||
| } | ||
| control.10 { | ||
| iface MIXER | ||
| name 'Headset Mic Switch' | ||
| value true | ||
| } | ||
| } | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| state.sofsoundwire { | ||
majunkier marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| control.1 { | ||
| iface MIXER | ||
| name 'rt711 FU05 Playback Volume' | ||
| value.0 80 | ||
| value.1 80 | ||
| } | ||
| control.3 { | ||
| iface MIXER | ||
| name 'rt711 FU0F Capture Switch' | ||
| value.0 true | ||
| value.1 true | ||
| } | ||
| control.5 { | ||
| iface MIXER | ||
| name 'rt711 FU0F Capture Volume' | ||
| value.0 30 | ||
| value.1 30 | ||
| } | ||
| control.8 { | ||
| iface MIXER | ||
| name 'rt711 GE49 Selected Mode' | ||
| value Headset | ||
| # override jack detection mode to headset | ||
| # related to https://github.com/thesofproject/linux/pull/4969 | ||
| } | ||
| control.36 { | ||
| iface MIXER | ||
| name 'Headset Mic Switch' | ||
| value true | ||
| } | ||
| } | ||
| state.CODEC { | ||
| control.4 { | ||
| iface MIXER | ||
| name 'PCM Playback Volume' | ||
| value.0 120 | ||
| value.1 120 | ||
| } | ||
| } | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| state.sofhdadsp { | ||
| control.1 { | ||
| iface MIXER | ||
| name 'Headphone Playback Volume' | ||
| value.0 60 | ||
| value.1 60 | ||
| } | ||
| control.2 { | ||
| iface MIXER | ||
| name 'Headphone Playback Switch' | ||
| value.0 true | ||
| value.1 true | ||
| } | ||
| control.6 { | ||
| iface MIXER | ||
| name 'Capture Volume' | ||
| value.0 30 | ||
| value.1 30 | ||
| } | ||
| control.7 { | ||
| iface MIXER | ||
| name 'Capture Switch' | ||
| value.0 true | ||
| value.1 true | ||
| } | ||
| control.9 { | ||
| iface MIXER | ||
| name 'Master Playback Volume' | ||
| value 87 | ||
| } | ||
| control.10 { | ||
| iface MIXER | ||
| name 'Master Playback Switch' | ||
| value true | ||
| } | ||
majunkier marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| state.sofsoundwire { | ||
| control.1 { | ||
| iface MIXER | ||
| name 'rt712 FU06 Playback Volume' | ||
| value.0 60 | ||
| value.1 60 | ||
| } | ||
| control.2 { | ||
| iface MIXER | ||
| name 'rt712 FU05 Playback Volume' | ||
| value.0 60 | ||
| value.1 60 | ||
| } | ||
| control.3 { | ||
| iface MIXER | ||
| name 'rt712 FU0F Capture Switch' | ||
| value.0 true | ||
| value.1 true | ||
| } | ||
| control.4 { | ||
| iface MIXER | ||
| name 'rt712 FU0F Capture Volume' | ||
| value.0 46 | ||
| value.1 46 | ||
| } | ||
| control.14 { | ||
| iface MIXER | ||
| name 'Headphone Switch' | ||
| value true | ||
| } | ||
| control.15 { | ||
| iface MIXER | ||
| name 'Headset Mic Switch' | ||
| value true | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
File MTLP_RVP_SDW.sh contain comment's why we set something, we should keep them
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.
AFAIK, the ALSA state file format has no custom comments, although alsactl seems to ignore them, if added carefully.
I think better to avoid parsing issues and just rely on the git log history to track changes.
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.
In that case, comments should be move to README file to preserve info why specific config was set
Uh oh!
There was an error while loading. Please reload this page.
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.
in README it will be
quicklyout of sync .. let's try to add it to the .state file directlyThere 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.
A good git log is important but it should be focused and explaining why things CHANGED. It should ideally not be required to explain why things ARE the way they are.
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.
Agree, git log should focus on explaining why something was changed. But there are cases where leaving comment in code is also important, for changes that could rise questions in future, or like here proposing whole new approach, comment in file can be quicker to find and understand than digging in git history.