Best High Integration/Low Cost USB Audio Controller for PC Internet Phone CM109 USB I/O Controller DataSheet Version 1.3a C-MEDIA ELECTRONICS INC. TEL: 886-2-8773-1100 FAX: 886-2-8773-2211 6F, 100, Sec. 4, Civil Boulevard, Taipei, Taiwan 106, R.O.C. For detailed product information, please contact sales@cmedia.com.tw CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone NOTICES THIS DOCUMENT IS PROVIDED "AS IS" WITH NO WARRANTIES WHAT SO EVER, INCLUDING ANY WARRANTY OF MERCHANT ABILITY, NONINFRINGEMENT, FITNESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY PROPOSAL, DOCUMENT OR SAMPLE. ALL RIGHTS RESERVED. NO PART OF THIS DOCUMENT MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY ANY MEANS, ELECTRONIC OR MECHANICAL, INCLUDING INFORMATION STORAGE AND RETRIEVAL SYSTEMS, WITHOUT PERMISSION IN WRITING FROM C-MEDIA ELECTRONICS, INC. COPYRIGHT Copyright (c) 2003-2006 C-Media Electronics Inc. All rights reserved. All content included on this document, such as text, graphics, logos, button icons, images, audio clips, digital downloads, data compilations, and software, is either the exclusive property of C-Media Electronics Inc., its affiliates (collectively, "C-Media"), its content suppliers, or its licensors and protected by Republic of China and international copyright laws. TRADEMARKS C-Media, the C-Media Logo, Xear 3D, Xear 3D Logo, Speaker Shifter, Smart Jack, and Smart Audio Jack are trademarks of C-Media Electronics Inc. in Republic of China and/or other countries. All other brand and product names listed are trademarks or registered trademarks of their respective holders and are hereby recognized as such. *C-Media reserves the right to modify the specifications without further notice* Date: 08/Sep/2005 Version: -1- 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone TABLE OF CONTENTS 1. DESCRIPTIONS AND OVERVIEW 4 2. FEATURES 4 3. PIN DESCRIPTIONS 6 3.1 PIN ASSIGNMENT BY PIN NUMBER 6 3.2 PIN-OUT DIAGRAM 6 3.3 PIN SIGNAL DESCRIPTIONS 7 4. MCU INTERFACE 9 5. BLOCK DIAGRAM 9 6. ORDERING INFORMATION 10 7. FUNCTION DESCRIPTIONS 11 7.1 USB INTERFACE 11 7.1.1 DEVICE DESCRIPTOR 11 7.1.2 CONFIGURATION DESCRIPTOR 12 7.1.3 CONTENT FORMAT FOR 94C46 12 7.1.4 USB AUDIO TOPOLOGY DIAGRAM 13 7.2 JUMPER PINS AND MODE SETTING 13 7.3 HID FEATURE 14 7.3.1 HID DESCRIPTOR 15 7.3.2 WINDOWS SOFTWARE ARCHITECTURE FOR HID 16 7.4 INTERNAL REGISTERS 16 7.4.1 ACCESS VIA HID CLASS COMMAND 16 7.4.2 ACCESS VIA ENTERNAL INTERFACE BY MCU 19 Date: 08/Sep/2005 Version: -2- 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 7.4.3 22 INDIRECT ACCESSED REGISTERS 7.5 MCU INTERFACE 23 7.6 BUZZER OUTPUT 28 8. ELECTRICAL CHARACTERISTICS 29 8.1 ABSOLUTE MAXIMUM RATING 29 8.2 OPERATION CONDITIONS 29 8.3 ELECTRICAL PARAMETERS 30 9. FREQUENCY RESPONSE GRAPHS 31 9.1 DIGITAL PLAYBACK FOR LINE OUTPUT FREQUENCY (10K OHM LOADING) 31 9.1.1 FREQUENCY RESPONSE 48KS/SEC 31 9.1.2 FREQUENCY RESPONSE 44.1KS/SEC 31 9.2 DIGITAL PLAYBACK FOR LINE OUTPUT FREQUENCY (32 OHM LOADING) 32 9.2.1 FREQUENCY RESPONSE 48KS/SEC 32 9.2.2 FREQUENCY RESPONSE 44.1KS/SEC 32 9.3 DIGITAL RECORDING FOR LINE OUTPUT FREQUENCY 33 9.3.1 FREQUENCY RESPONSE 48KS/SEC 33 9.3.2 FREQUENCY RESPONSE 44.1KS/SEC 33 10. APPLICATION CIRCUIT REFERENCE 34 Date: 08/Sep/2005 Version: -3- 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 1.DESCRIPTIONS AND OVERVIEW CM109 is a highly integrated single chip USB audio controller specifically for VoIP (Voice over internet protocol) application. All essential analog modules are embedded in CM109, including dual DAC and earphone driver, ADC, microphone booster, PLL, regulator, and USB transceiver. 8 GPIO pins can constitute a 24 key matrix directly support keypad control function without MCU. It's also support buzzer output pin for VoIP application. In addition, audio adjustment can be easily controlled via specific HID compliant volume control pins. Many features are programmable with jumper pins or external EEPROM. Vender can customized unique USB VID/PID to EEPROM for VoIP software authentication. Moreover, individual unique phone number for each device is possible via serial number stored in external EEPROM. Moreover, CM109 provided I2C interface with MCU application for LCM integrated and advanced functions. VoIP applications are becoming increasing popular as VoIP can provide free or low-cost calling worldwide. To provide a VoIP experience that is the same as using a regular phone and eliminate the poor call quality that results from using the PC audio, C-Media has developed CM109 USB Controller that enables a regular phone, handset, or headset which is interfaced to the USB port on the PC. With the C-Media OEMs can quickly bring to market a family of low cost high quality VoIP products. 2. FEATURES z Compliant with USB 2.0 Full Speed Operation z Compliant with USB Audio Device class specification v1.0 z Supports USB Suspend/Resume Mode and remote Wakeup with Volume Control pins z Single 12MHz Crystal input with on-chip PLL and embedded USB transceiver z Jumper Pin for Speaker Mode (Playback Only) or Headset Mode (Playback + Recording) z For Headset Mode, USB audio function topology has 2 Input Terminals, 2 Output Terminals, 1 Mixer Unit, 1 Selector Unit, and 3 Feature Units z Jumper Pin for Operation System Mixer Unit Enable/Disable under Headset Mode Date: 08/Sep/2005 Version: -4- 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone z For Speaker Mode, USB audio function topology has 1 Input Terminal, 1 Output Terminal, and 1 Feature Unit z Support one Control Endpoint, one Isochroous out Endpoint, one Isochroous in Endpoint, and one Interrupt in Endpoint z Alternate zero bandwidth setting for releasing playback bandwidth on USB Bus when this device is inactive z Volume up, volume down, and playback mute support USB HID for Host Control Synchronization z Record Mute Pin with LED Indicator for Record Mute Status z External EEPROM Interface for Vendor Specific USB VID, PID, and Serial Number z Supports AES/EBU, IEC60958, S/PDIF Consumer Formats for Stereo PCM Data at S/PDIF Output z 8 GPIO Pins with Read/Write via HID z Embedded Buzzer Function controlled by Register z Support I2C Interface for External MCU Integrated z Jumper Pin for Output Voltage Swing (3.5V or 2.5V) z Jumper Pin for Power Mode Setting z Isochroous transfer uses Adaptive Mode with Internal PLL for Synchronization z 48K/44.1KHz Sampling Rate for both Playback and Recording z Soft Mute Function z Embedded High Performance 16 bit audio DAC with Earphone Phone Buffer z Host side data loss noise reduction function z Embedded 16 bit ADC input with Microphone Boost z Embedded power on Reset Block z Embedded 5V to 3.3V regulator for single External 5V Operation z Compatible with Win98 SE / Win ME / Win 2000 / Win XP and Mac OS9 / OS X without Additional Driver z 48 Pin LQFP Package z Support Hardware SDK tool for third-party software or soft-phone development Date: 08/Sep/2005 Version: -5- 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 3. PIN DESCRIPTIONS 3.1 PIN ASSIGNMENT BY PIN NUMBER Pin # 1 2 3 4 5 6 7 8 9 10 11 12 Signal Name SPDIFO DW DR SK CS MUTER PWRSEL XI XO MODE GPIO2 LEDO Pin # 13 14 15 16 17 18 19 20 21 22 23 24 Signal Name GPIO3 DVSS1 GPIO4 GPIO5 GPIO6 MUTEP BUZZ GPIO7 LEDR GPIO8 TEST AVSS1 Pin # 25 26 27 28 29 30 31 32 33 34 35 36 Signal Name VBIAS VREF MICIN VSEL AVDD1 LOL LOBS LOR AVSS2 AVDD2 DVDD DVSS2 Pin # 37 38 39 40 41 42 43 44 45 46 47 48 Signal Name REGV MSEL VOLUP PDSW USBDP USBDM GPIO1 SCLK MINT SDAT MCLK VOLDN 3.2 PIN-OUT DIAGRAM Date: 08/Sep/2005 Version: -6- 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 3.3 PIN SIGNAL DESCRIPTIONS Pin # Symbol Type Description 1 SPDIFO DO, 8mA, SR 2 DW DIO, 8mA, PD, 5VT 3 DR DO, 4mA, SR USB Controller Data Writes to EEPROM Interface. EEPROM Data Input. 4 SK DO, 4mA, SR EEPROM Interface Clock 5 CS DO, 4mA, SR EEPROM Interface Chip Select 6 MUTER DI, ST, PU 7 PWRSEL DI, ST 8 XI DI Input Pin for 12MHz Oscillator 9 XO DO Output Pin for 12MHz Oscillator 10 MODE DI, ST 11 GPIO2 DIO, 8mA, PD, 5VT 12 LEDO DO, SR, 8mA 13 GPIO3 DIO, 8mA, PD, 5VT 14 DVSS1 P 15 GPIO4 DIO, 8mA, PD, 5VT GPIO Pin 16 GPIO5 DIO, 8mA, PD, 5VT GPIO Pin 17 GPIO6 DIO, 8mA, PD, 5VT GPIO Pin 18 MUTEP DI, ST, PU Mute Playback (Edge Trigger with de-Bouncing) 19 BUZZ DO, 8mA, SR 20 GPIO7 DIO, 8mA, PD, 5VT 21 LEDR DO, SR, 8mA 22 GPIO8 DIO, 8mA, PD, 5VT GPIO Pin 23 TEST DI, ST, PD Test Mode Select Pin; Pull Low for Normal Operation 24 AVSS1 P SPDIF Output USB Controller Data Read From EEPROM Interface. EEPROM Data Output. (100KHz) Mute Recording (Edge Trigger with de-Bouncing) H: Pull Up to 3.3V; L: Pull Down to Ground Speaker Mode HSelf Power with 100mALBus Power with 500mA Headset Mode HBus Power with 100mALBus Power with 500mA H: Pull Up to 3.3V; L: Pull Down to Ground LHeadset Mode: Playback & Recording HSpeaker Mode: Playback Only GPIO Pin LED for Operation; Output H for Power On; Toggling for Data Transmit GPIO Pin Digital Grounding Buzzer Output Pin GPIO Pin LED for Mute Recording Indicator; Output H when Recording is Muted Analog Ground Date: 08/Sep/2005 Version: -7- 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 25 VBIAS AO Microphone Bias Voltage Supply (4.5V) 26 VREF AO Connecting to External Decoupling Capacitor for Embedded Bandgap Circuit; 2.25V Output 27 MICIN AI Microphone Input 28 VSEL AI Line Out Voltage Swing Select H: Pull Up to 5V, L: Pull Down to Ground L: 2.5Vpp OutputH: 3.5Vpp Output 29 AVDD1 P 5V Analog Power for Analog Circuit 30 LOL AO Line Out Left Channel 31 LOBS AO DC 2.25V Output for Line Out Bias 32 LOR AO Line Out Right Channel 33 AVSS2 P Analog Ground 34 AVDD2 P 5V Analog Power for Analog Circuit 35 DVDD P 5V Power Supply to Internal Regulator 36 DVSS2 P Digital Grounding 37 REGV AO 3.3V Reference Output for Internal 5V AE 3.3V Regulator Mixer Enable Select H: Pull Up to 3.3V, L: Pull Down to Ground L: Without Mixer; H: With Mixer (With Default Mute) USB Descriptors are changed accordingly 38 MSEL DI, ST 39 VOLUP DI, ST, PU 40 PDSW DO, 4mA , OD 41 USBDP AIO USB Data D+ 42 USBDM AIO USB Data D- 43 GPIO1 DIO, 8mA, PD, 5VT GPIO Pin 44 SCLK DIO, 8mA, PD, 5VT External MCU Serial Bus Clock Pin 45 MINT DO, 4mA, SR 46 SDAT DIO, 8mA, PD, 5VT 47 MCLK DO, 4mA, SR 48 VOLDN DI, ST, PU Volume Up (Edge Trigger with de-Bouncing) Power Down Switch Control (for PMOS Polarity) 0: Normal Mode, 1: Power Down Mode External MCU Interrupt Pin When Register Address 4 ~ 7 has new data, MINT is set Low; after MCU read MINT is reset to H External MCU Serial Bus Data Pin External MCU Clock Pin, Clock Frequency is Programmable Default is 1.5 MHz (Options Include, 6MHz, 3MHz, 1.5MHz) Volume Down (Edge Trigger with de-Bouncing) Date: 08/Sep/2005 Version: -8- 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone Note: DI - Digital Input Pad, DO - Digital Output Pad, DIO - Digital bi-Directional Pad, AI/AO/AIO - Analog Pad, SR Slew Rate Control, ST - Schmitt Trigger, PD/PU - Pull Down or Pull Up, 5VT - 5 Volt Tolerant (3.3V Pad), OD - Open Drain 4. MCU INTERFACE CM109 provides a serial MCU Interface for external MCU to access internal registers with these registers access. MCU and host side software can have bi-directional communication. This interface can keep flexibility for external module control and integrate, such as LCD panel. 5. BLOCK DIAGRAM VOLUP VOLDN MUTER LEDO MCU MUTEP LEDR I/F GPIO BUZZ SPDIFO PWRSEL MODE PDSW MSEL REGV reset interface logics 5 -> 3.3 regulator power on reset USB control - 3.3V VREF CS SK DW DR USBDP USBDM + LOBS 16 bit DAC USB interface EEPROM interface LOL 0 ~ -45dB 38 steps ISO out processing 16 bit DAC LOR 0 ~ -45dB 38 steps USB TRX SRAM +12 ~ -33 dB 32 steps ISO in processing MICIN 16 bit ADC +22.5 ~ 0 dB 16 steps 48 MHz 12 MHz +20dB boost enable PLL1 clock gen VREF (2.25V) bandgap VREF VBIAS 4.5V Block Diagram Of CM109 Date: 08/Sep/2005 Version: -9- 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 6. ORDERING INFORMATION Model Number Package Operating Ambient Temperature Supply Range CM109 48-Pin LQFP 7mmx7mmx1.4mm (Plastic) 0 o C to +70 o C DVdd = 5V, AVdd = 5V Outline Dimensions Dimensions shown in inches and mm 48-Lead Thin Plastic Quad Flatpack (LQFP) Ordering Information Of CM109 Date: 08/Sep/2005 Version: - 10 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 7. FUNCTION DESCRIPTIONS 7.1 USB Interface CM109 integrates USB transceiver, PLL, and regulator so only a few passive components are necessary for the USB interface connection. Default USB descriptors are embedded in CM109; therefore no additional design effort is needed for a generic USB operation. PID changes with the jumper pin setting so different setting have different PID. For customized product, customer can attach a 93C46 EEPROM to override the embedded VID, PID and provide addition serial number for each set. CM109 automatically detects 93C46 existence and performs the overwrite function during power up. 7.1.1 Device Descriptor Value (Hex) 12 01 0110 00 00 00 40 0d8c 0008 ~ 000F Offset Field Size 0 1 2 4 5 6 7 8 10 bLength bDescriptorType bcdUSB bDeviceClass bDeviceSubClass bDeviceProtocol bMaxPacketSize0 idVendor idProduct 1 1 2 1 1 1 1 2 2 12 bcdDevice 2 0100 14 iManufacturer 1 01 15 iProduct 1 02 16 iSerialNumber 1 03 17 bNumConfigurations 1 01 Description Total 18 Bytes Device Descriptor USB 1.1 compliant. Endpoint zero Size = 64 bytes Vendor ID Product ID Programmable by MSEL and MODE pin Device compliant to the Audio Device Class specification version 1.00 Index of string descriptor describing manufacturer Index of string descriptor describing product Index of string descriptor describing the device's serial number Configurations number = 1 Note: VID, PID, and serial number can be overridden by external EEPROM content Date: 08/Sep/2005 Version: - 11 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 7.1.2 Configuration Descriptor Offset Field Size 0 1 2 bLength bDescriptorType wTotalLength 1 1 2 4 bNumInterfaces 1 5 6 7 8 bConfigurationValue iConfiguration bmAttributes bMaxPower 1 1 1 2 Value Description (Hex) 09 Total 9 Bytes 02 Configuration Descriptor Total length of data returned for this configuration Programmable by MSEL and MODE pin 04 or 03 Number of interfaces supported by this Configuration (Decided by Speaker Mode and Head Set mode): 0: control interface 1: ISO-OUT interface 2: ISO-IN interface (Option) 3: INT-IN(HID) interface 01 00 A0 or E0 Programmable by PWRSEL 32 or FA Maximum power consumption of the USB Programmable by MODE and PWRSEL 7.1.3 Content Format for 93C46 670X where X = bit 4, 3, 2, 1 bit 2 serial num ber enable control 1: enable 0: disable bit 1 product string enable control 1: enable 0: disable 1W = 2B ytes id code 2 bytes V ID 2 bytes address = 0 P ID 2 bytes serial num ber 6 bytes unused Content Format for 93C46 Date: 08/Sep/2005 Version: - 12 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 7.1.4 USB Audio Topology Diagram USB O ut IT Speaker out ID = 0 1 OT ID = 0 6 M ix e r U n it ID = 0 F F e a tu re U n it (v o lu m e ) (m u te ) F e a tu re U n it ID = 0 9 (v o lu m e ) (m u te ) ID = 0 D e n a b le o r d is a b le b y M S E L p in U S B IN OT M ic ro p h o n e In ID = 0 7 IT ID = 0 2 s e le c to r U n it ID = 0 8 F e a tu re U n it (v o lu m e ) (m u te ) ID = 0 A USB Audio Topology Diagram 7.2 Jumper Pins and Mode Setting: Several jumper pins can set the configuration of CM109. These jumper pin settings affect both USB descriptors and USB audio topology. If MODE pin is pulled up to 3.3V (speaker mode), a playback only function is activated and there is no recording function declared to the host. At this setting, MSEL pin is ignored and only one input terminal, one output terminal and one feature unit is declared in USB audio topology. If MODE pin is pulled low (headset mode), a full duplex playback and recording function is reported to the host. MSEL pin setting activates one mixer unit and one feature unit. The following USB audio topology in Chapter: 7.1.4 is an example of headset mode. PWRSEL pin affects the power configuration of CM109; together with MODE pin totally 4 combinations are programmable. Date: 08/Sep/2005 Version: - 13 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone MODE Combinations 3.3V GND 3.3V Speaker Mode : Playback Only (Self Power with 100mA) Headset Mode : Playback + Recording (Bus Power with 100mA) GND Speaker Mode : Playback Only (Bus Power with 500mA) Headset Mode : Playback + Recording (Bus Power with 500mA) PWRSEL VSEL jumper pin sets the output voltage swing. When VSEL is connected to 5V, output voltage swing is 3.5Vpp; when VSEL is connected to ground, output voltage is 2.5Vpp. 7.3 HID Feature and Descriptions HID feature is provided by CM109 so user setting to volume up, volume down, and playback mute button pin is reported to the host to synchronize host side setting. In addition, all CM109 internal registers can be accessed via HID function call. USB protocols can configure devices at startup or when they are plugged in at run time. These devices are broken into various device classes. Each device class defines the common behavior and protocols for devices that serve similar functions. The HID (Human Interface Device) class is one of the device classes. The HID class consists primarily of devices that are used by humans to control the operation of computer systems. Typical examples of HID class devices include: - Keyboards and pointing devices, for example: mouse, trackballs, and joysticks. - Front-panel controls, for example: knobs, switches, buttons, and sliders. - Controls that might be found on devices such as VCR remote controls, games or simulation devices, for example: data gloves, throttles, and steering wheels. - Devices that may not require human interaction but provide data in a similar format to HID class devices, for example: bar-code readers, thermometers, or voltmeters. Date: 08/Sep/2005 Version: - 14 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 7.3.1 HID Descriptor HID Interface Descriptor Offset Field Size 0 bLength 1 1 bDescriptorType 1 2 bInterfaceNumber 1 3 bAlternateSetting 1 Value (Hex) 09 04 03 00 4 bNumEndpoints 1 01 5 6 7 bInterfaceClass bInterfaceSubClass bInterfaceProtocol 1 1 1 03 00 00 8 iInterface 1 00 HID Descriptor Offset Field 0 bLength 1 bDescriptorType 2 bcdHID 4 bCountryCode 5 bNumDescriptors 6 bDescriptorType 7 wDescriptorLength Size 1 1 2 1 1 1 Value (Hex) 09 21 0100 00 01 22 2 0030 Description Size of this descriptor: 9 byte INTERFACE descriptor type Number of Interface: 3 alternate 0 Number of endpoints used by this Interface: 1 HID Interface Class No Subclass Must be set to 0 Index of a string descriptor that describes this interface. Description Total 9 Bytes HID Descriptor Type HID class version 1.00 Report Descriptor Numeric expression that is the total size of the optional descriptor: 48 Bytes Interrupt IN Endpoint Descriptor Offset Field Size Value (Hex) Description 0 bLength 1 07 Total 7 Bytes 1 bDescriptorType 1 05 ENDPOINT Descriptor Type IN Endpoint 2 bEndpointAddress 1 83 Endpoint number = 3 3 bmAttributes 1 03 Interrupt endpoint type 4 wMaxPacketSize 2 0004 Maximum packet size: 4 bytes 6 bInterval 1 20 32ms Date: 08/Sep/2005 Version: - 15 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 7.3.2 Windows Software Architecture for HID Applications C-Media SDK Winmm.dll User32.exe or User.exe Direct Input HID.dll Reports (device specification) Audio Driver Keyboard Class Driver Joy Stick Class Driver Mouse Class Driver HID Class Driver(HIDCLASS.SYS) Gameport MiniDriver(HIDGAME.SYS) USB Gameport USB HUB Driver(USBHUB.SYS) USB Class Driver(USBD.SYS) PCI Enumerator Note: Please contact with our sales for the C-Media SDK example if needed. 7.4 Internal Registers All internal registers of CM109 can be accessed via generic HID functional calls without the need to develop kernel mode driver. Totally 4 bytes of data can be read or write from HID. Input report is for read and output report is for write. Internal registers of CM109 are used to control GPIO, S/PDIF output, EEPROM and MCU data access. Host side HID or external MCU can access CM109 internal registers. With both sides accessed to the same set of registers, two-way communication can be achieved. 7.4.1 Access via HID Class Command: HID_IR0 to HID_IR3 are HID input report and is use by host side receiving data to CM109. HID_OR0 to HID_OR3 are HID output report and is used by host side sending adta to CM109 HID interrupt will occur when HID_IR0-3 are updated by button status MCU (and GPI in case HID_IR0[7:6] == 2'b00). Date: 08/Sep/2005 Version: - 16 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone HID_IR0 (HID input report byte 0) Offset : 0x00 Bits 7-6 5-4 3 2 1 0 Read/Write Description R When HID_OR0[7] == 1'b0: HID_IR0-3 are programmed by MCU (and GPI) 0: HID_IR1 is used as GPI 1: HID_IR0-3 are used as generic HID registers 2: Values written to HID_IR0-3 are also mapped to MCU_CTRL, EEPROM_DATA0-1, EEPROM_CTRL 3: Reserved R When HID_OR0[7] == 1'b0: Generic registers programmed by MCU When HID_OR0[7] == 1'b1: Mapped from MCU_CTRL[5:4] R 0: No activity on Record-Mute button 1: Record-Mute button pressed then released R 0: No activity on Playback-Mute button 1: Playback-Mute button pressed then released R 0: Volume-Down button released 1: Volume-Down button pressed R 0: Volume-Up button released 1: Volume-Up button pressed Default 0x0 0x0 0x0 0x0 0x0 0x0 HID_IR1 (HID input report byte 1) Offset : 0x01 Bits 7-0 Read/Write Description Default R When HID_OR0[7] == 1'b0: 0x00 GPI (when HID_IR0[7:6] == 2'b00); or Generic registers programmed by MCU (otherwise) When HID_OR0[7] == 1'b1: Mapped from EEPROM_DATA0 HID_IR2 (HID input report byte 2) Offset : 0x02 Bits 7-0 Read/Write Description R When HID_OR0[7] == 1'b0: Generic registers programmed by MCU When HID_OR0[7] == 1'b1: Mapped from EEPROM_DATA1 Date: 08/Sep/2005 Default 0x00 Version: - 17 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone HID_IR3 (HID input report byte 3) Offset : 0x03 Bits 7-0 Read/Write Description R When HID_OR0[7] == 1'b0: Generic registers programmed by MCU When HID_OR0[7] == 1'b1: Mapped from EEPROM_CTRL Default 0x00 HID_OR0 (HID output report byte 0) Offset : 0x04 Bits 7-6 5 4 3-0 Read/Write Description R/W 0: HID_OR1-2 are used for GPO; HID_OR0, 3 are used for buzzer and SPDIF 1: HID_OR0-3 are used as generic HID registers 2: Values written to HID_OR0-3 are also mapped to MCU_CTRL, EEPROM_DATA0-1, EEPROM_CTRL (see Note) 3: Reserved R/W When HID_OR0[7] == 1'b0: 0: Buzzer off 1: Buzzer on When HID_OR0[7] == 1'b1: Mapped to MCU_CTRL[5] R/W When HID_OR0[7] == 1'b0: Valid bit in SPDIF frame When HID_OR0[7] == 1'b1: Mapped to MCU_CTRL[4] R/W When HID_OR0[7] == 1'b0: First nibble of SPDIF status channel When HID_OR0[7] == 1'b1: Reserved Default 0x0 0x0 0x0 0x0 Note : When EEPROM access is done, HID interrupt will occur. USB host can get the result from interrupt pipe (endpoint 3). Date: 08/Sep/2005 Version: - 18 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone HID_OR1 (HID output report byte 1) Offset : 0x05 Bits 7-0 Read/Write Description R/W When HID_OR0[7:6] == 2'b00: 0: GPO drives L 1: GPO drives H When HID_OR0[7:6] == 2'b01: Generic HID registers When HID_OR0[7:6] == 2'b1x: Mapped to EEPROM__DATA0 Default 0x00 HID_OR2 (HID output report byte 2) Offset : 0x06 Bits 7-0 Read/Write Description R/W When HID_OR0[7:6] == 2'b00: 0: Set GPIO to input mode 1: Set GPIO to output mode When HID_OR0[7:6] == 2'b01: Generic HID registers When HID_OR0[7:6] == 2'b1x: Mapped to EEPROM_DATA1 Default 0x00 HID_OR3 (HID output report byte 3) Offset : 0x07 Bits 7-0 Read/Write Description R/W When HID_OR0[7] == 1'b0: Category byte of SPDIF status channel When HID_OR0[7] == 1'b1: Mapped to EEPROM_CTRL Default 0x00 Note: HID_OR3 is used for SPDIF when SPDIF_CONFIG[5] == 1'b0 7.4.2 Access via External Serial Interface by MCU: External MCU can write data to HID_IR0 to HID_IR3 and read data from HID_OR0 to HID_OR3. MINT will be active when HID_OR0-3 are updated by Set_Output_Report HID class command, and will be cleared after HID_OR0-3 are read by MCU. Date: 08/Sep/2005 Version: - 19 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone HID_IR0 (HID input report byte 0) Offset : 0x00 Bits 7-6 5 4 3 2 1 0 Read/Write Description R/W 0: HID_IR0-3 are not used by MCU 1: HID_IR0-3 are used as generic HID registers 2: Values written to HID_IR0-3 are also mapped to MCU_CTRL, EEPROM_DATA0-1, EEPROM_CTRL (see Note) 3: Reserved R/W When HID_IR0[7] == 1'b0: 0: Buzzer off 1: Buzzer on When HID_IR0[7] == 1'b1: Mapped to MCU_CTRL[5] R/W When HID_IR0[7] == 1'b0: Generic HID register When HID_IR0[7] == 1'b1: Mapped to MCU_CTRL[4] R 0: No activity on Record-Mute button 1: Record-Mute button pressed then released R 0: No activity on Playback-Mute button 1: Playback-Mute button pressed then released R 0: Volume-Down button released 1: Volume-Down button pressed R 0: Volume-Up button released 1: Volume-Up button pressed Default 0x0 0x0 0x0 0x0 0x0 0x0 0x0 Note: When EEPROM access is done, MINT will be active. MCU should read HID_OR0-3 to get the result, and then MINT will be cleared. HID_IR1 (HID input report byte 1) Offset : 0x01 Bits 7-0 Read/Write Description R/W When HID_IR0[7] == 1'b0: Generic HID registers When HID_IR0[7] == 1'b1: Mapped to EEPROM_DATA0 Date: 08/Sep/2005 Default 0x00 Version: - 20 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone HID_IR2 (HID input report byte 2) Offset : 0x02 Bits 7-0 Read/Write Description R/W When HID_IR0[7] == 1'b0: Generic HID registers When HID_IR0[7] == 1'b1: Mapped to EEPROM_DATA1 Default 0x00 HID_IR3 (HID input report byte 3) Offset : 0x03 Bits 7-0 Read/Write Description R/W When HID_IR0[7] == 1'b0: Generic HID registers When HID_IR0[7] == 1'b1: Mapped to EEPROM_CTRL Default 0x00 HID_OR0 (HID output report byte 0) Offset : 0x04 Bits 7-6 5-4 3-0 Read/Write Description R When HID_IR0[7] == 1'b0: HID_OR0-3 are programmed by USB host 0: HID_OR1-2 are used for GPO 1: HID_OR0-3 are used as generic HID registers 2: Values written to HID_OR0-3 are also mapped to MCU_CTRL, EEPROM_DATA0-1, EEPROM_CTRL 3: Reserved When HID_IR0[7] == 1'b1: Always 2'b11 R When HID_IR0[7] == 1'b0: Generic registers programmed by USB host When HID_IR0[7] == 1'b1: Mapped from MCU_CTRL[5:4] R When HID_IR0[7] == 1'b0: Generic registers programmed by USB host When HID_IR0[7] == 1'b1: Always 4'h0 Date: 08/Sep/2005 Default 0x0 0x0 0x0 Version: - 21 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone HID_OR1 (HID output report byte 1) Offset : 0x05 Bits 7-0 Read/Write Description R When HID_IR0[7] == 1'b0: Generic registers programmed by USB host When HID_IR0[7] == 1'b1: Mapped from EEPROM_DATA0 Default 0x00 HID_OR2 (HID output report byte 2) Offset : 0x06 Bits 7-0 Read/Write Description R When HID_IR0[7] == 1'b0: Generic registers programmed by USB host When HID_IR0[7] == 1'b1: Mapped from EEPROM_DATA1 Default HID_OR3 (HID output report byte 3) Offset : 0x07 Bits 7-0 7.4.3 Read/Write Description R When HID_IR0[7] == 1'b0: Generic registers programmed by USB host When HID_IR0[7] == 1'b1: Mapped from EEPROM_CTRL Default 0x00 Indirect Accessed Registers: MCU_CTRL (MCU control) Offset : 0x08 Bits 7-6 5-4 3-0 Read/Write Description -Reserved R/W 0: MCLK operating at 1.5MHz 1: MCLK operating at 3MHz 2: MCLK operating at 6MHz 3: Reserved -Reserved Date: 08/Sep/2005 Default 0x0 0x0 0x0 Version: - 22 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone EEPROM_DATA0 (Low byte of EEPROM data) Offset : 0x09 Bits 7-0 Read/Write Description R/W Low byte of EEPROM data to be accessed Default 0x00 EEPROM_DATA1 (High byte of EEPROM data) Offset : 0x0a Bits 7-0 Read/Write Description R/W High byte of EEPROM data to be accessed Default 0x00 EEPROM_CTRL (Serial EEPROM access control) Offset : 0x0b Bits 7 6 5-0 Read/Write Description R/W When Register Read: 0: No EEPROM access pending 1: Last EEPROM access pending When Register Write: 0: No action 1: Start EEPROM access (will clear to 0 automatically) R/W 0: Read EEPROM 1: Write EEPROM R/W Address of serial EEPROM Default 0x0 0x0 0x00 7.5 MCU Interface On MCU serial interface, CM109 serves as a slave device with bit rate up to 400Kbps (fast mode). MCU can read/write 3 bytes to CM109 device with a 2-bit register address. Since host side and MCU can both access to all the internal registers, access contention when both host and MCU try to access the same register should be avoided on application. The 7-bit slave address of CM109 is assigned as 7'b0111000. When a one-byte data is written by MCU, CM109 will transfer totally 4 bytes to the USB host via an additional interrupt pipe. The sequence of the upward HID report is the button status first (address 00), then register with address 01, then register with address 02, then register with address 03. The USB host will keep polling the upward HID Date: 08/Sep/2005 Version: - 23 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone report every 32mS. When there is any button pressed or released, or MCU data coming, CM109 will transfer the 4 bytes of HID report to the USB host again. CM109 can also transfer one byte MCU data from the USB host to its register. This is accomplished by a `Set Output Report' HID class request via default control pipe. MCU can get this downward byte by interrupt or polling. CM109 has one input pin `SCLK' where it gets serial clock from MCU, and one open-drain output pin `SDAT' where it sends or receives serial signal to/from MCU. As shown below, `SDAT' should be stable when `SCLK' is high, and can have transition only when `SCLK' is low. START and STOP conditions shown below are the exception. Every transaction begins from a START, and ends with a STOP, or another START (repeated START). Date: 08/Sep/2005 Version: - 24 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone The figure below demonstrates a typical transaction. After every 8 bits sent by the transmitter, the receiver should send one bit low for positive acknowledgement or one bit high for negative acknowledgement. After the negative acknowledgement, a STOP or repeated START should follow. The next figure shows more detailed about acknowledgement bit. Note that `SCLK' is always driven by the master. P SDAT Acknowledgement Signal from Receiver MSB Acknowledgment Signal from Receiver SCLK S or Sr 1 2 7 8 1 9 2 ACK 3-8 9 ACK START or Repeated START Condition Sr Sr or P STOP or Repeated START Condition Data Transfer on the MCU Interface The figure below shows a complete data transfer. After a START, MCU should send 7-bit slave address (7'b0111000) first, and then the 8th bit denotes a read transfer when it's high; or a write transfer when it's low. The first acknowledgement is always from CM109. Date: 08/Sep/2005 Version: - 25 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone In the write transfer, MCU keep acting as the master and the transfer direction is not changed. The following figure gives an example of one byte write transfer. CM109 regards the first DATA byte as the register address. The second DATA byte is the content that MCU writes at the register address. If there is the third DATA byte, CM109 will auto-increment this byte to the next register address. The figure below shows an example of two bytes read transfer. Because CM109 has auto-increment function, the second DATA byte will be the register data on the next address. Please note that the USB host tries to get new HID data every 32mS. It's quite slow. If the continuous write transfers are too close in time, the former transfer may have no effect. Date: 08/Sep/2005 Version: - 26 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone The figure below shows typical transactions between MCU and CM109. After a START, MCU should send 7-bit slave address (0111000) first, and then the 8th bit denotes a read transfer when it's high; or a write transfer when it's low. MCU write: S 0x70 0 0x00 MCU read: S 0x70 S 0x71 0 0 0x04 0 Byte 0 0 0 Byte 0 0 Byte 1 0 Byte 1 0 Byte 2 0 From CM109 to MCU Byte 2 0 Byte 3 1 Byte 3 P P From MCU to CM109 S START condition P STOP condition 0 Positive acknowledge 1 Negative acknowledge Byte n 0 One byte data (address n) In a write transfer, MCU keeps acting as the transmitter. CM109 regards the first DATA byte as start register address (it's better to be 0x00). The following four DATA bytes are the content that MCU writes to the register addresses. In a read transfer, two transactions are necessary. MCU resets start register address by the first transaction. Then MCU changes to be the receiver during the second transaction to get four bytes of data. Note 1: Bits 0~3 of the first HID byte always reflect button activity, so they can not be written by MCU. Date: 08/Sep/2005 Version: - 27 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 7.6 Buzzer Output Each time the software set "1" to the register HID-OR0 bit 5, an embedded ringing sequence is played once. Since the delay between one sequence and next sequence is long (around 1 second ~ 2 second), this delay to be set by software, H/W only play one sequence and then stop for one register write. ringing phase content 0.025 sec 0.025 sec 0.025 sec 0.025 sec 0.025 sec 0.025 sec 0.025 sec 5KHz 300Hz 5KHz 300Hz 5KHz 300Hz 5KHz 0.2 sec 0.1 sec 0.2 sec 0.4 sec 0.2 sec 0.1 sec 0.2 sec ringing silent ringing silent ringing silent ringing Date: 08/Sep/2005 0.025 sec 300Hz silent & wait next trigger Version: - 28 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 8. ELECTRICAL CHARACTERISTICS 8.1 Absolute Maximum Rating Symbol Parameter Value Unit Dvmin Min Digital Supply Voltage - 0.3 V Dvmax Max Digital Supply Voltage +6 V Avmin Min Analog Supply Voltage - 0.3 V Avmax Max Analog Supply Voltage +6 V Dvinout Voltage on any Digital Input or Output Pin -0.3 to +5.5 V Avinout Voltage on any Analog Input or Output Pin -0.3 to +5.5 V Tstg Storage Temperature Range -40 to +125 ESD (HBM) ESD Human Body Mode 3500 V ESD (MM) ESD Machine Mode 200 V 0 C 8.2 Operation Conditions Operation conditions Min Typ Max Unit Analog Supply Voltage 4.5 5.0 5.5 V Digital Supply Voltage 4.5 5.0 5.5 V Total Power Consumption - - TBD Suspend Mode Power Consumption - 320 - Operating ambient temperature 0 - 70 Date: 08/Sep/2005 uA 0 C Version: - 29 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 8.3 Electrical Parameters Min Typ DAC (10K Ohm Loading) Resolution 16 THD + N (-3dBr) -74.29 SNR 93.6 Silent SNR 98.2 Dynamic range 93.8 Frequency response 48KHz 20 Frequency Response 44.1KHz 20 Output Boltage (rms) 1.25 Output Voltage Swing 0.5 DAC (32 Ohm Loading) Resolution 16 THD + N (-3dBr) -71.1 SNR 93.7 Silent SNR 98.2 Dynamic Range 93.8 Frequency Response 48KHz 20 Frequency Response 44.1KHz 20 Output Voltage (rms) 1.25 Output Voltage Swing 0.5 ADC Resolution 16 THD + N (-3dBr) -76.1 SNR 83.1 Dynamic Range 81.6 Frequency Response 48KHz 20 Frequency Response 44.1KHz 20 Input Range 0 Amplification Volume Control Level -45 Volume Control Step 38 Microphone Input Boost Gain +20 Gain Adjustment Range 0 Gain Adjustment Steps 16 Mixer Gain Adjustment -33.0 Mixer Gain Adjustment Steps 32 Date: 08/Sep/2005 Max Unit 20K 20K 4.0 Bits dB dB dB dB Hz Hz Vrms V 20K 20K 4.0 Bits dB dB dB dB Hz Vrms V 19.2 17.6 2.88 bit dB dB dB Hz Hz Vpp 0 - dB Steps 22.5 12.0 - dB dB Steps dB Steps Version: - 30 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 9. FREQUENCY RESPONSE GRAPHS 9.1 Digital Playback for Line Output Frequency (10K Ohm Loading) 9.1.1 Frequency Response 48Ks/Sec (10K Ohm Loading) C -m e d ia D ig ital P layb ac k (P C -D -A ) f o r L ine O utp ut F re q ue nc y R e s p o ns e 0 7 /1 5 /0 3 1 9 :0 3 :1 4 +1 +0 d B r -1 -2 -3 A -4 -5 -6 30 50 100 200 500 1k 2k 5k 10k Hz C o lo r L in e S tyle Th ic k D a ta Axis G re e n Ye llo w S o lid S o lid 2 2 Fa s tte s t.C h .1 Am p l!N o rm a lize Fa s tte s t.C h .2 Am p l!N o rm a lize L e ft L e ft W L -Mu ltito n e -4 8 k .a t2 9.1.2 Frequency Response 44.1Ks/Sec (10K Ohm Loading) C -m e d ia D ig ital P layb ac k (P C -D -A ) fo r L ine O utp ut F re q ue nc y R e s p o ns e 0 7 /1 5 /0 3 1 9 :0 5 :4 0 +1 +0 d B r -1 -2 -3 A -4 -5 -6 20 50 100 200 500 1k 2k 5k 10k Hz C o lo r L in e S tyle Th ick D a ta Axis G re e n Ye llo w S o lid S o lid 2 2 Fa s tte s t.C h .1 Am p l!N o rm a lize Fa s tte s t.C h .2 Am p l!N o rm a lize L e ft L e ft W L -Mu ltito n e -4 4 k .a t2 Date: 08/Sep/2005 Version: - 31 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 9.2 Digital Playback for Line Output Frequency (32 Ohm Loading) 9.2.1 Frequency Response 48Ks/Sec (32 Ohm Loading) C -m e d ia D ig ital R e c o rd ing (A -D -P C ) fo r L ine Inp ut F re q ue nc y R e s p o ns e +1 +0 d B r -1 -2 -3 1 -4 -5 -6 20 50 100 200 500 1k 2k 5k 10k Hz C o lo r L in e S tyle Th ick D a ta Axis C ya n Ye llo w S o lid S o lid 2 2 Fa s tte s t.C h .1 Am p l!N o rm a lize Fa s tte s t.C h .2 Am p l!N o rm a lize L e ft L e ft L W -MFre q R e s p -4 8 K .a t2 9.2.2 Frequency Response 44.1Ks/Sec (32 Ohm Loading) C -m e d ia D ig ital R e c o rd ing (A -D -P C ) fo r L ine Inp ut F re q ue nc y R e s p o ns e +1 +0 -1 d B -2 -3 -4 -5 -6 20 50 100 200 500 1k 2k 5k 10k Hz C o lo r L in e S tyle Th ick D a ta Axis G re e n Ye llo w S o lid S o lid 2 2 Fa s tte s t.C h .1 Am p l!N o rm a lize Fa s tte s t.C h .2 Am p l!N o rm a lize L e ft L e ft L W -MFre q R e s p -4 4 K .a t2 Date: 08/Sep/2005 Version: - 32 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 9.3 Digital Recording for Line Output Frequency 9.3.1 Frequency Response 48Ks/Sec C -ME D IA D igital P layb ack (P C -D -A ) fo r Line O utp ut F reque ncy R e sp onse 0 7 /2 1 /0 3 1 4 :2 7 :2 9 +1 +0 d B r -1 -2 -3 A -4 -5 -6 30 50 100 200 500 1k 2k 5k 10k Hz Sw e e p Tra ce C o lo r L in e Style Th ick D a ta Axis 1 1 1 2 C ya n Ye llo w So lid So lid 2 2 Fa s tte s t.C h .1 Am p l!N o rm a lize Fa s tte s t.C h .2 Am p l!N o rm a lize L e ft L e ft C om m ent WL -Mu ltito n e -4 8 k.a t2 c 9.3.2 Frequency Response 44.1Ks/Sec C -ME D IA D ig ital P layb ac k (P C -D -A ) fo r L ine O utp ut F re q ue nc y R e sponse 0 7 /2 1/0 3 1 5 :1 6:5 5 +1 +0 d B r -1 -2 -3 A -4 -5 -6 20 50 100 200 500 1k 2k 5k 10k Hz Sw e e p Tra ce C o lo r L in e Style Th ick D a ta Axis 1 1 1 2 C ya n Ye llo w So lid So lid 2 2 Fa s tte s t.C h.1 Am p l!N o rm a lize Fa s tte s t.C h.2 Am p l!N o rm a lize L e ft L e ft Com m ent WL -Mu ltito n e -4 4 k.a t2 c Date: 08/Sep/2005 Version: - 33 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone 10. APPLICATION CIRCUIT REFERENCE Date: 08/Sep/2005 Version: - 34 - 1.3a CM109 High Integration / Low Cost USB Audio Controller for PC Internet Phone REFERENCE USB-IF, USB Specification, Revision 1.1 and 2.0, and USB Audio Device Class Specification, Revision 1.0,. End of Specifications C-MEDIA ELECTRONICS INC. 6F., 100, Sec. 4, Civil Boulevard, Taipei, Taiwan 106 R.O.C. TEL:886-2-8773-1100 FAX:886-2-8773-2211 E-mailsales@cmedia.com.tw URLhttp://www.cmedia.com.tw Date: 08/Sep/2005 Version: - 35 - 1.3a