/* Note that this function expects to be passed the complement of the original code word. This is in keeping with ISDN conventions.  */
int ulaw2linear(unsigned char u_val)
/* Note that this function expects to be passed the complement of the original code word. This is in keeping with ISDN conventions.  */
int ulaw2linear(unsigned char u_val)
{
	int		t;
	u_val = ~u_val;
	t = ((u_val & QUANT_MASK) << 3) + BIAS;
	t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT;
	return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS));
}