When this code was split from dev/pad, the "volume" member size was changed
from u_int to uint8_t. This had the unfortunate side-effect of introducing
an integer overflow when adjusting samples as the largest type used was now
int16_t. This change copies the volume level to a temporary u_int and uses
that in the calculation. Should fix recent failures with the
dev/audio/t_pad/pad_output test.
On Allwinner A31 you need to set the CONTROL_IFLG bit to clear it. Add
a "iflg-rwc" property to enable this behaviour.
Don't assume that U-Boot has enabled the TWI clock. Also, for A31, set
the "iflg-rwc" device property for gttwsi.
The SoC RTC works on this board but does not seem to be hooked up to the
battery. Thankfully, there is a PCF8563 attached to TWI2 at address 51h,
so use that instead.