idle_rate is uint8_t, sof_cnt is uint32_t. The result is uint32_t, which
is the wrong type for 'abs'. Explicitly cast idle_rate to uint32_t,
subtract sof_cnt and then explicitly cast to int32_t and then use abs,
storing the result in another int32_t which matches the return type for
abs.
This quiets clang warnings about passing unsigned values to abs.
Signed-off-by: Keith Packard <keithp@keithp.com>