C371347_139780418F8DFE40697A24CD62AD2CE5.pdf - 第18页
CM108B USB Audio Single C hip Datasheet Revision: 1.11 www .cmedia.com.tw P age 18 / 24 Copyright© C -Media Electr onics Inc. 1: volume-down button pres sed 0 R 0: volume-up butto n released 1: volume-up butto n press ed…

CM108B
USB Audio Single Chip
Datasheet Revision: 1.11 www.cmedia.com.tw
Page 17 / 24 Copyright© C-Media Electronics Inc.
7.4 Internal Registers
All of CM108B’s internal registers can be accessed via generic HID functional calls without the need to develop a
kernel mode driver. In total, 4 bytes of data can be read or written from the HID. The input report is for read and the
output report is for write. These internal registers of CM108B are used to control GPIO pins, S/PDIF output and
EEPROM data access.
Access via HID Class Command
HID interrupt will occur when HID_IR0-3 are updated by button status, or GPI in case HID_IR0[7:6] == 2’b00).
HID Get_Input_Report Format
Command Format:
bmRequestType
bRequest
wValue
wIndex
wLength
Data
8’h A1
8’h 01
(Get_Report)
16’h 01 00
(Rpt Type + Rpt ID)
16’h 00 02
16’h 00 03
(Interface)
16’h 00 04
(4 bytes)
Report
Input Data Format:
byte 0
HID IR0[7:0]
byte1
HID IR1[7:0]
byte2
HID IR2[7:0]
byte3
HID IR3[7:0]
HID Set_Output_Report Format
Command Format:
bmRequestType
bRequest
wValue
wIndex
wLength
Data
8’h 21
8’h 09
(Set_Report)
16’h 02 00
(Rpt Type + Rpt ID)
16’h 00 02
16’h 00 03
(Interface)
16’h 00 04
(4 bytes)
Report
Output Data Format:
byte 0
HID OR0[7:0]
byte1
HID OR1[7:0]
byte2
HID OR2[7:0]
byte3
HID OR3[7:0]
HID_IR0 (HID input report byte 0)
Offset: 0x00
Bits
Read/Write
Description
Default
7-6
R
00: HID_IR1 is used as GPI,
10: values written to HID_IR0-3 are also mapped to
EPROM_DATA0-1 and EEPROM_CTRL
Others: reserved
0x0
5-4
R
Reserved
0x0
3
R
0: no activity on record/mute button
1: record/mute button pressed then released
0x0
2
R
0: no activity on playback/mute button
1: playback/mute button pressed then released
0x0
1
R
0: volume-down button released
0x0

CM108B
USB Audio Single Chip
Datasheet Revision: 1.11 www.cmedia.com.tw
Page 18 / 24 Copyright© C-Media Electronics Inc.
1: volume-down button pressed
0
R
0: volume-up button released
1: volume-up button pressed
0x0
HID_IR1 (HID input report byte 1)
Offset: 0x01
Bits
Read/Write
Description
Default
7-0
R
When HID_IR0[7:6] == 2’b00: HID_IR1[3:0] is the input from
GPIO4 ~ GPIO1 in input mode
When HID_OR0[7] == 1’b1: mapped from EEPROM_DATA0
0x00
HID_IR2 (HID input report byte 2)
Offset: 0x02
Bits
Read/Write
Description
Default
7-0
R
When HID_OR0[7] == 1’b1: mapped from EEPROM_DATA1
0x00
HID_IR3 (HID input report byte 3)
Offset: 0x03
Bits
Read/Write
Description
Default
7-0
R
When HID_OR0[7] == 1’b1: mapped from EEPROM_CTRL
0x00
HID_OR0 (HID output report byte 0)
Offset: 0x04
Bits
Read/Write
Description
Default
7-6
R / W
0: HID_OR1-2 are used for GPO; HID_OR0, 3 are used for SPDIF
1: reserved
2: values written to HID_OR0-3 are also mapped to
EEPROM_DATA0-1, EEPROM_CTRL (See Note)
3: reserved
0x0
5
R / W
Reserved
0x0
4
R / W
When HID_OR0[7] == 1’b0: valid bit in SPDIF frame
When HID_OR0[7] == 1’b1: reserved
0x0
3-0
R / W
When HID_OR0[7] == 1’b0: first nibble of SPDIF status channel
When HID_OR0[7] == 1’b1: reserved
0x0
Note 1: When EEPROM access is done, HID interrupt will occur. USB host can get the result from interrupt pipe
(endpoint 3).
Note 2: HID_OR0 is used for SPDIF when SPDIF_CONFIG[5] == 1’b0
HID_OR1 (HID output report byte 1)
Offset: 0x05
Bits
Read/Write
Description
Default
7-0
R / W
When HID_OR0[7:6] == 2’b00: HID_OR1[3:0] is the output to
GPIO4 ~ GPIO1 in output mode
0: GPO drives L
1: GPO drives H
When HID_OR0[7:6] == 2’b01: reserved
When HID_OR0[7:6] == 2’b1x: mapped to EEPROM__DATA0
0x00
HID_OR2 (HID output report byte 2)
Offset: 0x06

CM108B
USB Audio Single Chip
Datasheet Revision: 1.11 www.cmedia.com.tw
Page 19 / 24 Copyright© C-Media Electronics Inc.
Bits
Read/Write
Description
Default
7-0
R / W
When HID_OR0[7:6] == 2’b00: HID_OR2[3:0] is the mode setting
for GPIO4 ~ GPIO1
0: set GPIO to input mode
1: set GPIO to output mode
When HID_OR0[7:6] == 2’b01: reserved
When HID_OR0[7:6] == 2’b1x: mapped to EEPROM_DATA1
0x00
HID_OR3 (HID output report byte 3)
Offset: 0x07
Bits
Read/Write
Description
Default
7-0
R / W
When HID_OR0[7] == 1’b0: category byte of SPDIF status
channel
When HID_OR0[7] == 1’b1: mapped to EEPROM_CTRL
0x00
Note: HID_OR3 is used for SPDIF when SPDIF_CONFIG[5] == 1’b0