Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ALSA] ice1712 - Reorganize existing eeprom data

Reorganize EEPROM data (in C99 style).
Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
189bc171 bcb4d788

+133 -162
+41 -71
sound/pci/ice1712/aureon.c
··· 2110 2110 */ 2111 2111 2112 2112 static unsigned char aureon51_eeprom[] __devinitdata = { 2113 - 0x0a, /* SYSCONF: clock 512, spdif-in/ADC, 3DACs */ 2114 - 0x80, /* ACLINK: I2S */ 2115 - 0xfc, /* I2S: vol, 96k, 24bit, 192k */ 2116 - 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 2117 - 0xff, /* GPIO_DIR */ 2118 - 0xff, /* GPIO_DIR1 */ 2119 - 0x5f, /* GPIO_DIR2 */ 2120 - 0x00, /* GPIO_MASK */ 2121 - 0x00, /* GPIO_MASK1 */ 2122 - 0x00, /* GPIO_MASK2 */ 2123 - 0x00, /* GPIO_STATE */ 2124 - 0x00, /* GPIO_STATE1 */ 2125 - 0x00, /* GPIO_STATE2 */ 2113 + [ICE_EEP2_SYSCONF] = 0x0a, /* clock 512, spdif-in/ADC, 3DACs */ 2114 + [ICE_EEP2_ACLINK] = 0x80, /* I2S */ 2115 + [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ 2116 + [ICE_EEP2_SPDIF] = 0xc3, /* out-en, out-int, spdif-in */ 2117 + [ICE_EEP2_GPIO_DIR] = 0xff, 2118 + [ICE_EEP2_GPIO_DIR1] = 0xff, 2119 + [ICE_EEP2_GPIO_DIR2] = 0x5f, 2120 + [ICE_EEP2_GPIO_MASK] = 0x00, 2121 + [ICE_EEP2_GPIO_MASK1] = 0x00, 2122 + [ICE_EEP2_GPIO_MASK2] = 0x00, 2123 + [ICE_EEP2_GPIO_STATE] = 0x00, 2124 + [ICE_EEP2_GPIO_STATE1] = 0x00, 2125 + [ICE_EEP2_GPIO_STATE2] = 0x00, 2126 2126 }; 2127 2127 2128 2128 static unsigned char aureon71_eeprom[] __devinitdata = { 2129 - 0x0b, /* SYSCONF: clock 512, spdif-in/ADC, 4DACs */ 2130 - 0x80, /* ACLINK: I2S */ 2131 - 0xfc, /* I2S: vol, 96k, 24bit, 192k */ 2132 - 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 2133 - 0xff, /* GPIO_DIR */ 2134 - 0xff, /* GPIO_DIR1 */ 2135 - 0x5f, /* GPIO_DIR2 */ 2136 - 0x00, /* GPIO_MASK */ 2137 - 0x00, /* GPIO_MASK1 */ 2138 - 0x00, /* GPIO_MASK2 */ 2139 - 0x00, /* GPIO_STATE */ 2140 - 0x00, /* GPIO_STATE1 */ 2141 - 0x00, /* GPIO_STATE2 */ 2129 + [ICE_EEP2_SYSCONF] = 0x0b, /* clock 512, spdif-in/ADC, 4DACs */ 2130 + [ICE_EEP2_ACLINK] = 0x80, /* I2S */ 2131 + [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ 2132 + [ICE_EEP2_SPDIF] = 0xc3, /* out-en, out-int, spdif-in */ 2133 + [ICE_EEP2_GPIO_DIR] = 0xff, 2134 + [ICE_EEP2_GPIO_DIR1] = 0xff, 2135 + [ICE_EEP2_GPIO_DIR2] = 0x5f, 2136 + [ICE_EEP2_GPIO_MASK] = 0x00, 2137 + [ICE_EEP2_GPIO_MASK1] = 0x00, 2138 + [ICE_EEP2_GPIO_MASK2] = 0x00, 2139 + [ICE_EEP2_GPIO_STATE] = 0x00, 2140 + [ICE_EEP2_GPIO_STATE1] = 0x00, 2141 + [ICE_EEP2_GPIO_STATE2] = 0x00, 2142 2142 }; 2143 - 2144 - static unsigned char prodigy71_eeprom[] __devinitdata = { 2145 - 0x0b, /* SYSCONF: clock 512, spdif-in/ADC, 4DACs */ 2146 - 0x80, /* ACLINK: I2S */ 2147 - 0xfc, /* I2S: vol, 96k, 24bit, 192k */ 2148 - 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 2149 - 0xff, /* GPIO_DIR */ 2150 - 0xff, /* GPIO_DIR1 */ 2151 - 0x5f, /* GPIO_DIR2 */ 2152 - 0x00, /* GPIO_MASK */ 2153 - 0x00, /* GPIO_MASK1 */ 2154 - 0x00, /* GPIO_MASK2 */ 2155 - 0x00, /* GPIO_STATE */ 2156 - 0x00, /* GPIO_STATE1 */ 2157 - 0x00, /* GPIO_STATE2 */ 2158 - }; 2143 + #define prodigy71_eeprom aureon71_eeprom 2159 2144 2160 2145 static unsigned char prodigy71lt_eeprom[] __devinitdata = { 2161 - 0x4b, /* SYSCINF: clock 512, spdif-in/ADC, 4DACs */ 2162 - 0x80, /* ACLINK: I2S */ 2163 - 0xfc, /* I2S: vol, 96k, 24bit, 192k */ 2164 - 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 2165 - 0xff, /* GPIO_DIR */ 2166 - 0xff, /* GPIO_DIR1 */ 2167 - 0x5f, /* GPIO_DIR2 */ 2168 - 0x00, /* GPIO_MASK */ 2169 - 0x00, /* GPIO_MASK1 */ 2170 - 0x00, /* GPIO_MASK2 */ 2171 - 0x00, /* GPIO_STATE */ 2172 - 0x00, /* GPIO_STATE1 */ 2173 - 0x00, /* GPIO_STATE2 */ 2146 + [ICE_EEP2_SYSCONF] = 0x4b, /* clock 384, spdif-in/ADC, 4DACs */ 2147 + [ICE_EEP2_ACLINK] = 0x80, /* I2S */ 2148 + [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ 2149 + [ICE_EEP2_SPDIF] = 0xc3, /* out-en, out-int, spdif-in */ 2150 + [ICE_EEP2_GPIO_DIR] = 0xff, 2151 + [ICE_EEP2_GPIO_DIR1] = 0xff, 2152 + [ICE_EEP2_GPIO_DIR2] = 0x5f, 2153 + [ICE_EEP2_GPIO_MASK] = 0x00, 2154 + [ICE_EEP2_GPIO_MASK1] = 0x00, 2155 + [ICE_EEP2_GPIO_MASK2] = 0x00, 2156 + [ICE_EEP2_GPIO_STATE] = 0x00, 2157 + [ICE_EEP2_GPIO_STATE1] = 0x00, 2158 + [ICE_EEP2_GPIO_STATE2] = 0x00, 2174 2159 }; 2175 - 2176 - static unsigned char prodigy71xt_eeprom[] __devinitdata = { 2177 - 0x4b, /* SYSCINF: clock 512, spdif-in/ADC, 4DACs */ 2178 - 0x80, /* ACLINK: I2S */ 2179 - 0xfc, /* I2S: vol, 96k, 24bit, 192k */ 2180 - 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 2181 - 0xff, /* GPIO_DIR */ 2182 - 0xff, /* GPIO_DIR1 */ 2183 - 0x5f, /* GPIO_DIR2 */ 2184 - 0x00, /* GPIO_MASK */ 2185 - 0x00, /* GPIO_MASK1 */ 2186 - 0x00, /* GPIO_MASK2 */ 2187 - 0x00, /* GPIO_STATE */ 2188 - 0x00, /* GPIO_STATE1 */ 2189 - 0x00, /* GPIO_STATE2 */ 2190 - }; 2160 + #define prodigy71xt_eeprom prodigy71lt_eeprom 2191 2161 2192 2162 /* entry point */ 2193 2163 struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = {
+13 -13
sound/pci/ice1712/juli.c
··· 207 207 */ 208 208 209 209 static unsigned char juli_eeprom[] __devinitdata = { 210 - 0x20, /* SYSCONF: clock 512, mpu401, 1xADC, 1xDACs */ 211 - 0x80, /* ACLINK: I2S */ 212 - 0xf8, /* I2S: vol, 96k, 24bit, 192k */ 213 - 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 214 - 0x9f, /* GPIO_DIR */ 215 - 0xff, /* GPIO_DIR1 */ 216 - 0x7f, /* GPIO_DIR2 */ 217 - 0x9f, /* GPIO_MASK */ 218 - 0xff, /* GPIO_MASK1 */ 219 - 0x7f, /* GPIO_MASK2 */ 220 - 0x16, /* GPIO_STATE: internal clock, multiple 1x, 48kHz */ 221 - 0x80, /* GPIO_STATE1: mute */ 222 - 0x00, /* GPIO_STATE2 */ 210 + [ICE_EEP2_SYSCONF] = 0x20, /* clock 512, mpu401, 1xADC, 1xDACs */ 211 + [ICE_EEP2_ACLINK] = 0x80, /* I2S */ 212 + [ICE_EEP2_I2S] = 0xf8, /* vol, 96k, 24bit, 192k */ 213 + [ICE_EEP2_SPDIF] = 0xc3, /* out-en, out-int, spdif-in */ 214 + [ICE_EEP2_GPIO_DIR] = 0x9f, 215 + [ICE_EEP2_GPIO_DIR1] = 0xff, 216 + [ICE_EEP2_GPIO_DIR2] = 0x7f, 217 + [ICE_EEP2_GPIO_MASK] = 0x9f, 218 + [ICE_EEP2_GPIO_MASK1] = 0xff, 219 + [ICE_EEP2_GPIO_MASK2] = 0x7f, 220 + [ICE_EEP2_GPIO_STATE] = 0x16, /* internal clock, multiple 1x, 48kHz */ 221 + [ICE_EEP2_GPIO_STATE1] = 0x80, /* mute */ 222 + [ICE_EEP2_GPIO_STATE2] = 0x00, 223 223 }; 224 224 225 225 /* entry point */
+26 -26
sound/pci/ice1712/phase.c
··· 153 153 } 154 154 155 155 static unsigned char phase22_eeprom[] __devinitdata = { 156 - 0x00, /* SYSCONF: 1xADC, 1xDACs */ 157 - 0x80, /* ACLINK: I2S */ 158 - 0xf8, /* I2S: vol, 96k, 24bit*/ 159 - 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 160 - 0xFF, /* GPIO_DIR */ 161 - 0xFF, /* GPIO_DIR1 */ 162 - 0xFF, /* GPIO_DIR2 */ 163 - 0x00, /* GPIO_MASK */ 164 - 0x00, /* GPIO_MASK1 */ 165 - 0x00, /* GPIO_MASK2 */ 166 - 0x00, /* GPIO_STATE: */ 167 - 0x00, /* GPIO_STATE1: */ 168 - 0x00, /* GPIO_STATE2 */ 156 + [ICE_EEP2_SYSCONF] = 0x00, /* 1xADC, 1xDACs */ 157 + [ICE_EEP2_ACLINK] = 0x80, /* I2S */ 158 + [ICE_EEP2_I2S] = 0xf8, /* vol, 96k, 24bit */ 159 + [ICE_EEP2_SPDIF] = 0xc3, /* out-en, out-int, spdif-in */ 160 + [ICE_EEP2_GPIO_DIR] = 0xff, 161 + [ICE_EEP2_GPIO_DIR1] = 0xff, 162 + [ICE_EEP2_GPIO_DIR2] = 0xff, 163 + [ICE_EEP2_GPIO_MASK] = 0x00, 164 + [ICE_EEP2_GPIO_MASK1] = 0x00, 165 + [ICE_EEP2_GPIO_MASK2] = 0x00, 166 + [ICE_EEP2_GPIO_STATE] = 0x00, 167 + [ICE_EEP2_GPIO_STATE1] = 0x00, 168 + [ICE_EEP2_GPIO_STATE2] = 0x00, 169 169 }; 170 170 171 171 static unsigned char phase28_eeprom[] __devinitdata = { 172 - 0x0b, /* SYSCONF: clock 512, spdif-in/ADC, 4DACs */ 173 - 0x80, /* ACLINK: I2S */ 174 - 0xfc, /* I2S: vol, 96k, 24bit, 192k */ 175 - 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 176 - 0xff, /* GPIO_DIR */ 177 - 0xff, /* GPIO_DIR1 */ 178 - 0x5f, /* GPIO_DIR2 */ 179 - 0x00, /* GPIO_MASK */ 180 - 0x00, /* GPIO_MASK1 */ 181 - 0x00, /* GPIO_MASK2 */ 182 - 0x00, /* GPIO_STATE */ 183 - 0x00, /* GPIO_STATE1 */ 184 - 0x00, /* GPIO_STATE2 */ 172 + [ICE_EEP2_SYSCONF] = 0x0b, /* clock 512, spdif-in/ADC, 4DACs */ 173 + [ICE_EEP2_ACLINK] = 0x80, /* I2S */ 174 + [ICE_EEP2_I2S] = 0xfc, /* vol, 96k, 24bit, 192k */ 175 + [ICE_EEP2_SPDIF] = 0xc3, /* out-en, out-int, spdif-in */ 176 + [ICE_EEP2_GPIO_DIR] = 0xff, 177 + [ICE_EEP2_GPIO_DIR1] = 0xff, 178 + [ICE_EEP2_GPIO_DIR2] = 0x5f, 179 + [ICE_EEP2_GPIO_MASK] = 0x00, 180 + [ICE_EEP2_GPIO_MASK1] = 0x00, 181 + [ICE_EEP2_GPIO_MASK2] = 0x00, 182 + [ICE_EEP2_GPIO_STATE] = 0x00, 183 + [ICE_EEP2_GPIO_STATE1] = 0x00, 184 + [ICE_EEP2_GPIO_STATE2] = 0x00, 185 185 }; 186 186 187 187 /*
+13 -13
sound/pci/ice1712/pontis.c
··· 827 827 */ 828 828 829 829 static unsigned char pontis_eeprom[] __devinitdata = { 830 - 0x08, /* SYSCONF: clock 256, mpu401, spdif-in/ADC, 1DAC */ 831 - 0x80, /* ACLINK: I2S */ 832 - 0xf8, /* I2S: vol, 96k, 24bit, 192k */ 833 - 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 834 - 0x07, /* GPIO_DIR */ 835 - 0x00, /* GPIO_DIR1 */ 836 - 0x00, /* GPIO_DIR2 (ignored) */ 837 - 0x0f, /* GPIO_MASK (4-7 reserved for CS8416) */ 838 - 0xff, /* GPIO_MASK1 */ 839 - 0x00, /* GPIO_MASK2 (ignored) */ 840 - 0x06, /* GPIO_STATE (0-low, 1-high, 2-high) */ 841 - 0x00, /* GPIO_STATE1 */ 842 - 0x00, /* GPIO_STATE2 (ignored) */ 830 + [ICE_EEP2_SYSCONF] = 0x08, /* clock 256, mpu401, spdif-in/ADC, 1DAC */ 831 + [ICE_EEP2_ACLINK] = 0x80, /* I2S */ 832 + [ICE_EEP2_I2S] = 0xf8, /* vol, 96k, 24bit, 192k */ 833 + [ICE_EEP2_SPDIF] = 0xc3, /* out-en, out-int, spdif-in */ 834 + [ICE_EEP2_GPIO_DIR] = 0x07, 835 + [ICE_EEP2_GPIO_DIR1] = 0x00, 836 + [ICE_EEP2_GPIO_DIR2] = 0x00, /* ignored */ 837 + [ICE_EEP2_GPIO_MASK] = 0x0f, /* 4-7 reserved for CS8416 */ 838 + [ICE_EEP2_GPIO_MASK1] = 0xff, 839 + [ICE_EEP2_GPIO_MASK2] = 0x00, /* ignored */ 840 + [ICE_EEP2_GPIO_STATE] = 0x06, /* 0-low, 1-high, 2-high */ 841 + [ICE_EEP2_GPIO_STATE1] = 0x00, 842 + [ICE_EEP2_GPIO_STATE2] = 0x00, /* ignored */ 843 843 }; 844 844 845 845 /* entry point */
+13 -13
sound/pci/ice1712/prodigy192.c
··· 507 507 */ 508 508 509 509 static unsigned char prodigy71_eeprom[] __devinitdata = { 510 - 0x2b, /* SYSCONF: clock 512, mpu401, spdif-in/ADC, 4DACs */ 511 - 0x80, /* ACLINK: I2S */ 512 - 0xf8, /* I2S: vol, 96k, 24bit, 192k */ 513 - 0xc3, /* SPDIF: out-en, out-int, spdif-in */ 514 - 0xff, /* GPIO_DIR */ 515 - 0xff, /* GPIO_DIR1 */ 516 - 0xbf, /* GPIO_DIR2 */ 517 - 0x00, /* GPIO_MASK */ 518 - 0x00, /* GPIO_MASK1 */ 519 - 0x00, /* GPIO_MASK2 */ 520 - 0x00, /* GPIO_STATE */ 521 - 0x00, /* GPIO_STATE1 */ 522 - 0x00, /* GPIO_STATE2 */ 510 + [ICE_EEP2_SYSCONF] = 0x2b, /* clock 512, mpu401, spdif-in/ADC, 4DACs */ 511 + [ICE_EEP2_ACLINK] = 0x80, /* I2S */ 512 + [ICE_EEP2_I2S] = 0xf8, /* vol, 96k, 24bit, 192k */ 513 + [ICE_EEP2_SPDIF] = 0xc3, /* out-en, out-int, spdif-in */ 514 + [ICE_EEP2_GPIO_DIR] = 0xff, 515 + [ICE_EEP2_GPIO_DIR1] = 0xff, 516 + [ICE_EEP2_GPIO_DIR2] = 0xbf, 517 + [ICE_EEP2_GPIO_MASK] = 0x00, 518 + [ICE_EEP2_GPIO_MASK1] = 0x00, 519 + [ICE_EEP2_GPIO_MASK2] = 0x00, 520 + [ICE_EEP2_GPIO_STATE] = 0x00, 521 + [ICE_EEP2_GPIO_STATE1] = 0x00, 522 + [ICE_EEP2_GPIO_STATE2] = 0x00, 523 523 }; 524 524 525 525
+27 -26
sound/pci/ice1712/vt1720_mobo.c
··· 30 30 #include <sound/core.h> 31 31 32 32 #include "ice1712.h" 33 + #include "envy24ht.h" 33 34 #include "vt1720_mobo.h" 34 35 35 36 ··· 57 56 /* EEPROM image */ 58 57 59 58 static unsigned char k8x800_eeprom[] __devinitdata = { 60 - 0x01, /* SYSCONF: clock 256, 1ADC, 2DACs */ 61 - 0x02, /* ACLINK: ACLINK, packed */ 62 - 0x00, /* I2S: - */ 63 - 0x00, /* SPDIF: - */ 64 - 0xff, /* GPIO_DIR */ 65 - 0xff, /* GPIO_DIR1 */ 66 - 0x00, /* - */ 67 - 0xff, /* GPIO_MASK */ 68 - 0xff, /* GPIO_MASK1 */ 69 - 0x00, /* - */ 70 - 0x00, /* GPIO_STATE */ 71 - 0x00, /* GPIO_STATE1 */ 72 - 0x00, /* - */ 59 + [ICE_EEP2_SYSCONF] = 0x01, /* clock 256, 1ADC, 2DACs */ 60 + [ICE_EEP2_ACLINK] = 0x02, /* ACLINK, packed */ 61 + [ICE_EEP2_I2S] = 0x00, /* - */ 62 + [ICE_EEP2_SPDIF] = 0x00, /* - */ 63 + [ICE_EEP2_GPIO_DIR] = 0xff, 64 + [ICE_EEP2_GPIO_DIR1] = 0xff, 65 + [ICE_EEP2_GPIO_DIR2] = 0x00, /* - */ 66 + [ICE_EEP2_GPIO_MASK] = 0xff, 67 + [ICE_EEP2_GPIO_MASK1] = 0xff, 68 + [ICE_EEP2_GPIO_MASK2] = 0x00, /* - */ 69 + [ICE_EEP2_GPIO_STATE] = 0x00, 70 + [ICE_EEP2_GPIO_STATE1] = 0x00, 71 + [ICE_EEP2_GPIO_STATE2] = 0x00, /* - */ 73 72 }; 74 73 75 74 static unsigned char sn25p_eeprom[] __devinitdata = { 76 - 0x01, /* SYSCONF: clock 256, 1ADC, 2DACs */ 77 - 0x02, /* ACLINK: ACLINK, packed */ 78 - 0x00, /* I2S: - */ 79 - 0x41, /* SPDIF: - */ 80 - 0xff, /* GPIO_DIR */ 81 - 0xff, /* GPIO_DIR1 */ 82 - 0x00, /* - */ 83 - 0xff, /* GPIO_MASK */ 84 - 0xff, /* GPIO_MASK1 */ 85 - 0x00, /* - */ 86 - 0x00, /* GPIO_STATE */ 87 - 0x00, /* GPIO_STATE1 */ 88 - 0x00, /* - */ 75 + [ICE_EEP2_SYSCONF] = 0x01, /* clock 256, 1ADC, 2DACs */ 76 + [ICE_EEP2_ACLINK] = 0x02, /* ACLINK, packed */ 77 + [ICE_EEP2_I2S] = 0x00, /* - */ 78 + [ICE_EEP2_SPDIF] = 0x41, /* - */ 79 + [ICE_EEP2_GPIO_DIR] = 0xff, 80 + [ICE_EEP2_GPIO_DIR1] = 0xff, 81 + [ICE_EEP2_GPIO_DIR2] = 0x00, /* - */ 82 + [ICE_EEP2_GPIO_MASK] = 0xff, 83 + [ICE_EEP2_GPIO_MASK1] = 0xff, 84 + [ICE_EEP2_GPIO_MASK2] = 0x00, /* - */ 85 + [ICE_EEP2_GPIO_STATE] = 0x00, 86 + [ICE_EEP2_GPIO_STATE1] = 0x00, 87 + [ICE_EEP2_GPIO_STATE2] = 0x00, /* - */ 89 88 }; 90 89 91 90