CN103324459A - Method and system for implementing USB (universal serial bus) headset devices - Google Patents

Method and system for implementing USB (universal serial bus) headset devices Download PDF

Info

Publication number
CN103324459A
CN103324459A CN2013102370348A CN201310237034A CN103324459A CN 103324459 A CN103324459 A CN 103324459A CN 2013102370348 A CN2013102370348 A CN 2013102370348A CN 201310237034 A CN201310237034 A CN 201310237034A CN 103324459 A CN103324459 A CN 103324459A
Authority
CN
China
Prior art keywords
headset
broadcast message
plug
broadcast
monitoring
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.)
Pending
Application number
CN2013102370348A
Other languages
Chinese (zh)
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.)
TCL Corp
Original Assignee
TCL Corp
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 TCL Corp filed Critical TCL Corp
Priority to CN2013102370348A priority Critical patent/CN103324459A/en
Publication of CN103324459A publication Critical patent/CN103324459A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and a system for implementing USB (universal serial bus) headset devices, and belongs to the technical field of computers. The method includes the steps: monitoring headset plug events generated by plugging the USB headset devices by a monitoring device; converting the monitored headset plug events into headset plug broadcast messages and then broadcasting by the monitoring device to allow monitoring of a broadcast processing device; monitoring the broadcast messages by the broadcast processing device, judging whether the monitored current broadcast messages are the headset plug broadcast messages or not, and setting the current USB headset devices according to acquired attribute parameters after the headset plug broadcast messages are analyzed and processed when the monitored current broadcast messages are the headset plug broadcast messages. The system comprises the monitoring device and the broadcast processing device. The headset plug devices are monitored and correspondingly processed by the monitoring device, the headset plug broadcast messages are transmitted to the broadcast processing module for processing, and audio input and output are realized through USB headsets.

Description

