acp: add debug for open and close

Debug open and close calls.
Make pa_alsa_close to close the device.
This commit is contained in:
Wim Taymans 2022-08-05 12:31:28 +02:00
parent 34c1c1614e
commit a9ced45d4b
5 changed files with 27 additions and 18 deletions

View file

@ -382,8 +382,7 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
0, NULL, NULL, false))) {
pa_alsa_init_proplist_pcm(NULL, m->output_proplist, m->output_pcm);
pa_proplist_setf(m->output_proplist, "clock.name", "api.alsa.%u", index);
snd_pcm_close(m->output_pcm);
m->output_pcm = NULL;
pa_alsa_close(&m->output_pcm);
m->supported = true;
pa_channel_map_init_auto(&m->channel_map, m->sample_spec.channels, PA_CHANNEL_MAP_AUX);
}
@ -413,8 +412,7 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
0, NULL, NULL, false))) {
pa_alsa_init_proplist_pcm(NULL, m->input_proplist, m->input_pcm);
pa_proplist_setf(m->input_proplist, "clock.name", "api.alsa.%u", index);
snd_pcm_close(m->input_pcm);
m->input_pcm = NULL;
pa_alsa_close(&m->input_pcm);
m->supported = true;
pa_channel_map_init_auto(&m->channel_map, m->sample_spec.channels, PA_CHANNEL_MAP_AUX);
}