Messages in this thread | | | Date | Tue, 7 Feb 2023 09:45:46 +1300 | From | Daniel Beer <> | Subject | Re: [PATCH v3 2/2] ASoC: tas5805m: add missing page switch. |
| |
On Mon, Feb 06, 2023 at 01:11:09PM +0000, Mark Brown wrote: > On Thu, Oct 27, 2022 at 09:38:38PM +1300, Daniel Beer wrote: > > In tas5805m_refresh, we switch pages to update the DSP volume control, > > but we need to switch back to page 0 before trying to alter the > > soft-mute control. This latter page-switch was missing. > > You should just use the register windowing support in regmap, it will > take care of this for you, avoiding any further similar errors.
Hi Mark,
Thanks for reviewing.
We did discuss this a while back when the driver first went in. Unfortunately the vendor software tools provide configuration for the part in the form of a sequence of raw register writes, including explicit page changes:
https://lore.kernel.org/lkml/Yd85bjKEX9JnoOlI@sirena.org.uk/
Aside from this, I have two other practical issues.
The first is that I'm not sure how exactly to implement the paging scheme in terms of regmap_range_cfg (assuming this is what you're referring to). This chip has multi-level paging (books/pages), with the book selection register itself requiring paging to access. A sequence of three register writes is therefore required in the general case to select the correct page. I had a quick look at a random assortment of existing regmap_range_cfg uses, but didn't find anything that looked like the same problem.
Secondly, the patches as submitted here have been tested, but I don't currently have access to hardware. I'm very hesitant to make a significant change without retesting and leave the driver in a broken state again.
Cheers, Daniel
-- Daniel Beer Firmware Engineer at Igor Institute daniel.beer@igorinstitute.com or +64-27-420-8101 Offices in Seattle, San Francisco, and Vancouver BC or (206) 494-3312
| |