1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| static void profile_finalize_probing(pa_alsa_profile *to_be_finalized, pa_alsa_profile *next) { pa_alsa_mapping *m; uint32_t idx;
if (!to_be_finalized) return;
if (to_be_finalized->output_mappings) PA_IDXSET_FOREACH(m, to_be_finalized->output_mappings, idx) {
if (!m->output_pcm) continue;
if (to_be_finalized->supported) m->supported++;
if (next && next->output_mappings && pa_idxset_get_by_data(next->output_mappings, m, NULL)) continue;
snd_pcm_close(m->output_pcm); m->output_pcm = NULL; }
if (to_be_finalized->input_mappings) PA_IDXSET_FOREACH(m, to_be_finalized->input_mappings, idx) {
if (!m->input_pcm) continue;
if (to_be_finalized->supported) m->supported++;
if (next && next->input_mappings && pa_idxset_get_by_data(next->input_mappings, m, NULL)) continue;
snd_pcm_close(m->input_pcm); m->input_pcm = NULL; } }
|