mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
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:
parent
f2120fc2b6
commit
300a5e3ed7
8 changed files with 28 additions and 74 deletions
|
|
@ -1886,12 +1886,10 @@ static void set_sink_name(pa_sink_new_data *data, pa_modargs *ma, const char *de
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
@ -1901,7 +1899,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_OUTPUT)))
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue