Skip to content

topology: Update CML topologies - #1774

Merged
lgirdwood merged 3 commits into
thesofproject:masterfrom
sathyap-chrome:remotes/sathya/master
Sep 27, 2019
Merged

lgirdwood merged 3 commits into
thesofproject:masterfrom
sathyap-chrome:remotes/sathya/master

Conversation

@sathyap-chrome

Copy link
Copy Markdown
Contributor

With m/n divider support, we can now support 24 bit/ 48k
on max98357a.

Signed-off-by: Sathya Prakash M R sathya.prakash.m.r@intel.com

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

See comments below, I believe the support for the max98357a was a botched job and we need to think more when we have firmware/topologies dependencies like this

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.

how was this ever merged? we played 48kHz at the wrong frequency?

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.

Unfortunately yes. maxim has a depenancy that BCLK should be exactly = FSYNC * CH * Bit till we had m/n divider BCLK should only be a divisior of MCLK and hence this was only working configuration available which maxim also suggested to be ok to use.

With m/n divider now available, we can satisfy the maxim requirement by giving 2.304 Mhz BCLK.

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.

so the problem I have here is that you have a strong dependency on firmware supporting M/N. There should be some sort of ABI dependency.
Well at the same time the initial code is completely broken, I sincerely hope no one ever used this topology...

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.

Earlier topology was only used for enabling purpose. Since the m/n divider is part of the new drop now, i pushed this change. Can we merge this so that we update the new topology ?

Is there a way we can protect this change under ABI dependancy - say if ABI > x then choose this config, else move to old config ?

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 there a way we can protect this change under ABI dependancy - say if ABI > x then choose this config, else move to old config ?

@sathyap-chrome ABI info is generated at tplg build time using the script get_abi.sh and defined in the variables SOF_ABI_MAJOR/MINOR/PATCH in abi.h (this is generated so it will be in the build_tools/topology folder). You could include this in your topology m4 and check if the ABI version is valid to use the M/N divider.

@plbossart

plbossart commented Aug 29, 2019 via email

Copy link
Copy Markdown
Member

@lgirdwood

Copy link
Copy Markdown
Member

@sathyap-chrome does the latest code now have M/N support ?

@sathyap-chrome

Copy link
Copy Markdown
Contributor Author

@lrgirdwo yes.

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

Btw, I'm assume M/N setting is implied from the MCLK/BCLK setting and not directly set in this file.

Comment thread tools/topology/sof-cml-rt1011-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.

Can we use 0xF here instead of F ? Makes it more obvious that it's a mask.

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.

Sure.
As per design, the M/N setting is automatically done based on the MCLK and BCLK and is not directed by the topology.

@tlauda

tlauda commented Sep 14, 2019

Copy link
Copy Markdown
Contributor

@sathyap-chrome Can you fix the build issues?

@sathyap-chrome

Copy link
Copy Markdown
Contributor Author

Sure. i'm reworking the patches. sorry for typo in this one.

Some of the features on topology need to have
ABI version check. This adds few definitions to
check ABI version being 3.9 or more.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Add rt1011 speaker CML Audio topology on top of
sof_rt5682 where RT1011 is configured as
TDM 4 SLOT ( 2 CH PB and 4 CH Feedback), 100 FS BCLK.
BCLK delay is added for supported ABI versions.

Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
@sathyap-chrome sathyap-chrome changed the title topology: update max98357a configuration in CML topology: Update CML topologies Sep 23, 2019
With m/n divider support, we can now support 24 bit/ 48k
on max98357a.
Add check to only use update BCLK if m/n support is present.
Else fallback to older settings.

Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
@sathyap-chrome

Copy link
Copy Markdown
Contributor Author

Reworked the patches based on earlier suggestions.
The 1st commit now provides ABI version help to ensure we enable features based on when support was added.

based on @ranj063 suggestion, we can consider both BCLK delay and m/n support added in ABI version 3.9. So version check is made as > 3.8 ( hence 3.9 or greater.

@ranj063 ranj063 left a comment

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.

@sathyap-chrome the changes to check for ABI are fine but we need @plbossart to approve if the SSP config params are correct.

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