Electronic device and method, in electronic device, for determining whether object is near
An electronic device, according to various embodiments, includes: an application processor including an audio processing module and a voice recognition module; a mic; a speaker; and a sensor hub. While the audio processing module included in the application processor is in a sleep state, the sensor hub generates an ultrasonic signal and provides the ultrasonic signal to the speaker so that the speaker outputs a first signal including the ultrasonic signal therethrough; receives, from the voice recognition module, a second signal inputted through the mic; and determines whether an object is near the electronic device, at least on the basis of the first signal and the second signal.
1 . An electronic device comprising:
a microphone;
a speaker;
an application processor including an audio processing module and a voice recognition module; and
a sensor hub,
wherein, while the audio processing module is in an active state, the application processor is configured to generate an ultrasonic signal and provide the ultrasonic signal to the speaker via the audio processing module, and
wherein, while the audio processing module is in a sleep state, the sensor hub is configured to:
generate the ultrasonic signal and provide the ultrasonic signal to the speaker so that the speaker outputs a first signal including the ultrasonic signal;
receive from the voice recognition module a second signal input through the microphone; and
determine whether an object is close to the electronic device based on at least the first signal and the second signal,
wherein a first ultrasonic engine included in the audio processing module generates the ultrasonic signal while the audio processing module is in the active state, and a second ultrasonic engine, which is different from the first ultrasonic engine and included in the sensor hub, generates the ultrasonic signal while the audio processing module is in the sleep state.
2 . The electronic device of claim 1 , wherein the audio processing module included in the application processor is configured to transmit, to the voice recognition module, a first message for waking up the voice recognition module before entering the sleep state.
3 . The electronic device of claim 1 , wherein the audio processing module included in the application processor is configured to transmit, to an audio codec, a second message for allowing the audio codec included in the electronic device to enter the sleep state before entering the sleep state.
4 . The electronic device of claim 1 , wherein the sensor hub is configured to receive a sensed first measurement value from an illuminance sensor and receive a sensed second measurement value from a 6-axis sensor.
5 . The electronic device of claim 4 , wherein the sensor hub is configured to determine whether the object is close to the electronic device based on the first signal, the second signal, the first measurement value, and the second measurement value.
6 . The electronic device of claim 1 , wherein the audio processing module included in the application processor is configured to transmit, to the sensor hub, a third message for transferring a control authority for ultrasonic signal processing, and receive, from the sensor hub, a sleep entry command in return for the third message.
7 . The electronic device of claim 1 , wherein the voice recognition module includes:
a plurality of buffers; and
a low pass filter (LPF) configured to filter the second signal and transmit the filtered second signal to one of the plurality of buffers.
8 . The electronic device of claim 1 , further comprising:
a high pass filter (HPF) configured to filter the second signal and transmit the filtered second signal to the sensor hub.
9 . The electronic device of claim 1 , wherein the audio processing module includes a first ultrasonic engine which is configured to generate or process the ultrasonic signal, and
wherein the sensor hub includes a second ultrasonic engine which is configured to generate or process the ultrasonic signal.
10 . The electronic device of claim 9 , wherein the ultrasonic signal is generated by the second ultrasonic engine, while the audio processing module included in the application processor is in the sleep state.
11 . A method of determining whether an object is close to an electronic device including an application processor including an audio processing module and a voice recognition module, a microphone, a speaker, and a sensor hub, the method comprising:
while the audio processing module is in an active state, generating, by the application processor, an ultrasonic signal and providing, by the application processor, the ultrasonic signal to the speaker via the audio processing module; and
while the audio processing module is in a sleep state:
generating, by the sensor hub, the ultrasonic signal and providing, by the sensor hub, the ultrasonic signal to the speaker so that the speaker outputs a first signal including the ultrasonic signal,
receiving, by the sensor hub, from the voice recognition module a second signal input through the microphone in the sleep state of the audio processing module, and
determining, by the sensor hub, whether an object is close to the electronic device based on at least the first signal and the second signal,
wherein a first ultrasonic engine included in the audio processing module generates the ultrasonic signal while the audio processing module is in the active state, and a second ultrasonic engine, which is different from the first ultrasonic engine and included in the sensor hub, generates the ultrasonic signal while the audio processing module is in the sleep state.
12 . The method of claim 11 , further comprising:
transmitting to the voice recognition module, by the audio processing module, a first message for waking up the voice recognition module before entering the sleep state.
13 . The method of claim 11 , further comprising:
transmitting to the audio codec, by the audio processing module, a second message for allowing an audio codec included in the electronic device to enter the sleep state before entering the sleep state.
14 . The method of claim 11 , further comprising:
receiving, by the sensor hub, a sensed first measurement value from an illuminance sensor and receiving a sensed second measurement value from a 6-axis sensor.
15 . The method of claim 14 , further comprising:
determining, by the sensor hub, whether the object is close to the electronic device based on the first signal, the second signal, the first measurement value, and the second measurement value.