[alsa-devel] Additional bugs in tlv320aic3x.c driver (register defaults)

Rick Mann rmann at latencyzero.com
Thu Oct 1 02:12:56 CEST 2015


Benoît,

I've discovered some additional minor bugs in the tlv320aic3104 support in the tlv320aic3x driver. In this instance, the reg_default values aren't quite right.

I've written a corrected list, but the set specified includes the reserved registers. I don't know if devm_regmap_init_i2c() attempts to write the default values, or uses them as the initial values in a cache (and attempts to avoid writes unless specific registers change). In my debugging, it does not appear to write the entire register map at any point to the IC, so I think it's the latter.

I also don't know how the regmap is intended to be used. It is passed to devm_regmap_init_i2c() as .reg_defaults, implying the array provides starting values, but other parts of the code refer to the array as if the values are changed in that array as they're read and written.

Documentation for regmap suggests regmaps can be "sparse," which I presume would be done by omitting the reserved registers from the defaults array.

In any case, the fix is not trivial, and I don't want to go down that road not knowing if it's the right approach. Does this make sense?

For reference, the registers with different default values (than the ones specified in that file) are 32, 33, 51, 58, 65, 72, 93.

Thanks,

-- 
Rick Mann
rmann at latencyzero.com




More information about the Alsa-devel mailing list