A kind of method and system that realize USB headset equipment
Technical field
The present invention relates to field of computer technology, particularly a kind of method and system that realize USB headset equipment.
Background technology
At present, be that the smart machine (for example: intelligent television, mobile phone, ipad etc.) of platform has appeared in the daily life in a large number with the Android system, in smart machine, audio-visual amusement all is one of its most important function.
The smart machine that has carried the android system can be play music in the USB device, audio-visual, video etc., but because smart machine can not be supported the USB headset, when the user in enjoy music or when watching video display, volume is crossed the life that conference influences other households, volume is turned down and can be influenced auditory perception.
Summary of the invention
Can not support the problem of USB headset equipment in order to solve intelligent television in the prior art, the embodiment of the invention provides a kind of multi-screen to share the method and system that control realizes USB headset equipment.Described technical scheme is as follows:
First aspect provides a kind of method of the USB of realization headset equipment, and described method comprises:
The headset plug event that monitoring device produces when being plugged by USB headset equipment is monitored;
Described monitoring device is broadcasted after converting the headset plug event that monitors to headset plug broadcast message, monitors to be used for broadcast processing apparatus;
Broadcast processing apparatus is monitored broadcast message, judges whether the current broadcast information that listens to is headset plug broadcast message;
When described broadcast processing apparatus is headset plug broadcast message when the broadcast message that listens to, described headset plug broadcast message carried out dissection process after, according to the property parameters that obtains after resolving current USB headset equipment is arranged.
In conjunction with first aspect, under first kind of embodiment of first aspect, described headset plug event can be divided into: earphone plug event and microphone plug event, wherein, the information that comprises in the described headset plug event is specially: the plug state of device identification, device type sign, equipment, device number, sound card number.
In conjunction with first aspect, under second kind of embodiment of first aspect, described monitoring device also comprises before the headset plug event that is produced by the plug of USB headset equipment is monitored:
Described monitoring device is created earphone monitoring class object and microphone monitoring class object;
Described monitoring device is definition ear speaker device sign and microphone apparatus sign in described earphone monitoring class object and microphone monitoring class object respectively, is earphone plug event or microphone plug event in order to the event of determining to monitor.
In conjunction with first aspect, under the third embodiment of first aspect, described broadcast processing apparatus is monitored broadcast message, judges whether the current broadcast information that listens to is headset plug broadcast message, comprising:
The broadcast message of broadcast processing apparatus monitoring system;
Broadcast processing apparatus obtains device identification from described broadcast message, judge according to described device identification whether described broadcast message is headset plug broadcast message.
In conjunction with first aspect, under the 4th kind of embodiment of first aspect, when described broadcast processing apparatus is headset plug broadcast message when the broadcast message that listens to, after described headset plug broadcast message carried out dissection process, according to the property parameters that obtains after resolving current USB headset equipment is arranged, comprising:
Broadcast processing apparatus is resolved described headset plug broadcast message, obtains headset device type sign;
Broadcast processing apparatus is judged the headset device type according to described headset device type sign, the device value of obtaining corresponding headset device type defines corresponding input-output apparatus, obtain the device attribute value in the headset plug broadcast message after the parsing, and arrange according to the input-output apparatus of described device attribute value to definition;
Broadcast processing apparatus calls contiguous function according to the device value of described definition and described property parameters current USB headset equipment is set.
Second aspect provides a kind of system of the USB of realization headset equipment, and described system comprises:
Monitoring device and broadcast processing apparatus;
Described monitoring device comprises monitoring modular and modular converter; Described monitoring modular is used for when plug by USB headset equipment the headset plug event of generation and monitors; Described modular converter is broadcasted after the headset plug event that monitors being converted to headset plug broadcast message, monitors to be used for broadcast processing apparatus;
Described broadcast processing apparatus comprises receiver module and processing module, and described receiver module is used for monitoring broadcast message, judges whether the current broadcast information that listens to is headset plug broadcast message; Described processing module is used for when the broadcast message that listens to is headset plug broadcast message, described headset plug broadcast message is carried out dissection process after, according to the property parameters that obtains after the parsing current USB headset equipment is arranged.
In conjunction with second aspect, under first kind of embodiment of second aspect, described headset plug event can be divided into: earphone plug event and microphone plug event, wherein, the information that comprises in the described headset plug event is specially: the plug state of device identification, device type sign, equipment, device number, sound card number.
In conjunction with second aspect, under second kind of embodiment of second aspect, described monitoring device also comprises:
Presetting module is used for creating earphone monitoring class object and microphone monitoring class object; Being used for identifying and the microphone apparatus sign at described earphone monitoring class object and microphone monitoring class object definition ear speaker device respectively, is earphone plug event or microphone plug event in order to the event of determining to monitor.
In conjunction with second aspect, under the third embodiment of second aspect, described receiver module is used for the broadcast message of monitoring system; Be used for obtaining device identification from described broadcast message, judge according to described device identification whether described broadcast message is headset plug broadcast message.
In conjunction with second aspect, under the 4th kind of embodiment of second aspect, described processing module is used for resolving described headset plug broadcast message, obtains headset device type sign; Be used for judging the headset device type according to described headset device type sign, the device value of obtaining corresponding headset device type defines corresponding input-output apparatus, obtain the device attribute value in the headset plug broadcast message after the parsing, and arrange according to the input-output apparatus of described device attribute value to definition; Be used for calling contiguous function according to the device value of described definition and described property parameters current USB headset equipment is set.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is:
By adding the plug state of monitoring device monitoring headset, and the information of obtaining is sent to the setting that treating apparatus carries out headset equipment, makes USB headset equipment be connected in the system and can identify and use.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the invention, the accompanying drawing of required use is done to introduce simply in will describing embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the method flow diagram of a kind of USB of realization headset equipment of providing of the embodiment of the invention one;
Fig. 2 is the detail flowchart of presetting monitoring device among Fig. 1 before the step 101;
Fig. 3 is the detail flowchart of step 103 among Fig. 1;
Fig. 4 is the detail flowchart of step 104 among Fig. 1;
Fig. 5 is for realizing the design sketch of USB headset equipment;
The structural representation of the system of a kind of USB of realization headset equipment that Fig. 6 embodiment of the invention two provides;
Fig. 7 is the structural representation of monitoring device 11 among Fig. 6;
Fig. 8 is the structural representation of broadcast processing apparatus 12 among Fig. 6;
Fig. 9 is the structural representation of another monitoring device among Fig. 7.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Embodiment one
The invention provides a kind of method of the USB of realization headset equipment, as shown in Figure 1, described method comprises:
Step 101: the headset plug event that monitoring device produces when being plugged by USB headset equipment is monitored.
In the present embodiment, described headset plug event refers to that when system kernel detects the Plug Action that headset equipment is arranged on the USB interface event notice by Uevent sends comprises: earphone plug event and microphone plug event; Wherein, the information that comprises in the described headset plug event is specially: the plug state of device identification, device type sign, equipment, device number, sound card number, device path etc.; For example, the event that sends by Uevent is: MINOR=48, MAJOR=116, SUBSYSTEM=sound, DEVNAME=snd/pcmC1D0p, DEVPATH=/devices/lm2.
Step 102: described monitoring device is broadcasted after converting the headset plug event that monitors to headset plug broadcast message, monitors to be used for broadcast processing apparatus.
Step 103: broadcast processing apparatus is monitored broadcast message, judges whether the current broadcast information that listens to is headset plug broadcast message.
In the present embodiment, described broadcast message is specially intent message, and Intent message is the message informing mechanism of binding during deferred run between the assembly in a kind of same or different application among the android; Intent itself is a passive data structure, preserve the description of the operation that will carry out, specifically, the action of single job during intent is responsible for using, action relates to data, additional data is described, Android is then according to the description of this Intent, be responsible for finding corresponding assembly, Intent passed to the assembly that calls, and finish calling of assembly.
Step 104: when described broadcast processing apparatus is headset plug broadcast message when the broadcast message that listens to, described headset plug broadcast message carried out dissection process after, according to the property parameters that obtains after resolving current USB headset equipment is arranged.If the non-headset plug of the broadcast message that listens to broadcast message does not then deal with in the present invention.
Particularly, in the present embodiment, wherein, described property parameters specifically comprises: the plug state of device identification, device type sign, equipment, device number, sound card number; Wherein, described device identification is used for determining that the broadcast message that listens to is headset plug broadcast message; Described device type sign is used for the type of difference headset equipment; The plug state of described equipment is used for the insertion of expression USB device or extracts the Status Flag of state; Described device number refers to the key word of equipment.
In conjunction with above-mentioned embodiment, as shown in Figure 2, before step 101, also comprise:
201: monitoring device is created earphone monitoring class object and microphone monitoring class object.
Wherein, described earphone monitoring class object is used for the plug event of monitoring earphone; Described microphone monitoring class object is used for the plug event of monitoring microphone.For example, as earphone monitoring class UsbPlay Observer, microphone monitoring class Usb Caputer Observer.
202: described monitoring device is definition ear speaker device sign and microphone apparatus sign in described earphone monitoring class object and microphone monitoring class object respectively, is earphone plug event or microphone plug event in order to the event of determining to monitor.
In the present embodiment, described ear speaker device sign (English name: Observer-playback) be used for judging whether the event that monitors is earphone plug event; Described microphone apparatus sign (English name: Observer-micphone) be used for judging whether the event that monitors is microphone plug event; For example, the definition ear speaker device is designated " DEVNAME=snd/pcmC1D0p ", and the definition microphone apparatus is designated " DEVNAME=snd/pcmC1D0c ".
In conjunction with above-mentioned embodiment, preferably, in the present embodiment, step 101 begins to monitor function by what call the Android standard, start monitoring modular, " DEVNAME=snd/pcmC1D0p " and " DEVNAME=snd/pcmC1D0c " two character strings are joined in the monitoring of backstage.
When kernel detects the Plug Action of USB headset equipment, will send event notice by Uevent, owing to comprise character string " DEVNAME=snd/pcmC1D0p " or " DEVNAME=snd/pcmC1D0c " in the headset equipment that the sends plug event notice, earphone monitoring class object and microphone monitoring class object default in the monitored device of these character strings meetings detect, to call processing event function automatically handles, processing procedure is as described in the step 102, particularly, the processing procedure of step 102 is as follows:
Obtain the plug operation and refer to judge that USB device is to insert or extract, set up an intent broadcasting, and the information such as plug state, device number, sound card number of obtaining device identification, device type sign, equipment from described plug event arrange the respective attributes of described intent broadcasting, and broadcast.
In conjunction with above-mentioned embodiment, as shown in Figure 3, step 103 specifically comprises:
301: the broadcast message of described broadcast processing apparatus monitoring system.
302: the broadcasting monitoring device obtains device identification from described broadcast message, judges according to described device identification whether described broadcast message is headset plug broadcast message.
Wherein, described broadcast message is intent information, in the present embodiment, when the broadcasting monitoring device obtains device identification from the described intent information that listens to, judge whether described device identification is predefined " DEVNAME=snd/pcmC1D0p " or " DEVNAME=snd/pcmC1D0c ", be to determine that then described broadcast message is headset plug broadcast message, continues execution in step 104; Otherwise continue the broadcast message of monitoring system.
For example, audio service in the Android system (English name: the audio broadcasting receiver module is arranged AudioService), be used for receiving system broadcasting, when the audio broadcasting receiver module receives system broadcasts, can call broadcasting processing function judges accordingly, the headset plug broadcast message that if described broadcast message is monitoring device to be sent, then device identification is " DEVNAME=snd/pcmC1D0p " or " DEVNAME=snd/pcmC1D0c ".
In conjunction with above-mentioned embodiment, as shown in Figure 4, step 104 specifically comprises:
401: resolve described headset plug broadcast message, obtain headset device type sign.
In the present embodiment, described headset device type sign is used for sign earphone and microphone, obtains the value of the sign flag of described headset plug broadcast message particularly.
402: judge the headset device type according to described headset device type sign, when described headset device type is designated first sign, execution in step 403; When described headset device type is designated second sign, execution in step 404;
In the present embodiment, judge the value of the described headset device type sign flag that obtains, when the headset device type is designated first sign, represent that described headset equipment is ear speaker device, concrete flag value is 0, when the headset device type is designated second sign, represent that described headset equipment is microphone apparatus, concrete flag value is 1.
403: define a standard output device, and obtain corresponding property parameters value the headset plug information after described parsing corresponding property parameters is set.
Particularly, in the present embodiment, define a standard output device, from broadcast message, obtain the information such as plug state, device number, sound card number of equipment described output device is carried out the parameter setting.
404: define a standard input device, and obtain corresponding property parameters value the headset plug information after described parsing corresponding property parameters is set.
In the present embodiment, define a standard input device, from current broadcast information, obtain the information such as plug state, device number, sound card number of equipment described input equipment is carried out the parameter setting; For example, a microphone apparatus is connected upward intelligent TV set by USB interface.
405: call contiguous function according to described device value and described property parameters current USB headset equipment is set.
In the present embodiment, calling the USB that contiguous function will arrange parameter arranges, as current audio input device/output device, for example, with connect microphone apparatus as current audio input device, the device number of microphone apparatus is 0, the sound card number is 1, the plug state is 1, and the value of sign flag is 0, and device number is that 0 microphone is set to current audio input device.
Preferably, the headset equipment that present embodiment is described is earphone-microphone, can pass through mode and media termination wireless connections such as bluetooth, Wifi.For the android system, realize being connected and visit of wireless device by its Audio Policy (audio frequency strategy) with Auido Flinger (audio core service).
In the present embodiment, the method for described realization USB headset is based on the android system, and the prerequisite of monitoring USB device plug is to have disposed predetermined parameter in the android system in audio-policy, increased the configuration of USB headset equipment, set sampling rate, channel number, coded format etc.
By said method, can reach realization effect as shown in Figure 5, for example, in the music process, USB headset equipment is connected on the intelligent television, system will switch to audio frequency apparatus UAC (English full name: USB audio class; Chinese: the USB audio class), and carry out control by such and play.
The embodiment of the invention is by adding the plug state of monitoring device monitoring headset, and the information of obtaining is sent to the setting that treating apparatus carries out headset equipment, makes USB headset equipment be connected in the system and can identify and use.
Embodiment two
The embodiment of the invention two provides a kind of system of the USB of realization headset, and as shown in Figure 6, described system 10 comprises:
Monitoring device 11 and broadcast processing apparatus 12;
Wherein, as shown in Figure 7, monitoring device 11 comprises: monitoring modular 111 and modular converter 112; Monitoring modular 111 is used for when plug by USB headset equipment the headset plug event of generation and monitors; Modular converter 112 is broadcasted after the headset plug event that monitors being converted to headset plug broadcast message, monitors to be used for broadcast processing apparatus.
In the present embodiment, described headset plug event refers to that when system kernel detects the Plug Action that headset equipment is arranged on the USB interface event notice by Uevent sends comprises: earphone plug event and microphone plug event; Wherein, the information that comprises in the described headset plug event is specially: the plug state of device identification, device type sign, equipment, device number, sound card number, device path etc.; For example, the event that sends by Uevent is: MINOR=48, MAJOR=116, SUBSYSTEM=sound, DEVNAME=snd/pcmC1D0p, DEVPATH=/devices/lm2.
Wherein, as shown in Figure 8, broadcast processing apparatus 12 comprises: receiver module 121 and processing module 122, described receiver module are used for monitoring broadcast message, judge whether the current broadcast information that listens to is headset plug broadcast message; Described processing module is used for when the broadcast message that listens to is headset plug broadcast message, described headset plug broadcast message is carried out dissection process after, according to the property parameters that obtains after the parsing current USB headset equipment is arranged.
In the present embodiment, described broadcast message is specially intent message, and Intent message is the message informing mechanism of binding during deferred run between the assembly in a kind of same or different application among the android; Intent itself is a passive data structure, preserve the description of the operation that will carry out, specifically, the action of single job during intent is responsible for using, action relates to data, additional data is described, Android is then according to the description of this Intent, be responsible for finding corresponding assembly, Intent passed to the assembly that calls, and finish calling of assembly.
Particularly, described property parameters specifically comprises: the plug state of device identification, device type sign, equipment, device number, sound card number; Wherein, described device identification is used for determining that the broadcast message that listens to is headset plug broadcast message; Described device type sign is used for the type of difference headset equipment; The plug state of described equipment is used for the insertion of expression USB device or extracts the Status Flag of state; Described device number refers to the key word of equipment.
In conjunction with said system, as shown in Figure 9, monitoring device 11 also comprises:
Presetting module 113 is used for creating earphone monitoring class object and microphone monitoring class object; Being used for identifying and the microphone apparatus sign at described earphone monitoring class object and microphone monitoring class object definition ear speaker device respectively, is earphone plug event or microphone plug event in order to the event of determining to monitor.
Wherein, described earphone monitoring class object is used for the plug event of monitoring earphone; Described microphone monitoring class object is used for the plug event of monitoring microphone.For example, as earphone monitoring class Usb Play Observer, microphone monitoring class Usb Caputer Observer.
In the present embodiment, described ear speaker device sign (English name: Observer-playback) be used for judging whether the event that monitors is earphone plug event; Described microphone apparatus sign (English name: Observer-micphone) be used for judging whether the event that monitors is microphone plug event; For example, the definition ear speaker device is designated " DEVNAME=snd/pcmC1D0p ", and the definition microphone apparatus is designated " DEVNAME=snd/pcmC1D0c ".
In conjunction with above-mentioned embodiment, preferably, in the present embodiment, step 101 begins to monitor function by what call the Android standard, start monitoring modular, " DEVNAME=snd/pcmC1D0p " and " DEVNAME=snd/pcmC1D0c " two character strings are joined in the monitoring of backstage.
When kernel detects the Plug Action of USB headset equipment, will send event notice by Uevent, owing to comprise character string " DEVNAME=snd/pcmC1D0p " or " DEVNAME=snd/pcmC1D0c " in the headset equipment that the sends plug event notice, earphone monitoring class object and microphone monitoring class object default in the monitored device of these character strings meetings detect, and will call processing event function automatically and handle
In conjunction with said system, receiver module 121 is used for the broadcast message of monitoring system; Be used for obtaining device identification from described broadcast message, judge according to described device identification whether described broadcast message is headset plug broadcast message.
Wherein, described broadcast message is intent information, in the present embodiment, when the broadcasting monitoring device obtains device identification from the described intent information that listens to, judge whether described device identification is predefined " DEVNAME=snd/pcmC1D0p " or " DEVNAME=snd/pcmC1D0c ", be to determine that then described broadcast message is headset plug broadcast message, continues execution in step 104; Otherwise continue the broadcast message of monitoring system.
For example, audio service in the Android system (English name: the audio broadcasting receiver module is arranged Audio Service), be used for receiving system broadcasting, when the audio broadcasting receiver module receives system broadcasts, can call broadcasting processing function judges accordingly, the headset plug broadcast message that if described broadcast message is monitoring device to be sent, then device identification is " DEVNAME=snd/pcmC1D0p " or " DEVNAME=snd/pcmC1D0c ".
In conjunction with said system, processing module 122 is used for resolving described headset plug broadcast message, obtains headset device type sign; Also be used for judging the headset device type according to described headset device type sign, the device value of obtaining corresponding headset device type defines corresponding input-output apparatus, obtain the device attribute value in the headset plug broadcast message after the parsing, and arrange according to the input-output apparatus of described device attribute value to definition; Be used for calling contiguous function according to the device value of described definition and described property parameters current USB headset equipment is set.
In the present embodiment, described headset device type sign is used for sign earphone and microphone, obtains the value of the sign flag of described headset plug broadcast message particularly.
In the present embodiment, judge the value of the described headset device type sign flag that obtains, when the headset device type is designated first sign, represent that described headset equipment is ear speaker device, concrete flag value is 0, when the headset device type is designated second sign, represent that described headset equipment is microphone apparatus, concrete flag value is 1.
Particularly, in the present embodiment, define a standard output device, from broadcast message, obtain the information such as plug state, device number, sound card number of equipment described output device is carried out the parameter setting.Define a standard input device, from current broadcast information, obtain the information such as plug state, device number, sound card number of equipment described input equipment is carried out the parameter setting; For example, a microphone apparatus is connected upward intelligent TV set by USB interface.
Wherein, calling the USB that contiguous function will arrange parameter arranges, as current audio input device/output device, for example, with connect microphone apparatus as current audio input device, the device number of microphone apparatus is 0, the sound card number is 1, the plug state is 1, and the value of sign flag is 0, and device number is that 0 microphone is set to current audio input device.
Preferably, the headset equipment that present embodiment is described is earphone-microphone, can pass through mode and media termination wireless connections such as bluetooth, Wifi.For the android system, realize being connected and visit of wireless device by its Audio Policy (audio frequency strategy) with Auido Flinger (audio core service).
Need to prove, in system, the method of described realization USB headset is based in the android system, the prerequisite of monitoring USB device plug is to have disposed predetermined parameter in the android system in audio-policy, increased the configuration of USB headset equipment, set sampling rate, channel number, coded format etc.
The invention described above embodiment sequence number does not represent the quality of embodiment just to description.
The all or part of step that one of ordinary skill in the art will appreciate that realization above-described embodiment can be finished by hardware, also can instruct relevant hardware to finish by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a method that realizes USB headset equipment is characterized in that, described method comprises:
The headset plug event that monitoring device produces when being plugged by USB headset equipment is monitored;
Described monitoring device is broadcasted after converting the headset plug event that monitors to headset plug broadcast message, monitors to be used for broadcast processing apparatus;
Broadcast processing apparatus is monitored broadcast message, judges whether the current broadcast information that listens to is headset plug broadcast message;
When described broadcast processing apparatus is headset plug broadcast message when the broadcast message that listens to, described headset plug broadcast message carried out dissection process after, according to the property parameters that obtains after resolving current USB headset equipment is arranged.
2. method according to claim 1, it is characterized in that, described headset plug event can be divided into: earphone plug event and microphone plug event, wherein, the information that comprises in the described headset plug event is specially: the plug state of device identification, device type sign, equipment, device number, sound card number.
3. method according to claim 1 is characterized in that, described monitoring device also comprises before the headset plug event that is produced by the plug of USB headset equipment is monitored:
Described monitoring device is created earphone monitoring class object and microphone monitoring class object;
Described monitoring device is definition ear speaker device sign and microphone apparatus sign in described earphone monitoring class object and microphone monitoring class object respectively, is earphone plug event or microphone plug event in order to the event of determining to monitor.
4. method according to claim 1 is characterized in that, described broadcast processing apparatus is monitored broadcast message, judges whether the current broadcast information that listens to is headset plug broadcast message, comprising:
The broadcast message of broadcast processing apparatus monitoring system;
Broadcast processing apparatus obtains device identification from described broadcast message, judge according to described device identification whether described broadcast message is headset plug broadcast message.
5. method according to claim 1, it is characterized in that, when described broadcast processing apparatus is headset plug broadcast message when the broadcast message that listens to, after described headset plug broadcast message carried out dissection process, according to the property parameters that obtains after resolving current USB headset equipment is arranged, comprising:
Broadcast processing apparatus is resolved described headset plug broadcast message, obtains headset device type sign;
Broadcast processing apparatus is judged the headset device type according to described headset device type sign, the device value of obtaining corresponding headset device type defines corresponding input-output apparatus, obtain the device attribute value in the headset plug broadcast message after the parsing, and arrange according to the input-output apparatus of described device attribute value to definition;
Broadcast processing apparatus calls contiguous function according to the device value of described definition and described property parameters current USB headset equipment is set.
6. a system that realizes USB headset equipment is characterized in that, described system comprises:
Monitoring device and broadcast processing apparatus;
Described monitoring device comprises monitoring modular and modular converter; Described monitoring modular is used for when plug by USB headset equipment the headset plug event of generation and monitors; Described modular converter is broadcasted after the headset plug event that monitors being converted to headset plug broadcast message, monitors to be used for broadcast processing apparatus;
Described broadcast processing apparatus comprises receiver module and processing module, and described receiver module is used for monitoring broadcast message, judges whether the current broadcast information that listens to is headset plug broadcast message; Described processing module is used for when the broadcast message that listens to is headset plug broadcast message, described headset plug broadcast message is carried out dissection process after, according to the property parameters that obtains after the parsing current USB headset equipment is arranged.
7. system according to claim 6, it is characterized in that, described headset plug event can be divided into: earphone plug event and microphone plug event, wherein, the information that comprises in the described headset plug event is specially: the plug state of device identification, device type sign, equipment, device number, sound card number.
8. system according to claim 6 is characterized in that, described monitoring device also comprises:
Presetting module is used for creating earphone monitoring class object and microphone monitoring class object; Being used for identifying and the microphone apparatus sign at described earphone monitoring class object and microphone monitoring class object definition ear speaker device respectively, is earphone plug event or microphone plug event in order to the event of determining to monitor.
9. system according to claim 6 is characterized in that, described receiver module is used for the broadcast message of monitoring system; Be used for obtaining device identification from described broadcast message, judge according to described device identification whether described broadcast message is headset plug broadcast message.
10. system according to claim 6 is characterized in that, described processing module is used for resolving described headset plug broadcast message, obtains headset device type sign; Be used for judging the headset device type according to described headset device type sign, the device value of obtaining corresponding headset device type defines corresponding input-output apparatus, obtain the device attribute value in the headset plug broadcast message after the parsing, and arrange according to the input-output apparatus of described device attribute value to definition; Be used for calling contiguous function according to the device value of described definition and described property parameters current USB headset equipment is set.
CN2013102370348A 2013-06-14 2013-06-14 Method and system for implementing USB (universal serial bus) headset devices Pending CN103324459A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013102370348A CN103324459A (en) 2013-06-14 2013-06-14 Method and system for implementing USB (universal serial bus) headset devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013102370348A CN103324459A (en) 2013-06-14 2013-06-14 Method and system for implementing USB (universal serial bus) headset devices

