Skip to content

Conversation

@aiChaoSONG
Copy link

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.

@aiChaoSONG aiChaoSONG requested a review from a team as a code owner October 26, 2020 09:37
@aiChaoSONG
Copy link
Author

@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;}')
Copy link
Contributor

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.

Copy link
Author

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.

Copy link
Contributor

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.

@xiulipan
Copy link
Contributor

@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>
@aiChaoSONG aiChaoSONG changed the title [RFC] lib.sh: revise card number acquisition code lib.sh: revise card number acquisition code Oct 27, 2020
@aiChaoSONG
Copy link
Author

@xiulipan Done, and tested on Helios, works fine.

Copy link
Collaborator

@marc-hb marc-hb left a 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; }')

@xiulipan xiulipan merged commit d715dcd into thesofproject:master Oct 28, 2020
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