Skip to content

topology: clean up platform specific macro - #2461

Merged
lgirdwood merged 1 commit into
thesofproject:masterfrom
fredoh9:fix/clean_ssp_platform_specific
Mar 4, 2020
Merged

lgirdwood merged 1 commit into
thesofproject:masterfrom
fredoh9:fix/clean_ssp_platform_specific

Conversation

@fredoh9

@fredoh9 fredoh9 commented Feb 28, 2020

Copy link
Copy Markdown
Contributor

All platform specific changes are moved to new file, platform/intel/all.m4.

Signed-off-by: Fred Oh fred.oh@linux.intel.com

Got a review comment from #2444
Compared all conf and tplg files before and after this change.

@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 really in agreement here, sorry, see comments below

Comment thread tools/topology/sof-cml-rt5682.m4 Outdated

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.

sorry, it makes no sense to move this to a common code. This can only be used for cml-rt5682 based topology. The SSP_INDEX is really tied to a specific hw, it can't be reused blindly. NAK on this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your comment. I will review again, any way I can make this simple and generic. I will think about belwo comments as well.

Comment thread tools/topology/platform/intel/all.m4 Outdated

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.

meh. that looks like testing the limits of M4 nested ifs...

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.

also all.m4 is not really a great name...

Comment thread tools/topology/platform/intel/all.m4 Outdated

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.

NAK on this, see other comment.

Comment thread tools/topology/platform/intel/all.m4 Outdated

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, this is either too limited or too broad. And it's not really good since on WHK/CML the mclk is fixed but on APL/ICL/TGL it's programmable

@lgirdwood lgirdwood 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.

What I mean is the we have a cml-sku.m4, whl-sku.m4, byt-sku.m4 etc (one for each platform + sku) and this file is included viainclude(PLATFORM) where PLATFORM is passed in during compilation. We probably have more than one SKU per platform too hence we need an optional -sku suffix.
Each platform.m4 (i.e. whl.m4, cml.m4) will contain the SSP mappings and settings that platform + sku only.

@lgirdwood lgirdwood 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.

Looks better, but the goal is more simplification that should be applied to all differentiation. @macchian fyi. i.e. I do not want to see lots of if else if else if else conditional logic in the topology to parse the arguments passed in my calling script.

@lgirdwood lgirdwood Mar 3, 2020 •

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.

The naming for SKU should be according to the DAI differentiation (if any) e.g.

  1. If all CML boards use same SSP, DMIC then just call it cml.m4
  2. If some CML boards use SSP2 and other use SSP3 then create cml-ssp2.m4 and cml-ssp3.m4
  3. Same as 2 but for DMICs.

Comment thread tools/topology/sof-cml-demux-rt5682.m4 Outdated

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.

Why not just do

include(`platform/intel/PLATFORM.m4`)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@lgirdwood PLATFORM is set from makefile. and sof-cml-demux-rt5682.m4 is shared between whl and cml. if/else is needed in somewhere doesn't it?

        "sof-cml-demux-rt5682\;sof-cml-demux-rt5682\;-DPLATFORM=cml"                                                                            
        "sof-cml-demux-rt5682\;sof-whl-demux-rt5682\;-DPLATFORM=whl"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@lgirdwood now I got it. PLATFORM.m4. will update again.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@lgirdwood I updated again, could you review agian?

icl, cml whl are sharing some toplogy files. Create platform specific files
including DSP configuration, SSP setting and DMIC to simplify platform
settings.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
@fredoh9
fredoh9 force-pushed the fix/clean_ssp_platform_specific branch from c25b273 to 4902f36 Compare March 3, 2020 21:19

@lgirdwood lgirdwood 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.

Looks good. @macchian fyi

@lgirdwood

Copy link
Copy Markdown
Member

@fredoh9 btw, please feel free to looks through all the board/machine topologies for where we have conditional logic and do a similar fixes.

@lgirdwood

Copy link
Copy Markdown
Member

SOFCI TEST

@lgirdwood

Copy link
Copy Markdown
Member

Rerun CI as internal CI reported only partial results. @wwittbrx fyi.

@fredoh9

fredoh9 commented Mar 4, 2020

Copy link
Copy Markdown
Contributor Author

@fredoh9 btw, please feel free to looks through all the board/machine topologies for where we have conditional logic and do a similar fixes.

@lgirdwood Sure I will review board/machine topologies after this. Once I touch one it cause chain effect to other files. I'd like to create new one. Touching m4 file is a bit tricky, I need to make sure all conf/tplg files are same after the change also.

@lgirdwood
lgirdwood merged commit 752f086 into thesofproject:master Mar 4, 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.

3 participants