19 Jul
2013
19 Jul
'13
8:51 p.m.
On Fri, Jul 19, 2013 at 07:07:21PM +0800, Barry Song wrote:
+#ifndef CONFIG_ANDROID
- unsigned int gpio_hp_detect;
- struct snd_soc_jack hp_jack;
+#endif
Not for mainline. I'd suggest setting it up for extcon anyway especially if it's just a simple accessory, that should work for both Android and mainline.
+static int sirf_inner_speaker_out_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
+{
- int is_spk_out = ucontrol->value.integer.value[0];
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct snd_soc_card *card = codec->card;
- struct sirf_inner_card *sinner_card = snd_soc_card_get_drvdata(card);
- if (gpio_is_valid(sinner_card->gpio_spk_pa))
gpio_direction_output(sinner_card->gpio_spk_pa, is_spk_out);
- return 0;
+}
Oh, right. If this is doing what I think this is doing you want to use DAPM within the CODEC then this can just become a pin switch or you can hook in directly if you continue to use soc-jack - it has DAPM integration.