Publications (1)

Publication Number Publication Date
CN103324459A true CN103324459A (en) 2013-09-25

Family

ID=49193230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013102370348A Pending CN103324459A (en) 2013-06-14 2013-06-14 Method and system for implementing USB (universal serial bus) headset devices

Country Status (1)

Country Link
CN (1) CN103324459A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103702046A (en) * 2013-12-18 2014-04-02 四川长虹电器股份有限公司 Method for opening voice equipment in selectable mode
CN105739943A (en) * 2016-02-02 2016-07-06 成都中科创达软件有限公司 Method for selecting audio and video applications during access of mobile device to earphone
CN105812568A (en) * 2016-04-15 2016-07-27 惠州Tcl移动通信有限公司 Mobile terminal and method for automatically playing music
CN105868143A (en) * 2015-12-15 2016-08-17 乐视致新电子科技(天津)有限公司 Method and system for stopping media scanner after USB device ejection in Android system
CN105868135A (en) * 2015-12-15 2016-08-17 乐视致新电子科技(天津)有限公司 Method and system for stopping media scanner after USB device ejection in Android system
CN106303824A (en) * 2016-07-29 2017-01-04 青岛海信电器股份有限公司 Audio frequency apparatus changing method and device
CN107092545A (en) * 2017-03-27 2017-08-25 武汉斗鱼网络科技有限公司 The method and system of client test earphone plug state
CN113312095A (en) * 2021-04-16 2021-08-27 深圳市智微智能软件开发有限公司 Method, device, terminal and storage medium for managing plug-pull events of display equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080049960A1 (en) * 2006-08-28 2008-02-28 Ocz Technology Group, Inc. Gaming headset with integrated microphone and adapted for olfactory stimulation
CN102722360A (en) * 2011-03-31 2012-10-10 比亚迪股份有限公司 Mobile terminal and management method for externally inserted attachment
CN102724351A (en) * 2011-03-31 2012-10-10 比亚迪股份有限公司 Mobile terminal and management method of mobile terminal to external interposer attachment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080049960A1 (en) * 2006-08-28 2008-02-28 Ocz Technology Group, Inc. Gaming headset with integrated microphone and adapted for olfactory stimulation
CN102722360A (en) * 2011-03-31 2012-10-10 比亚迪股份有限公司 Mobile terminal and management method for externally inserted attachment
CN102724351A (en) * 2011-03-31 2012-10-10 比亚迪股份有限公司 Mobile terminal and management method of mobile terminal to external interposer attachment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103702046A (en) * 2013-12-18 2014-04-02 四川长虹电器股份有限公司 Method for opening voice equipment in selectable mode
CN105868143A (en) * 2015-12-15 2016-08-17 乐视致新电子科技(天津)有限公司 Method and system for stopping media scanner after USB device ejection in Android system
CN105868135A (en) * 2015-12-15 2016-08-17 乐视致新电子科技(天津)有限公司 Method and system for stopping media scanner after USB device ejection in Android system
CN105739943A (en) * 2016-02-02 2016-07-06 成都中科创达软件有限公司 Method for selecting audio and video applications during access of mobile device to earphone
CN105812568A (en) * 2016-04-15 2016-07-27 惠州Tcl移动通信有限公司 Mobile terminal and method for automatically playing music
CN106303824A (en) * 2016-07-29 2017-01-04 青岛海信电器股份有限公司 Audio frequency apparatus changing method and device
CN106303824B (en) * 2016-07-29 2019-06-25 青岛海信电器股份有限公司 Audio frequency apparatus switching method and device
CN107092545A (en) * 2017-03-27 2017-08-25 武汉斗鱼网络科技有限公司 The method and system of client test earphone plug state
CN107092545B (en) * 2017-03-27 2020-09-04 武汉斗鱼网络科技有限公司 Method and system for detecting earphone plugging state by client
CN113312095A (en) * 2021-04-16 2021-08-27 深圳市智微智能软件开发有限公司 Method, device, terminal and storage medium for managing plug-pull events of display equipment
CN113312095B (en) * 2021-04-16 2024-04-16 深圳市智微智能软件开发有限公司 Method, device, terminal and storage medium for managing plug event of display equipment

