Skip to content

topology: sof-cml-rt5682: change SSP port num for rt5682 - #976

Merged
lgirdwood merged 2 commits into
thesofproject:masterfrom
ranj063:fix/sof-cml-rt5682-tplg
Feb 18, 2019
Merged

lgirdwood merged 2 commits into
thesofproject:masterfrom
ranj063:fix/sof-cml-rt5682-tplg

Conversation

@ranj063

@ranj063 ranj063 commented Feb 7, 2019

Copy link
Copy Markdown
Collaborator

The CML board has the rt5682 connected to SSP0 and the
machine driver defines the dai link for the headset
with the name "SSP0-codec" too. So change the topology
file accordingly.

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

@ranj063
ranj063 requested a review from xiulipan as a code owner February 7, 2019 04:55
@ranj063
ranj063 requested a review from plbossart February 7, 2019 05:19

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

isn't this going to break the RVP-based solution? the WHL-based solution does use SSP1 as a quirk (see the sof_rt5682.c machine driver (line 66) , and we have no way of detecting differences between WHL and CML.

@ranj063

ranj063 commented Feb 7, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart yes it will. Should we have 2 separate tplg files then?

@lgirdwood

Copy link
Copy Markdown
Member

@ranj063 yes two files, but it seem the kernel has no way of knowing which to load ? @plbossart DMI name for differentiation ?

@plbossart

plbossart commented Feb 7, 2019 via email

Copy link
Copy Markdown
Member

@ranj063

ranj063 commented Feb 7, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart I have a crazy idea of maybe avoiding the SSP numbers from topology. With a little bit of intelligence built into the topology parser, we can derive that information from the machine driver. Let me think about this today.

@lgirdwood

Copy link
Copy Markdown
Member

@ranj063 we will have FW with no OS or other OS so any port mapping must be explicit from topology.
@plbossart we can still use the same file, but we have a macro for SSP port that is set differently depending on whether we build topology for CML or another.

@plbossart

plbossart commented Feb 8, 2019 via email

Copy link
Copy Markdown
Member

@ranj063

ranj063 commented Feb 10, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart @lgirdwood sure, I will add the option to choose which platform the topology is being built for

@plbossart

Copy link
Copy Markdown
Member

We really need think about distributions. They will generate a set of files and that will be it. The approach where we can dynamically change the topology file depending on what is needed is very nice for developers, but can't work for distros. we really a have two solutions
a) use multiple topology files, and quirks to define which one is used
b) use a single file but logic that updates the BE part of the topology file.

@lgirdwood

Copy link
Copy Markdown
Member

@plbossart option b will work today. i.e. we take an existing topology.m4 per platform (since the topology will depend on avail cores/mips/memory) and the adjust/override the port mapping in the driver. However, this would still need a quirk table in the driver unless you have thought of a better method ?

@plbossart

Copy link
Copy Markdown
Member

@lgirdwood we typically have a quirk in the machine driver, so ideally we'd update the topology as we register the card. If we need a quirk in both the machine driver and platform driver that's really painful.

@lgirdwood

Copy link
Copy Markdown
Member

@plbossart I think we are good then just having the quirk in the machine driver then. We should de-duplicate some of our generic platform topologies since I think we have a lot of overlap with only changes for SSP mappings.

@ranj063

ranj063 commented Feb 13, 2019

Copy link
Copy Markdown
Collaborator Author

@lgirdwood @plbossart can I duplicate the topologies for now and then incrementally clean them up for all platforms in a future PR after my holidays?

@lgirdwood

Copy link
Copy Markdown
Member

@ranj063 yep, as long as we have an enhancement to track

The CML board has the rt5682 connected to SSP0 and the
machine driver defines the dai link for the headset
with the name "SSP0-codec" too. So change the topology
file accordingly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add topology for WHL with RT5682. This will be merged with
sof-cml-rt5682 in the future to avoid maintaining 2 files
with just the difference in SSP port numbers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@ranj063
ranj063 force-pushed the fix/sof-cml-rt5682-tplg branch from 6f22e0e to 06acc82 Compare February 14, 2019 21:49
@ranj063
ranj063 requested a review from jajanusz as a code owner February 14, 2019 21:49
@ranj063

ranj063 commented Feb 14, 2019

Copy link
Copy Markdown
Collaborator Author

@lgirdwood updated now. I'll add an issue to make sure to clean this up later

@lgirdwood
lgirdwood merged commit 2b4467c into thesofproject:master Feb 18, 2019
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