CN113411446B - Sound channel switching method and electronic equipment - Google Patents

Sound channel switching method and electronic equipment Download PDF

Info

Publication number
CN113411446B
CN113411446B CN202010180162.3A CN202010180162A CN113411446B CN 113411446 B CN113411446 B CN 113411446B CN 202010180162 A CN202010180162 A CN 202010180162A CN 113411446 B CN113411446 B CN 113411446B
Authority
CN
China
Prior art keywords
earphone
antenna
signal
worn
ear
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
CN202010180162.3A
Other languages
Chinese (zh)
Other versions
CN113411446A (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 CN202010180162.3A priority Critical patent/CN113411446B/en
Publication of CN113411446A publication Critical patent/CN113411446A/en
Application granted granted Critical
Publication of CN113411446B publication Critical patent/CN113411446B/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention provides a sound channel switching method and electronic equipment, wherein the electronic equipment comprises a first antenna and a second antenna; the channel switching method comprises the following steps: under the condition that the electronic equipment is in wireless connection with the earphone, the first antenna and the second antenna are controlled to respectively send signals to the left earphone and the right earphone, the wearing positions of the left earphone and the right earphone are determined by acquiring signal parameters sent to the left earphone and the right earphone, and the right channel audio signal can be configured for the left earphone and the left channel audio signal can be configured for the right earphone under the condition that the left earphone is worn on the right earphone and/or the right earphone is worn on the left earphone. The technical scheme provided by the invention solves the problem that the existing electronic equipment cannot identify the situation that the earphone is worn reversely, so that the hearing experience of the user is poor.

Description

Sound channel switching method and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method for switching channels and an electronic device.
Background
With the development of wireless communication technology and the gradual expansion of markets, wireless transmission technology (such as bluetooth transmission technology) of audio 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 headphones in reverse, and the electronic device cannot recognize that the headphones are worn in reverse, so that the left channel audio information is still transmitted to the left headphone, and the right channel audio information is transmitted to the right headphone, which causes bad hearing experience for the user.
Disclosure of Invention
The embodiment of the invention provides a sound channel switching 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 switching channels, which is applied to an electronic device, where the electronic device includes a first antenna and a second antenna; the channel switching method comprises the following steps:
under the condition that the electronic equipment and the earphone are in wireless connection, the first antenna and the second antenna are controlled to respectively send a first signal and a second signal to the left earphone, and the first antenna and the second antenna are controlled to respectively send a third signal and a fourth signal to the right earphone;
according to the time when the first signal and the second signal are sent to the left earphone and the time when the third signal and the fourth signal are sent to the right earphone, the wearing positions of the left earphone and the right earphone are obtained,
or alternatively, the process may be performed,
acquiring a distance between the first antenna and the second antenna, calculating a first angle according to the distance and a phase difference between the first signal and the second signal sent to the left earphone, and calculating a second angle according to the distance and a phase difference between the third signal and the fourth signal sent to the right earphone, so as to acquire wearing positions of the left earphone and the right earphone;
And when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear, configuring a right channel audio signal for the left earphone and configuring a left channel audio signal for the right earphone.
In a second aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes a first antenna and a second antenna; the electronic device further includes:
the transmitting module is used for controlling the first antenna and the second antenna to respectively transmit a first signal and a second signal to the left earphone and controlling the first antenna and the second antenna to respectively transmit a third signal and a fourth signal to the right earphone under the condition that the electronic equipment and the earphone are in wireless connection;
an acquisition module for acquiring wearing positions of the left earphone and the right earphone according to the time when the first signal and the second signal are transmitted to the left earphone and the time when the third signal and the fourth signal are transmitted to the right earphone,
or alternatively, the process may be performed,
the first angle is calculated according to the distance and the phase difference between the first signal and the second signal sent to the left earphone, and the second angle is calculated according to the distance and the phase difference between the third signal and the fourth signal sent to the right earphone, so that the wearing positions of the left earphone and the right earphone are obtained;
The configuration module is used for configuring right channel audio signals for the left earphone and configuring left channel audio signals for the right earphone when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear.
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 switching method as described in the first aspect when executed by the processor.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the channel switching method as described in the first aspect.
In the embodiment of the invention, under the condition that the electronic equipment is in wireless connection with the earphone, the first antenna and the second antenna which are arranged on the electronic equipment are controlled to respectively send signals to the left earphone and the right earphone, the wearing positions of the left earphone and the right earphone are determined by acquiring the signal parameters sent to the left earphone and the right earphone, and the right channel audio signal can be configured for the left earphone and the left channel audio signal can be configured for the right earphone under the condition that the left earphone is worn on the right earphone and/or the right earphone is worn on the left earphone. Therefore, even if the user wears left and right earphones reversely, the user does not need to take off the earphones to replace, the user can hear the audio suitable for the left ear and the right ear, and the hearing experience of the user is ensured.
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 switching method according to an embodiment of the present invention;
FIG. 1a is a schematic view of an electronic device to which the channel switching method of FIG. 1 is applied;
fig. 2 is a flowchart of another channel switching method according to an embodiment of the present invention;
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.
The embodiment of the invention provides a sound channel switching method applied to electronic equipment, which comprises a first antenna and a second antenna.
Optionally, the first antenna and the second antenna are respectively disposed on two opposite sides of the electronic device, for example, a left side frame and a right side frame of the electronic device.
Alternatively, the electronic device may be a device capable of playing audio, such as a mobile phone, tablet computer, notebook computer, MP3, MP4, wearable device, etc.
Referring to fig. 1, fig. 1 is a flowchart of a channel switching method according to an embodiment of the present invention, as shown in fig. 1, the channel switching method includes the following steps:
step 101, under the condition that the electronic device and the earphone are in wireless connection, the first antenna and the second antenna are controlled to respectively send a first signal and a second signal to the left earphone, and the first antenna and the second antenna are controlled to respectively send a third signal and a fourth signal to the right earphone.
Alternatively, the wireless connection may refer to a bluetooth connection, a wifi connection, a 3G connection, a 4G connection, a 5G connection, etc.
In the embodiment of the invention, the earphone is a Bluetooth earphone, and the electronic equipment is provided with a Bluetooth chip and a Bluetooth antenna, so that the electronic equipment and the earphone can be connected by Bluetooth. For example, the first antenna and the second antenna are both bluetooth antennas, the first antenna and the second antenna are both connected with the same bluetooth chip, the bluetooth chip can be connected with a single-pole double-throw switch, the first output end of the single-pole double-throw switch is connected with the first antenna, the second output end of the single-pole double-throw switch is connected with the second antenna, and then connection and control with two bluetooth antennas are realized through one bluetooth chip, so that hardware cost of electronic equipment is saved. Or, the electronic device may be provided with a first bluetooth chip and a second bluetooth chip, the first antenna is connected with the first bluetooth chip, and the second antenna is connected with the second bluetooth chip, so that the two antennas are respectively controlled by different bluetooth chips.
Alternatively, in other optional embodiments, the first antenna and the second antenna may be Ultra Wideband (UWB) antennas, and the earphone is correspondingly provided with a UWB module, for example, may be provided in a bluetooth chip of the earphone, so that the earphone can receive UWB pulse signals sent by the first antenna and the second antenna.
In the embodiment of the invention, under the condition that the electronic equipment and the earphone are connected by Bluetooth, a first signal and a second signal are respectively sent to the left earphone through a first antenna and a second antenna which are arranged on two opposite sides of the electronic equipment, and a third signal and a fourth signal are respectively sent to the right earphone through the first antenna and the second antenna.
Step 102, according to the time when the first signal and the second signal are sent to the left earphone and the time when the third signal and the fourth signal are sent to the right earphone, wearing positions of the left earphone and the right earphone are obtained.
In the embodiment of the invention, the first antenna and the second antenna are respectively positioned at two opposite sides of the electronic device, and when the first antenna and the second antenna send signals to the left earphone at the same time, as the first antenna and the second antenna are not positioned at the same position, the time when the left earphone receives the first signal and the time when the left earphone receives the second signal are different. Similarly, when the first antenna and the second antenna simultaneously transmit signals to the right earphone, the time when the right earphone receives the first signal and the time when the right earphone receives the second signal also have differences. It can be understood that the wearing positions of the left and right earphones can be judged according to the time when the first and second signals are transmitted to the left earphone and the time when the third and fourth signals are transmitted to the right earphone.
Optionally, the step 102 may include:
acquiring the time of the first signal and the second signal sent to the left earphone, and judging that the left earphone is worn on the right ear when the time of the first signal sent to the left earphone is later than the time of the second signal sent to the left earphone;
and acquiring the time when the third signal and the fourth signal are sent to the right earphone, and judging that the right earphone is worn on the left ear when the time when the third signal is sent to the right earphone is earlier than the time when the fourth signal is sent to the right earphone.
Referring to fig. 1a, in a case that a user faces a display screen of the electronic device 10, a first antenna 11 is disposed at a left frame of the electronic device 10, and a second antenna 12 is disposed at a right frame of the electronic device 10; when the electronic device 10 controls the first antenna 11 and the second antenna 12 to simultaneously transmit signals to the left earphone, that is, the first antenna 11 transmits the first signal S1 and the second antenna 12 transmits the second signal S2, if the time when the first signal S1 arrives at the left earphone 21 is acquired later than the time when the second signal S2 arrives at the left earphone 21, it is determined that the second antenna 12 provided on the right frame of the electronic device 10 is closer to the left earphone 21, and then the left earphone 21 is worn on the right ear of the user.
In the same principle, when the electronic device 10 controls the first antenna 11 and the second antenna 12 to simultaneously transmit signals to the right earphone 22, that is, the first antenna 11 transmits the third signal S3, and the second antenna 12 transmits the fourth signal S4, if the third signal S3 arrives at the right earphone 22 earlier than the fourth signal S4 arrives at the right earphone 22, it is determined that the first antenna 11 disposed at the left frame of the electronic device 10 is closer to the right earphone 22, and the right earphone 22 is worn at the left ear of the user.
Of course, if the first signal S1 reaches the left earphone 21 earlier than the second signal S2 reaches the left earphone 21, it is indicated that the left earphone 21 is worn on the left ear of the user at this time; if the third signal S3 arrives at the right earphone 22 later than the fourth signal S4 arrives at the right earphone 22, this indicates that the right earphone 22 is worn on the right ear of the user.
Therefore, the electronic equipment can send signals to the left earphone and the right earphone simultaneously by controlling the first antenna and the second antenna, and can judge the wearing positions of the left earphone and the right earphone by comparing the receiving time of the signals, so that the electronic equipment is beneficial to transmitting matched sound channel audio signals to the left earphone and the right earphone.
Step 103, configuring a right channel audio signal for the left earphone and configuring a left channel audio signal for the right earphone when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear.
It may be appreciated that, signals are sent to the left earphone and the right earphone through the first antenna and the second antenna, and if it is determined that the left earphone is worn on the right ear and/or the right earphone is worn on the left ear, the electronic device configures a right channel audio signal for the left earphone and configures a left channel audio signal for the right earphone. Thus, even if the user wears left and right headphones in reverse, the left ear still listens to the left channel audio and the right ear still listens to the right channel audio.
It should be noted that, the switching of the electronic device to the left and right channel audio signals may be that the coding sequence of the left channel audio signal and the right channel audio signal is exchanged during the process of coding the audio signals. For example, the electronic device is provided with a bluetooth chip, and the electronic device may transmit audio to the headset through a bluetooth transmission protocol. Specifically, after the electronic device acquires the audio file and decodes the audio file into an audio signal, the electronic device samples and encodes the audio signal based on a Bluetooth transmission protocol and encodes the audio signal into a left channel audio signal and a right channel audio signal; if the electronic device obtains that the wearing positions of the left earphone and the right earphone are opposite, the coding sequence of the left channel audio signal and the right channel audio signal may be exchanged in the coding process, so as to code the left channel audio signal at the position corresponding to the original right channel audio signal, and code the right channel audio signal at the position corresponding to the original left channel audio signal. Thus, the left earpiece receives, i.e., right channel audio signals, and the right earpiece receives, i.e., left channel audio signals.
According to the technical scheme provided by the embodiment of the invention, under the condition that the electronic equipment is in wireless connection with the earphone, the first antenna and the second antenna which are arranged on the two opposite sides of the electronic equipment are controlled to respectively send signals to the left earphone and the right earphone, the wearing positions of the left earphone and the right earphone are determined by acquiring the time of sending the signals to the left earphone and the right earphone, and the right channel audio signal can be configured for the left earphone and the left channel audio signal can be configured for the right earphone under the condition that the left earphone is worn on the right earphone and/or the right earphone is worn on the left earphone. Therefore, even if the user wears left and right earphones reversely, the user does not need to take off the earphones to replace, the user can hear the audio suitable for the left ear and the right ear, and the hearing experience of the user is ensured.
Or, in an alternative embodiment, after the electronic device obtains the wearing positions of the left earphone and the right earphone, the method may further include:
and sending prompt information to the earphone when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear.
The prompting information can be audio information, for example, the prompting information can be audio information prompting the user to change the wearing positions of the left earphone and the right earphone. It can be understood that when the electronic device obtains that the left earphone is worn on the right ear and/or the right earphone is worn on the left ear, the electronic device sends a prompt message for exchanging the wearing positions of the left earphone and the right earphone to the earphone so as to remind the user to timely replace the wearing positions of the left earphone and the right earphone and ensure the hearing experience of the user.
Referring to fig. 2, fig. 2 is a flowchart of another channel switching method provided in an embodiment of the present invention, where the electronic device includes a first antenna and a second antenna. As shown in fig. 2, the channel switching method includes the steps of:
step 201, under the condition that the electronic device establishes wireless connection with the earphone, the first antenna and the second antenna are controlled to respectively send a first signal and a second signal to the left earphone, and the first antenna and the second antenna are controlled to respectively send a third signal and a fourth signal to the right earphone.
This step may be performed with reference to step 101 in the embodiment shown in fig. 1, and in order to avoid repetition, details are not described in the embodiment of the present invention.
Step 202, obtaining a distance between the first antenna and the second antenna, calculating a first angle according to the distance and a phase difference between the first signal and the second signal sent to the left earphone, and calculating a second angle according to the distance and a phase difference between the third signal and the fourth signal sent to the right earphone, so as to obtain wearing positions of the left earphone and the right earphone.
In the embodiment of the invention, the first antenna and the second antenna are respectively positioned at two opposite sides of the electronic device, and when the first antenna and the second antenna send signals to the left earphone at the same time, as the first antenna and the second antenna are not positioned at the same position, a phase difference exists between the first signal and the second signal received by the left earphone. Similarly, when the first antenna and the second antenna send signals to the right earphone at the same time, a phase difference exists between the third signal and the fourth signal received by the right earphone.
Optionally, the step 202 may include:
acquiring the distance between the first antenna and the second antenna, calculating a first angle according to the distance and the phase difference between the first signal and the second signal sent to the left earphone, and calculating a second angle according to the distance and the phase difference between the third signal and the fourth signal sent to the right earphone;
and under the condition that the first angle is larger than the second angle, judging that the left earphone is worn on the right ear, and the right earphone is worn on the left ear.
It can be understood that the phase difference between the first signal and the second signal sent to the left earphone is related to the distance between the first antenna and the second antenna and the incident angle of the signal (i.e. the first angle), and the specific calculation formula is as follows:
wherein θ 1 For the first angle, ΔΦ1 is a phase difference between the first signal and the second signal sent to the left earphone, d is a distance between the first antenna and the second antenna, k is a first constant, λ is a second constant, pi is a third constant, and specific values of the constants may refer to related technologies, which will not be described in detail in this embodiment. Thus, the first angle can be calculated according to the above formula.
In the same principle, the phase difference between the third signal and the fourth signal sent to the right earphone is related to the distance between the first antenna and the second antenna and the signal incident angle (i.e. the second angle), and the specific calculation formula is as follows:
wherein θ 2 For the second angle, ΔΦ2 is the phase difference between the third signal and the fourth signal sent to the left earpiece, d is the distance between the first antenna and the second antenna, k is the first constant, λ is the second constant, and pi is the third constant. The second angle can also be calculated according to the above formula.
In the embodiment of the invention, when the first angle is larger than the second angle, the second antenna arranged on the right frame of the electronic device is closer to the left earphone, so that the left earphone is worn on the right ear of the user at the moment, and the right earphone is worn on the left ear of the user.
Step 203, configuring a right channel audio signal for the left earphone and configuring a left channel audio signal for the right earphone when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear.
It may be appreciated that, signals are sent to the left earphone and the right earphone through the first antenna and the second antenna, and if it is determined that the left earphone is worn on the right ear and/or the right earphone is worn on the left ear, the electronic device configures a right channel audio signal for the left earphone and configures a left channel audio signal for the right earphone. Thus, even if the user wears left and right headphones in reverse, the left ear still listens to the left channel audio and the right ear still listens to the right channel audio.
It should be noted that, the switching of the electronic device to the left and right channel audio signals may refer to the specific description in the embodiment described in fig. 1, and the embodiments of the present invention are not repeated.
Optionally, after acquiring the wearing positions of the left earphone and the right earphone, the electronic device may further include:
and sending prompt information to the earphone when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear.
The prompting information can be audio information, for example, the prompting information can be audio information prompting the user to change the wearing positions of the left earphone and the right earphone. It can be understood that when the electronic device obtains that the left earphone is worn on the right ear and/or the right earphone is worn on the left ear, the electronic device sends a prompt message for exchanging the wearing positions of the left earphone and the right earphone to the earphone so as to remind the user to timely replace the wearing positions of the left earphone and the right earphone and ensure the hearing experience of the user.
According to the technical scheme provided by the embodiment of the invention, under the condition that the electronic equipment is in wireless connection with the earphone, the first antenna and the second antenna which are arranged on the two opposite sides of the electronic equipment are controlled to respectively send signals to the left earphone and the right earphone, the wearing positions of the left earphone and the right earphone are determined by acquiring the phase difference sent to the left earphone and the right earphone and the distance calculation angle between the left earphone and the right earphone, and the right channel audio signal can be configured for the left earphone and the left channel audio signal can be configured for the right earphone under the condition that the left earphone is worn on the right earphone and/or the right earphone is worn on the left earphone. Therefore, even if the user wears left and right earphones reversely, the user does not need to take off the earphones to replace, the user can hear the audio suitable for the left ear and the right ear, and the hearing experience of the user is ensured.
Referring to fig. 3, fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention, where the electronic device includes a first antenna and a second antenna. As shown in fig. 3, the electronic device 300 includes:
a transmitting module 301, configured to control, when the electronic device establishes a wireless connection with an earphone, the first antenna and the second antenna to transmit a first signal and a second signal to the left earphone, respectively, and control the first antenna and the second antenna to transmit a third signal and a fourth signal to the right earphone, respectively;
an acquisition module 302, configured to acquire wearing positions of the left earphone and the right earphone according to a time when the first signal and the second signal are transmitted to the left earphone and a time when the third signal and the fourth signal are transmitted to the right earphone,
or alternatively, the process may be performed,
the first angle is calculated according to the distance and the phase difference between the first signal and the second signal sent to the left earphone, and the second angle is calculated according to the distance and the phase difference between the third signal and the fourth signal sent to the right earphone, so that the wearing positions of the left earphone and the right earphone are obtained;
The configuration module 303 is configured to configure a right channel audio signal for the left earphone and configure a left channel audio signal for the right earphone when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear.
Optionally, the acquiring module 302 is specifically configured to:
acquiring the time of the first signal and the second signal sent to the left earphone, and judging that the left earphone is worn on the right ear when the time of the first signal sent to the left earphone is later than the time of the second signal sent to the left earphone;
and acquiring the time when the third signal and the fourth signal are sent to the right earphone, and judging that the right earphone is worn on the left ear when the time when the third signal is sent to the right earphone is earlier than the time when the fourth signal is sent to the right earphone.
Optionally, the acquiring module 302 is specifically configured to:
acquiring the distance between the first antenna and the second antenna, calculating a first angle according to the distance and the phase difference between the first signal and the second signal sent to the left earphone, and calculating a second angle according to the distance and the phase difference between the third signal and the fourth signal sent to the right earphone;
And under the condition that the first angle is larger than the second angle, judging that the left earphone is worn on the right ear, and the right earphone is worn on the left ear.
Optionally, the first antenna and the second antenna are both bluetooth antennas, and the first antenna and the second antenna are both connected with the same bluetooth chip, or the first antenna is connected with the first bluetooth chip, and the second antenna is connected with the second bluetooth chip.
Optionally, the electronic device 300 further includes:
the prompting module is used for sending prompting information to the earphone when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear.
Optionally, the first antenna and the second antenna are respectively disposed on two opposite sides of the electronic device.
It should be noted that, the electronic device 300 can implement the processes of the channel switching method embodiment shown in fig. 1, or can implement the processes of the channel switching method embodiment shown in fig. 2, and achieve the same technical effects, so that repetition is avoided and no further description is provided herein.
In the embodiment of the invention, the electronic device 300 controls the first antenna and the second antenna arranged on two opposite sides of the electronic device to respectively send signals to the left earphone and the right earphone under the condition of establishing wireless connection with the earphone, determines the wearing positions of the left earphone and the right earphone by acquiring the signal parameters sent to the left earphone and the right earphone, and can configure right channel audio signals for the left earphone and configure left channel audio signals for the right earphone under the condition that the left earphone is worn on the right earphone and/or the right earphone is worn on the left earphone. Therefore, even if the wearing positions of the left and right earphones are reversed by the user, the user does not need to pick up the earphones to replace, the user can hear the audio frequency suitable for the left ear and the right ear, and the hearing experience of the user is ensured.
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 switching method embodiment described in fig. 4 or each process of the channel switching method embodiment described in fig. 2, 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.
Note that the radio frequency unit 401 includes a first antenna and a second antenna.
Wherein, when the electronic device and the earphone are in wireless connection, the radio frequency unit 401 controls the first antenna and the second antenna to respectively send a first signal and a second signal to the left earphone, and controls the first antenna and the second antenna to respectively send a third signal and a fourth signal to the right earphone;
The processor 410 is configured to obtain wearing positions of the left earphone and the right earphone according to the time when the first signal and the second signal are transmitted to the left earphone and the time when the third signal and the fourth signal are transmitted to the right earphone,
or alternatively, the process may be performed,
the processor 410 is configured to obtain a distance between the first antenna and the second antenna, calculate a first angle according to the distance and a phase difference between the first signal and the second signal sent to the left earphone, and calculate a second angle according to the distance and a phase difference between the third signal and the fourth signal sent to the right earphone, so as to obtain wearing positions of the left earphone and the right earphone;
the processor 410 is configured to configure a right channel audio signal for the left earpiece, and a left channel audio signal for the right earpiece, with the left earpiece being worn by the right ear and/or the right earpiece being worn by the left ear.
Wherein the processor 410 is further configured to:
acquiring the time of the first signal and the second signal sent to the left earphone, and judging that the left earphone is worn on the right ear when the time of the first signal sent to the left earphone is later than the time of the second signal sent to the left earphone;
And acquiring the time when the third signal and the fourth signal are sent to the right earphone, and judging that the right earphone is worn on the left ear when the time when the third signal is sent to the right earphone is earlier than the time when the fourth signal is sent to the right earphone.
Wherein the processor 410 is further configured to:
acquiring the distance between the first antenna and the second antenna, calculating a first angle according to the distance and the phase difference between the first signal and the second signal sent to the left earphone, and calculating a second angle according to the distance and the phase difference between the third signal and the fourth signal sent to the right earphone;
and under the condition that the first angle is larger than the second angle, judging that the left earphone is worn on the right ear, and the right earphone is worn on the left ear.
The first antenna and the second antenna are both Bluetooth antennas, and the first antenna and the second antenna are both connected with the same Bluetooth chip, or the first antenna is connected with the first Bluetooth chip, and the second antenna is connected with the second Bluetooth chip.
Wherein, the radio frequency unit 401 is further configured to:
and sending prompt information to the earphone when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear.
In the embodiment of the present invention, when the electronic device 400 establishes a wireless connection with the earphone, the first antenna and the second antenna disposed on opposite sides of the electronic device are controlled to transmit signals to the left earphone and the right earphone, respectively, and the wearing positions of the left earphone and the right earphone are determined by acquiring signal parameters transmitted to the left earphone and the right earphone, and the right channel audio signal can be configured for the left earphone and the left channel audio signal can be configured for the right earphone when the left earphone is worn on the right earphone and/or the right earphone is worn on the left earphone. Therefore, even if the wearing positions of the left and right earphones are reversed by the user, the user does not need to pick up the earphones to replace, the user can hear the audio frequency suitable for the left ear and the right ear, and the hearing experience of the user is ensured.
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 and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 4041 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 4041 and/or the backlight when the electronic device 400 moves 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 4041, and the display panel 4041 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 4041, 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 4041 according to the type of touch event. Although in fig. 4, the touch panel 4071 and the display panel 4041 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 4041 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 above-mentioned channel switching method embodiment, and the same technical effects can be achieved, so that repetition is avoided, and details are not repeated here.
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 switching method embodiment, and can achieve the same technical effects, so that repetition is avoided, and no further description is given here. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or 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 (6)

1. The sound channel switching method is applied to electronic equipment and is characterized in that the electronic equipment comprises a first antenna and a second antenna; the channel switching method comprises the following steps:
under the condition that the electronic equipment and the earphone are in wireless connection, the first antenna and the second antenna are controlled to respectively send a first signal and a second signal to the left earphone, and the first antenna and the second antenna are controlled to respectively send a third signal and a fourth signal to the right earphone;
the first antenna and the second antenna are respectively arranged on two opposite sides of the electronic equipment;
according to the time of the first signal and the second signal sent to the left earphone and the time of the third signal and the fourth signal sent to the right earphone, the wearing positions of the left earphone and the right earphone are obtained, and if the time of the first signal sent to the left earphone is later than the time of the second signal sent to the left earphone, the left earphone is judged to be worn on the right ear; in case the third signal is sent to the right earphone earlier than the fourth signal is sent to the right earphone, it is determined that the right earphone is worn on the left ear,
Or alternatively, the process may be performed,
acquiring the distance between the first antenna and the second antenna, calculating a first angle according to the distance and the phase difference between the first signal and the second signal sent to the left earphone, calculating a second angle according to the distance and the phase difference between the third signal and the fourth signal sent to the right earphone, and judging that the left earphone is worn on the right earphone and the right earphone is worn on the left earphone under the condition that the first angle is larger than the second angle;
and when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear, configuring a right channel audio signal for the left earphone and configuring a left channel audio signal for the right earphone.
2. The method of claim 1, wherein the first antenna and the second antenna are both bluetooth antennas, and wherein the first antenna and the second antenna are both connected to a same bluetooth chip, or wherein the first antenna is connected to a first bluetooth chip and the second antenna is connected to a second bluetooth chip.
3. The method of claim 1, wherein after the acquiring the wearing positions of the left and right headphones, the method further comprises:
And sending prompt information to the earphone when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear.
4. An electronic device, comprising a first antenna and a second antenna; the electronic device further includes:
the transmitting module is used for controlling the first antenna and the second antenna to respectively transmit a first signal and a second signal to the left earphone and controlling the first antenna and the second antenna to respectively transmit a third signal and a fourth signal to the right earphone under the condition that the electronic equipment and the earphone are in wireless connection; the first antenna and the second antenna are respectively arranged on two opposite sides of the electronic equipment;
an acquisition module configured to acquire wearing positions of the left earphone and the right earphone according to a time when the first signal and the second signal are transmitted to the left earphone and a time when the third signal and the fourth signal are transmitted to the right earphone, wherein the left earphone is determined to be worn on the right ear when the time when the first signal is transmitted to the left earphone is later than the time when the second signal is transmitted to the left earphone, and the right earphone is determined to be worn on the left ear when the time when the third signal is transmitted to the right earphone is earlier than the time when the fourth signal is transmitted to the right earphone,
Or alternatively, the process may be performed,
the method comprises the steps of acquiring a distance between a first antenna and a second antenna, calculating a first angle according to the distance and a phase difference between a first signal and a second signal sent to a left earphone, calculating a second angle according to the distance and a phase difference between a third signal and a fourth signal sent to a right earphone, and judging that the left earphone is worn on a right ear and the right earphone is worn on a left ear when the first angle is larger than the second angle;
the configuration module is used for configuring right channel audio signals for the left earphone and configuring left channel audio signals for the right earphone when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear.
5. The electronic device of claim 4, wherein the first antenna and the second antenna are both bluetooth antennas, wherein the first antenna and the second antenna are both connected to a same bluetooth chip, or wherein the first antenna is connected to a first bluetooth chip and the second antenna is connected to a second bluetooth chip.
6. The electronic device of claim 4, wherein the electronic device further comprises:
The prompting module is used for sending prompting information to the earphone when the left earphone is worn on the right ear and/or the right earphone is worn on the left ear.
CN202010180162.3A 2020-03-16 2020-03-16 Sound channel switching method and electronic equipment Active CN113411446B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010180162.3A CN113411446B (en) 2020-03-16 2020-03-16 Sound channel switching method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010180162.3A CN113411446B (en) 2020-03-16 2020-03-16 Sound channel switching method and electronic equipment

Publications (2)

Publication Number Publication Date
CN113411446A CN113411446A (en) 2021-09-17
CN113411446B true CN113411446B (en) 2023-07-21

Family

ID=77676076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010180162.3A Active CN113411446B (en) 2020-03-16 2020-03-16 Sound channel switching method and electronic equipment

Country Status (1)

Country Link
CN (1) CN113411446B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117156371A (en) * 2023-08-31 2023-12-01 上海柯锐芯微电子有限公司 UWB wireless earphone pose sensing measurement method based on multiple base stations

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013242232A (en) * 2012-05-21 2013-12-05 Toyota Central R&D Labs Inc Object approaching surveillance device
JP2014143451A (en) * 2011-05-10 2014-08-07 Japan Science & Technology Agency Stereo headphone device
CN104469624A (en) * 2014-12-16 2015-03-25 广东欧珀移动通信有限公司 Sound track switching method, sound track switching system and electronic equipment of headset and headset
CN106454588A (en) * 2016-09-30 2017-02-22 维沃移动通信有限公司 Earphone and earphone channel switching method
CN107580289A (en) * 2017-08-10 2018-01-12 西安蜂语信息科技有限公司 Method of speech processing and device
CN110753309A (en) * 2019-10-29 2020-02-04 歌尔科技有限公司 Electronic equipment positioning system, method and device
CN111766548A (en) * 2020-05-29 2020-10-13 维沃移动通信有限公司 Information prompting method and device, electronic equipment and readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102535726B1 (en) * 2016-11-30 2023-05-24 삼성전자주식회사 Method for detecting earphone position, storage medium and electronic device therefor

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014143451A (en) * 2011-05-10 2014-08-07 Japan Science & Technology Agency Stereo headphone device
JP2013242232A (en) * 2012-05-21 2013-12-05 Toyota Central R&D Labs Inc Object approaching surveillance device
CN104469624A (en) * 2014-12-16 2015-03-25 广东欧珀移动通信有限公司 Sound track switching method, sound track switching system and electronic equipment of headset and headset
CN106454588A (en) * 2016-09-30 2017-02-22 维沃移动通信有限公司 Earphone and earphone channel switching method
CN107580289A (en) * 2017-08-10 2018-01-12 西安蜂语信息科技有限公司 Method of speech processing and device
CN110753309A (en) * 2019-10-29 2020-02-04 歌尔科技有限公司 Electronic equipment positioning system, method and device
CN111766548A (en) * 2020-05-29 2020-10-13 维沃移动通信有限公司 Information prompting method and device, electronic equipment and readable storage medium

Also Published As

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

Similar Documents

Publication Publication Date Title
CN108347759B (en) Anti-interference method of flexible screen and mobile terminal
CN110166610B (en) Mobile terminal and switching method of sound outlet
CN109819450B (en) Signal receiving method, device and terminal
CN108494030B (en) Wireless charging method, terminal and transmitting terminal equipment
CN110266323B (en) Signal control circuit, terminal equipment and signal control method
CN113223539B (en) Audio transmission method and electronic equipment
CN109743737B (en) Method, terminal and base station for reducing coexistence interference of multiple networks
CN109739394B (en) SAR value processing method and mobile terminal
CN111093137B (en) Volume control method, volume control equipment and computer readable storage medium
CN108683980B (en) Audio signal transmission method and mobile terminal
US20230006711A1 (en) Audio transmission method and electronic device
CN110557166B (en) Communication circuit adjusting method and terminal
CN110099434B (en) Power adjustment method, terminal equipment and computer readable storage medium
CN109788114B (en) Call processing method and terminal
CN111352566B (en) Parameter adjusting method and electronic equipment
CN111432071B (en) Call control method and electronic equipment
CN113411446B (en) Sound channel switching method and electronic equipment
CN110673761B (en) Touch key detection method and terminal equipment thereof
CN110545351B (en) Incoming call processing method, electronic equipment and computer readable storage medium
CN110839108A (en) Noise reduction method and electronic equipment
CN111343618B (en) Display method and electronic equipment
CN111356096B (en) Information sending method and electronic equipment
CN113411702B (en) Sound channel configuration method and electronic equipment
CN115037831A (en) Mode control method and device, electronic equipment and earphone
CN112925501A (en) Audio playing control method, device and system and computer readable storage medium

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