[HD Mini Android Development] munjeni:
I will try, so do you think kernel side:

/root/android/system/kernel-msm/arch/arm/mach-msm/include/mach/htc_headset_mgr.h:#define BIT_HEADSET (1 << 0)
/root/android/system/kernel-msm/arch/arm/mach-msm/include/mach/htc_headset_mgr.h:#define BIT_HEADSET_NO_MIC (1 << 1)
/root/android/system/kernel-msm/arch/arm/mach-msm/include/mach/htc_headset.h:#define BIT_HEADSET (1 << 0)
/root/android/system/kernel-msm/arch/arm/mach-msm/include/mach/htc_headset.h:#define BIT_HEADSET_NO_MIC (1 << 1)
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: *state |= BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: *state |= BIT_HEADSET;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: state &= ~(BIT_35MM_HEADSET | BIT_HEADSET);
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: state |= BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: state &= ~(BIT_HEADSET | BIT_35MM_HEADSET);
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: state |= BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: state &= ~(BIT_HEADSET | BIT_HEADSET_NO_MIC |
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: state &= ~(BIT_HEADSET | BIT_HEADSET_NO_MIC);
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: state |= BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: state |= BIT_HEADSET;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: if (state & BIT_HEADSET_NO_MIC)
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: state &= ~BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: state |= (BIT_USB_HEADSET | BIT_HEADSET_NO_MIC);
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset_mgr.c: (BIT_HEADSET | BIT_HEADSET_NO_MIC)) != 0)
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: ~(BIT_HEADSET | BIT_HEADSET_NO_MIC));
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: state = BIT_HEADSET | BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: state &= ~(BIT_HEADSET_NO_MIC | BIT_HEADSET);
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: state |= BIT_HEADSET;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: state |= BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: state |= BIT_HEADSET;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: state |= BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: state |= BIT_HEADSET;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: state |= BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: if (switch_get_state(&hi->sdev) & BIT_HEADSET) {
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: if (switch_get_state(&hi->sdev) & BIT_HEADSET)
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: state &= ~(BIT_HEADSET | BIT_HEADSET_NO_MIC);
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: state |= BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_headset.c: state |= BIT_HEADSET;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_35mm_jack.c: hi->ext_35mm_status = BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_35mm_jack.c: hi->ext_35mm_status = BIT_HEADSET;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_35mm_jack.c: hi->ext_35mm_status = BIT_HEADSET_NO_MIC;
/root/android/system/kernel-msm/arch/arm/mach-msm/htc_35mm_jack.c: if ((hi->ext_35mm_status & BIT_HEADSET) == 0) {

or android side?

/root/android/system/frameworks/base/services/java/com/android/server/HeadsetObserver.java: private static final int BIT_HEADSET = (1 << 0);
/root/android/system/frameworks/base/services/java/com/android/server/HeadsetObserver.java: private static final int BIT_HEADSET_NO_MIC = (1 << 1);
/root/android/system/frameworks/base/services/java/com/android/server/HeadsetObserver.java: private static final int SUPPORTED_HEADSETS = (BIT_HEADSET|BIT_HEADSET_NO_MIC);
/root/android/system/frameworks/base/services/java/com/android/server/HeadsetObserver.java: private static final int HEADSETS_WITH_MIC = BIT_HEADSET;

I'm working now with cm6