Summary of the invention
Embodiments of the invention provide the audio-frequency processing method of a kind of terminal and this terminal, realize the played in stereo of audio signal on the terminal that adopts a loud speaker and an earphone structure.
For achieving the above object, embodiments of the invention adopt following technical scheme:
A kind of terminal comprises:
Control unit, be used for to send the first switching command to the first diverter switch and the second switching command to the second diverter switch;
The first diverter switch is used for cutting respectively according to the first switching command and leads to two paths on it, and described two paths input separately is connected with audio signal output end, and described two paths output separately is connected with an input of audio frequency amplifier;
Described control unit also is used for controlling audio signal and inputs to the first diverter switch, exports audio-frequency power amplifier to by described the first diverter switch;
The second diverter switch, be used for according to the second switching command cut the logical input that is connected with audio-frequency power amplifier on it and with output that receiver is connected between passage;
Audio-frequency power amplifier, be used for the audio signal of input is carried out power amplification and directly exported the audio signal of one of them sound channel to loud speaker by an output, the audio signal of another sound channel exports the second diverter switch to by another output, exports receiver to by described the second diverter switch.
A kind of audio-frequency processing method comprises:
Send the first switching command to the first diverter switch, indicate described the first diverter switch to cut respectively and lead to two paths on it, described two paths input separately is connected with audio signal output end, and described two paths output separately is connected with an input of audio frequency amplifier;
Send the second switching command to the second diverter switch, indicate described the second diverter switch cut the logical input that is connected with audio-frequency power amplifier on it and with output that receiver is connected between passage;
Control audio signal and input to the first diverter switch, export audio-frequency power amplifier to by described the first diverter switch, in described audio signal of carrying out after power amplification, the audio signal of a sound channel directly exports loud speaker to by an output of described audio-frequency power amplifier, the audio signal of another sound channel exports the second diverter switch to by another output of described audio-frequency power amplifier, exports receiver to by described the second diverter switch.
By the described embodiment of the present invention of technique scheme, when using described terminal to carry out the audio frequency broadcast, at first send the first switching command to the first diverter switch by control unit, described the first diverter switch can cut according to described the first switching command the passage that leads between audio signal output end and audio-frequency power amplifier input.Send the second switching command to the second diverter switch by described control unit, described the second diverter switch according to described the second switching command can cut the logical input that is connected with audio-frequency power amplifier on it and with output that receiver is connected between passage.After above-mentioned passage is all cut and is led to, described control unit is controlled audio signal and is inputed to the first diverter switch, export audio-frequency power amplifier to by described the first diverter switch, described audio signal is through after power amplification, the audio signal of one of them sound channel directly exports loud speaker to by an output of described audio-frequency power amplifier, and then drives described loud speaker broadcast; The audio signal of another sound channel exports the second diverter switch to by another output of described audio-frequency power amplifier, exports receiver to by described the second diverter switch, and then drives described receiver broadcast.Thereby only have in employing on the terminal of a receiver and a loadspeaker structure, realized the played in stereo of binaural audio signal.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Embodiment 1:
The embodiment of the present invention provides a kind of terminal, and this terminal has a loud speaker and a receiver, and as shown in Figure 1, this terminal comprises: control unit 11, the first diverter switch 12, the second diverter switch 13 and audio-frequency power amplifier 14.
Wherein, control unit 11 be used for sending the first switching command to the first diverter switch and the second switching command to the second diverter switch.After the first diverter switch 12 is used for receiving described the first switching command, cut respectively according to the first switching command and lead to two paths on it, described two paths input separately is connected with audio signal output end, and described two paths output separately is connected with an input of audio frequency amplifier.Described two paths can realize that audio signal output end is to the transfer of data of audio frequency amplifier input.
The second diverter switch 13 be used for according to the second switching command cut the logical input that is connected with audio-frequency power amplifier on it and with output that receiver is connected between passage.This passage can realize that the output of audio-frequency power amplifier is to the transfer of data of receiver.Above-mentioned passage all cut logical after, described control unit also is used for controlling audio signal and inputs to the first diverter switch, exports audio-frequency power amplifier to by described the first diverter switch.Audio-frequency power amplifier 14 is used for the audio signal of input is carried out power amplification and directly exported the audio signal of one of them sound channel to loud speaker by an output, the audio signal of another sound channel exports the second diverter switch to by another output, and described the second diverter switch exports receiver to.Represent left channel audio signal as L in Fig. 1, by exporting the second diverter switch after power amplification to, described the second diverter switch exports receiver to.R represents right channel audio signal, because an output of described audio-frequency power amplifier is connected directly to loud speaker, thereby during by this output output, will directly export loud speaker when the audio signal of R channel to, and then drives loud speaker and play.Also can export described left channel audio signal L to loud speaker, export described right channel audio signal R to above-mentioned the second diverter switch.
In prior art, control unit directly exports binaural audio signal to earphone by described audio signal output end, and export audio-frequency power amplifier to by the above-mentioned binaural audio signal that exports earphone to is switched in the present invention, binaural audio signal through after power amplification separately exports earphone and receiver to.Thereby also solved and to have realized the problem of audio signal played in stereo in the prior art on the terminal that adopts a loud speaker and an earphone structure.In addition, on the terminal with single loadspeaker structure, also be difficult to improved by the Power Limitation volume, and the present invention has increased the audio-frequency power amplifier of a two-way and can improve the volume that audio frequency is put outward.
Simultaneously, the embodiment of the present invention also provides a kind of audio-frequency processing method, and as shown in Figure 2, the method comprises the steps:
201, send the first switching command to the first diverter switch, indicate described the first diverter switch to cut respectively and lead to two paths on it, described two paths input separately is connected with audio signal output end, and described two paths output separately is connected with an input of audio frequency amplifier.
202, send the second switching command to the second diverter switch, indicate described the second diverter switch to cut to lead to the input that is connected with audio-frequency power amplifier on it and with output that receiver is connected between passage.Also can send simultaneously described the first switching command and described the second switching command in a step in described step 201 and step 202.
203, control audio signal input the first diverter switch, export audio-frequency power amplifier to by described the first diverter switch, the audio signal of a sound channel in described audio signal of carrying out after power amplification directly exports loud speaker to by an output of described audio-frequency power amplifier, the audio signal of another sound channel exports the second diverter switch to by another output of described audio-frequency power amplifier, exports receiver to by described the second diverter switch.Audio signal described in prior art is directly to export earphone to, this step will be controlled this audio signal input the first diverter switch that exports earphone to, export audio-frequency power amplifier to by described the first diverter switch, through the binaural audio signal after power amplification, more separately export earphone and receiver to.Thereby only have in employing on the terminal of a receiver and a loadspeaker structure, realized the played in stereo of binaural audio signal.
Embodiment 2:
The embodiment of the present invention provides a kind of terminal, and this terminal adopts a loud speaker and an earphone structure, and as shown in Figure 3, this terminal comprises: control unit 31, the first diverter switch 32, the second diverter switch 33 and audio-frequency power amplifier 34.
State in the use terminal and carry out audio frequency when putting outward, control unit 31 be used for sending the first switching command to the first diverter switch and the second switching command to the second diverter switch.After the first diverter switch 32 is used for receiving described the first switching command, cut respectively according to the first switching command and lead to two paths on it, described two paths input separately is connected with audio signal output end, and described two paths output separately is connected with an input of audio frequency amplifier.Described two paths can realize that audio signal output end is to the transfer of data of audio frequency amplifier input.
The second diverter switch 33 be used for according to the second switching command cut the logical input that is connected with audio-frequency power amplifier on it and with output that receiver is connected between passage.This passage can realize that the output of audio-frequency power amplifier is to the transfer of data of receiver.Above-mentioned passage all cut logical after, described control unit also is used for controlling audio signal and inputs to the first diverter switch, exports audio-frequency power amplifier to by described the first diverter switch.Audio-frequency power amplifier 34 is used for the audio signal of input is carried out power amplification and directly exported the audio signal of one of them sound channel to loud speaker by an output, the audio signal of another sound channel exports the second diverter switch to by another output, exports receiver to by described the second diverter switch.As the binaural audio signal in Fig. 3, wherein L represents left channel audio signal, and R represents right channel audio signal.Export audio-frequency power amplifier to by described the first diverter switch, through the binaural audio signal after power amplification, wherein left channel audio signal L exports the second diverter switch to after by power amplification, and described the second diverter switch exports receiver to.R represents right channel audio signal, because an output of described audio-frequency power amplifier is connected directly to loud speaker, thereby during by this output output, will directly export loud speaker when the audio signal of R channel to, and then drives loud speaker and play.Also can export described left channel audio signal L to loud speaker, export described right channel audio signal R to above-mentioned the second diverter switch.Because an output of described audio-frequency power amplifier is connected directly to loud speaker, thereby during by this output output, will directly export loud speaker when the audio signal that a sound channel is arranged to, and then drive loud speaker and play.
The earphone of stating in the use terminal carries out audio frequency when playing, described the first diverter switch 32 also is used for receiving the 3rd switching command that described control unit 31 sends, and cut logical two paths on it according to described the 3rd switching command, described two paths input separately is connected with audio signal output end, and described two paths output separately is connected with earphone.Then control unit can be controlled audio signal and export above-mentioned the first diverter switch to, exports earphone to by this first diverter switch.This moment, the user just can use earphone to hear the audio frequency of broadcast.
When above-mentioned terminal has telephone access, need to export voice signal to receiver under default conditions, this moment, described the second diverter switch 33 also was used for receiving the 4th switching command that described control unit 31 sends, and according to described the 4th switching command cut the logical input that is connected with audio signal output end on it and with output that receiver is connected between passage.At this moment control unit will be controlled voice signal and export described the second diverter switch to, export receiver to by described the second diverter switch.This moment, the user just can receive calls with receiver.When needs were put outside with voice signal, above-mentioned voice signal can be output as the audio signal of dual track through the conversion of terminal interlock circuit, and this transfer process belongs to prior art, does not repeat them here.Then the audio signal of the dual track of described output can export earphone to by above-mentioned the first diverter switch, and can realize receiving calls from earphone this moment.Also can export audio-frequency power amplifier to by above-mentioned the first diverter switch, an output by described audio-frequency power amplifier directly exports loud speaker to by the audio signal of a sound channel of audio-frequency power amplifier again, the audio signal of another sound channel exports the second diverter switch to by another output of described audio-frequency power amplifier, exports receiver to by described the second diverter switch.Can realize that the outer of voice signal put.
In prior art, control unit directly exports binaural audio signal to earphone by described audio signal output end, and export audio-frequency power amplifier to by the above-mentioned binaural audio signal that exports earphone to is switched in the present invention, binaural audio signal through after power amplification separately exports earphone and receiver to.Thereby also solved and to have realized the problem of audio signal played in stereo in the prior art on the terminal that adopts a loud speaker and an earphone structure.In addition, on the terminal with single loadspeaker structure, also be difficult to improved by the Power Limitation volume, and the present invention has increased the audio-frequency power amplifier of a two-way and can improve the volume that audio frequency is put outward.
The embodiment of the present invention also provides a kind of audio-frequency processing method, and as shown in Figure 4, the method comprises the steps:
401, state in the use terminal and carry out audio frequency when putting outward, send the first switching command to the first diverter switch, indicate described the first diverter switch to cut respectively and lead to two paths on it, described two paths input separately is connected with audio signal output end, and described two paths output separately is connected with an input of audio frequency amplifier.
402, send the second switching command to the second diverter switch, indicate described the second diverter switch to cut to lead to the input that is connected with audio-frequency power amplifier on it and with output that receiver is connected between passage.Also can send simultaneously described the first switching command and described the second switching command in a step in described step 401 and step 402, described the first switching command and described the second switching command are by GPIO (GeneralPurpose I/O, universal input/output) transmission.
403, control audio signal input the first diverter switch, export audio-frequency power amplifier to by described the first diverter switch, the audio signal of a sound channel in described audio signal of carrying out after power amplification directly exports loud speaker to by an output of described audio-frequency power amplifier, the audio signal of another sound channel exports the second diverter switch to by another output of described audio-frequency power amplifier, exports receiver to by described the second diverter switch.Audio signal described in prior art is directly to export earphone to, and this step will be controlled this audio signal input audio-frequency power amplifier that exports earphone to, then export respectively receiver and loud speaker to.Thereby only have in employing on the terminal of a receiver and a loadspeaker structure, realized the played in stereo of binaural audio signal.
When the earphone of above-mentioned terminal carries out the audio frequency broadcast, the method will adopt following step 104 to realize in addition:
404, send the 3rd switching command to described the first diverter switch, and indicate described the first diverter switch to cut logical two paths on it according to described the 3rd switching command, described two paths input separately is connected with audio signal output end, and described two paths output separately is connected with earphone.Then control audio signal and export above-mentioned the first diverter switch to, export earphone to by this first diverter switch.This moment, the user just can use earphone to hear the audio frequency of broadcast.
When above-mentioned terminal has telephone access, the method will adopt following step 105 to realize:
405, send the 4th switching command to described the second diverter switch, indication institute second diverter switch of telling according to described the 4th switching command cut lead to the input that is connected with audio signal output end on it and with output that receiver is connected between passage.To control voice signal and export described the second diverter switch to, export receiver to by described the second diverter switch.This moment, the user just can receive calls with receiver.Not only realize the played in stereo of audio signal on the terminal that adopts a loud speaker and an earphone structure, adopt the terminal of two loadspeaker structures also to save the space of a loud speaker with prior art.
The embodiment of the present invention is applied to the electronic product field, such as mobile phone, can realize the played in stereo of audio signal on the terminal of loud speaker of existing employing and an earphone structure.
Through the above description of the embodiments, the those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential common hardware, can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium that can read, floppy disk as computer, hard disk or CD etc., comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.