C371346_375F2440A66FD1C882296D07948AE54C.pdf - 第20页

CM 108AH Highly Integrated USB Audio I/O Controller www .cmedia.com.tw Copyright© C-Media Electro nics Inc. R ev . 2.1 ︱ P age 20/27 HID_IR3 (HID input report byte 3) Offset: 0x03 Bits Read/Write Description Default 7-0 …

100%1 / 27
CM108AH
Highly Integrated USB Audio I/O Controller
www.cmedia.com.tw
Copyright© C-Media Electronics Inc. Rev. 2.1 Page 19/27
7.4 Internal Registers
All of CM108AH’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 are used to control GPIO pin, S/PDIF
output and EEPROM data access.
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
1: volume-down button pressed
0x0
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
CM108AH
Highly Integrated USB Audio I/O Controller
www.cmedia.com.tw
Copyright© C-Media Electronics Inc. Rev. 2.1 Page 20/27
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
CM108AH
Highly Integrated USB Audio I/O Controller
www.cmedia.com.tw
Copyright© C-Media Electronics Inc. Rev. 2.1 Page 21/27
HID_OR2 (HID output report byte 2)
Offset: 0x06
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