Similar Documents

Publication Publication Date Title
CN103324459A (en) Method and system for implementing USB (universal serial bus) headset devices
CN106445448B (en) Audio device control method and system of terminal and mobile terminal
CN103209246A (en) Method for controlling handheld device through bluetooth headset and handheld device
CN104618780A (en) Method and system for controlling electrical apparatus
EP2995089B1 (en) Unpaired devices
CN105472576A (en) Intelligent television and handset incoming call information sharing method
CN102915751A (en) Method for automatically regulating sound volume and terminal equipment thereof
WO2014090040A1 (en) Method of using a mobile device as a microphone, method of audio playback, and related device and system
CN103139597A (en) Test method and digital television terminal
CN105681885A (en) Mobile terminal screen recording and live broadcasting device and method
CN111132111A (en) BLE-based audio sharing method and system and computer-readable storage medium
CN104301782A (en) Method and device for outputting audios and terminal
CN104168263A (en) Server and clock realization method thereof
CN107147929A (en) Multiwindow method of outputting acoustic sound, television set and computer-readable recording medium
EP2995086B1 (en) Paired devices
JP2014011793A (en) Radio audio/video system for audio signal reproduction and method of controlling the same
CN114245328B (en) Voice call transfer method and electronic equipment
CN103501442A (en) Method and system controlling output of terminal voice of smart television
CN105654973B (en) A kind of audio file processing method and system
CN105392032A (en) Method and apparatus for controlling multimedia playing
CN103269445A (en) Smart television system and control method thereof
CN105929941B (en) Information processing method and device and terminal equipment
CN105959074A (en) Broadcasting system and mobile information terminal
US20160119573A1 (en) User terminal apparatus and control method thereof
CN102970637B (en) The interactive system of a kind of electro-acoustic product and audio-video playback equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20130925

RJ01 Rejection of invention patent application after publication