-
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
Updated check-sof-logger.sh and verify-kernel-boot-log.sh #1245
Conversation
Can one of the admins verify this patch?
|
test this please |
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.
-
Are there any other possibilities besides these two? @kv2019i , @ranj063 , @bardliao can you answer?
-
The commit message must link to the corresponding bug, e.g. "Fixes issue [BUG] /proc/asound/sofprobes breaks "check-sof-logger" test #1243"
-
The commit title and message must describe the change much precisely. For instance:
check-sof-logger: remove wildcard from sof_alsa_card_found()
. The title has very little space, so don't use words like "update": every commit is an update.
See past commit message examples in the git log
.
Here are some good references, most of this applies to any open-source project so please spend some time and take a look
https://docs.zephyrproject.org/latest/contribute/guidelines.html#commit-guidelines
https://wiki.openstack.org/wiki/GitCommitMessages
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#write-a-meaningful-commit-message
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
Answer: it is not enough. |
Simpler and probably good enough: sof_alsa_card_found()
{
for i in /proc/asound/sof*/id; do
if test -e "$i"; then return 0; fi
done
return 1
} |
You need to use Also, see advice above for a useful commit message. |
Jenkins did not test this at all :-( |
Updated the test script with suggested changes Signed-off-by: harajend <[email protected]> Updated check-sof-logger.sh Updated SOF-specific codecs since the sof* regex also lists sofprobes. Signed-off-by: harajend <[email protected]>
Still not running :-( |
Jenkins still not running; pushing new versions does not make any difference. Something is wrong on the Jenkins side. cc: @kv2019i
Still not done. |
By default card 0 is selected so i added dynamic selection for amixer card Signed-off-by: harajend <[email protected]>
There is still no testing. Squashing looks good but the commit message of 212a420 is still a mess:
Don't say "update", every commit is an update. Just describe the change (once). |
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.
Mostly good, but some comments inline.
@@ -115,7 +115,8 @@ dmic_switch_present() | |||
(set -x | |||
# name= is hardcoded in /usr/share/alsa/ucm2/* | |||
# This returns a non-zero error status on failure | |||
amixer cget name='Dmic0 Capture Switch' | |||
switch=$(aplay -l | head -2 | tail -1 | awk '{print $3}') | |||
amixer -c "$switch" cget name='Dmic0 Capture Switch' |
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.
Hmm, doesn't this still select a fixed card?
E.g.
~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
... you'd get the same with "amixer -c 0" gets us.
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.
Select a card using its name, such as "sofsoundwire", instead of selecting it using numbers
aplay -l | head -2 | tail -1 | awk '{print $3}'
sofsoundwire
Command shall be like: amixer -c "sofsoundwire" cget name='Dmic0 Capture Switch'
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.
@harajend But "head -2 | tail -1" will always pick the first card, so this is same as passing "amixer -c 0", right?
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.
awk
is a "big boy" and can select lines itself. It's shorter AND more readable:
switch=$(aplay -l | awk 'NR == 2 {print $3}')
amixer -c 0
looks even better? I'm only simplifying code but I don't know if it is correct.
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.
@harajend But "head -2 | tail -1" will always pick the first card, so this is same as passing "amixer -c 0", right?
Yes, On functionality front both are same. Here I thought to pass "name/identifier" instead of "index number"
@@ -71,7 +71,10 @@ sof_alsa_card_found() | |||
# note: assumes SOF card names to start with "sof", e.g. |
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.
Change is good, but the commit message seems wrong. There are two signed offs. Can you amend the message and repush?
Mmm.... Jenkins just started running in unrelated #1247... Let's try something.... |
test this please |
Jenkins is still not running :-( @harajend please try closing this one and re-submitting in a new PR? |
Updated SOF-specific codecs since the sof* regex also lists sofprobes.