sound: soc: vts: add VTS wakelock from N770F
This commit is contained in:
parent
bcdb33a6ad
commit
8d58ae9417
2 changed files with 9 additions and 3 deletions
|
@ -42,7 +42,7 @@ extern int vts_clear_sram(struct platform_device *pdev);
|
|||
* @return true if VTS is on, false on otherwise
|
||||
*/
|
||||
extern volatile bool vts_is_on(void);
|
||||
extern volatile bool vts_is_recognitionrunning(void);
|
||||
extern bool vts_is_recognitionrunning(void);
|
||||
#else /* !CONFIG_SND_SOC_SAMSUNG_VTS */
|
||||
static inline int vts_acquire_sram(struct platform_device *pdev, int vts)
|
||||
{ return -ENODEV; }
|
||||
|
|
|
@ -615,7 +615,7 @@ volatile bool vts_is_on(void)
|
|||
}
|
||||
EXPORT_SYMBOL(vts_is_on);
|
||||
|
||||
volatile bool vts_is_recognitionrunning(void)
|
||||
bool vts_is_recognitionrunning(void)
|
||||
{
|
||||
return p_vts_data && p_vts_data->running;
|
||||
}
|
||||
|
@ -1811,6 +1811,10 @@ static int vts_runtime_suspend(struct device *dev)
|
|||
spin_unlock_irqrestore(&data->state_spinlock, flag);
|
||||
}
|
||||
|
||||
if(wake_lock_active(&data->wake_lock)) {
|
||||
dev_info(dev, "vts wake locked. forced unlock\n");
|
||||
wake_unlock(&data->wake_lock);
|
||||
}
|
||||
data->enabled = false;
|
||||
data->exec_mode = VTS_OFF_MODE;
|
||||
data->active_trigger = TRIGGER_SVOICE;
|
||||
|
@ -2508,6 +2512,8 @@ static int samsung_vts_probe(struct platform_device *pdev)
|
|||
|
||||
device_init_wakeup(dev, true);
|
||||
|
||||
of_platform_populate(np, NULL, NULL, dev);
|
||||
|
||||
/* Allocate Memory for error logging */
|
||||
for (i = 0; i < VTS_DUMP_LAST; i++) {
|
||||
if (i == RUNTIME_SUSPEND_DUMP) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue