EXTCON_MECHANICAL,
EXTCON_JACK_MICROPHONE,
EXTCON_JACK_HEADPHONE,
+ EXTCON_JACK_LINE_OUT,
EXTCON_NONE,
};
SW_MICROPHONE_INSERT,
attached);
break;
+ case EXTCON_JACK_LINE_OUT:
+ input_report_switch(info->input,
+ SW_LINEOUT_INSERT,
+ attached);
+ break;
}
input_sync(info->input);
madera_set_headphone_imp(info, val);
- madera_extcon_report(info, EXTCON_JACK_HEADPHONE, true);
+ /* Report high impedence cables as line outputs */
+ if(val>= 5000)
+ madera_extcon_report(info, EXTCON_JACK_LINE_OUT, true);
+ else
+ madera_extcon_report(info, EXTCON_JACK_HEADPHONE, true);
if (info->have_mic)
madera_jds_set_state(info, &madera_micd_button);
input_set_capability(info->input,
EV_SW,
SW_JACK_PHYSICAL_INSERT);
+ input_set_capability(info->input,
+ EV_SW,
+ SW_LINEOUT_INSERT);
}
ret = input_register_device(info->input);