CN114442992A - Switching method of audio transmission protocol of USB sound card - Google Patents

Switching method of audio transmission protocol of USB sound card Download PDF

Info

Publication number
CN114442992A
CN114442992A CN202210087862.7A CN202210087862A CN114442992A CN 114442992 A CN114442992 A CN 114442992A CN 202210087862 A CN202210087862 A CN 202210087862A CN 114442992 A CN114442992 A CN 114442992A
Authority
CN
China
Prior art keywords
usb
sound card
uac
upper computer
protocol
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
Application number
CN202210087862.7A
Other languages
Chinese (zh)
Other versions
CN114442992B (en
Inventor
窦中康
刘峰
黄俊斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Nationalchip Science & Technology Co ltd
Original Assignee
Hangzhou Nationalchip Science & Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Nationalchip Science & Technology Co ltd filed Critical Hangzhou Nationalchip Science & Technology Co ltd
Priority to CN202210087862.7A priority Critical patent/CN114442992B/en
Publication of CN114442992A publication Critical patent/CN114442992A/en
Application granted granted Critical
Publication of CN114442992B publication Critical patent/CN114442992B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/16Sound input; Sound output
    • G06F3/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Abstract

The invention discloses a switching method of a USB sound card audio transmission protocol. At present, the USB sound card cannot be normally used in partial scenes. The USB system of the upper computer supports various transmission speeds and UAC protocols of various versions, a 1.0 version UAC protocol and a 2.0 version UAC protocol are built in a flash of a USB sound card, the USB sound card is connected to a USB interface of the upper computer, and after the upper computer finds that USB equipment is inserted, the USB equipment starts to identify; the identification process comprises the following steps: after the reset operation is completed, the microcontroller of the USB sound card can acquire the current transmission speed of the USB interface of the upper computer, and selects the corresponding 1.0 version UAC protocol or 2.0 version UAC protocol according to the current transmission speed. The method of the invention can make the USB sound card support 1.0 and 2.0 version UAC protocols, improves the compatibility of the sound card, and automatically selects the corresponding version UAC protocol.

Description

Switching method of audio transmission protocol of USB sound card
Technical Field
The invention belongs to the technical field of audio data transmission, and relates to a switching method of an audio transmission protocol of a USB sound card.
Background
The sound card is the most basic component in a computer multimedia system and is hardware for realizing sound wave/digital signal interconversion. The USB sound card is a sound card for transmitting audio based on USB.
USB: a universal serial bus (usb). The system is an external bus standard and is used for standardizing the connection and communication between a computer and external equipment. It is commonly found on various devices (computers, tablets, mobile phones, set-top boxes, televisions).
End point: a series of mutually independent endpoints together form the function of the USB by a logic terminal when the USB Host and the USB Device communicate. During communication, the USB Host transmits and receives data by specifying the endpoint number of the USB Device.
UAC protocol: USB Audio Class, the USB Audio Class, defines standards for transmitting Audio over USB. Currently existing versions are UAC1.0, UAC2.0, UAC 3.0. Compared with UAC1.0, UAC2.0 can support higher sampling rate and sampling depth, can provide higher transmission bandwidth, and can provide better audio experience effect.
The fastest SPEED supported by the USB1.0 is 1.5Mbps with the code number LOW-SPEED. The fastest SPEED supported by USB1.1 is 12Mbps, with the code FULL-SPEED. The fastest SPEED supported by USB2.0 is 480Mbps with code number HIGH-SPEED.
The 1.0 version UAC protocol was developed based on USB1.1, and the 2.0 version UAC protocol was developed based on USB 2.0. Therefore, the UAC protocol version 1.0 only supports transmissions based on FULL-SPEED, but not on HIGH-SPEED. And the UAC protocol version 2.0 only supports transmission based on HIGH-SPEED and cannot support transmission based on FULL-SPEED. The 2.0 version UAC protocol has better performance and experience, but in some scenarios that only support full speed, the USB sound card with the 2.0 version UAC protocol built in cannot be used.
Disclosure of Invention
The invention aims to provide a switching method of an audio transmission protocol of a USB sound card.
The method specifically comprises the following steps: the flash of the USB sound card is internally provided with a 1.0 version UAC protocol and a 2.0 version UAC protocol, and other control software. The USB sound card is connected to host computer USB interface, and the host computer discovery has USB equipment to insert the back, begins USB equipment discernment, and the identification process includes: power supply, reset, select configuration. The USB system of the upper computer supports UAC protocols with various transmission speeds and various versions. After the reset operation is completed, the microcontroller of the USB sound card can acquire the current transmission speed of the USB interface of the upper computer.
The reset process is as follows: the microcontroller of the USB sound card selects a corresponding 1.0 version UAC protocol or 2.0 version UAC protocol according to the current transmission speed of the USB interface of the upper computer: if the upper computer supports HIGH-SPEED, a 2.0 version UAC protocol is selected, and if the upper computer only supports FULL-SPEED, a 1.0 version UAC protocol is selected.
The selection configuration process is as follows: in the process of identifying the USB sound card, sending configuration information including the selected UAC protocol version to an upper computer, and selecting a corresponding UAC protocol after the upper computer obtains the configuration; then the upper computer configures parameters of the USB sound card through instructions in the selected UAC protocol, wherein the parameters comprise sampling rate, channel number and sampling depth; after the configuration is finished, the upper computer controls the USB sound card to record or play through the UAC protocol.
When the host computer records, begin to record the order through sending UAC and inform USB sound card preparation recording, MCU in the USB sound card begins the data of initialization audio acquisition module in order to gather the microphone, and MCU gives the USB with the data that the microphone was gathered, gives the host computer through the USB passageway, and the host computer is preserved in order to accomplish the recording after receiving the data.
When the host computer plays, the USB sound card is informed to start playing by sending a UAC (Universal Serial bus) play command, the MCU in the USB sound card starts initializing the audio play module, the audio data to be played by the host computer is issued to the USB sound card through the USB, the USB of the USB sound card gives the received data to the audio play module, and the audio play module controls the loudspeaker to play the audio to complete playing.
The method of the invention can make the USB sound card support 1.0 and 2.0 version UAC protocol, improves the compatibility of the sound card, and can automatically select the corresponding UAC protocol version according to the scene self-adaptation.
Drawings
FIG. 1 is a schematic block diagram of the process of the present invention.
In the figure, a microphone 1, a speaker 2, an audio acquisition module 3, an audio output module 4, an MCU (micro controller unit) 5, an SRAM6, a Flash7, a USB device controller 8, and a USB host controller 9.
Detailed Description
The switching method of the audio transmission protocol of the USB sound card comprises the following steps: the USB sound card is connected to host computer USB interface, and the host computer discovery has USB equipment to insert the back, begins USB equipment discernment, and the identification process includes: power supply, reset, select configuration. The USB system of the upper computer supports UAC protocols with various transmission speeds and various versions. After the reset operation is completed, the microcontroller of the USB sound card can acquire the current transmission speed of the USB interface of the upper computer.
The reset process is as follows: the microcontroller of the USB sound card selects a corresponding 1.0 version UAC protocol or 2.0 version UAC protocol according to the current transmission speed of the USB interface of the upper computer: if the upper computer supports HIGH-SPEED, a 2.0 version UAC protocol is selected, and if the upper computer only supports FULL-SPEED, a 1.0 version UAC protocol is selected.
The selection configuration process is as follows: in the process of identifying the USB sound card, sending configuration information including the selected UAC protocol version to an upper computer, and selecting a corresponding UAC protocol after the upper computer obtains the configuration; then the upper computer configures parameters of the USB sound card through instructions in the selected UAC protocol, wherein the parameters comprise sampling rate, channel number and sampling depth; after the configuration is completed, the upper computer controls the USB sound card to record or play through the UAC protocol.
The specific implementation is shown in fig. 1. Functions included in the firmware of the USB sound card I: the driver of various peripheral modules, the service logic of the USB sound card, 1.0 version UAC protocol, 2.0 version UAC protocol and the like.
After the USB sound card I is connected to the upper computer II, the upper computer supplies power to the USB sound card, the MCU 5 of the USB sound card is started, and drives of all the modules are moved to the SRAM6 from the Flash7 so as to operate all the modules in the following process. After the data is moved, the MCU 5 starts to initialize the peripherals, including the audio acquisition module 3, the microphone 1, the audio output module 4, the speaker 2, and the USB device controller 8. After the initialization is completed, the USB device controller 8 receives an identification request (i.e. enumeration) from the host USB controller 9, and the identification process can be described as: resetting, setting an address, reading USB equipment information and configuring the USB equipment.
After the host computer resets the USB sound card, the USB device controller 8 detects whether the current transmission speed is high-speed or full-speed according to the reset result and notifies the MCU 5 of the result, and the MCU 5 determines the current UAC version to be used according to the speed, selects the UAC protocol version 2.0 if the speed is high, and selects the UAC protocol version 1.0 if the speed is full.
When the upper computer reads the information of the USB equipment, the MCU 5 sends the selected UAC protocol to the upper computer, the upper computer confirms whether the UAC protocol of the version is supported after receiving the UAC protocol, if so, the USB sound card can normally work after enumeration is completed, and if not, the USB sound card cannot normally work after enumeration is completed. Generally, the upper computer can support multiple sets of UAC protocols.
When the upper computer is configured with the USB equipment, the upper computer can be configured with the sampling rate, the channel number, the sampling depth and the like of the USB sound card. And then the USB sound card is in a state of being in place at any time, and waits for a recording or playing instruction of the upper computer.
After enumeration is completed, the upper computer prepares to use the USB sound card to complete recording and playing functions, wherein:
during recording, the upper computer informs the USB sound card to start recording through a command in a selected UAC protocol, the USB equipment controller 8 of the USB sound card informs the MCU 5 to prepare recording after receiving the command, and the MCU 5 then opens the microphone 1 and the audio acquisition module 3. The data collected by the microphone 1 is converted from analog signals into digital signals through ADC conversion of the audio collection module 3 to be stored in the SRAM6, the MCU 5 informs the USB device controller 8 to read collected audio data from the designated address of the SRAM6 and send the audio data to the upper computer, and the upper computer stores the data after receiving the data to finish recording.
During playing, the upper computer informs the USB sound card to start playing through a command in a selected UAC protocol, the USB equipment controller 8 of the USB sound card informs the MCU 5 of preparing playing after receiving the command, and the MCU 5 then opens the loudspeaker 2 and the audio output module 4. The data received by the USB device controller 8 is firstly stored in the SRAM6 and is informed to the MCU 5, the MCU 5 informs the audio output module 4 of the address of the received audio data, the audio output module 4 takes out the data from the address and converts the data into an analog signal through DAC conversion, and the analog signal is sent to the loudspeaker 2 and played, and the playing is completed.

Claims (2)

1. A switching method of audio transmission protocol of USB sound card is characterized in that:
the USB sound card is connected to host computer USB interface, and the host computer discovery has USB equipment to insert the back, begins USB equipment discernment, and the identification process includes: power supply, reset and configuration selection; a 1.0 version UAC protocol and a 2.0 version UAC protocol and other control software are arranged in the flash of the USB sound card; the USB system of the upper computer supports UAC protocols with various transmission speeds and various versions; after the reset operation is finished, the microcontroller of the USB sound card can acquire the current transmission speed of the USB interface of the upper computer;
the reset process is as follows: the microcontroller of the USB sound card selects a corresponding 1.0 version UAC protocol or 2.0 version UAC protocol according to the current transmission speed of the USB interface of the upper computer: if the upper computer supports HIGH-SPEED, selecting 2.0 version UAC protocol, and if the upper computer only supports FULL-SPEED, selecting 1.0 version UAC protocol;
the selection configuration process is as follows: in the process of identifying the USB sound card, sending configuration information including the selected UAC protocol version to an upper computer, and selecting a corresponding UAC protocol after the upper computer obtains the configuration; then the upper computer configures parameters of the USB sound card through instructions in the selected UAC protocol, wherein the parameters comprise sampling rate, channel number and sampling depth; after the configuration is finished, the upper computer controls the USB sound card to record or play through the UAC protocol.
2. The method for switching audio transmission protocols of a USB sound card according to claim 1, wherein:
when the upper computer records, the USB sound card is informed to prepare for recording by sending a UAC recording start command, the MCU in the USB sound card starts to initialize the audio acquisition module to acquire data of the microphone, the MCU sends the data acquired by the microphone to the USB and the USB to the upper computer through the USB channel, and the upper computer receives the data and then stores the data to finish recording;
when the host computer plays, the USB sound card is informed to start playing by sending a UAC (Universal Serial bus) play command, the MCU in the USB sound card starts initializing the audio play module, the audio data to be played by the host computer is issued to the USB sound card through the USB, the USB of the USB sound card gives the received data to the audio play module, and the audio play module controls the loudspeaker to play the audio to complete playing.
CN202210087862.7A 2022-01-25 2022-01-25 Switching method of USB sound card audio transmission protocol Active CN114442992B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210087862.7A CN114442992B (en) 2022-01-25 2022-01-25 Switching method of USB sound card audio transmission protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210087862.7A CN114442992B (en) 2022-01-25 2022-01-25 Switching method of USB sound card audio transmission protocol

Publications (2)

Publication Number Publication Date
CN114442992A true CN114442992A (en) 2022-05-06
CN114442992B CN114442992B (en) 2024-01-02

Family

ID=81370503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210087862.7A Active CN114442992B (en) 2022-01-25 2022-01-25 Switching method of USB sound card audio transmission protocol

Country Status (1)

Country Link
CN (1) CN114442992B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1997082A (en) * 2006-01-05 2007-07-11 华为技术有限公司 Recognition method of in-band voice data based on the change switching of the net load in the network
US20070300223A1 (en) * 2006-06-23 2007-12-27 Lenovo (Beijing) Limited Virtual machine system and method for switching hardware devices thereof
US7529871B1 (en) * 2004-04-27 2009-05-05 Apple Inc. Communication between an accessory and a media player with multiple protocol versions
CN101430640A (en) * 2007-11-05 2009-05-13 康佳集团股份有限公司 Communication terminal with USB audio card, and method for implementing USB audio card in communication terminal
CN101593114A (en) * 2008-05-30 2009-12-02 深圳艾科创新微电子有限公司 A kind of UVC application automatic replacing system device driven
CN102036058A (en) * 2010-12-20 2011-04-27 南京中兴新软件有限责任公司 Method, server, terminal and system for switching videos in video monitoring system
CN104794074A (en) * 2015-03-27 2015-07-22 小米科技有限责任公司 External connection device identification method and device
CN106294265A (en) * 2015-05-19 2017-01-04 深圳市超越自然多媒体有限公司 A kind of audio data transmission method between USB sound card and smart machine
CN106293594A (en) * 2015-05-19 2017-01-04 深圳市超越自然多媒体有限公司 A kind of audio data transmission method for USB sound card
CN207198837U (en) * 2017-09-29 2018-04-06 深圳市客所思电子科技有限公司 USB sound cards
CN107894883A (en) * 2017-11-22 2018-04-10 佛山乐野音乐设备有限公司 Audio stream transmission method and sound card audio conversion circuit
CN108089834A (en) * 2017-11-07 2018-05-29 潍坊歌尔电子有限公司 A kind of broadcasting synchronous method, device and USB sound cards
CN109741756A (en) * 2018-12-29 2019-05-10 苏州思必驰信息科技有限公司 Method and system based on USB external equipment transmission operation signal
WO2019172998A1 (en) * 2018-02-21 2019-09-12 Qualcomm Incorporated Systems and methods for using distributed universal serial bus (usb) host drivers
CN112965688A (en) * 2021-03-31 2021-06-15 杭州国芯科技股份有限公司 Audio transmission method for USB sound card

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7529871B1 (en) * 2004-04-27 2009-05-05 Apple Inc. Communication between an accessory and a media player with multiple protocol versions
CN1997082A (en) * 2006-01-05 2007-07-11 华为技术有限公司 Recognition method of in-band voice data based on the change switching of the net load in the network
US20070300223A1 (en) * 2006-06-23 2007-12-27 Lenovo (Beijing) Limited Virtual machine system and method for switching hardware devices thereof
CN101430640A (en) * 2007-11-05 2009-05-13 康佳集团股份有限公司 Communication terminal with USB audio card, and method for implementing USB audio card in communication terminal
CN101593114A (en) * 2008-05-30 2009-12-02 深圳艾科创新微电子有限公司 A kind of UVC application automatic replacing system device driven
CN102036058A (en) * 2010-12-20 2011-04-27 南京中兴新软件有限责任公司 Method, server, terminal and system for switching videos in video monitoring system
CN104794074A (en) * 2015-03-27 2015-07-22 小米科技有限责任公司 External connection device identification method and device
CN106294265A (en) * 2015-05-19 2017-01-04 深圳市超越自然多媒体有限公司 A kind of audio data transmission method between USB sound card and smart machine
CN106293594A (en) * 2015-05-19 2017-01-04 深圳市超越自然多媒体有限公司 A kind of audio data transmission method for USB sound card
CN207198837U (en) * 2017-09-29 2018-04-06 深圳市客所思电子科技有限公司 USB sound cards
CN108089834A (en) * 2017-11-07 2018-05-29 潍坊歌尔电子有限公司 A kind of broadcasting synchronous method, device and USB sound cards
CN107894883A (en) * 2017-11-22 2018-04-10 佛山乐野音乐设备有限公司 Audio stream transmission method and sound card audio conversion circuit
WO2019172998A1 (en) * 2018-02-21 2019-09-12 Qualcomm Incorporated Systems and methods for using distributed universal serial bus (usb) host drivers
CN109741756A (en) * 2018-12-29 2019-05-10 苏州思必驰信息科技有限公司 Method and system based on USB external equipment transmission operation signal
CN112965688A (en) * 2021-03-31 2021-06-15 杭州国芯科技股份有限公司 Audio transmission method for USB sound card

Also Published As

Publication number Publication date
CN114442992B (en) 2024-01-02

Similar Documents

Publication Publication Date Title
KR101329307B1 (en) Apparatus and method for controlling USB operation
TWI338222B (en) Method and system for allowing a media player to transfer digital audio to an accessory
TWI393009B (en) Data sharing and transfer systems and methods
EP2423806B1 (en) Method and device for transmitting universal serial bus audio data through a wireless data terminal
US8533370B2 (en) Device and method for enabling a host apparatus to access a peripheral device
CN1770771A (en) Solution for consumer electronics control
CN101076100B (en) Method and apparatus for transmitting decoded data fluid to display device
US9804858B2 (en) System for re-enumeration of USB 3.0 compatible peripheral devices
JP2011508930A (en) Control bus for connecting electronic devices
CN101019087A (en) System and method for accessing universal serial bus networks
US11010325B2 (en) Memory card slot interface adapter
CN100489822C (en) Audio system
CN108738000A (en) Based on Android(Android)The bluetooth adaptation method and terminal device of system
CN105657172A (en) DSP power amplifier interaction system
CN114442992B (en) Switching method of USB sound card audio transmission protocol
EP1866749A1 (en) A method and protocol for transmitting extended commands to usb devices
EP2209323A1 (en) Electronic device, control signal conversion method, and control signal conversion program
CN112965688A (en) Audio transmission method for USB sound card
CN110798269B (en) Method and system for realizing PCM slave function based on GPIO
CN115802096B (en) Multi-channel HDMI cooperative control method and system
US20150309956A1 (en) Data terminal, data transmission system, and hot swapping control method
CN106294265A (en) A kind of audio data transmission method between USB sound card and smart machine
US20080104298A1 (en) Expandable Express Card Capable of Isolating Noise and Method for Combining Functionalities of the Express Card with a Non-Host Device
TWI385558B (en) Apparatus, system and method for selectively activating functions provided by a portable device
CN101179654B (en) Embedded system based image acquisition method of camera device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant