Lines Matching full:jack

23 #include <sound/jack.h>
2185 /* Jack detect and button-press timings */
2213 /* Check the jack was not removed underneath us */
2230 * The pins get temporarily shorted on jack unplug, so we poll for
2242 snd_soc_jack_report(rt5640->jack, SND_JACK_BTN_0,
2250 snd_soc_jack_report(rt5640->jack, 0, SND_JACK_BTN_0);
2265 * We get the insertion event before the jack is fully inserted at which
2277 /* Check the jack is still connected before checking ovcd */
2292 dev_dbg(component->dev, "jack mic-gnd shorted\n");
2298 dev_dbg(component->dev, "jack mic-gnd open\n");
2321 /* mic jack */
2324 dev_dbg(component->dev, "mic jack status %d\n",
2333 /* headphone jack */
2336 dev_dbg(component->dev, "headphone jack status %d\n",
2345 snd_soc_jack_report(rt5640->jack, jack_type, SND_JACK_HEADSET);
2351 /* Jack removed, or spurious IRQ? */
2352 if (rt5640->jack->status & SND_JACK_HEADPHONE) {
2353 if (rt5640->jack->status & SND_JACK_MICROPHONE) {
2358 snd_soc_jack_report(rt5640->jack, 0,
2360 dev_dbg(component->dev, "jack unplugged\n");
2362 } else if (!(rt5640->jack->status & SND_JACK_HEADPHONE)) {
2363 /* Jack inserted */
2375 snd_soc_jack_report(rt5640->jack, status, SND_JACK_HEADSET);
2384 * IRQs on both edges (so as to detect both jack plugin and
2392 * If the jack-detect IRQ flag goes high (unplug) after our
2409 if (rt5640->jack)
2446 * of over-current, when the mic-contact in the jack is short-circuited,
2463 * soc_remove_component() force-disables jack and thus rt5640->jack
2466 if (!rt5640->jack)
2477 if (rt5640->jack->status & SND_JACK_MICROPHONE) {
2480 snd_soc_jack_report(rt5640->jack, 0, SND_JACK_BTN_0);
2486 rt5640->jack = NULL;
2490 struct snd_soc_jack *jack,
2513 * All IRQs get or-ed together, so we need the jack IRQ to report 0
2514 * when a jack is inserted so that the OVCD IRQ then toggles the IRQ
2538 rt5640->jack = jack;
2539 if (rt5640->jack->status & SND_JACK_MICROPHONE) {
2576 /* sync initial jack state */
2587 struct snd_soc_component *component, struct snd_soc_jack *jack)
2619 rt5640->jack = jack;
2625 rt5640->jack = NULL;
2630 /* sync initial jack state */
2638 struct snd_soc_jack *jack, void *data)
2642 if (jack) {
2644 rt5640_enable_hda_jack_detect(component, jack);
2646 rt5640_enable_jack_detect(component, jack, data);
2742 "realtek,jack-detect-source", &val) == 0) {
2746 dev_warn(component->dev, "Warning: Invalid jack-detect-source value: %d, leaving jack-detect disabled\n",
2750 if (!device_property_read_bool(component->dev, "realtek,jack-detect-not-inverted"))
2801 if (rt5640->jack) {
2802 /* disable jack interrupts during system suspend */
2829 if (rt5640->jack) {