/* convert from the zero-based int to the byte/word for usb descriptor  */
static int convert_bytes_value(struct usb_mixer_elem_info *cval, int val)
/* convert from the zero-based int to the byte/word for usb descriptor  */
static int convert_bytes_value(struct usb_mixer_elem_info *cval, int val)
{
	switch (cval->val_type) {
	case USB_MIXER_BOOLEAN:
		return !!val;
	case USB_MIXER_INV_BOOLEAN:
		return !val;
	case USB_MIXER_S8:
	case USB_MIXER_U8:
		return val & 0xff;
	case USB_MIXER_S16:
	case USB_MIXER_U16:
		return val & 0xffff;
	}
	return 0;
}