Patent ID: 9009373
Filing Date: 2015-04-14
Classification: G06F

Abstract:
1. A method for implementing audio transmission, comprising: setting an interface descriptor for a Universal Serial Bus (USB) audio device in a USB composite device, wherein the interface descriptor is used for describing information needed by the USB audio device for transmitting audio data; sending, by the USB audio device, the interface descriptor of the USB audio device to a USB host to enable the USB host to complete enumeration and identification of the USB audio device according to the interface descriptor of the USB audio device; and performing audio data transmission between the USB host and the USB audio device, wherein after the USB host sends an interface selecting command and selects a data transmission interface, the USB audio device starts a Start of Frame (SOF) interruption of the USB; when the SOF interruption occurs, a frame of audio data is sent and received at the isochronous (ISO) endpoint for data transmission; after the USB host sends the interface selecting command and selects a non-data transmission interface, the USB audio device stops the SOF interruption of the USB; wherein a bandwidth needed for transmitting the audio data through the USB ISO endpoint is reserved on the USB host side; wherein the enumeration and identification of the USB audio device according to the interface descriptor of the USB audio device comprising: the USB resets in order that a device address of the USB device is restored to a default address; the USB host driver requests the device for a device descriptor, and the USB device returns the device descriptor of the USB device to the USB host; the USB host driver sets an address of the device, the USB host sends a command of setting the address to the device, after receiving the command, the USB device fills the received address to an address register of a USB device controller; the USB host driver requests the device for a configuration descriptor, the USB host sends a command to the device to request the device for the configuration descriptor, and the USB device returns the configuration descriptor of the USB composite device, including the interface descriptors of the USB audio device and the interface descriptors of other sub-devices in the USB composite device, to the USB host; the USB host driver parses the configuration descriptor and selects the USB configuration; and the USB host driver loads a sub-device driver, the USB host respectively loads the driving program of each sub-device according to the parsed information of USB sub-devices, wherein the performing audio data transmission between the USB host and the USB audio device further comprises: preferentially processing a data transmission request from the USB audio device by the USB composite device; and after the data transmission request from the USB audio device is completely processed, processing a data transmission request from the non-USB audio device by the USB composite device, wherein setting the ISO endpoints for audio transmission requiring a higher real-time property as high- endpoints; and setting the AT port, Modem port, and large-capacity storage device requiring a low real-time properties as low-priority endpoints, when the transmission interruption of the USB occurs, the data transmission requests of the high-priority endpoints are processed preferentially; and the data transmission requests of other low-priority endpoints are not processed until the data transmission requests on the high-priority endpoints are completely processed, setting an allowable maximal data transmission length of the low-priority endpoint, only the data with a length less than the allowable maximal data transmission length is transmitted on the low-priority endpoint, when the data which the low-priority endpoint requires to transmit with a length longer than the allowable maximal data transmission length, the request is split into multiple small data packets, cancelling the limitation on the allowable maximal data transmission length of the low-priority endpoint, when data transmissions on all the high-priority endpoints have been stopped.