dv patch by Max Krasnyansky (maxk at qualcomm dot com)