ASoC: jack: create kctls according to jack pins info
authorJie Yang <yang.jie@intel.com>
Mon, 27 Apr 2015 13:21:00 +0000 (21:21 +0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 27 Apr 2015 19:38:32 +0000 (21:38 +0200)
Jack kctls are now created according to the pin info.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/soc-jack.c

index 70a9bdd5f3e3684278f44acacab8a24f1ef13ee3..87ca9806f3ee88fdd05617f840b0e9ff57ce34a8 100644 (file)
@@ -197,6 +197,7 @@ int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count,
 
                INIT_LIST_HEAD(&pins[i].list);
                list_add(&(pins[i].list), &jack->pins);
+               snd_jack_add_new_kctl(jack->jack, pins[i].pin, pins[i].mask);
        }
 
        /* Update to reflect the last reported status; canned jack