Summary of the invention
Therefore, the object of the present invention is to provide a kind of method of work of 2.4G wireless audio device, can make an ANTENN AUDIO sending module that four ANTENN AUDIO receiver modules are carried out the ANTENN AUDIO transmission.
The invention provides a kind of method of work of 2.4G wireless audio device, this 2.4G wireless audio device comprises an ANTENN AUDIO sending module and the first, second, third and the 4th ANTENN AUDIO receiver module, wherein, the ANTENN AUDIO sending module is worked as follows:
Step 101, frequency hopping protocol processes are provided with frequency and emission mode;
Step 102, AD conversion unit sampled audio data also are stored to data buffer;
Whetherstep 103, judgment data buffer be full, if otherwise return execution instep 102, if execution instep 104 then;
Voice data instep 104, compression, the coded data buffer, and add the ORC check code;
Voice data behindstep 105, the radio frequency unit launching code, control data and ANTENN AUDIO receiver module are replied control data;
Step 106, switching radio frequency unit are receiving mode;
Step 107, judge whether to receive the answer signal of ANTENN AUDIO receiver module, if otherwise return execution instep 101, if execution instep 108 then;
Step 108, judge whether it is the answer signal of the first ANTENN AUDIO receiver module, if then return execution instep 101, if otherwise execution instep 109;
Step 109, judge whether it is the answer signal of the second ANTENN AUDIO receiver module, if then return execution instep 101, if otherwise execution instep 110;
Step 110, judge whether it is the answer signal of the 3rd ANTENN AUDIO receiver module, if then return execution instep 101, if otherwise execution instep 111;
Step 111, be defined as the answer signal of the 4th ANTENN AUDIO receiver module, return execution instep 101 then;
Four ANTENN AUDIO receiver modules are worked as follows:
Step 201, frequency hopping protocol processes and frequency is set;
Step 202, judge whether to receive effective radiofrequency signal, if otherwise return execution instep 201, if the radiofrequency signal that arrives of demodulate reception then;
Data afterstep 203, decoding and the decompression demodulation deposit the data after decompressing in data buffer;
Whetherstep 204, judgment data buffer be full, if execution instep 205 then, if otherwise execution instep 206;
Step 205, D/A conversion unit carry out digital-to-analogue conversion to the data in the data buffer;
Step 206, radio frequency unit switch to emission mode;
Step 207, judge whether to be that the first ANTENN AUDIO receiver module is replied control data, if otherwise execution instep 208, if execution instep 211 then;
Step 208, judge whether to be that the second ANTENN AUDIO receiver module is replied control data, if otherwise execution instep 209, if execution instep 211 then;
Step 209, judge whether to be that the 3rd ANTENN AUDIO receiver module is replied control data, if otherwise execution instep 210, if execution instep 211 then;
Step 210, be defined as the 4th ANTENN AUDIO receiver module and reply control data;
Step 211, corresponding ANTENN AUDIO receiver module emission answer signal.
Wherein, be provided with the command channel that is used for to player output control command word between described ANTENN AUDIO sending module and the player as audio-source, described ANTENN AUDIO receiver module is provided with the command channel for button input of control commands word; In the describedstep 211, the control command word of importing with button in the answer signal; In describedstep 108,step 109,step 110 or thestep 111, before returning execution instep 101, execution in step S also: judge to have or not the control command word to be enclosed in, if have then send ppu by the I/O mouth with control command word decoding back, return execution instep 101 again, if do not have then directly return execution instep 101.
Wherein, described player is iPhone, iPOD, MP3 or mobile phone.
Wherein, described control command word is for to play, stop, advancing or to retreat.
Wherein, the communication mode between described ANTENN AUDIO sending module and the described ANTENN AUDIO receiver module is half-duplex.
Wherein, described ANTENN AUDIO sending module and described ANTENN AUDIO receiver module are worked based on GFSK digital modulation/demodulation mode.
In sum, the present invention has realized that an ANTENN AUDIO sending module carries out the ANTENN AUDIO transmission to four ANTENN AUDIO receiver modules, can be applicable to the device of various generation audio streams, the present invention also can be implemented in the playback action of ANTENN AUDIO receiver module one end controls playing device.
Embodiment
Figure 1 shows that a kind of circuit block diagram of using 2.4G ANTENN AUDIO sending module of the present invention, Figure 2 shows that a kind of circuit block diagram of using 2.4G ANTENN AUDIO receiver module of the present invention.As shown in Figure 1, in 2.4G ANTENN AUDIO sending module,voltage regulator 10,analog power 11 anddigital power 12 are formed power supply circuits, 11 pairs of artificial circuit part power supplies of analog power, 12 pairs of digital circuit part power supplies of digital power;AD conversion unit 13 is gathered the audio signal of left and right acoustic channels and simulated audio signal is converted to digital audio and video signals from audio-source (as sound card, mp3, CD Player, DVD player etc.); 2.4G 14 pairs of digital audio and video signals of baseband processing unit compress and encode; Under sending mode, the digital signal behindradio frequency unit 15 modulating-codings to be generating radiofrequency signal, and launches from antenna; PA (power amplifier) 16, LNA (low noise amplifier) 17 and radio-frequency (RF)switch 18 are formed radio-frequency (RF) front-end circuit, can amplify emission or the radiofrequency signal that receives.
As shown in Figure 2, in 2.4G ANTENN AUDIO receiver module,voltage regulator 20,analog power 21 anddigital power 22 are formed power supply circuits, 21 pairs of artificial circuit part power supplies of analog power, 22 pairs of digital circuit part power supplies of digital power; PA (power amplifier) 26, LNA (low noise amplifier) 27 and radio-frequency (RF)switch 28 are formed radio-frequency (RF) front-end circuit, can amplify the radiofrequency signal that receives or launch; Under receiving mode, the radiofrequency signal thatradio frequency unit 25 demodulation receive from antenna; 2.4G the signal that 24 pairs ofradio frequency units 25 of baseband processing unit demodulate is decoded and is decompressed, thereby draws digital audio and video signals; D/A conversion unit 23 is converted to simulated audio signal to digital audio and video signals, and exports respectively according to left and right acoustic channels.
Radio frequency unit 15 andradio frequency unit 25 can adopt chip ML2724,2.4Gbaseband processing unit 14 and 2.4Gbaseband processing unit 24 can adopt chip AT91SAM7S16,AD conversion unit 13 can adopt chip CE2632, and D/A conversion unit 23 can adopt chips W M8501.2.4G the ANTENN AUDIO sending module generally is connected with various audio-source, as sound card, mp3, CD Player, DVD player, television set etc., 2.4G ANTENN AUDIO receiver module generally is connected with various loudspeaker arrangements, as loud speaker, earphone, microphone etc.; Hardware setting by as above can realize I2S (Inter-IC Sound) digital audio of form and the support of analogue audio frequency.The present invention can realize that a 2.4G ANTENN AUDIO sending module carries out the ANTENN AUDIO transmission to four 2.4G ANTENN AUDIO receiver modules, just by an audio-source to four loudspeaker arrangement transmitting audio signals, for example, in household audio and video system, the rearmounted loudspeaker arrangement that the preposition loud speaker of left and right sound channels adds left and right sound channels remote four jiaos the time, just need be applied to the present invention in the room.
As shown in Figure 3, it is the workflow diagram of ANTENN AUDIO sending module in a preferred embodiment of the present invention, in this preferred embodiment, the 2.4G wireless audio device comprises an ANTENN AUDIO sending module and the first, second, third and the 4th ANTENN AUDIO receiver module; In the ANTENN AUDIO transmission course, the ANTENN AUDIO sending module sends a signal to the ANTENN AUDIO receiver module earlier, the ANTENN AUDIO receiver module sends a signal to the ANTENN AUDIO sending module more then, thereby form a communication cycle, between ANTENN AUDIO sending module and the ANTENN AUDIO receiver module communicate by letter according to this cycle constantly circulation repeat.At the transmitting terminal of ANTENN AUDIO transmission, in a communication cycle, the ANTENN AUDIO sending module is by step work as shown in Figure 3.
Step 101, frequency hopping protocol processes are provided with frequency and emission mode, and the present invention adopts the work of frequency hopping mode to disturb to avoid producing signal; In this step, can carry out the frequency hopping protocol processes by baseband processing unit, baseband processing unit can adopt GFSK (Gauss Frequency Shift Key, Gaussian Frequency Shift Keying) digital modulation/demodulation mode to work; Make radio frequency unit be operated in ISM (i.e. industry, science, the medical science) frequency range of 2.4GHz, 20 optional frequencies are provided, thereby can satisfy multifrequency and frequency hopping needs according to the frequency that is provided with; Communication pattern between ANTENN AUDIO sending module and the ANTENN AUDIO receiver module can be set to half-duplex, can set emission mode according to actual demand, length, the signal of setting communication cycle send or time slot arrangement, the signal transmission of reception or the sequential scheduling that receives.
Step 102, AD conversion unit sampled audio data also are stored to data buffer, transfer digital signal to and are stored to data buffer after audio-source is gathered simulated audio signal.
Whetherstep 103, judgment data buffer be full, if otherwise return execution instep 102, if execution instep 104 then, the capacity of data buffer can be reference with the data volume that can send in the ANTENN AUDIO process of transmitting.
Voice data instep 104, compression, the coded data buffer, and interpolation ORC check code, this step is carried out by baseband processing unit, and baseband processing unit can adopt GFSK (GaussFrequency Shift Key, Gaussian Frequency Shift Keying) digital modulation/demodulation mode to work.
Voice data behindstep 105, the radio frequency unit launching code, control data and ANTENN AUDIO receiver module are replied control data, control data is used for the operating state at the control ANTENN AUDIO receiver module of voice playing process, as control its time-out, control it and enter battery saving mode etc., the ANTENN AUDIO receiver module is replied the responder action that control data is used to control the ANTENN AUDIO receiver module, as when sending answer signal etc.; Because the recipient is four ANTENN AUDIO receiver modules, so the send mode of ANTENN AUDIO sending module can adopt the broadcast mode of point-to-multipoint.
Step 106, switching radio frequency unit are receiving mode, prepare to receive the answer signal from the ANTENN AUDIO receiver module, to judge the result of this ANTENN AUDIO process of transmitting.
Step 107, judge whether to receive the answer signal of ANTENN AUDIO receiver module, if otherwise return execution instep 101, if execution instep 108 then, on behalf of this ANTENN AUDIO, "No" send may fail to be sent to the ANTENN AUDIO receiver module, therefore need return execution instep 101, on behalf of this ANTENN AUDIO, "Yes" send and has been sent to the ANTENN AUDIO receiver module.
Step 108, judge whether it is the answer signal of the first ANTENN AUDIO receiver module, if then return execution instep 101, if otherwise execution instep 109.
Step 109, judge whether it is the answer signal of the second ANTENN AUDIO receiver module, if then return execution instep 101, if otherwise execution instep 110.
Step 110, judge whether it is the answer signal of the 3rd ANTENN AUDIO receiver module, if then return execution instep 101, if otherwise execution instep 111.
Step 111, be defined as the answer signal of the 4th ANTENN AUDIO receiver module, return execution instep 101 then.
Which ANTENN AUDIO receiver module determines to send what reply according to the answer signal that receives among the step 108-111 specifically is, execution instep 111 is restarted new communication cycle then.
As shown in Figure 4, it is the workflow diagram of ANTENN AUDIO receiver module in a preferred embodiment of the present invention, and at the receiving terminal of ANTENN AUDIO transmission, in a communication cycle, four ANTENN AUDIO receiver modules are by as shown in Figure 4 step work.
Step 201, frequency hopping protocol processes and frequency is set, four ANTENN AUDIO receiver modules and the unification of ANTENN AUDIO sending module according to the frequency hopping agreement in selected frequency work.
Step 202, judge whether to receive effective radiofrequency signal, if otherwise return execution instep 201, if the radiofrequency signal that arrives of demodulate reception then, the ANTENN AUDIO receiver module is at first determined the validity of the signal that receives, then by the radio frequency unit demodulation.
Data afterstep 203, decoding and the decompression demodulation, deposit the data after decompressing in data buffer, carry out this step by baseband processing unit, thereby restore digital audio and video signals, baseband processing unit can adopt GFSK (Gauss Frequency Shift Key, Gaussian Frequency Shift Keying) digital modulation/demodulation mode to work.
Whetherstep 204, judgment data buffer be full, if execution instep 205 then, if otherwise execution instep 206.
Step 205, D/A conversion unit carry out digital-to-analogue conversion to the data in the data buffer, export to all kinds of loudspeaker arrangements after digital audio and video signals is converted to simulated audio signal, as loud speaker, earphone, microphone etc.
Step 206, radio frequency unit switch to emission mode, and the ANTENN AUDIO receiver module is prepared to reply control data to the ANTENN AUDIO sending module according to the reception condition of ANTENN AUDIO.
Step 207, judge whether to be that the first ANTENN AUDIO receiver module is replied control data, if otherwise execution instep 208, if execution instep 211 then.
Step 208, judge whether to be that the second ANTENN AUDIO receiver module is replied control data, if otherwise execution instep 209, if execution instep 211 then.
Step 209, judge whether to be that the 3rd ANTENN AUDIO receiver module is replied control data, if otherwise execution instep 210, if execution instep 211 then.
Step 210, be defined as the 4th ANTENN AUDIO receiver module and reply control data.
Step 211, corresponding ANTENN AUDIO receiver module emission answer signal.Because the communication modes between ANTENN AUDIO sending module and the ANTENN AUDIO receiver module is the semiduplex mode of point-to-multipoint, therefore in a communication cycle, at first need to arrange to be specially which ANTENN AUDIO receiver module and reply control data by step 207-210, instep 211, arrange this ANTENN AUDIO receiver module to ANTENN AUDIO sending module emission answer signal then, after the execution ofstep 211, returnstep 201 and receive ANTENN AUDIO transmission next time with wait.
As shown in Figure 3 and Figure 4, the present invention has realized that an ANTENN AUDIO sending module carries out the ANTENN AUDIO transmission to four ANTENN AUDIO receiver modules, enforcement of the present invention does not need to change the structure of existing various 2.4G ANTENN AUDIO transmitting devices, can combine with the device of various generation audio streams with the wireless transmission audio frequency, for example can be applicable to wireless speaker, sound card, mp3, CD Player, DVD player, earphone, microphone etc., because the 2.4G wireless transmission method has the confidentiality height, volume is small and exquisite, power saving, long transmission distance, duplex simultaneous two-way work, advantages such as transmission bandwidth is bigger, so its application prospect is extensive.
As shown in Figure 5, it is for the block diagram of the another preferred embodiment of the present invention.In actual the use, because the distance between ANTENN AUDIO sending module and the ANTENN AUDIO receiver module is far away, the loud speaker that the player distance that is connected with the ANTENN AUDIO sending module is connected with the ANTENN AUDIO receiver module is also far away, and the user is nearer apart from loud speaker one end usually, and therefore wishing can be in the playback action of ANTENN AUDIO receiver module one end controls playing device.In this preferred embodiment, also be provided with the command channel that is used for to player output control command word between ANTENN AUDIO sending module and the player except that being provided with the voice-grade channel that is used for input audio signal, the ANTENN AUDIO receiver module also is provided with the command channel for button input of control commands word except that having the voice-grade channel that is used for output audio signal; Player is by the ADC (AD conversion unit) of voice-grade channel output audio signal to the ANTENN AUDIO sending module, the ANTENN AUDIO sending module sends wireless audio signal to first, second, third and the 4th ANTENN AUDIO receiver module, changes after audio frequency amplifier amplifies to export loud speaker 1-4 respectively to through the DAC of ANTENN AUDIO receiver module (D/A conversion unit); By on the ANTENN AUDIO receiver module, setting up the button that is used to import, user's input of control commands word is to the command channel, the control command word is attached on the audio signal and is sent to the ANTENN AUDIO sending module via the ANTENN AUDIO receiver module, and the ANTENN AUDIO sending module is delivered to command word decoding back the ppu of player by the I/O mouth; For the player that audio interface has the line traffic control function, the command channel between ANTENN AUDIO sending module and the player need not to change the original structure of player, only need utilize the line traffic control interface of player to get final product.In this embodiment, player can be iPhone, iPOD, MP3 and mobile phone etc.; The control command word that can import by button comprises that the controls playing device plays, stops, advancing and retreat etc.
As Figure 6 and Figure 7, Fig. 6 is the workflow diagram of middle ANTENN AUDIO sending module embodiment illustrated in fig. 5, and Fig. 7 is the flow chart of step S among Fig. 6.The user is by the control command word of button input ANTENN AUDIO receiver module, can when ANTENN AUDIO receiver module emission answer signal, together be transmitted to the ANTENN AUDIO sending module, wireless sending module is when carrying out its workflow, instep 108,step 109, instep 110 or thestep 111, before returning execution instep 101, execution in step S also: judge to have or not the control command word to be enclosed in, if have then send ppu by the I/O mouth with command word decoding back, return execution instep 101 again, if do not have then directly return execution instep 101, thereby give player with the control command word, be implemented in ANTENN AUDIO receiver module one end and can make broadcast by the controls playing device, stop, action such as advance or retreat makes things convenient for the user.Among this embodiment, similar among other job step of ANTENN AUDIO sending module and Fig. 3, do not repeat them here.
In sum, the present invention has realized that an ANTENN AUDIO sending module carries out the ANTENN AUDIO transmission to four ANTENN AUDIO receiver modules, enforcement of the present invention does not need to change the structure of existing various 2.4G ANTENN AUDIO transmitting devices, can combine with the device of various generation audio streams with the wireless transmission audio frequency, the present invention also can be implemented in the playback action of ANTENN AUDIO receiver module one end controls playing device.
The above; for the person of ordinary skill of the art; can make other various corresponding changes and distortion according to technical scheme of the present invention and technical conceive, and all these changes and distortion all should belong to the protection range of accompanying Claim of the present invention.