Files
kernel_common_drivers/drivers/host/host_report.c
T
bangzheng.liu 03cdeebe7b DSP: SC2 far field voice early suspend with dsp [2/3]
PD#SWPL-139800

Problem:
SC2 far field voice need early suspend and record
with dsp.

Solution:
When DSP waked up by VAD, then:
1. DSP notify to AOCPU (would fail by unknown cmd) and ARM
during early suspend.
2. DSP notify to AOCPU (would fail by unknown cmd) and ARM
(would fail by timeout) and do retry after ARM deep sleep and
before AOCPU STR poweroff.
3. DSP notify to AOCPU after AOCPU STR poweroff.
4. when ffv not supported, dsp do not start vwe.

Verify:
sc2_ah212

Change-Id: I0e610ab7dd76c362c71a9ec98ce589bf7d04beda
Signed-off-by: bangzheng.liu <bangzheng.liu@amlogic.com>
2024-07-11 22:05:15 -07:00

30 lines
1.0 KiB
C

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
*/
#include "host_report.h"
void host_dsp_vad_report(struct host_module *host)
{
input_event(host->host_dsp->input_device, EV_KEY, KEY_POWER, 1);
input_sync(host->host_dsp->input_device);
input_event(host->host_dsp->input_device, EV_KEY, KEY_POWER, 0);
input_sync(host->host_dsp->input_device);
}
void host_dsp_vad_input_device_init(struct host_module *host)
{
host->host_dsp->input_device->name = "vad_keypad";
host->host_dsp->input_device->phys = "vad_keypad/input3";
host->host_dsp->input_device->dev.parent = host->dev;
host->host_dsp->input_device->id.bustype = BUS_ISA;
host->host_dsp->input_device->id.vendor = 0x0001;
host->host_dsp->input_device->id.product = 0x0001;
host->host_dsp->input_device->id.version = 0x0100;
host->host_dsp->input_device->evbit[0] = BIT_MASK(EV_KEY);
host->host_dsp->input_device->keybit[BIT_WORD(BTN_0)] = BIT_MASK(BTN_0);
set_bit(KEY_POWER, host->host_dsp->input_device->keybit);
}