Hi, On Mon, 9 Nov 2020, Bard Liao wrote: > Besides, it doesn't make sense to read feedback data when codec is not > active. To avoid the regmap_read error, this patch try to return a fake > value when kcontrol _get is called in suspend. > However, the question is what is the "correct" behavior when we try to > read a volatile register when cache only is set. > 1. return an error code to signal codec is not available as what we have > now. > 2. return a fake value like what this patch do. > 3. wake-up the codec and always return a valid value. any thoughts on this anyone? This seems like a generic concern w.r.t. ASoC codec drivers and behavior of volatile registers exposed as kcontrols, and what happens when codec is in suspend. Currently regmap read will return -EBUSY in this case (case 1 above). I personally think this is still the best option. It's a bit ugly as there could be other reasons for -EBUSY as well, but at least user-space won't silently read invalid values. Waking up the codec (3) could work as well, but should this be done in all codec drivers that have volatile regs in regmap? Again, user-space would get consistent results, with the expense of extra/additional codec wakeups. Br, Kai