Skip to content

ASoC: codec: max98373-sdw: Avoid regmap read of volatile reg. during … - #2507

Closed
naveen-manohar wants to merge 1 commit into
thesofproject:topic/sof-devfrom
naveen-manohar:max98373_amixer_err
Closed

naveen-manohar wants to merge 1 commit into
thesofproject:topic/sof-devfrom
naveen-manohar:max98373_amixer_err

Conversation

@naveen-manohar

Copy link
Copy Markdown

…suspend

If codec is suspended, a error of Device or resource busy occurs when
executing amixer. Amixer accesses AMP_PATH_GAIN which is a volatile register
and the regmap is set to cache_only when codec is suspended, so regmap can't
get its data from regmap cache and return -EBUSY.

Patch removes volatile attribute of such registers.

Signed-off-by: Naveen Manohar naveen.m@intel.com

…spend

If codec is suspended,  a error of Device or resource busy occurs when
executing amixer. Amixer accesses AMP_PATH_GAIN which is a volatile register
and the regmap is set to cache_only when codec is suspended, so regmap can't
get its data from regmap cache and return -EBUSY.

Patch removes volatile attribute of such registers.

Signed-off-by: Naveen Manohar <naveen.m@intel.com>
@naveen-manohar

Copy link
Copy Markdown
Author

Now I noticed, already there was a discussion here - b82ead2#r444520713

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

Commit message doesn't seem right.
Can you also add a BugLink: .... tag so that this is tied to an actual bug.
Thanks!

switch (reg) {
case MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK:
case MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK:
case MAX98373_R20B6_BDE_CUR_STATE_READBACK:

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 commit message states "Patch removes volatile attribute of such registers."

That doesn't seem right, it no longer exposes those registers?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Correct.. shall modify it.

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.

We should not remove those registers if they are volatile.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Notice that Amp temperature value can be read for calibration in factory test and boot time.., so these registers should be exposed. We need to find some way to avoid errors during suspend..
Any suggestions or inputs please ?

@naveen-manohar

Copy link
Copy Markdown
Author

@bardliao, one Query, we do observe one such errors wrt rt5682-sdw & it maps to

Commit message doesn't seem right.
Can you also add a BugLink: .... tag so that this is tied to an actual bug.
Thanks!

Done - #2510

@RanderWang

RanderWang commented Oct 15, 2020 •

Copy link
Copy Markdown

please check #2226. I made such change in my first version and some register change was discarded after discussing. please check: #2226 (comment)

@plbossart

Copy link
Copy Markdown
Member

@bardliao provided a patch upstream already.

@plbossart plbossart closed this Dec 15, 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.

[TGL] [SDW]: max98373/rt5682 SDW error at soc_component_read_no_lock during suspend

4 participants