htcleo: fixed headset microphone detection
This commit is contained in:
parent
0e3a49a809
commit
a09e4020ff
@ -19,6 +19,7 @@
|
||||
#include <mach/htc_acoustic_qsd.h>
|
||||
#include <asm/gpio.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/htc_headset_mgr.h>
|
||||
|
||||
#include "board-htcleo.h"
|
||||
#include "devices.h"
|
||||
@ -318,12 +319,21 @@ static struct q6audio_analog_ops ops =
|
||||
.get_rx_vol = htcleo_get_rx_vol,
|
||||
};
|
||||
|
||||
static void hs_mic_register(void)
|
||||
{
|
||||
struct headset_notifier notifier;
|
||||
notifier.id = HEADSET_REG_MIC_BIAS;
|
||||
notifier.func = htcleo_mic_enable;
|
||||
headset_notifier_register(¬ifier);
|
||||
}
|
||||
|
||||
void __init htcleo_audio_init(void)
|
||||
{
|
||||
mutex_init(&mic_lock);
|
||||
mutex_init(&bt_sco_lock);
|
||||
q6audio_register_analog_ops(&ops);
|
||||
acoustic_register_ops(&acoustic);
|
||||
hs_mic_register();
|
||||
// q6audio_set_acdb_file("default_PMIC.acdb");
|
||||
}
|
||||
|
||||
|
@ -393,7 +393,7 @@ static int audiojack_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
ret = request_irq(pjack_info->irq_mic,
|
||||
mic_irq_handler, IRQF_DISABLED | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_LOW, "mic_headset", NULL);
|
||||
mic_irq_handler, IRQF_DISABLED | IRQF_TRIGGER_LOW, "mic_headset", NULL);
|
||||
if (ret < 0)
|
||||
goto err_request_detect_irq;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user