Skip to content

Change the naming convention for the ALH DAI copiers in topology - #7640

Merged
ranj063 merged 5 commits into
thesofproject:mainfrom
ranj063:fix/dai_copier
May 23, 2023
Merged

ranj063 merged 5 commits into
thesofproject:mainfrom
ranj063:fix/dai_copier

Conversation

@ranj063

@ranj063 ranj063 commented May 17, 2023 •

Copy link
Copy Markdown
Collaborator

For ALH DAI, the new name is changed to reflect the link ID and index in an aggregated group like: dai-copier-ALH.SDW1-Playback.0 or alh-copier.SDW1-Playback.1

Also, today we do not show the aggregated DAI copiers in the topology graph. So add a route via a virtual widget to show its existence as below
sof-mtl-rt711-l0-rt1316-l23-rt714-l1

@ranj063
ranj063 requested a review from jsarha as a code owner May 17, 2023 20:33
@ranj063
ranj063 marked this pull request as draft May 18, 2023 00:32
@ranj063
ranj063 marked this pull request as ready for review May 19, 2023 15:54
@ranj063
ranj063 requested a review from plbossart May 19, 2023 15:54

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not following the dai_index use, and not understand at all what it means for SoundWire. We need @bardliao to review this as well, not sure what a DAI "10" or "20" could possibly mean.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we already have a dai_index on line 20.

a) do we need the duplication?
b) if yes, should we use a macro to make sure there's always a matching value in both locations?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here for the SSP.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this one right? I don't recall us using a SoundWire DAI '10'?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is this one right? I don't recall us using a SoundWire DAI '10'?

Yes, this follows the rule from b407a1a
Sdw dai index is not used by node_id. The only rule of sdw dai index is don't be duplicated.
For example, we can't have 2 dai_index 10.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@plbossart @bardliao please have a look at this PR again. I have removed those artificial DAI index that we proviously used and replaced it with the actual index of the DAI in an aggregated group. If there is no aggregation the dai_index will always be 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

here too. I must admit I don't follow what this dai_index is. It clearly makes no sense if this is used to name a DAI.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

here too. I must admit I don't follow what this dai_index is. It clearly makes no sense if this is used to name a DAI.

20 means pcm 2, index 0.
We include pcm id in the dai_index because the dais are defined in different files and sdw-xxx-generic.conf can be included by different sdw topologys. The dai index could be conflict if they are 0,1,2,3... We don't know what index can we use when we add a new sdw topology unless we check all included .confs.
For the reason above, I think use different dai index group for differnt pcm could be easier to decide a new dai index.

@ranj063
ranj063 requested review from bardliao and plbossart May 20, 2023 18:59
@ranj063
ranj063 force-pushed the fix/dai_copier branch 3 times, most recently from 46a8a36 to 81169c7 Compare May 22, 2023 20:17
@ranj063 ranj063 changed the title Change the naming convention for the DAI copiers in topology Change the naming convention for the ALH DAI copiers in topology May 22, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we need the dai_index?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we do need the dai_index. When there's aggregation, the dai_index would be set based on the index of the DAI in the aggregated group. When there' sno aggregation, it will just be 0

Comment thread tools/topology/topology2/cavs-sdw-src-gain-mixin.conf Outdated
Comment thread tools/topology/topology2/cavs-sdw-src-gain-mixin.conf Outdated
@fredoh9

fredoh9 commented May 22, 2023

Copy link
Copy Markdown
Contributor

Device test with TGLU_RVP_SDW_IPC4ZPH failed because my test kept running after my reservation was expired. This is my bad, I reserved the device too tight. Sorry about that.

Public link: https://sof-ci.01.org/sofpr/PR7640/build8284/devicetest/index.html
Internal test link: result/planresultdetail/26186

@ranj063
ranj063 requested a review from plbossart May 22, 2023 21:26

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM @ranj063, to the extent of my ability to review topology files.

Only a couple of comments below

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

commit title: topology2: componenets:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fixed now

Comment thread tools/topology/topology2/include/components/alh-dai-copier.conf Outdated
ranj063 added 5 commits May 22, 2023 16:22
…opiers

Create a new class for ALH because they are different from the other DAI
types with DAI index being irrelevant. So, it would need a new naming
scheme that's more meaningful. For ex: dai-copier-ALH.SDW1-Playback.0

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This is specifically meant to be used with ALH DAI copiers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Replace the use of the generic dai-copier class with the ALH specific
DAI copier and pipeline class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Remove ALH support in the generic dai-copier class as it has its own
class now.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
When there are aggregated amps, the topology includes a DAI copier for
each aggregated DAI. But, since the second DAI is not connected to
anything in topology, it doesn't show up in the graph. So, add a virtual
widget and connect it to the aggregated DAI and the gain module to show
its existence in the graph. When parsing the topology, the kernel
ignores all routes that contain a virtual widget at any end of the
route.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@ranj063

ranj063 commented May 23, 2023

Copy link
Copy Markdown
Collaborator Author

Usual failures with nocodec. Merging.

@ranj063
ranj063 merged commit 3835846 into thesofproject:main May 23, 2023
@ranj063
ranj063 deleted the fix/dai_copier branch May 23, 2023 01:53
@marc-hb

marc-hb commented May 24, 2023 •

Copy link
Copy Markdown
Collaborator

Regression reported in

Most tests are failing on ADLP_SKU0B00_SDCA_IPC4ZPH

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.

5 participants