aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/ak4114.h2
-rw-r--r--include/sound/ak4117.h2
-rw-r--r--include/sound/ak4xxx-adda.h4
-rw-r--r--sound/i2c/other/ak4114.c2
-rw-r--r--sound/i2c/other/ak4117.c2
-rw-r--r--sound/i2c/other/ak4xxx-adda.c15
-rw-r--r--sound/pci/ice1712/juli.c4
-rw-r--r--sound/pci/ice1712/revo.c14
8 files changed, 23 insertions, 22 deletions
diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h
index 85f49d464751..c149d3b2558b 100644
--- a/include/sound/ak4114.h
+++ b/include/sound/ak4114.h
@@ -188,7 +188,7 @@ struct ak4114 {
188 188
189int snd_ak4114_create(struct snd_card *card, 189int snd_ak4114_create(struct snd_card *card,
190 ak4114_read_t *read, ak4114_write_t *write, 190 ak4114_read_t *read, ak4114_write_t *write,
191 unsigned char pgm[7], unsigned char txcsb[5], 191 const unsigned char pgm[7], const unsigned char txcsb[5],
192 void *private_data, struct ak4114 **r_ak4114); 192 void *private_data, struct ak4114 **r_ak4114);
193void snd_ak4114_reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char mask, unsigned char val); 193void snd_ak4114_reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char mask, unsigned char val);
194void snd_ak4114_reinit(struct ak4114 *ak4114); 194void snd_ak4114_reinit(struct ak4114 *ak4114);
diff --git a/include/sound/ak4117.h b/include/sound/ak4117.h
index 2b96c32f06fd..d650d52e3d29 100644
--- a/include/sound/ak4117.h
+++ b/include/sound/ak4117.h
@@ -178,7 +178,7 @@ struct ak4117 {
178}; 178};
179 179
180int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write, 180int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write,
181 unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117); 181 const unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117);
182void snd_ak4117_reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char mask, unsigned char val); 182void snd_ak4117_reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char mask, unsigned char val);
183void snd_ak4117_reinit(struct ak4117 *ak4117); 183void snd_ak4117_reinit(struct ak4117 *ak4117);
184int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *capture_substream); 184int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *capture_substream);
diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h
index d01d53528015..aa49dda4f410 100644
--- a/include/sound/ak4xxx-adda.h
+++ b/include/sound/ak4xxx-adda.h
@@ -71,8 +71,8 @@ struct snd_akm4xxx {
71 } type; 71 } type;
72 72
73 /* (array) information of combined codecs */ 73 /* (array) information of combined codecs */
74 struct snd_akm4xxx_dac_channel *dac_info; 74 const struct snd_akm4xxx_dac_channel *dac_info;
75 struct snd_akm4xxx_adc_channel *adc_info; 75 const struct snd_akm4xxx_adc_channel *adc_info;
76 76
77 struct snd_ak4xxx_ops ops; 77 struct snd_ak4xxx_ops ops;
78}; 78};
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c
index 69dcaf8ac793..34bbafc81cf6 100644
--- a/sound/i2c/other/ak4114.c
+++ b/sound/i2c/other/ak4114.c
@@ -79,7 +79,7 @@ static int snd_ak4114_dev_free(struct snd_device *device)
79 79
80int snd_ak4114_create(struct snd_card *card, 80int snd_ak4114_create(struct snd_card *card,
81 ak4114_read_t *read, ak4114_write_t *write, 81 ak4114_read_t *read, ak4114_write_t *write,
82 unsigned char pgm[7], unsigned char txcsb[5], 82 const unsigned char pgm[7], const unsigned char txcsb[5],
83 void *private_data, struct ak4114 **r_ak4114) 83 void *private_data, struct ak4114 **r_ak4114)
84{ 84{
85 struct ak4114 *chip; 85 struct ak4114 *chip;
diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c
index 4e45952dd95a..c022f29da2f7 100644
--- a/sound/i2c/other/ak4117.c
+++ b/sound/i2c/other/ak4117.c
@@ -74,7 +74,7 @@ static int snd_ak4117_dev_free(struct snd_device *device)
74} 74}
75 75
76int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write, 76int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write,
77 unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117) 77 const unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117)
78{ 78{
79 struct ak4117 *chip; 79 struct ak4117 *chip;
80 int err = 0; 80 int err = 0;
diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c
index fe61b92f4e47..3d9d6c5d354e 100644
--- a/sound/i2c/other/ak4xxx-adda.c
+++ b/sound/i2c/other/ak4xxx-adda.c
@@ -140,7 +140,7 @@ EXPORT_SYMBOL(snd_akm4xxx_reset);
140 * Used for AK4524 input/ouput attenuation, AK4528, and 140 * Used for AK4524 input/ouput attenuation, AK4528, and
141 * AK5365 input attenuation 141 * AK5365 input attenuation
142 */ 142 */
143static unsigned char vol_cvt_datt[128] = { 143static const unsigned char vol_cvt_datt[128] = {
144 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 144 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04,
145 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x06, 0x06, 145 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x06, 0x06,
146 0x06, 0x07, 0x07, 0x08, 0x08, 0x08, 0x09, 0x0a, 146 0x06, 0x07, 0x07, 0x08, 0x08, 0x08, 0x09, 0x0a,
@@ -184,7 +184,7 @@ void snd_akm4xxx_init(struct snd_akm4xxx *ak)
184 0x07, 0x00, /* 7: DAC right muted */ 184 0x07, 0x00, /* 7: DAC right muted */
185 0xff, 0xff 185 0xff, 0xff
186 }; 186 };
187 static unsigned char inits_ak4528[] = { 187 static const unsigned char inits_ak4528[] = {
188 0x00, 0x07, /* 0: all power up */ 188 0x00, 0x07, /* 0: all power up */
189 0x01, 0x00, /* 1: ADC/DAC reset */ 189 0x01, 0x00, /* 1: ADC/DAC reset */
190 0x02, 0x60, /* 2: 24bit I2S */ 190 0x02, 0x60, /* 2: 24bit I2S */
@@ -194,7 +194,7 @@ void snd_akm4xxx_init(struct snd_akm4xxx *ak)
194 0x05, 0x00, /* 5: ADC right muted */ 194 0x05, 0x00, /* 5: ADC right muted */
195 0xff, 0xff 195 0xff, 0xff
196 }; 196 };
197 static unsigned char inits_ak4529[] = { 197 static const unsigned char inits_ak4529[] = {
198 0x09, 0x01, /* 9: ATS=0, RSTN=1 */ 198 0x09, 0x01, /* 9: ATS=0, RSTN=1 */
199 0x0a, 0x3f, /* A: all power up, no zero/overflow detection */ 199 0x0a, 0x3f, /* A: all power up, no zero/overflow detection */
200 0x00, 0x0c, /* 0: TDM=0, 24bit I2S, SMUTE=0 */ 200 0x00, 0x0c, /* 0: TDM=0, 24bit I2S, SMUTE=0 */
@@ -210,7 +210,7 @@ void snd_akm4xxx_init(struct snd_akm4xxx *ak)
210 0x08, 0x55, /* 8: deemphasis all off */ 210 0x08, 0x55, /* 8: deemphasis all off */
211 0xff, 0xff 211 0xff, 0xff
212 }; 212 };
213 static unsigned char inits_ak4355[] = { 213 static const unsigned char inits_ak4355[] = {
214 0x01, 0x02, /* 1: reset and soft-mute */ 214 0x01, 0x02, /* 1: reset and soft-mute */
215 0x00, 0x06, /* 0: mode3(i2s), disable auto-clock detect, 215 0x00, 0x06, /* 0: mode3(i2s), disable auto-clock detect,
216 * disable DZF, sharp roll-off, RSTN#=0 */ 216 * disable DZF, sharp roll-off, RSTN#=0 */
@@ -227,7 +227,7 @@ void snd_akm4xxx_init(struct snd_akm4xxx *ak)
227 0x01, 0x01, /* 1: un-reset, unmute */ 227 0x01, 0x01, /* 1: un-reset, unmute */
228 0xff, 0xff 228 0xff, 0xff
229 }; 229 };
230 static unsigned char inits_ak4358[] = { 230 static const unsigned char inits_ak4358[] = {
231 0x01, 0x02, /* 1: reset and soft-mute */ 231 0x01, 0x02, /* 1: reset and soft-mute */
232 0x00, 0x06, /* 0: mode3(i2s), disable auto-clock detect, 232 0x00, 0x06, /* 0: mode3(i2s), disable auto-clock detect,
233 * disable DZF, sharp roll-off, RSTN#=0 */ 233 * disable DZF, sharp roll-off, RSTN#=0 */
@@ -246,7 +246,7 @@ void snd_akm4xxx_init(struct snd_akm4xxx *ak)
246 0x01, 0x01, /* 1: un-reset, unmute */ 246 0x01, 0x01, /* 1: un-reset, unmute */
247 0xff, 0xff 247 0xff, 0xff
248 }; 248 };
249 static unsigned char inits_ak4381[] = { 249 static const unsigned char inits_ak4381[] = {
250 0x00, 0x0c, /* 0: mode3(i2s), disable auto-clock detect */ 250 0x00, 0x0c, /* 0: mode3(i2s), disable auto-clock detect */
251 0x01, 0x02, /* 1: de-emphasis off, normal speed, 251 0x01, 0x02, /* 1: de-emphasis off, normal speed,
252 * sharp roll-off, DZF off */ 252 * sharp roll-off, DZF off */
@@ -259,7 +259,8 @@ void snd_akm4xxx_init(struct snd_akm4xxx *ak)
259 }; 259 };
260 260
261 int chip, num_chips; 261 int chip, num_chips;
262 unsigned char *ptr, reg, data, *inits; 262 const unsigned char *ptr, *inits;
263 unsigned char reg, data;
263 264
264 memset(ak->images, 0, sizeof(ak->images)); 265 memset(ak->images, 0, sizeof(ak->images));
265 memset(ak->volumes, 0, sizeof(ak->volumes)); 266 memset(ak->volumes, 0, sizeof(ak->volumes));
diff --git a/sound/pci/ice1712/juli.c b/sound/pci/ice1712/juli.c
index 4854eaf63a8a..d88172fa95da 100644
--- a/sound/pci/ice1712/juli.c
+++ b/sound/pci/ice1712/juli.c
@@ -146,7 +146,7 @@ static int __devinit juli_add_controls(struct snd_ice1712 *ice)
146 */ 146 */
147static int __devinit juli_init(struct snd_ice1712 *ice) 147static int __devinit juli_init(struct snd_ice1712 *ice)
148{ 148{
149 static unsigned char ak4114_init_vals[] = { 149 static const unsigned char ak4114_init_vals[] = {
150 /* AK4117_REG_PWRDN */ AK4114_RST | AK4114_PWN | AK4114_OCKS0 | AK4114_OCKS1, 150 /* AK4117_REG_PWRDN */ AK4114_RST | AK4114_PWN | AK4114_OCKS0 | AK4114_OCKS1,
151 /* AK4114_REQ_FORMAT */ AK4114_DIF_I24I2S, 151 /* AK4114_REQ_FORMAT */ AK4114_DIF_I24I2S,
152 /* AK4114_REG_IO0 */ AK4114_TX1E, 152 /* AK4114_REG_IO0 */ AK4114_TX1E,
@@ -154,7 +154,7 @@ static int __devinit juli_init(struct snd_ice1712 *ice)
154 /* AK4114_REG_INT0_MASK */ 0, 154 /* AK4114_REG_INT0_MASK */ 0,
155 /* AK4114_REG_INT1_MASK */ 0 155 /* AK4114_REG_INT1_MASK */ 0
156 }; 156 };
157 static unsigned char ak4114_init_txcsb[] = { 157 static const unsigned char ak4114_init_txcsb[] = {
158 0x41, 0x02, 0x2c, 0x00, 0x00 158 0x41, 0x02, 0x2c, 0x00, 0x00
159 }; 159 };
160 int err; 160 int err;
diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c
index 7d3bccbf0313..025a7e8497c3 100644
--- a/sound/pci/ice1712/revo.c
+++ b/sound/pci/ice1712/revo.c
@@ -185,18 +185,18 @@ static int revo51_i2c_init(struct snd_ice1712 *ice,
185 185
186#define AK_DAC(xname,xch) { .name = xname, .num_channels = xch } 186#define AK_DAC(xname,xch) { .name = xname, .num_channels = xch }
187 187
188static struct snd_akm4xxx_dac_channel revo71_front[] = { 188static const struct snd_akm4xxx_dac_channel revo71_front[] = {
189 AK_DAC("PCM Playback Volume", 2) 189 AK_DAC("PCM Playback Volume", 2)
190}; 190};
191 191
192static struct snd_akm4xxx_dac_channel revo71_surround[] = { 192static const struct snd_akm4xxx_dac_channel revo71_surround[] = {
193 AK_DAC("PCM Center Playback Volume", 1), 193 AK_DAC("PCM Center Playback Volume", 1),
194 AK_DAC("PCM LFE Playback Volume", 1), 194 AK_DAC("PCM LFE Playback Volume", 1),
195 AK_DAC("PCM Side Playback Volume", 2), 195 AK_DAC("PCM Side Playback Volume", 2),
196 AK_DAC("PCM Rear Playback Volume", 2), 196 AK_DAC("PCM Rear Playback Volume", 2),
197}; 197};
198 198
199static struct snd_akm4xxx_dac_channel revo51_dac[] = { 199static const struct snd_akm4xxx_dac_channel revo51_dac[] = {
200 AK_DAC("PCM Playback Volume", 2), 200 AK_DAC("PCM Playback Volume", 2),
201 AK_DAC("PCM Center Playback Volume", 1), 201 AK_DAC("PCM Center Playback Volume", 1),
202 AK_DAC("PCM LFE Playback Volume", 1), 202 AK_DAC("PCM LFE Playback Volume", 1),
@@ -210,7 +210,7 @@ static const char *revo51_adc_input_names[] = {
210 NULL 210 NULL
211}; 211};
212 212
213static struct snd_akm4xxx_adc_channel revo51_adc[] = { 213static const struct snd_akm4xxx_adc_channel revo51_adc[] = {
214 { 214 {
215 .name = "PCM Capture Volume", 215 .name = "PCM Capture Volume",
216 .switch_name = "PCM Capture Switch", 216 .switch_name = "PCM Capture Switch",
@@ -219,7 +219,7 @@ static struct snd_akm4xxx_adc_channel revo51_adc[] = {
219 }, 219 },
220}; 220};
221 221
222static struct snd_akm4xxx akm_revo_front __devinitdata = { 222static const struct snd_akm4xxx akm_revo_front __devinitdata = {
223 .type = SND_AK4381, 223 .type = SND_AK4381,
224 .num_dacs = 2, 224 .num_dacs = 2,
225 .ops = { 225 .ops = {
@@ -320,11 +320,11 @@ static void ap192_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
320#endif 320#endif
321} 321}
322 322
323static struct snd_akm4xxx_dac_channel ap192_dac[] = { 323static const struct snd_akm4xxx_dac_channel ap192_dac[] = {
324 AK_DAC("PCM Playback Volume", 2) 324 AK_DAC("PCM Playback Volume", 2)
325}; 325};
326 326
327static struct snd_akm4xxx akm_ap192 __devinitdata = { 327static const struct snd_akm4xxx akm_ap192 __devinitdata = {
328 .type = SND_AK4358, 328 .type = SND_AK4358,
329 .num_dacs = 2, 329 .num_dacs = 2,
330 .ops = { 330 .ops = {