Add function vol2attn to return an attenuation for a given volume. Needed in alsa as well as in player.
Make use of vol2attn in software and hardware mixers.