/* find an audio control unit with the given unit id  */
static void* find_audio_control_unit(struct mixer_build *state, unsigned char unit)
/* find an audio control unit with the given unit id  */
static void* find_audio_control_unit(struct mixer_build *state, unsigned char unit)
{
	unsigned char *p;
	p = NULL;
	while ((p = snd_usb_find_desc(state->buffer, state->buflen, p,
				      USB_DT_CS_INTERFACE)) != NULL) {
		if (p[0] >= 4 && p[2] >= INPUT_TERMINAL && p[2] <= EXTENSION_UNIT && p[3] == unit)
			return p;
	}
	return NULL;
}