def _find_device_on_list(device, device_list):
    """Return index of given device on the list
    :param device: SoundCard Device instance to find
    :param device_list: List of audio devices (tuples of SoundCard Device instance and name)
    """
    return next(
        (i for i, e in enumerate(device_list)
         if device and device.name == e[0].name), 0
    )