/* manual mapping of mixer names if the mixer topology is too complicated and the parsed names are ambiguous, add the entries in usbmixer_maps.c.  */
static int check_mapped_name(struct mixer_build *state, int unitid, int control, char *buf, int buflen)
/* manual mapping of mixer names if the mixer topology is too complicated and the parsed names are ambiguous, add the entries in usbmixer_maps.c.  */
static int check_mapped_name(struct mixer_build *state, int unitid, int control, char *buf, int buflen)
{
	const struct usbmix_name_map *p;
	if (! state->map)
		return 0;
	for (p = state->map; p->id; p++) {
		if (p->id == unitid && p->name &&
		    (! control || ! p->control || control == p->control)) {
			buflen--;
			return strlcpy(buf, p->name, buflen);
		}
	}
	return 0;
}