CN113411702B - Sound channel configuration method and electronic equipment - Google Patents

Sound channel configuration method and electronic equipment Download PDF

Info

Publication number
CN113411702B
CN113411702B CN202010180920.1A CN202010180920A CN113411702B CN 113411702 B CN113411702 B CN 113411702B CN 202010180920 A CN202010180920 A CN 202010180920A CN 113411702 B CN113411702 B CN 113411702B
Authority
CN
China
Prior art keywords
earphone
signal
channel audio
audio signal
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010180920.1A
Other languages
Chinese (zh)
Other versions
CN113411702A (en
Inventor
温林涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010180920.1A priority Critical patent/CN113411702B/en
Publication of CN113411702A publication Critical patent/CN113411702A/en
Application granted granted Critical
Publication of CN113411702B publication Critical patent/CN113411702B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • H04R3/12Circuits for transducers, loudspeakers or microphones for distributing signals to two or more loudspeakers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2420/00Details of connection covered by H04R, not provided for in its groups
    • H04R2420/01Input selection or mixing for amplifiers or loudspeakers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2430/00Signal processing covered by H04R, not provided for in its groups
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2499/00Aspects covered by H04R or H04S not otherwise provided for in their subgroups
    • H04R2499/10General applications
    • H04R2499/11Transducers incorporated or for use in hand-held devices, e.g. mobile phones, PDA's, camera's

Landscapes

  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Otolaryngology (AREA)
  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Headphones And Earphones (AREA)

Abstract

The invention provides a sound channel configuration method and electronic equipment, wherein the sound channel configuration method is applied to the electronic equipment and comprises the following steps: acquiring a first signal of an infrared sensor and a second signal of an angle detection sensor which are arranged on the earphone; judging whether the wearing position of the earphone is matched with a preset position according to the first signal and the second signal; and under the condition that the wearing position is not matched with the preset position, configuring a right channel audio signal for the left earphone of the earphone, and/or configuring a left channel audio signal for the right earphone of the earphone. The technical scheme provided by the invention solves the problem that the hearing experience of a user is poor because the traditional electronic equipment cannot identify whether the earphone is worn reversely.

Description

Sound channel configuration method and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method for configuring a sound channel and an electronic device.
Background
With the development of wireless communication technology and the gradual expansion of markets, wireless transmission technology of audio, such as bluetooth transmission technology, is also increasingly used in wireless communication. At present, an electronic device generally decodes an audio file into left and right channel audio information, packages the audio file and sends the left and right channel audio information to an earphone end, so that the left earphone extracts the left channel audio information from the audio file, and the right earphone extracts the right channel audio information from the audio file, amplifies the audio file and then plays the audio file. However, the user may wear the earphone reversely, and the electronic device cannot identify the situation that the earphone is worn reversely, so that the left channel audio information is transmitted to the left earphone, the right channel audio information is transmitted to the right earphone, and poor hearing experience is caused for the user.
Disclosure of Invention
The embodiment of the invention provides a sound channel configuration method and electronic equipment, which are used for solving the problem that the traditional electronic equipment cannot identify the situation that headphones are worn reversely, so that the hearing experience of a user is poor.
In order to solve the technical problems, the invention is realized as follows:
In a first aspect, an embodiment of the present invention provides a method for configuring a sound channel, which is applied to an electronic device, including:
acquiring a first signal of an infrared sensor and a second signal of an angle detection sensor which are arranged on the earphone;
judging whether the wearing position of the earphone is matched with a preset position according to the first signal and the second signal;
And under the condition that the wearing position is not matched with the preset position, configuring a right channel audio signal for the left earphone of the earphone, and/or configuring a left channel audio signal for the right earphone of the earphone.
In a second aspect, an embodiment of the present invention further provides an electronic device, including:
The acquisition module is used for acquiring a first signal of an infrared sensor and a second signal of an angle detection sensor which are arranged on the earphone;
The judging module is used for judging whether the wearing position of the earphone is matched with a preset position according to the first signal and the second signal;
The configuration module is used for configuring a right channel audio signal for the left earphone of the earphone and/or configuring a left channel audio signal for the right earphone of the earphone under the condition that the wearing position is not matched with the preset position.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program implementing the steps of the channel configuration method as described in the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the channel configuration method as described in the first aspect.
In the embodiment of the invention, the electronic equipment judges whether the wearing position of the earphone is matched with the preset position according to the first signal and the second signal by acquiring the first signal of the infrared sensor and the second signal of the angle detection sensor arranged on the earphone; and under the condition that the wearing position is not matched with the preset position, configuring a right channel audio signal for the left earphone of the earphone, and/or configuring a left channel audio signal for the right earphone of the earphone. Therefore, the electronic device can identify whether the left earphone and the right earphone are worn reversely, and the user does not need to replace the left earphone and the right earphone even if the earphones are worn reversely, the left earphone still sounds left channel audio, the right earphone still sounds right channel audio, hearing experience of the user is ensured, and user operation is simplified.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a flowchart of a channel configuration method provided in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a scenario in which headphones are worn on a user's ear;
FIG. 3 is a block diagram of an electronic device according to an embodiment of the present invention;
fig. 4 is a block diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a channel configuration method according to an embodiment of the present invention, as shown in fig. 1, the channel configuration method includes the following steps:
Step 101, acquiring a first signal of an infrared sensor and a second signal of an angle detection sensor, which are arranged on the earphone.
The sound channel configuration method provided by the embodiment of the invention is applied to electronic equipment, wherein the electronic equipment can be an earphone or can be audio playing equipment which can be connected with the earphone, such as a mobile phone, a tablet personal computer, a notebook computer, a wearable device and the like.
As a specific implementation manner, the embodiment of the present invention will be described using the electronic device as a mobile phone, where the mobile phone is wirelessly connected to an earphone, for example, may be a bluetooth connection. Wherein the infrared sensor and the angle detection sensor are disposed in the left earphone, and/or the infrared sensor and the angle detection sensor are disposed in the right earphone. That is, the infrared sensor and the angle detection sensor may be both disposed on the left earphone or may be both disposed on the right earphone, and of course, both the infrared sensor and the angle detection sensor may be disposed on the left earphone and the right earphone.
In the embodiment of the invention, under the condition that the mobile phone and the earphone are in wireless connection, the mobile phone acquires a first signal of an infrared sensor and a second signal of an angle detection sensor which are arranged on the earphone. For example, the cellular phone may be a first signal periodically detecting the infrared sensor and a second signal of the angle detection sensor. The working principles of the infrared sensor and the angle detection sensor may refer to related technologies, which will not be described in detail in this embodiment.
Step 102, judging whether the wearing position of the earphone is matched with a preset position according to the first signal and the second signal.
The preset position is that a left earphone of the earphone is worn on a left ear of a user, and a right earphone of the earphone is worn on a right ear of the user. That is, the mobile phone determines whether the left earphone of the earphone is worn on the left ear of the user or whether the right earphone is worn on the right ear of the user according to the acquired first signal of the infrared sensor and the acquired second signal of the angle detection sensor.
Optionally, the step 102 may specifically include:
if the first signal is received within the preset time period and the second signal indicates that the direction of the earphone is the same as the preset direction, judging that the wearing position is matched with the preset position;
If the first signal is not received within the preset time period and the second signal indicates that the direction of the earphone is the same as the preset direction, the wearing position is not matched with the preset position;
if the first signal is received within the preset time period and the second signal indicates that the direction of the earphone is opposite to the preset direction, judging that the wearing position is not matched with the preset position;
And if the first signal is not received within the preset time period and the second signal indicates that the direction of the earphone is opposite to the preset direction, judging that the wearing position is matched with the preset position.
In the embodiment of the invention, the infrared sensor and the angle detection sensor are both arranged on the earphone, and when the earphone is worn on the ear of a user, signals emitted by the infrared sensor are possibly reflected by the ear or not reflected by the ear due to different wearing positions of the earphone. It will be appreciated that the human ear is asymmetric, the ear comprising a tragus, antitragus, helix, etc. configuration; after the earphone is worn on the ear, a part of the earphone is exposed, and an infrared sensor can be arranged on the exposed part. For example, assuming that an infrared sensor is provided on a left earphone of the earphone, when the left earphone is worn on a left ear of a user, the infrared sensor is exposed, and a signal emitted by the infrared sensor is not reflected by the ear; referring to fig. 2, if the left earphone 20 is worn on the right ear 10 of the user, the infrared sensor 21 is not exposed, and the signal emitted by the infrared sensor 21 will first touch the ear 10 (e.g. the auricle of the ear) and then be reflected. Thus, the mobile phone can judge whether the left earphone is worn on the left ear or the right ear by the time of receiving the signal of the infrared sensor.
It will be appreciated that an angle detection sensor provided on the headset can be used to detect the angle of the headset. For example, the angle detection sensor is provided to the left earphone, and when the left earphone is worn on the left ear of the user, the angle detected by the angle detection sensor is definitely different from the angle detected when the left earphone is worn on the right ear of the user. Thus, the mobile phone can judge the orientation of the earphone by receiving the angle detected by the angle detection sensor. Alternatively, the angle detection sensor may be a gravity sensor, an acceleration sensor, an angle sensor, or the like.
The infrared sensor and the angle detection sensor are arranged on a left earphone, and the time length that a first signal transmitted by the infrared sensor reaches the mobile phone without being reflected by the ear is preset time length; the left earphone is worn on the left ear of the user, and when the angle detected by the angle detection sensor (for example, the angle between the extending direction of the connecting line between the vertex of the left earphone and the center of the left earphone and the gravity direction) is smaller than 90 degrees, the direction of the top of the left earphone (towards the upper direction) is the preset direction, and the four embodiments for judging the wearing position of the earphone are specifically described.
In the first embodiment, if the mobile phone receives the first signal of the infrared sensor within the preset time period, and the received second signal of the angle detection sensor indicates that the orientation of the left earphone is the same as the preset direction, it is indicated that the first signal transmitted by the infrared sensor is not reflected by the ear at this time, and the top of the left earphone is oriented upward, it is determined that the wearing position of the left earphone is matched with the preset position, that is, the left earphone is worn on the left ear of the user.
In the second embodiment, if the mobile phone does not receive the first signal transmitted by the infrared sensor within the preset time, the second signal indicates that the direction of the left earphone is the same as the preset direction, which indicates that the first signal transmitted by the infrared sensor is reflected by the ear and then transmitted to the mobile phone, but the top of the left earphone is upward; it can be determined that the left earphone is worn on the right ear of the user.
In the third embodiment, if the mobile phone receives the first signal transmitted by the infrared sensor within the preset time period, but the received second signal of the angle detection sensor indicates that the direction of the headset is opposite to the preset direction, which indicates that the first signal transmitted by the infrared sensor is not reflected by the ear at this time, but the top of the left headset faces downward, it may be determined that the left headset is worn on the right ear of the user.
In the fourth embodiment, if the mobile phone does not receive the first signal transmitted by the infrared sensor within the preset time period, and the received second signal of the angle detection sensor indicates that the direction of the headset is opposite to the preset direction, it is indicated that the first signal transmitted by the infrared sensor is transmitted to the mobile phone after being reflected by the ear, but the top of the left headset faces downward, and it is determined that the left headset is worn on the left ear of the user at this time.
Therefore, whether the current wearing position of the earphone is matched with the preset position can be judged through the first signal transmitted by the infrared sensor and the second signal transmitted by the angle detection sensor arranged on the earphone. The above embodiments are described by taking the left earphone as an example, but the right earphone is also applicable to the above embodiments, and will not be described here.
Optionally, when the mobile phone detects that the wearing position of the earphone is not matched with the preset position, the mobile phone may output prompt information, for example, voice information, to the earphone of the user, so as to prompt the user that the wearing position of the earphone is incorrect, remind the user to replace the wearing positions of the left earphone and the right earphone, and ensure the hearing experience of the user.
Step 103, configuring a right channel audio signal for a left earphone of the earphone and/or configuring a left channel audio signal for a right earphone of the earphone when the wearing position is not matched with a preset position.
It is understood that the wearing position of the earphone is not matched with the preset position, which may mean that the left earphone is worn on the right ear of the user and/or the right earphone is worn on the left ear of the user. In this case, if the left channel audio signal is continuously transmitted to the left earphone, the right channel audio signal is transmitted to the right earphone, and the listening experience of the user is affected.
In the embodiment of the invention, if the wearing position of the earphone is not matched with the preset position, a right channel audio signal is configured for the left earphone of the earphone, and/or a left channel audio signal is configured for the right earphone. Therefore, even if the user wears the left and right earphones reversely, the user does not need to replace the left earphone, the left sound channel audio is heard by the left ear, the right sound channel audio is heard by the right ear, the hearing experience of the user is ensured, the user operation is simplified, and the earphone is more convenient for the user to use.
In an alternative embodiment, the electronic device is an audio transmission apparatus, and the step 103 may include:
acquiring a left channel audio signal and a right channel audio signal under the condition that the wearing position is not matched with a preset position;
encoding the left channel audio signal and/or the right channel audio signal in a first encoding sequence;
Wherein, the left channel audio signal and the right channel audio signal are encoded according to a second encoding sequence when the wearing position is matched with a preset position; the left channel audio signal in the first coding sequence corresponds to the right channel audio signal in the second coding sequence, and the right channel audio signal in the first coding sequence corresponds to the left channel audio signal in the second coding sequence.
It will be appreciated that the left and right channel audio signals in the first coding sequence are exactly opposite to the left and right channel audio signals in the second coding sequence.
For example, taking the audio transmission device as a mobile phone, when the mobile phone transmits an audio signal to the earphone, the mobile phone decodes the audio signal into a left channel audio signal and a right channel audio signal and then encodes the audio signal according to a certain encoding rule; in the first coding sequence, the left channel audio signal and the right channel audio signal may be encoded in the order of left, right, left, right … …, and in the second coding sequence, the left channel audio signal and the right channel audio signal are encoded in the order of right, left, right, left … …. Therefore, under the condition that the wearing positions of the left earphone and the right earphone are not matched with the preset positions, the mobile phone can change the coding sequence of the left channel audio signal and the right channel audio signal, so that the right channel audio signal is configured for the left earphone, the left channel audio signal is configured for the right earphone, and the hearing experience of a user is ensured.
It should be noted that, the audio transmission method may also be applied to headphones, where when the headphones detect that the wearing positions of the left headphones and/or the right headphones do not match with the preset positions, the headphones configure right channel audio signals for the left headphones and configure left channel audio signals for the right headphones after receiving the left channel audio signals and the right channel audio signals transmitted by the audio transmission device. For example, the left earphone of the earphone is used as a main earphone, receives the audio signal transmitted by the audio transmission device, and sends the left channel audio signal to the right earphone.
In the embodiment of the invention, the electronic equipment judges whether the wearing position of the earphone is matched with the preset position according to the first signal and the second signal by acquiring the first signal of the infrared sensor and the second signal of the angle detection sensor arranged on the earphone; and under the condition that the wearing position is not matched with the preset position, configuring a right channel audio signal for the left earphone of the earphone, and/or configuring a left channel audio signal for the right earphone of the earphone. Therefore, even if the wearing position of the earphone is not right, the earphone is not required to be replaced by a user, the left ear still sounds the left channel audio, the right ear still sounds the right channel audio, the hearing experience of the user is ensured, and the user operation is simplified.
Referring to fig. 3, fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 3, the electronic device 300 includes:
an acquisition module 301, configured to acquire a first signal of an infrared sensor and a second signal of an angle detection sensor, which are disposed on the earphone;
a judging module 302, configured to judge whether a wearing position of the earphone matches a preset position according to the first signal and the second signal;
A configuration module 303, configured to configure a right channel audio signal for a left earphone of the earphone and/or configure a left channel audio signal for a right earphone of the earphone if the wearing position does not match the preset position.
Optionally, the determining module 302 is further configured to:
if the first signal is received within the preset time period and the second signal indicates that the direction of the earphone is the same as the preset direction, judging that the wearing position is matched with the preset position;
If the first signal is not received within the preset time period and the second signal indicates that the direction of the earphone is the same as the preset direction, the wearing position is not matched with the preset position;
if the first signal is received within the preset time period and the second signal indicates that the direction of the earphone is opposite to the preset direction, judging that the wearing position is not matched with the preset position;
And if the first signal is not received within the preset time period and the second signal indicates that the direction of the earphone is opposite to the preset direction, judging that the wearing position is matched with the preset position.
Optionally, the electronic device 300 is a headset, and the infrared sensor and the angle detection sensor are disposed on the left headset, and/or the infrared sensor and the angle detection sensor are disposed on the right headset.
Optionally, the electronic device 300 is an audio transmission device, and the configuration module 303 is further configured to:
acquiring a left channel audio signal and a right channel audio signal under the condition that the wearing position is not matched with a preset position;
encoding the left channel audio signal and/or the right channel audio signal in a first encoding sequence;
Wherein, the left channel audio signal and the right channel audio signal are encoded according to a second encoding sequence when the wearing position is matched with a preset position;
The left channel audio signal in the first coding sequence corresponds to the right channel audio signal in the second coding sequence, and the right channel audio signal in the first coding sequence corresponds to the left channel audio signal in the second coding sequence.
Optionally, the angle detection sensor is any one of a gravity sensor, an acceleration sensor and an angle sensor.
It should be noted that, the electronic device 300 can implement the processes of the embodiment of the channel configuration method described in fig. 1 and achieve the same technical effects, and in order to avoid repetition, a detailed description is omitted here.
In the embodiment of the present invention, the electronic device 300 determines whether the wearing position of the earphone matches with the preset position according to the first signal and the second signal by acquiring the first signal of the infrared sensor and the second signal of the angle detection sensor, which are disposed on the earphone; and under the condition that the wearing position is not matched with the preset position, configuring a right channel audio signal for the left earphone of the earphone, and/or configuring a left channel audio signal for the right earphone of the earphone. In this way, the electronic device 300 can identify whether the left and right headphones are worn reversely, and even if the headphones are worn in an incorrect position, the user does not need to replace the headphones, the left ear still listens to the left channel audio, the right ear still listens to the right channel audio, the listening experience of the user is ensured, and the user operation is simplified.
Referring to fig. 4, fig. 4 is a block diagram of another electronic device implementing an embodiment of the present invention, and an electronic device 400 can implement each process of the channel configuration method embodiment described in fig. 1 and achieve the same technical effects. As shown in fig. 4, electronic device 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power source 411. Those skilled in the art will appreciate that the electronic device structure shown in fig. 4 is not limiting of the electronic device and that the electronic device may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. In the embodiment of the invention, the electronic equipment comprises, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer and the like.
Wherein the processor 410 is configured to:
acquiring a first signal of an infrared sensor and a second signal of an angle detection sensor which are arranged on the earphone;
judging whether the wearing position of the earphone is matched with a preset position according to the first signal and the second signal;
And under the condition that the wearing position is not matched with the preset position, configuring a right channel audio signal for the left earphone of the earphone, and/or configuring a left channel audio signal for the right earphone of the earphone.
Optionally, the processor 410 is further configured to:
if the first signal is received within the preset time period and the second signal indicates that the direction of the earphone is the same as the preset direction, judging that the wearing position is matched with the preset position;
If the first signal is not received within the preset time period and the second signal indicates that the direction of the earphone is the same as the preset direction, the wearing position is not matched with the preset position;
if the first signal is received within the preset time period and the second signal indicates that the direction of the earphone is opposite to the preset direction, judging that the wearing position is not matched with the preset position;
And if the first signal is not received within the preset time period and the second signal indicates that the direction of the earphone is opposite to the preset direction, judging that the wearing position is matched with the preset position.
Optionally, the electronic device 400 is a headset, and the infrared sensor and the angle detection sensor are disposed on the left headset, and/or the infrared sensor and the angle detection sensor are disposed on the right headset.
Optionally, the electronic device 400 is an audio transmission device, and the processor 410 is further configured to:
acquiring a left channel audio signal and a right channel audio signal under the condition that the wearing position is not matched with a preset position;
encoding the left channel audio signal and/or the right channel audio signal in a first encoding sequence;
Wherein, the left channel audio signal and the right channel audio signal are encoded according to a second encoding sequence when the wearing position is matched with a preset position;
The left channel audio signal in the first coding sequence corresponds to the right channel audio signal in the second coding sequence, and the right channel audio signal in the first coding sequence corresponds to the left channel audio signal in the second coding sequence.
Optionally, the angle detection sensor is any one of a gravity sensor, an acceleration sensor and an angle sensor.
In the embodiment of the present invention, the electronic device 400 determines whether the wearing position of the headset is matched with the preset position according to the first signal and the second signal by acquiring the first signal of the infrared sensor and the second signal of the angle detection sensor, which are arranged on the headset; and under the condition that the wearing position is not matched with the preset position, configuring a right channel audio signal for the left earphone of the earphone, and/or configuring a left channel audio signal for the right earphone of the earphone. In this way, the electronic device 400 can identify whether the left and right headphones are worn reversely, and even if the headphones are worn in an incorrect position, the user does not need to replace the headphones, the left ear still listens to the left channel audio, the right ear still listens to the right channel audio, the listening experience of the user is ensured, and the user operation is simplified.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and transmitting signals during the process of receiving and transmitting information or communication, specifically, receiving downlink data from a base station and then processing the received downlink data by the processor 410; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 401 may also communicate with networks and other devices through a wireless communication system.
The electronic device 400 provides wireless broadband internet access to users, such as helping users send and receive e-mail, browse web pages, and access streaming media, through the network module 402.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the electronic device 400. The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive an audio or video signal. The input unit 404 may include a graphics processor (Graphics Processing Unit, GPU) 4041 and a microphone 4042, the graphics processor 4041 processing image data of still images or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphics processor 4041 may be stored in memory 409 (or other computer readable storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 401 in the case of a telephone call mode.
The electronic device 400 also includes at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 4061 and/or the backlight when the electronic device 400 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for recognizing the gesture of the electronic equipment (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; the sensor 405 may further include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described herein.
The display unit 406 is used to display information input by a user or information provided to the user. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the electronic device 400. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. The touch panel 4071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 4071 or thereabout using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 410, and receives and executes commands sent from the processor 410. In addition, the touch panel 4071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 407 may include other input devices 4072 in addition to the touch panel 4071. In particular, other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 4071 may be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or thereabout, the touch operation is transferred to the processor 410 to determine the type of touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two independent components to implement the input and output functions of the electronic device 400, in some embodiments, the touch panel 4071 may be integrated with the display panel 4061 to implement the input and output functions of the electronic device 400, which is not limited herein.
The interface unit 408 is an interface to which an external device is connected to the electronic apparatus 400. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 400 or may be used to transmit data between the electronic apparatus 400 and an external device.
Memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 409 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 410 is a control center of the electronic device 400, connects various parts of the entire electronic device 400 using various interfaces and lines, and performs various functions of the electronic device 400 and processes data by running or executing software programs and/or modules stored in the memory 409 and invoking data stored in the memory 409, thereby performing overall monitoring of the electronic device 400. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The electronic device 400 may also include a power supply 411 (e.g., a battery) for powering the various components, and preferably the power supply 411 may be logically connected to the processor 410 via a power management system that performs functions such as managing charging, discharging, and power consumption.
In addition, the electronic device 400 includes some functional modules, which are not shown, and are not described herein.
Optionally, the embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the computer program when executed by the processor implements each process of the foregoing channel configuration method embodiment, and the process can achieve the same technical effect, so that repetition is avoided, and details are not repeated herein.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the processes of the above-mentioned channel configuration method embodiment, and can achieve the same technical effects, so that repetition is avoided, and no further description is given here. The computer readable storage medium is, for example, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (8)

1. A channel configuration method applied to an electronic device, comprising:
acquiring a first signal of an infrared sensor and a second signal of an angle detection sensor which are arranged on the earphone;
judging whether the wearing position of the earphone is matched with a preset position according to the first signal and the second signal;
configuring a right channel audio signal for a left earphone of the earphone and/or configuring a left channel audio signal for a right earphone of the earphone when the wearing position is not matched with a preset position;
The judging whether the wearing position is matched with a preset position according to the first signal and the second signal comprises the following steps:
if the first signal is received within the preset time period and the second signal indicates that the direction of the earphone is the same as the preset direction, judging that the wearing position is matched with the preset position;
If the first signal is not received within the preset time period and the second signal indicates that the direction of the earphone is the same as the preset direction, the wearing position is not matched with the preset position;
if the first signal is received within the preset time period and the second signal indicates that the direction of the earphone is opposite to the preset direction, judging that the wearing position is not matched with the preset position;
And if the first signal is not received within the preset time period and the second signal indicates that the direction of the earphone is opposite to the preset direction, judging that the wearing position is matched with the preset position.
2. The method according to claim 1, wherein the electronic device is an audio transmission device, and wherein configuring the right channel audio signal for the left earpiece of the earpiece and/or configuring the left channel audio signal for the right earpiece of the earpiece if the wearing position does not match a preset position comprises:
acquiring a left channel audio signal and a right channel audio signal under the condition that the wearing position is not matched with a preset position;
encoding the left channel audio signal and/or the right channel audio signal in a first encoding sequence;
Wherein, the left channel audio signal and the right channel audio signal are encoded according to a second encoding sequence when the wearing position is matched with a preset position;
The left channel audio signal in the first coding sequence corresponds to the right channel audio signal in the second coding sequence, and the right channel audio signal in the first coding sequence corresponds to the left channel audio signal in the second coding sequence.
3. The method of claim 1, wherein the angle detection sensor is any one of a gravity sensor, an acceleration sensor, and an angle sensor.
4. An electronic device, comprising:
The acquisition module is used for acquiring a first signal of an infrared sensor and a second signal of an angle detection sensor which are arranged on the earphone;
The judging module is used for judging whether the wearing position of the earphone is matched with a preset position according to the first signal and the second signal;
The configuration module is used for configuring a right channel audio signal for the left earphone of the earphone and/or configuring a left channel audio signal for the right earphone of the earphone under the condition that the wearing position is not matched with the preset position;
The judging module is further used for:
if the first signal is received within the preset time period and the second signal indicates that the direction of the earphone is the same as the preset direction, judging that the wearing position is matched with the preset position;
If the first signal is not received within the preset time period and the second signal indicates that the direction of the earphone is the same as the preset direction, the wearing position is not matched with the preset position;
if the first signal is received within the preset time period and the second signal indicates that the direction of the earphone is opposite to the preset direction, judging that the wearing position is not matched with the preset position;
And if the first signal is not received within the preset time period and the second signal indicates that the direction of the earphone is opposite to the preset direction, judging that the wearing position is matched with the preset position.
5. The electronic device of claim 4, wherein the electronic device is an audio transmission device, and wherein the configuration module is further configured to:
acquiring a left channel audio signal and a right channel audio signal under the condition that the wearing position is not matched with a preset position;
encoding the left channel audio signal and/or the right channel audio signal in a first encoding sequence;
Wherein, the left channel audio signal and the right channel audio signal are encoded according to a second encoding sequence when the wearing position is matched with a preset position;
The left channel audio signal in the first coding sequence corresponds to the right channel audio signal in the second coding sequence, and the right channel audio signal in the first coding sequence corresponds to the left channel audio signal in the second coding sequence.
6. The electronic device of claim 4, wherein the angle detection sensor is any one of a gravity sensor, an acceleration sensor, and an angle sensor.
7. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the channel configuration method of any of claims 1-3.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the channel configuration method according to any one of claims 1-3.
CN202010180920.1A 2020-03-16 2020-03-16 Sound channel configuration method and electronic equipment Active CN113411702B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010180920.1A CN113411702B (en) 2020-03-16 2020-03-16 Sound channel configuration method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010180920.1A CN113411702B (en) 2020-03-16 2020-03-16 Sound channel configuration method and electronic equipment

Publications (2)

Publication Number Publication Date
CN113411702A CN113411702A (en) 2021-09-17
CN113411702B true CN113411702B (en) 2024-05-14

Family

ID=77676353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010180920.1A Active CN113411702B (en) 2020-03-16 2020-03-16 Sound channel configuration method and electronic equipment

Country Status (1)

Country Link
CN (1) CN113411702B (en)

Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102026082A (en) * 2009-09-21 2011-04-20 联想(北京)有限公司 Track self-adaptive method and device for sound producing device
EP2498510A1 (en) * 2011-03-11 2012-09-12 Research In Motion Limited Synthetic stereo on a mono headset with motion sensing
WO2012153784A1 (en) * 2011-05-10 2012-11-15 独立行政法人科学技術振興機構 Stereo headphone device
CN104202697A (en) * 2014-09-18 2014-12-10 苏州大学 Adaptive automatic left sound track and right sound track switching stereo headphone
CN104540057A (en) * 2014-12-19 2015-04-22 深圳市禹欣鑫电子有限公司 Infrared earphones for the old
JP2015186072A (en) * 2014-03-25 2015-10-22 オンキヨー株式会社 audio signal output device
CN105101016A (en) * 2015-08-07 2015-11-25 深圳市金立通信设备有限公司 Earphone sound channel switching method and terminal
CN105228041A (en) * 2015-09-24 2016-01-06 联想(北京)有限公司 A kind of information processing method and audio output device
CN105898666A (en) * 2016-06-23 2016-08-24 乐视控股(北京)有限公司 Channel data matching method and channel data matching device
CN105959854A (en) * 2016-06-22 2016-09-21 惠州Tcl移动通信有限公司 Method and system for realizing normal output of left sound and right sound based on headset
CN205827179U (en) * 2016-07-05 2016-12-21 南京信息工程大学 A kind of multi-functional volume Preceding stage control device
CN106358127A (en) * 2016-09-30 2017-01-25 维沃移动通信有限公司 Left and right sound channel switching method and mobile terminal
CN106454588A (en) * 2016-09-30 2017-02-22 维沃移动通信有限公司 Earphone and earphone channel switching method
CN106445457A (en) * 2016-09-29 2017-02-22 宇龙计算机通信科技(深圳)有限公司 Headphone sound channel switching method and device
CN107801113A (en) * 2017-10-09 2018-03-13 维沃移动通信有限公司 A kind of method, wireless headset and mobile terminal for controlling wireless headset sound channel
CN108737917A (en) * 2017-04-18 2018-11-02 南宁富桂精密工业有限公司 Earphone wearing state is detected and sound channel switching method, system and earphone
CN108810706A (en) * 2018-07-12 2018-11-13 中新工程技术研究院有限公司 A kind of control method, device, computer equipment and the storage medium of earphone sound channel
CN108886653A (en) * 2016-04-20 2018-11-23 华为技术有限公司 A kind of earphone sound channel control method, relevant device and system
CN109195058A (en) * 2018-11-29 2019-01-11 努比亚技术有限公司 Switching method, device, terminal and the storage medium of earphone sound channel
US10362399B1 (en) * 2017-09-22 2019-07-23 Apple Inc. Detection of headphone orientation
WO2019196101A1 (en) * 2018-04-13 2019-10-17 万魔声学科技有限公司 Method and apparatus for switching working mode of earphone, and audio circuit, earphone and earphone system
CN110536196A (en) * 2018-05-24 2019-12-03 群光电子股份有限公司 Symmetrical Headphone device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008103827A (en) * 2006-10-17 2008-05-01 Sharp Corp Wireless headphone
CN102316394B (en) * 2010-06-30 2014-09-03 索尼爱立信移动通讯有限公司 Bluetooth equipment and audio playing method using same
US9326058B2 (en) * 2012-09-26 2016-04-26 Sony Corporation Control method of mobile terminal apparatus
US10623871B2 (en) * 2016-05-27 2020-04-14 Sonova Ag Hearing assistance system with automatic side detection

Patent Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102026082A (en) * 2009-09-21 2011-04-20 联想(北京)有限公司 Track self-adaptive method and device for sound producing device
EP2498510A1 (en) * 2011-03-11 2012-09-12 Research In Motion Limited Synthetic stereo on a mono headset with motion sensing
WO2012153784A1 (en) * 2011-05-10 2012-11-15 独立行政法人科学技術振興機構 Stereo headphone device
JP2015186072A (en) * 2014-03-25 2015-10-22 オンキヨー株式会社 audio signal output device
CN104202697A (en) * 2014-09-18 2014-12-10 苏州大学 Adaptive automatic left sound track and right sound track switching stereo headphone
CN104540057A (en) * 2014-12-19 2015-04-22 深圳市禹欣鑫电子有限公司 Infrared earphones for the old
CN105101016A (en) * 2015-08-07 2015-11-25 深圳市金立通信设备有限公司 Earphone sound channel switching method and terminal
CN105228041A (en) * 2015-09-24 2016-01-06 联想(北京)有限公司 A kind of information processing method and audio output device
CN108886653A (en) * 2016-04-20 2018-11-23 华为技术有限公司 A kind of earphone sound channel control method, relevant device and system
CN105959854A (en) * 2016-06-22 2016-09-21 惠州Tcl移动通信有限公司 Method and system for realizing normal output of left sound and right sound based on headset
CN105898666A (en) * 2016-06-23 2016-08-24 乐视控股(北京)有限公司 Channel data matching method and channel data matching device
CN205827179U (en) * 2016-07-05 2016-12-21 南京信息工程大学 A kind of multi-functional volume Preceding stage control device
CN106445457A (en) * 2016-09-29 2017-02-22 宇龙计算机通信科技(深圳)有限公司 Headphone sound channel switching method and device
CN106454588A (en) * 2016-09-30 2017-02-22 维沃移动通信有限公司 Earphone and earphone channel switching method
CN106358127A (en) * 2016-09-30 2017-01-25 维沃移动通信有限公司 Left and right sound channel switching method and mobile terminal
CN108737917A (en) * 2017-04-18 2018-11-02 南宁富桂精密工业有限公司 Earphone wearing state is detected and sound channel switching method, system and earphone
US10362399B1 (en) * 2017-09-22 2019-07-23 Apple Inc. Detection of headphone orientation
CN107801113A (en) * 2017-10-09 2018-03-13 维沃移动通信有限公司 A kind of method, wireless headset and mobile terminal for controlling wireless headset sound channel
WO2019196101A1 (en) * 2018-04-13 2019-10-17 万魔声学科技有限公司 Method and apparatus for switching working mode of earphone, and audio circuit, earphone and earphone system
CN110536196A (en) * 2018-05-24 2019-12-03 群光电子股份有限公司 Symmetrical Headphone device
CN108810706A (en) * 2018-07-12 2018-11-13 中新工程技术研究院有限公司 A kind of control method, device, computer equipment and the storage medium of earphone sound channel
CN109195058A (en) * 2018-11-29 2019-01-11 努比亚技术有限公司 Switching method, device, terminal and the storage medium of earphone sound channel

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一款基于单片机自动调音的BDS耳机控制系统设计;倪婷婷;倪菁;姜云耀;邱胜海;;物联网技术(第08期);全文 *
一种简易红外通信装置的设计;吴春梅;崔海瑛;赵大伟;王馨玉;;科技风(第06期);全文 *

Also Published As

Publication number Publication date
CN113411702A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
US11635939B2 (en) Prompting method and mobile terminal
CN108494030B (en) Wireless charging method, terminal and transmitting terminal equipment
CN109215683B (en) Prompting method and terminal
CN113223539B (en) Audio transmission method and electronic equipment
CN108196815B (en) Method for adjusting call sound and mobile terminal
CN109743737B (en) Method, terminal and base station for reducing coexistence interference of multiple networks
US20230254395A1 (en) Electronic Device and Control Method Thereof
CN108683980B (en) Audio signal transmission method and mobile terminal
CN108848267B (en) Audio playing method and mobile terminal
CN111093137B (en) Volume control method, volume control equipment and computer readable storage medium
CN111432071B (en) Call control method and electronic equipment
CN111182118B (en) Volume adjusting method and electronic equipment
CN109873894B (en) Volume adjusting method and mobile terminal
EP4093070A1 (en) Audio transmission method and electronic device
CN108093119B (en) Strange incoming call number marking method and mobile terminal
CN111459447B (en) Volume adjustment display method and electronic equipment
CN110673761B (en) Touch key detection method and terminal equipment thereof
CN109348366B (en) Method for adjusting volume by using electrical parameters and mobile terminal
CN113411446B (en) Sound channel switching method and electronic equipment
CN111526248A (en) Audio output mode switching method and electronic equipment
CN110839108A (en) Noise reduction method and electronic equipment
CN110545351A (en) incoming call processing method and electronic equipment
CN113411702B (en) Sound channel configuration method and electronic equipment
CN115037831A (en) Mode control method and device, electronic equipment and earphone
CN111343618B (en) Display method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant