alsa: Remove unnecessary hctl handles being passed around

Now that we have switched to using the mixer handle only,
there is no use for sending hctl handles around.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
David Henningsson 2014-09-01 15:58:22 +02:00
parent f2120fc2b6
commit 300a5e3ed7
8 changed files with 28 additions and 74 deletions

View file

@ -1604,12 +1604,10 @@ static void set_source_name(pa_source_new_data *data, pa_modargs *ma, const char
}
static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char *element, bool ignore_dB) {
snd_hctl_t *hctl;
if (!mapping && !element)
return;
if (!(u->mixer_handle = pa_alsa_open_mixer_for_pcm(u->pcm_handle, &u->control_device, &hctl))) {
if (!(u->mixer_handle = pa_alsa_open_mixer_for_pcm(u->pcm_handle, &u->control_device))) {
pa_log_info("Failed to find a working mixer device.");
return;
}
@ -1619,7 +1617,7 @@ static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char
if (!(u->mixer_path = pa_alsa_path_synthesize(element, PA_ALSA_DIRECTION_INPUT)))
goto fail;
if (pa_alsa_path_probe(u->mixer_path, u->mixer_handle, hctl, ignore_dB) < 0)
if (pa_alsa_path_probe(u->mixer_path, u->mixer_handle, ignore_dB) < 0)
goto fail;
pa_log_debug("Probed mixer path %s:", u->mixer_path->name);