[alsa-devel] [PATCH] ASoC: da732x: Mark DC offset control registers volatile

Opensource [Adam Thomson] Adam.Thomson.Opensource at diasemi.com
Mon Feb 24 12:31:25 CET 2014


On Mon, 24 Feb 2014 03:01:37 +0000, Mark Brown wrote:

> From: Mark Brown <broonie at linaro.org>
> 
> The driver reads from the DC offset control registers during callibration
> but since the registers are marked as volatile and there is a register
> cache the values will not be read from the hardware after the first reading
> rendering the callibration ineffective.
 
Guessing that should read 'not marked as volatile'.

> It appears that the driver was originally written for the ASoC level
> register I/O code but converted to regmap prior to merge and this issue
> was missed during the conversion as the framework level volatile register
> functionality was not being used.

Yes you're correct here, unfortunately. A good spot.

> +static bool da732x_volatile(struct device *dev, unsigned int reg)
> +{
> +	switch (reg) {
> +	case DA732X_REG_HPL_DAC_OFF_CNTL:
> +	case DA732X_REG_HPR_DAC_OFF_CNTL:
> +		return true;
> +	default:
> +		return false;
> +	}
> +}
> +

Having looked over the driver again, can you include the following
registers as well: 

DA732X_REG_HPL
DA732X_REG_HPR

Also, if we're doing this then you can move to using snd_soc_read()
instead of hw_read(), I guess.


More information about the Alsa-devel mailing list