+
+ // Try to add an input at the given card/device. If it succeeds, return
+ // synchronously. If not, fire off a background thread to try up to
+ // <num_retries> times.
+ void probe_device_with_retry(unsigned card_index, unsigned dev_index);
+ void probe_device_retry_thread_func(unsigned card_index, unsigned dev_index);
+
+ enum class ProbeResult {
+ SUCCESS,
+ DEFER,
+ FAILURE
+ };
+ ProbeResult probe_device_once(unsigned card_index, unsigned dev_index);
+
+ // Must be called with <mu> held. Will allocate a new entry if needed.
+ // The returned entry will be set to READY state.
+ unsigned find_free_device_index();
+
+ friend class ALSAInput;