rk_headset: enable rk_headset and fix complie error

Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I3f1906ddca16b2fedf403c7c88e00ff1dc4edd42
This commit is contained in:
Shunhua Lan
2021-10-20 22:08:18 +08:00
committed by Tao Huang
parent cd2119c1ce
commit 342259045c
3 changed files with 3 additions and 10 deletions
+2
View File
@@ -240,6 +240,8 @@ source "drivers/rkflash/Kconfig"
source "drivers/rk_nand/Kconfig"
source "drivers/headset_observe/Kconfig"
source "drivers/rknpu/Kconfig"
endmenu
+1
View File
@@ -190,5 +190,6 @@ obj-$(CONFIG_INTERCONNECT) += interconnect/
obj-$(CONFIG_COUNTER) += counter/
obj-$(CONFIG_MOST) += most/
obj-$(CONFIG_RK_FLASH) += rkflash/
obj-$(CONFIG_RK_HEADSET) += headset_observe/
obj-$(CONFIG_RK_NAND) += rk_nand/
obj-$(CONFIG_ROCKCHIP_RKNPU) += rknpu/
@@ -82,9 +82,6 @@ extern int rt5631_headset_mic_detect(bool headset_status);
extern int rt3261_headset_mic_detect(int jack_insert);
#endif
#if defined(CONFIG_SND_SOC_CX2072X)
extern int cx2072x_jack_report(void);
#endif
/* headset private data */
struct headset_priv {
@@ -299,13 +296,6 @@ static void hook_once_work(struct work_struct *work)
}
headset_info->cur_headset_status =
headset_info->isMic ? BIT_HEADSET : BIT_HEADSET_NO_MIC;
#if defined(CONFIG_SND_SOC_CX2072X)
if (cx2072x_jack_report() != -1)
headset_info->cur_headset_status =
(cx2072x_jack_report() == 3) ? BIT_HEADSET :
BIT_HEADSET_NO_MIC;
#endif
if (headset_info->cur_headset_status) {
if (headset_info->isMic) {
extcon_set_state_sync(headset_info->edev,