alsa-mixer/card: Move to use the new mixer interface

Use the new mixer API to get callbacks, instead of using the hctl
API. Using the hctl API caused a memory leak, because alsa-lib itself
used the hctl callbacks, which we were previously overriding.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
David Henningsson 2014-09-01 15:41:39 +02:00
parent 1fd8848e64
commit f2120fc2b6
3 changed files with 25 additions and 25 deletions

View file

@ -164,7 +164,7 @@ struct pa_alsa_jack {
char *alsa_name; /* E g "Headphone Jack" */
bool has_control; /* is the jack itself present? */
bool plugged_in; /* is this jack currently plugged in? */
snd_hctl_elem_t *hctl_elem; /* Jack detection handle */
snd_mixer_elem_t *melem; /* Jack detection handle */
pa_available_t state_unplugged, state_plugged;
pa_alsa_required_t required;