US20180338206A1 - Control method and control system for audio device - Google Patents
Control method and control system for audio device Download PDFInfo
- Publication number
- US20180338206A1 US20180338206A1 US15/964,500 US201815964500A US2018338206A1 US 20180338206 A1 US20180338206 A1 US 20180338206A1 US 201815964500 A US201815964500 A US 201815964500A US 2018338206 A1 US2018338206 A1 US 2018338206A1
- Authority
- US
- United States
- Prior art keywords
- audio
- usb
- adapter
- host
- function
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R5/00—Stereophonic arrangements
- H04R5/04—Circuit arrangements, e.g. for selective connection of amplifier inputs/outputs to loudspeakers, for loudspeaker detection, or for adaptation of settings to personal preferences or hearing impairments
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/382—Information transfer, e.g. on bus using universal interface adapter
- G06F13/385—Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/162—Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers, loudspeakers or microphones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2420/00—Details of connection covered by H04R, not provided for in its groups
- H04R2420/09—Applications of special connectors, e.g. USB, XLR, in loudspeakers, microphones or headphones
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present disclosure generally relates to a control method and control system for an audio device, and, more particularly, to a control method and control system for a Universal Serial Bus (USB) audio adapter.
- USB Universal Serial Bus
- USB audio adapter The function of a USB audio adapter is to convert audio signals between the USB interface and the analog audio interface.
- one of the audio jacks is dedicated to audio output devices such as headphones, and the other is dedicated to audio input devices such as microphones.
- the audio jack supports both audio output and audio input, and so the audio jack can be connected to headphone devices, microphone devices, or headset devices.
- Headset devices refer generally to devices having both the headphone function and the microphone function.
- the host After the USB audio adapter is connected to a host (e.g., a device with a USB interface such as a computer, a portable electronic product, etc.), the host enumerates the USB audio adapter as an appropriate device according to the declaration type of the USB audio adapter. More specifically, because the USB audio adapter provides at least the function of connecting to the headphone and the microphone, the host enumerates the USB audio adapter as a headset device after the USB audio adapter is connected to the host.
- a host e.g., a device with a USB interface such as a computer, a portable electronic product, etc.
- the host directs the audio data to this USB audio adapter, instead of using the built-in audio devices (such as built-in speaker, microphone, etc.) for audio playback or picking up the sound.
- the built-in audio devices such as built-in speaker, microphone, etc.
- the device connected to the USB audio adapter is a pure headphone device
- the user expects that the host still uses the built-in microphone to pick up the sound; unfortunately, the practical situation is that the host attempts to use the USB audio adapter for both picking up the sound and audio playback, thereby failing to pick up the sound.
- an object of the present disclosure is to provide a control method and a control system for an audio device, so as to improve the usage convenience of the audio device.
- a control method for an audio device is provided.
- the control method is applied to a Universal Serial Bus (USB) audio adapter that includes an analog audio interface and is connected to a host.
- the control method includes steps of: detecting whether the analog audio interface is connected to a target device or detecting a function of the target device, and generating a detection result; controlling the USB audio adapter to operate in a disconnected mode; and controlling the USB audio adapter to continue operating in the disconnected mode according to the detection result, or controlling, according to the detection result, the USB audio adapter to operate in a connected mode and transmit audio data to the host and/or receive audio data from the host.
- USB Universal Serial Bus
- a control system for an audio device is also provided.
- the control system is applied to a USB audio adapter that includes an analog audio interface and is connected to a host.
- the control system includes a detection circuit and a control unit.
- the detection circuit which is coupled to the analog audio interface, detects whether the analog audio interface is connected to a target device or detects a function of the target device, and generates a detection result.
- the control unit which is coupled to the detection circuit, controls the USB audio adapter to operate in a disconnected mode or a connected mode.
- the USB audio adapter continues to operate in the disconnected mode according to the detection result, or the control unit controls, according to the detection result, the USB audio adapter to operate in the connected mode and transmit audio data to the host and/or receive audio data from the host.
- a control method for an audio device is also provided.
- the control method is applied to a USB audio adapter that includes an analog audio interface and is connected to a host.
- the control method includes steps of: detecting a function of a target device connected to the analog audio interface and generating a detection result; declaring the USB audio adapter according to the detection result; and controlling the USB audio adapter to operate in a disconnected mode when the USB audio adapter is declared as an audio device having only an audio output function, an audio device having only an audio input function, or an audio device having a function including audio input/output, and a connection status of the analog audio interface changes.
- the detection result indicates that the target device has only the audio output function
- the USB audio adapter is declared as the audio device having only the audio output function.
- the USB audio adapter is declared as the audio device having only the audio input function.
- the USB audio adapter is declared as the audio device having the function including audio input/output.
- the control method and the control system for an audio device in this disclosure can perform dynamic enumeration according to the current usage scenario of the audio device.
- the USB audio adapter utilizing the dynamic enumeration mechanism of this disclosure not only works in a manner that the user's expectations are met, but also reduces power consumption when the analog audio interface of the USB audio adapter is not connected to any device.
- FIG. 1 illustrates the functional block diagram of a Universal Serial Bus (USB) audio adapter of this disclosure.
- USB Universal Serial Bus
- FIGS. 2A-2C illustrate flowcharts of a control method for an audio device.
- the disclosure herein includes a control method and a control system for an audio device. On account of that some or all elements of the control system could be known, the detail of such elements is omitted provided that such detail has little to do with the features of this disclosure and this omission nowhere dissatisfies the specification and enablement requirements.
- FIG. 1 shows the functional block diagram of a Universal Serial Bus (USB) audio adapter of this disclosure.
- the USB audio adapter 100 includes a control unit 110 , a USB function circuit 120 , a detection module 130 , a storage 140 , an audio playback module 150 , an audio recording module 160 , and an analog audio interface 170 .
- the control system 180 for the audio device includes a control unit 110 , a detection module 130 , and a storage 140 .
- the analog audio interface 170 may include an audio jack and/or an audio socket.
- the control unit 110 may be a computing unit having a program execution capability, such as a microprocessor, a micro control unit (MCU), and the like.
- MCU micro control unit
- the USB function circuit 120 connects the host via the USB interface for data transmission and reception.
- the USB function circuit 120 may include circuits for transmitting and receiving data, such as a sampling circuit, a clock circuit (e.g., a phase-locked loop (PLL), a clock and data recovery (CDR) circuit), and the like.
- the USB function circuit 120 changes the behavior of its internal circuit to control the USB audio adapter 100 to operate in a connected mode or a disconnected mode. For example, for the full speed mode of USB 1 . 0 , the USB function circuit 120 can switch between the J state and the SE0 state by changing the electric potential of the pin of the USB interface.
- the USB audio adapter 100 When the USB function circuit 120 is in the J state, the USB audio adapter 100 operates in the connected mode; when the USB function circuit 120 is in the SE0 state for more than 2.5 microseconds ( ⁇ s), the USB audio adapter 100 enters the disconnected mode.
- the host can learn that the USB audio adapter 100 is plugged in a USB port of the host, and both can transmit and receive data normally.
- the USB audio adapter 100 when the USB audio adapter 100 operates in the disconnected mode, despite the fact that the USB audio adapter 100 is physically plugged in the USB port of the host, the host, in fact, operates as if the USB port is not connected to any USB device, meaning that there is no data transmission between the USB audio adapter 100 and the host in this instance.
- Driving the USB device to operate in the connected mode or the disconnected mode is a function defined by the USB specification, and is thus omitted for brevity.
- the analog audio interface 170 may include at least one jack/socket that allows an analog audio plug to plug in.
- the jack/socket allows an audio output device, an audio input device, or a device including audio input/output to plug in.
- the analog audio interface 170 includes two jacks/sockets, one of them allows an audio output device or a device including audio input/output to plug in, while the other allows an audio input device to plug in.
- the audio data is transmitted from the host to the control unit 110 through the USB function circuit 120 , and the control unit 110 controls the audio data to be transmitted to the target device via the audio playback module 150 .
- the audio playback module 150 may perform digital-to-analog conversion on the audio data, and may also perform decoding operations in some applications.
- the audio recording module 160 converts the audio signal from the target device into audio data (e.g., perform analog-to-digital conversion, and may also perform encoding operations in some applications), and then the control unit 110 transmits the audio data to the host through the USB function circuit 120 .
- the detection module 130 detects whether a target device is plugged in the analog audio interface 170 and detects the type of the target device when the target device is plugged in the analog audio interface 170 .
- the types of the target device include an audio output device, an audio input device, and a device including audio input/output.
- the control unit 110 controls the declaration type that the USB audio adapter 100 declares to the host, and selectively disables the USB function circuit 120 , the audio playback module 150 , and the audio recording module 160 .
- the storage 140 stores multiple sets of device description data, each corresponds to a declaration type.
- Each set of device description data includes multiple descriptors, such as device descriptors, configuration descriptors, interface descriptors, and endpoint descriptors.
- the host enumerates, according to the device description data, the USB audio adapter 100 as the declaration type that the control unit 110 selects.
- the declaration types include an audio device with audio output function only, an audio device with audio input function only, and an audio device with both audio input and output functions.
- FIGS. 2A to 2C are flowcharts of a control method for an audio device.
- the host powers the USB audio adapter 100 and enumerates the USB audio adapter 100 to confirm the functions and properties of the USB audio adapter 100 .
- the detection module 130 starts to detect whether any target device is plugged in the analog audio interface 170 (step S 220 ).
- the detection manner in step S 220 may be (1) mechanical detection, for example, detecting whether the elastic plate in the analog audio interface 170 is pushed; if the elastic plate is pushed, the determination result in step S 220 is positive; (2) impedance detection, for example, detecting whether the impedance between two metal plates in the analog audio interface 170 is a high impedance; if not, the determination result in step S 220 is positive; or (3) user-defined, that is, the detection module 130 is directly informed of the status by an external event (such as a switch).
- mechanical detection for example, detecting whether the elastic plate in the analog audio interface 170 is pushed; if the elastic plate is pushed, the determination result in step S 220 is positive
- impedance detection for example, detecting whether the impedance between two metal plates in the analog audio interface 170 is a high impedance; if not, the determination result in step S 220 is positive
- user-defined that is, the detection module 130 is directly informed of the status by an external event (such as a switch
- the detection module 130 detects in step S 230 whether the target device has the audio output function only (for example, the target device is a pure headphone device), and detects in step S 240 whether the target device has the audio input function only (for example, the target device is a pure microphone device).
- the control unit 110 determines the declaration type of the USB audio adapter 100 (step S 250 , S 260 or S 270 ) according to the detection result of the detection module 130 ; the detection result indicates that the target device has the audio output function only, the audio input function only, or the function including audio input/output.
- the detection module 130 is a circuit.
- the storage 140 stores multiple program instructions or codes, and the detection module 130 executes the program instructions or codes to realize the functions of the detection module 130 .
- the detection module 130 can detect whether the device has a microphone function by at least the following methods: (1) detecting the impedance of the target device; (2) providing the analog audio interface 170 with a voltage, and detecting the voltage change; or (3) directly defined by the user, that is, the detection module 130 is directly informed of the state by an external device.
- Steps S 220 to S 240 are applicable to the case in which the analog audio interface 170 has only one or more than one jack/socket; this modification can be readily known by those skilled in the art, and the detailed descriptions are omitted for brevity.
- the control unit 110 selects a corresponding set of device description data among multiple sets of device description data from the storage 140 according to the detection result of the detection module 130 ; that is, these steps determine a corresponding declaration type.
- the control unit 110 declares, according to the detection result, the USB audio adapter 100 as one of the audio output device, the audio input device or the device including audio input/output, or a combination of the above devices.
- the control unit 110 controls the USB audio adapter 100 to connect the host (step S 310 ), causing the USB audio adapter 100 to operate in the connected mode.
- step S 310 may be skipped and/or deemed completed.
- the host learns that the USB audio adapter 100 is plugged in its USB port, the host automatically enumerates the USB audio adapter 100 . After finishing the enumeration process, the host communicates with the USB audio adapter 100 according to the type that the USB audio adapter 100 declared in step S 250 , S 260 , or S 270 .
- the audio data is transmitted from the host to the USB audio adapter 100 , converted into an audio signal, and then transmitted through the analog audio interface 170 to the target device that has only the audio output function; in this case, the host can disable the built-in speaker but still use the built-in microphone to pick up the sound.
- the audio signal is transmitted to the USB audio adapter 100 through the target device that has only the audio input function, converted into audio data, and then transmitted through the USB function circuit 120 to the host; in this case, the host can disable the built-in microphone but still use the built-in speaker for audio playback.
- the USB audio adapter 100 is enumerated as (or declares as) a device including audio input/output, the paths of the audio signal and the audio data are bidirectional; in this case, the host can disable the built-in speaker and microphone. Accordingly, the data flow direction of the audio data between the USB function circuit 120 and the host is associated with the declaration type.
- the USB audio adapter 100 may make a corresponding declaration according to the type of the target device plugged in. In this way, when the host completes enumerating the USB audio adapter 100 , the host may automatically determine whether to play and/or receive audio signals with a built-in audio device or the target device according to the current declaration type of the USB audio adapter 100 . More specifically, despite the fact that the USB audio adapter 100 can be connected to an audio output device, an audio input device, or a device including audio input/output, the disclosed dynamic enumeration/declaration mechanism enables the host to adaptively decide to enable or disable the built-in audio device according to the type of the target device currently connected to the USB audio adapter 100 . As a result, the operations of audio playback and picking up the sound can meet the user's expectations.
- step S 320 the USB audio adapter 100 maintains normal communication with the host (receiving audio data from the host, transmitting the audio data to the host, or performing both at the same time) until the detection module 130 detects that the connection status of the analog audio interface 170 changes (step S 330 ). More specifically, when any jack/socket of the analog audio interface 170 changes from connecting with a target device to not connecting with any target device or vice versa, the determination result of step S 330 is positive. When the status of the analog audio interface 170 changes, the control unit 110 controls the USB function circuit 120 to cause the USB audio adapter 100 to operate in the disconnected mode (step S 340 ).
- step S 340 the USB audio adapter 100 is not physically unplugged from the USB port of the host; instead, the control unit 110 controls the USB function circuit 120 to cause the USB audio adapter 100 to switch from the connected mode to the disconnected mode to simulate the unplugging operation. After the USB audio adapter 100 is disconnected from the host, the process goes back to step S 220 .
- step S 410 the control unit 110 controls the USB function circuit 120 to cause the USB audio adapter 100 to operate in the disconnected mode. If the USB audio adapter 100 was in the disconnected mode before step S 410 , the USB audio adapter 100 is controlled to remain in the disconnected mode in step S 410 . Because the USB audio adapter 100 operates in the disconnected mode at this moment, the host does not enumerate the USB audio adapter 100 . Next, the USB audio adapter 100 enters the power-saving mode (step S 420 ).
- the control unit 110 turns off the USB function circuit 120 , the audio playback module 150 , and the audio recording module 160 ; in other words, in the power-saving mode the USB function circuit 120 , the audio playback module 150 , and the audio recording module 160 are suspended in order to reduce the power consumption of the USB audio adapter 100 .
- the control unit 110 may enter a sleep mode or a low power consumption mode to further reduce the power consumption of the USB audio adapter 100 . More specifically, in the sleep mode or the low power consumption mode, the control unit 110 controls the firmware to remain in a state immediately before the sleep mode or the low power consumption mode. After the control unit 110 is waked up (for example, being waked up by an interrupt sent from the detection module 130 ), the firmware can continue from the state to resume the tasks.
- the USB audio adapter 100 operates in the disconnected mode.
- step S 430 the detection module 130 detects whether the connection status of the analog audio interface 170 changes.
- the detail of step S 430 is substantially the same as that of step S 330 . It should be noted that, if the control unit 110 enters the sleep mode or the low power consumption mode in step S 420 , step S 430 is completely executed by hardware (i.e., the detection module 130 is implemented by circuits); if, on the other hand, the control unit 110 does not enter the sleep mode or the low power consumption mode in step S 420 , step S 430 may be executed by hardware and/or firmware (i.e., the detection module 130 is implemented by circuits and/or programs).
- the USB audio adapter 100 continues to operate in the power-saving mode until the status of the analog audio interface 170 changes (i.e., step S 430 is determined to be positive).
- step S 440 the control unit 110 controls the USB audio adapter 100 to exit the power-saving mode. More specifically, the control unit 110 turns on the USB function circuit 120 , the audio playback module 150 , and the audio recording module 160 ; in other words, the USB function circuit 120 , the audio playback module 150 , and the audio recording module 160 resume normal operation. The flow then goes back to step S 220 .
- part of the modules or circuits of the USB audio adapter 100 is in a zero-power-consumption state in the power-saving mode.
- the detection module 130 consumes a small amount of power. Therefore, when the analog audio interface 170 of the USB audio adapter 100 is not connected to any target device, the USB audio adapter 100 consumes little power.
- the power of the host is limited (e.g., the host is a battery-powered portable electronic device), the USB audio adapter 100 that implements this mechanism does not place an extra burden on the host.
- control unit 110 may selectively turn off the audio playback module 150 or the audio recording module 160 in step S 320 according to the declaration type. For example, when the USB audio adapter 100 declares as a pure audio output device, the audio recording module 160 is in an idle state, and thus the control unit 110 can turn off the audio recording module 160 to reduce power consumption.
- the detection module 130 , the audio playback module 150 , and the audio recording module 160 can be implemented by circuitry, hardware, software, and/or firmware. When these modules are implemented by software or firmware, the control unit 110 may execute program codes or instructions stored in the storage 140 to perform the functions of each module.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
Description
- The present disclosure generally relates to a control method and control system for an audio device, and, more particularly, to a control method and control system for a Universal Serial Bus (USB) audio adapter.
- The function of a USB audio adapter is to convert audio signals between the USB interface and the analog audio interface. There are two common USB audio adapters: one contains two audio jacks and the other contains only one audio jack. For the application of the USB audio adapter with two audio jacks, one of the audio jacks is dedicated to audio output devices such as headphones, and the other is dedicated to audio input devices such as microphones. For the application of the USB audio adapter with only one audio jack, the audio jack supports both audio output and audio input, and so the audio jack can be connected to headphone devices, microphone devices, or headset devices. Headset devices refer generally to devices having both the headphone function and the microphone function.
- After the USB audio adapter is connected to a host (e.g., a device with a USB interface such as a computer, a portable electronic product, etc.), the host enumerates the USB audio adapter as an appropriate device according to the declaration type of the USB audio adapter. More specifically, because the USB audio adapter provides at least the function of connecting to the headphone and the microphone, the host enumerates the USB audio adapter as a headset device after the USB audio adapter is connected to the host. Once enumerated, regardless of the type of the device (a pure headphone device, a pure audio output device, a pure microphone device, a pure audio input device, a headset device, a device including audio input/output, or even the audio jack is not connected to any device) that is connected to the audio jack of the USB audio adapter, the host directs the audio data to this USB audio adapter, instead of using the built-in audio devices (such as built-in speaker, microphone, etc.) for audio playback or picking up the sound. Such a design, however, may cause inconveniences to users. For example, when the device connected to the USB audio adapter is a pure headphone device, the user expects that the host still uses the built-in microphone to pick up the sound; unfortunately, the practical situation is that the host attempts to use the USB audio adapter for both picking up the sound and audio playback, thereby failing to pick up the sound.
- In view of the issues of the prior art, an object of the present disclosure is to provide a control method and a control system for an audio device, so as to improve the usage convenience of the audio device.
- A control method for an audio device is provided. The control method is applied to a Universal Serial Bus (USB) audio adapter that includes an analog audio interface and is connected to a host. The control method includes steps of: detecting whether the analog audio interface is connected to a target device or detecting a function of the target device, and generating a detection result; controlling the USB audio adapter to operate in a disconnected mode; and controlling the USB audio adapter to continue operating in the disconnected mode according to the detection result, or controlling, according to the detection result, the USB audio adapter to operate in a connected mode and transmit audio data to the host and/or receive audio data from the host.
- A control system for an audio device is also provided. The control system is applied to a USB audio adapter that includes an analog audio interface and is connected to a host. The control system includes a detection circuit and a control unit. The detection circuit, which is coupled to the analog audio interface, detects whether the analog audio interface is connected to a target device or detects a function of the target device, and generates a detection result. The control unit, which is coupled to the detection circuit, controls the USB audio adapter to operate in a disconnected mode or a connected mode. After the control unit controls the USB audio adapter to operate in the disconnected mode, the USB audio adapter continues to operate in the disconnected mode according to the detection result, or the control unit controls, according to the detection result, the USB audio adapter to operate in the connected mode and transmit audio data to the host and/or receive audio data from the host.
- A control method for an audio device is also provided. The control method is applied to a USB audio adapter that includes an analog audio interface and is connected to a host. The control method includes steps of: detecting a function of a target device connected to the analog audio interface and generating a detection result; declaring the USB audio adapter according to the detection result; and controlling the USB audio adapter to operate in a disconnected mode when the USB audio adapter is declared as an audio device having only an audio output function, an audio device having only an audio input function, or an audio device having a function including audio input/output, and a connection status of the analog audio interface changes. When the detection result indicates that the target device has only the audio output function, the USB audio adapter is declared as the audio device having only the audio output function. When the detection result indicates that the target device has only the audio input function, the USB audio adapter is declared as the audio device having only the audio input function. When the detection result indicates that the target device has the function including audio input/output, the USB audio adapter is declared as the audio device having the function including audio input/output.
- The control method and the control system for an audio device in this disclosure can perform dynamic enumeration according to the current usage scenario of the audio device. Compared with the prior art, the USB audio adapter utilizing the dynamic enumeration mechanism of this disclosure not only works in a manner that the user's expectations are met, but also reduces power consumption when the analog audio interface of the USB audio adapter is not connected to any device.
- These and other objectives of the present disclosure no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiments with reference to the various figures and drawings.
-
FIG. 1 illustrates the functional block diagram of a Universal Serial Bus (USB) audio adapter of this disclosure. -
FIGS. 2A-2C illustrate flowcharts of a control method for an audio device. - The following description is written by referring to terms of this technical field. If any term is defined in this specification, such term should be explained accordingly.
- The disclosure herein includes a control method and a control system for an audio device. On account of that some or all elements of the control system could be known, the detail of such elements is omitted provided that such detail has little to do with the features of this disclosure and this omission nowhere dissatisfies the specification and enablement requirements.
-
FIG. 1 shows the functional block diagram of a Universal Serial Bus (USB) audio adapter of this disclosure. TheUSB audio adapter 100 includes acontrol unit 110, aUSB function circuit 120, adetection module 130, astorage 140, anaudio playback module 150, anaudio recording module 160, and ananalog audio interface 170. In this disclosure, thecontrol system 180 for the audio device includes acontrol unit 110, adetection module 130, and astorage 140. Theanalog audio interface 170 may include an audio jack and/or an audio socket. Thecontrol unit 110 may be a computing unit having a program execution capability, such as a microprocessor, a micro control unit (MCU), and the like. - The
USB function circuit 120 connects the host via the USB interface for data transmission and reception. TheUSB function circuit 120 may include circuits for transmitting and receiving data, such as a sampling circuit, a clock circuit (e.g., a phase-locked loop (PLL), a clock and data recovery (CDR) circuit), and the like. TheUSB function circuit 120 changes the behavior of its internal circuit to control theUSB audio adapter 100 to operate in a connected mode or a disconnected mode. For example, for the full speed mode of USB 1.0, theUSB function circuit 120 can switch between the J state and the SE0 state by changing the electric potential of the pin of the USB interface. When theUSB function circuit 120 is in the J state, theUSB audio adapter 100 operates in the connected mode; when theUSB function circuit 120 is in the SE0 state for more than 2.5 microseconds (μs), theUSB audio adapter 100 enters the disconnected mode. When theUSB audio adapter 100 operates in the connected mode, the host can learn that theUSB audio adapter 100 is plugged in a USB port of the host, and both can transmit and receive data normally. On the other hand, when theUSB audio adapter 100 operates in the disconnected mode, despite the fact that theUSB audio adapter 100 is physically plugged in the USB port of the host, the host, in fact, operates as if the USB port is not connected to any USB device, meaning that there is no data transmission between theUSB audio adapter 100 and the host in this instance. Driving the USB device to operate in the connected mode or the disconnected mode is a function defined by the USB specification, and is thus omitted for brevity. - The
analog audio interface 170 may include at least one jack/socket that allows an analog audio plug to plug in. When theanalog audio interface 170 includes only one jack/socket, the jack/socket allows an audio output device, an audio input device, or a device including audio input/output to plug in. When theanalog audio interface 170 includes two jacks/sockets, one of them allows an audio output device or a device including audio input/output to plug in, while the other allows an audio input device to plug in. When the target device connected to theanalog audio interface 170 has an audio output function, the audio data is transmitted from the host to thecontrol unit 110 through theUSB function circuit 120, and thecontrol unit 110 controls the audio data to be transmitted to the target device via theaudio playback module 150. Theaudio playback module 150 may perform digital-to-analog conversion on the audio data, and may also perform decoding operations in some applications. On the other hand, when the target device connected to theanalog audio interface 170 has an audio input function, theaudio recording module 160 converts the audio signal from the target device into audio data (e.g., perform analog-to-digital conversion, and may also perform encoding operations in some applications), and then thecontrol unit 110 transmits the audio data to the host through theUSB function circuit 120. - The
detection module 130 detects whether a target device is plugged in theanalog audio interface 170 and detects the type of the target device when the target device is plugged in theanalog audio interface 170. The types of the target device include an audio output device, an audio input device, and a device including audio input/output. According to the detection result of thedetection module 130, thecontrol unit 110 controls the declaration type that theUSB audio adapter 100 declares to the host, and selectively disables theUSB function circuit 120, theaudio playback module 150, and theaudio recording module 160. Thestorage 140 stores multiple sets of device description data, each corresponds to a declaration type. Each set of device description data includes multiple descriptors, such as device descriptors, configuration descriptors, interface descriptors, and endpoint descriptors. During enumeration, the host enumerates, according to the device description data, theUSB audio adapter 100 as the declaration type that thecontrol unit 110 selects. The declaration types include an audio device with audio output function only, an audio device with audio input function only, and an audio device with both audio input and output functions. -
FIGS. 2A to 2C are flowcharts of a control method for an audio device. As shown inFIG. 2A , after theUSB audio adapter 100 is plugged in the USB port of the host (step S210), the host powers theUSB audio adapter 100 and enumerates theUSB audio adapter 100 to confirm the functions and properties of theUSB audio adapter 100. On the other hand, after theUSB audio adapter 100 receives power, thedetection module 130 starts to detect whether any target device is plugged in the analog audio interface 170 (step S220). The detection manner in step S220 may be (1) mechanical detection, for example, detecting whether the elastic plate in theanalog audio interface 170 is pushed; if the elastic plate is pushed, the determination result in step S220 is positive; (2) impedance detection, for example, detecting whether the impedance between two metal plates in theanalog audio interface 170 is a high impedance; if not, the determination result in step S220 is positive; or (3) user-defined, that is, thedetection module 130 is directly informed of the status by an external event (such as a switch). These three detection manners are well known to those of ordinary skill in the art and the details are thus omitted for brevity. - When the determination result in step S220 is positive, the
detection module 130 detects in step S230 whether the target device has the audio output function only (for example, the target device is a pure headphone device), and detects in step S240 whether the target device has the audio input function only (for example, the target device is a pure microphone device). After that, thecontrol unit 110 determines the declaration type of the USB audio adapter 100 (step S250, S260 or S270) according to the detection result of thedetection module 130; the detection result indicates that the target device has the audio output function only, the audio input function only, or the function including audio input/output. Note that to identify a target device as a pure headphone device, a pure microphone device, a headset device, or other audio devices is prior art and can be implemented by hardware, firmware, or a combination of the two. When implemented by hardware, thedetection module 130 is a circuit. When implemented by firmware, thestorage 140 stores multiple program instructions or codes, and thedetection module 130 executes the program instructions or codes to realize the functions of thedetection module 130. Thedetection module 130 can detect whether the device has a microphone function by at least the following methods: (1) detecting the impedance of the target device; (2) providing theanalog audio interface 170 with a voltage, and detecting the voltage change; or (3) directly defined by the user, that is, thedetection module 130 is directly informed of the state by an external device. Steps S220 to S240 are applicable to the case in which theanalog audio interface 170 has only one or more than one jack/socket; this modification can be readily known by those skilled in the art, and the detailed descriptions are omitted for brevity. - In steps S250 to S270, the
control unit 110 selects a corresponding set of device description data among multiple sets of device description data from thestorage 140 according to the detection result of thedetection module 130; that is, these steps determine a corresponding declaration type. In other words, thecontrol unit 110 declares, according to the detection result, theUSB audio adapter 100 as one of the audio output device, the audio input device or the device including audio input/output, or a combination of the above devices. Referring toFIG. 2B , after thecontrol unit 110 determines the declaration type, thecontrol unit 110 controls theUSB audio adapter 100 to connect the host (step S310), causing theUSB audio adapter 100 to operate in the connected mode. Note that when theUSB audio adapter 100 is plugged in the USB port of the host for the first time (at this moment, the host learns that a device is plugged in the USB port), theUSB audio adapter 100 operates in the connected mode, and, therefore, step S310 may be skipped and/or deemed completed. When the host learns that theUSB audio adapter 100 is plugged in its USB port, the host automatically enumerates theUSB audio adapter 100. After finishing the enumeration process, the host communicates with theUSB audio adapter 100 according to the type that theUSB audio adapter 100 declared in step S250, S260, or S270. For example, when theUSB audio adapter 100 is enumerated as (or declares as) a pure audio output device, the audio data is transmitted from the host to theUSB audio adapter 100, converted into an audio signal, and then transmitted through theanalog audio interface 170 to the target device that has only the audio output function; in this case, the host can disable the built-in speaker but still use the built-in microphone to pick up the sound. When theUSB audio adapter 100 is enumerated as (or declares as) a pure audio input device, the audio signal is transmitted to theUSB audio adapter 100 through the target device that has only the audio input function, converted into audio data, and then transmitted through theUSB function circuit 120 to the host; in this case, the host can disable the built-in microphone but still use the built-in speaker for audio playback. When theUSB audio adapter 100 is enumerated as (or declares as) a device including audio input/output, the paths of the audio signal and the audio data are bidirectional; in this case, the host can disable the built-in speaker and microphone. Accordingly, the data flow direction of the audio data between theUSB function circuit 120 and the host is associated with the declaration type. - As discussed above, the
USB audio adapter 100 may make a corresponding declaration according to the type of the target device plugged in. In this way, when the host completes enumerating theUSB audio adapter 100, the host may automatically determine whether to play and/or receive audio signals with a built-in audio device or the target device according to the current declaration type of theUSB audio adapter 100. More specifically, despite the fact that theUSB audio adapter 100 can be connected to an audio output device, an audio input device, or a device including audio input/output, the disclosed dynamic enumeration/declaration mechanism enables the host to adaptively decide to enable or disable the built-in audio device according to the type of the target device currently connected to theUSB audio adapter 100. As a result, the operations of audio playback and picking up the sound can meet the user's expectations. - After connecting with the host, in step S320, the
USB audio adapter 100 maintains normal communication with the host (receiving audio data from the host, transmitting the audio data to the host, or performing both at the same time) until thedetection module 130 detects that the connection status of theanalog audio interface 170 changes (step S330). More specifically, when any jack/socket of theanalog audio interface 170 changes from connecting with a target device to not connecting with any target device or vice versa, the determination result of step S330 is positive. When the status of theanalog audio interface 170 changes, thecontrol unit 110 controls theUSB function circuit 120 to cause theUSB audio adapter 100 to operate in the disconnected mode (step S340). More specifically, in step S340, theUSB audio adapter 100 is not physically unplugged from the USB port of the host; instead, thecontrol unit 110 controls theUSB function circuit 120 to cause theUSB audio adapter 100 to switch from the connected mode to the disconnected mode to simulate the unplugging operation. After theUSB audio adapter 100 is disconnected from the host, the process goes back to step S220. - When the determination result in step S220 is negative, the detection result of the
detection module 130 indicates that no target device is plugged in the jack/socket of theanalog audio interface 170 at this moment. Next, referring toFIG. 2C , thecontrol unit 110 controls theUSB function circuit 120 to cause theUSB audio adapter 100 to operate in the disconnected mode (step S410). If theUSB audio adapter 100 was in the disconnected mode before step S410, theUSB audio adapter 100 is controlled to remain in the disconnected mode in step S410. Because theUSB audio adapter 100 operates in the disconnected mode at this moment, the host does not enumerate theUSB audio adapter 100. Next, theUSB audio adapter 100 enters the power-saving mode (step S420). More specifically, in the power-saving mode, thecontrol unit 110 turns off theUSB function circuit 120, theaudio playback module 150, and theaudio recording module 160; in other words, in the power-saving mode theUSB function circuit 120, theaudio playback module 150, and theaudio recording module 160 are suspended in order to reduce the power consumption of theUSB audio adapter 100. Preferably, in the power-saving mode, thecontrol unit 110 may enter a sleep mode or a low power consumption mode to further reduce the power consumption of theUSB audio adapter 100. More specifically, in the sleep mode or the low power consumption mode, thecontrol unit 110 controls the firmware to remain in a state immediately before the sleep mode or the low power consumption mode. After thecontrol unit 110 is waked up (for example, being waked up by an interrupt sent from the detection module 130), the firmware can continue from the state to resume the tasks. In step S420, theUSB audio adapter 100 operates in the disconnected mode. - In the next step S430, the
detection module 130 detects whether the connection status of theanalog audio interface 170 changes. The detail of step S430 is substantially the same as that of step S330. It should be noted that, if thecontrol unit 110 enters the sleep mode or the low power consumption mode in step S420, step S430 is completely executed by hardware (i.e., thedetection module 130 is implemented by circuits); if, on the other hand, thecontrol unit 110 does not enter the sleep mode or the low power consumption mode in step S420, step S430 may be executed by hardware and/or firmware (i.e., thedetection module 130 is implemented by circuits and/or programs). TheUSB audio adapter 100 continues to operate in the power-saving mode until the status of theanalog audio interface 170 changes (i.e., step S430 is determined to be positive). In step S440, thecontrol unit 110 controls theUSB audio adapter 100 to exit the power-saving mode. More specifically, thecontrol unit 110 turns on theUSB function circuit 120, theaudio playback module 150, and theaudio recording module 160; in other words, theUSB function circuit 120, theaudio playback module 150, and theaudio recording module 160 resume normal operation. The flow then goes back to step S220. - As discussed above, part of the modules or circuits of the
USB audio adapter 100 is in a zero-power-consumption state in the power-saving mode. Ideally, in the power-saving mode, only thedetection module 130 consumes a small amount of power. Therefore, when theanalog audio interface 170 of theUSB audio adapter 100 is not connected to any target device, theUSB audio adapter 100 consumes little power. When the power of the host is limited (e.g., the host is a battery-powered portable electronic device), theUSB audio adapter 100 that implements this mechanism does not place an extra burden on the host. - In addition, the
control unit 110 may selectively turn off theaudio playback module 150 or theaudio recording module 160 in step S320 according to the declaration type. For example, when theUSB audio adapter 100 declares as a pure audio output device, theaudio recording module 160 is in an idle state, and thus thecontrol unit 110 can turn off theaudio recording module 160 to reduce power consumption. - The
detection module 130, theaudio playback module 150, and theaudio recording module 160 can be implemented by circuitry, hardware, software, and/or firmware. When these modules are implemented by software or firmware, thecontrol unit 110 may execute program codes or instructions stored in thestorage 140 to perform the functions of each module. - Note that there is no step sequence limitation for the method embodiments as long as the execution of each step is applicable. Furthermore, the shape, size, and ratio of any element and the step sequence of any flow chart in the disclosed figures are exemplary for understanding, not for limiting the scope of this disclosure. The aforementioned descriptions represent merely the preferred embodiments of the present disclosure, without any intention to limit the scope of the present disclosure thereto. Various equivalent changes, alterations, or modifications based on the claims of the present disclosure are all consequently viewed as being embraced by the scope of the present disclosure.
Claims (20)
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW106116562A | 2017-05-19 | ||
| TW106116562 | 2017-05-19 | ||
| TW106116562A TWI621947B (en) | 2017-05-19 | 2017-05-19 | Method for controlling audio device and system thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| US10136223B1 US10136223B1 (en) | 2018-11-20 |
| US20180338206A1 true US20180338206A1 (en) | 2018-11-22 |
Family
ID=62639998
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/964,500 Active US10136223B1 (en) | 2017-05-19 | 2018-04-27 | Control method and control system for audio device |
Country Status (2)
| Country | Link |
|---|---|
| US (1) | US10136223B1 (en) |
| TW (1) | TWI621947B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115442706A (en) * | 2021-06-02 | 2022-12-06 | 瑞昱半导体股份有限公司 | External audio device and method for operating the external audio device |
| US11601923B2 (en) | 2018-01-12 | 2023-03-07 | Vivo Mobile Communication Co., Ltd. | UCI transmission method and mobile terminal |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10154601B2 (en) * | 2016-01-20 | 2018-12-11 | Facebook, Inc. | Modular electromechanical device |
| TWI689819B (en) * | 2018-09-27 | 2020-04-01 | 瑞昱半導體股份有限公司 | Audio playback device |
| TWI812947B (en) * | 2021-05-06 | 2023-08-21 | 瑞昱半導體股份有限公司 | External audio device and method for operating an external audio device |
| US12112091B2 (en) * | 2023-03-03 | 2024-10-08 | Qualcomm Incorporated | Unifying multiple audio bus interfaces in an audio system |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8601470B2 (en) * | 2007-01-05 | 2013-12-03 | Moka5, Inc. | Symbiotic smart peripherals |
| US7912501B2 (en) * | 2007-01-05 | 2011-03-22 | Apple Inc. | Audio I/O headset plug and plug detection circuitry |
| US7747010B1 (en) * | 2007-04-05 | 2010-06-29 | Avaya Inc. | Telephony software client application for handling the insertion and removal of logical audio devices |
| CN101420094A (en) * | 2007-10-22 | 2009-04-29 | 鸿富锦精密工业(深圳)有限公司 | Combined USB interface switching apparatus |
| CN101763237B (en) * | 2008-12-23 | 2012-09-05 | 骅讯电子企业股份有限公司 | External audio device and signal processing method |
| US8843664B2 (en) * | 2011-09-29 | 2014-09-23 | Cypress Semiconductor Corporation | Re-enumeration of USB 3.0 compatible devices |
-
2017
- 2017-05-19 TW TW106116562A patent/TWI621947B/en active
-
2018
- 2018-04-27 US US15/964,500 patent/US10136223B1/en active Active
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11601923B2 (en) | 2018-01-12 | 2023-03-07 | Vivo Mobile Communication Co., Ltd. | UCI transmission method and mobile terminal |
| CN115442706A (en) * | 2021-06-02 | 2022-12-06 | 瑞昱半导体股份有限公司 | External audio device and method for operating the external audio device |
Also Published As
| Publication number | Publication date |
|---|---|
| TW201901459A (en) | 2019-01-01 |
| US10136223B1 (en) | 2018-11-20 |
| TWI621947B (en) | 2018-04-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10136223B1 (en) | Control method and control system for audio device | |
| US8595533B2 (en) | Power management system, method thereof and storage medium | |
| US10127181B2 (en) | Port disconnect charging function for USB hub | |
| US8407495B2 (en) | Information processor and power supply method for an information processor | |
| US20130162198A1 (en) | Information processing apparatus and control method | |
| US20130101132A1 (en) | Method and Device for Earphone and USB to Share Micro-USB Interface | |
| US10042801B2 (en) | System for detecting universal serial bus (USB) device and method thereof | |
| US10565145B2 (en) | Felxconnect disconnect detection | |
| JP5986145B2 (en) | Portable devices, cable assemblies and USB systems | |
| CN110018976B (en) | Method for USB master device to respond to USB slave device and related device | |
| US10345879B2 (en) | Capacitance based accessory connection detection for a battery powered unit | |
| JP2011258173A (en) | Power saving device and power saving method of the same | |
| CN109672950B (en) | Power saving circuit and power saving method based on Type-C earphone | |
| CN108733609B (en) | Switching circuit, intelligent switching device and switching method of double USB interfaces | |
| US20150253842A1 (en) | Semiconductor device, and power control method for usbotg | |
| CN110879792A (en) | Electronic device and interface control method thereof | |
| WO2024027208A1 (en) | Charging circuit, electronic device, charging system, and reverse charging method | |
| CN102098035B (en) | Analog switch control circuit and mobile phone | |
| US20070239924A1 (en) | Electronic device transmitting audio-and-video signals with USB connector | |
| CN108966079B (en) | Control method and system for audio device | |
| US12493572B2 (en) | Universal serial bus architecture | |
| WO2025208977A1 (en) | First electronic device, second electronic device, cable, and power supply system | |
| CN111641633A (en) | Information processing method for memory and electronic equipment | |
| TWI394036B (en) | Mother board | |
| KR20060024673A (en) | Portable terminal with universal serial bus terminal and method for driving universal serial bus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| AS | Assignment |
Owner name: REALTEK SEMICONDUCTOR CORPORATION, TAIWAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:CHEN, HSING-LUN;CHIU, SHU-YEH;CHEN, KO-WEI;REEL/FRAME:045653/0803 Effective date: 20180206 |
|
| FEPP | Fee payment procedure |
Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
| STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
| MAFP | Maintenance fee payment |
Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY Year of fee payment: 4 |
|
| MAFP | Maintenance fee payment |
Free format text: PAYMENT OF MAINTENANCE FEE, 8TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1552); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY Year of fee payment: 8 |