-
Notifications
You must be signed in to change notification settings - Fork 59
lib.sh: revise card number acquisition code #474
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
Conversation
|
@ranj063 Please add your comment here, will the name 'sof-probes' change later? |
| # setup SOFCARD id | ||
| if [ ! "$SOFCARD" ]; then | ||
| SOFCARD=$(grep 'sof-[a-z]' /proc/asound/cards|awk '{print $1;}') | ||
| SOFCARD=$(grep -v 'sof-probes' /proc/asound/cards | grep 'sof-[a-z]' | awk '{print $1;}') |
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.
@aiChaoSONG im my opinion this should be handled slightly differently. We should run sof-test for all sof-* cards. This is coming soon too after the auxiliary bus patch is accepted. And anyway with sof-probes, there will really be nothing to do (just yet) becaue it doesnt add any pcm devices, only compress devices.
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.
We cannot acquire the PCM card mapping from TPLG, right? @xiulipan We need to carefully deal with this change.
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.
@aiChaoSONG @ranj063 Yes, I would say this patch is only a simple workaroud for the PR2501.
We have some coming change that will spilt existing PCMs to different card. Let's have some sync up meeting first to decided what should be done for the update.
|
@aiChaoSONG I am OK with this workaround, please also add some inline comments and update the commit to clarify this is a workaround. |
Auxiliary devices in SOF feature is introduced in thesofproject/linux#2501, and it adds a new sof-probes card in /proc/asound/cards, which will break current test, because we cannot acquire the correct card ID. This patch workarounds the issue by filtering out the sof-probes card with grep. Even it gets merged, our test is safe to run. Signed-off-by: Amery Song <chao.song@intel.com>
df85b21 to
f2305e3
Compare
|
@xiulipan Done, and tested on Helios, works fine. |
marc-hb
left a comment
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.
# SOFCARD is the _first_ sof card found
SOFCARD=$(grep -v 'sof-probes' /proc/asound/cards |
awk '/sof-[a-z]/ {print $1; exit; }')
Auxiliary devices in SOF feature is introduced in
thesofproject/linux#2501, which adds a new sof-probes
card in /proc/asound/cards. Old SOF card number
acquisition cannot work any more due to this change.
This patch excludes the sof-probes card with a grep.