diff options
Diffstat (limited to 'sound/pci/hda/patch_ca0110.c')
-rw-r--r-- | sound/pci/hda/patch_ca0110.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sound/pci/hda/patch_ca0110.c b/sound/pci/hda/patch_ca0110.c index af478019088e..61b92634b161 100644 --- a/sound/pci/hda/patch_ca0110.c +++ b/sound/pci/hda/patch_ca0110.c | |||
@@ -134,7 +134,7 @@ static int ca0110_capture_pcm_cleanup(struct hda_pcm_stream *hinfo, | |||
134 | /* | 134 | /* |
135 | */ | 135 | */ |
136 | 136 | ||
137 | static char *dirstr[2] = { "Playback", "Capture" }; | 137 | static const char * const dirstr[2] = { "Playback", "Capture" }; |
138 | 138 | ||
139 | static int _add_switch(struct hda_codec *codec, hda_nid_t nid, const char *pfx, | 139 | static int _add_switch(struct hda_codec *codec, hda_nid_t nid, const char *pfx, |
140 | int chan, int dir) | 140 | int chan, int dir) |
@@ -171,7 +171,7 @@ static int ca0110_build_controls(struct hda_codec *codec) | |||
171 | { | 171 | { |
172 | struct ca0110_spec *spec = codec->spec; | 172 | struct ca0110_spec *spec = codec->spec; |
173 | struct auto_pin_cfg *cfg = &spec->autocfg; | 173 | struct auto_pin_cfg *cfg = &spec->autocfg; |
174 | static char *prefix[AUTO_CFG_MAX_OUTS] = { | 174 | static const char * const prefix[AUTO_CFG_MAX_OUTS] = { |
175 | "Front", "Surround", NULL, "Side", "Multi" | 175 | "Front", "Surround", NULL, "Side", "Multi" |
176 | }; | 176 | }; |
177 | hda_nid_t mutenid; | 177 | hda_nid_t mutenid; |
@@ -259,7 +259,7 @@ static int ca0110_build_controls(struct hda_codec *codec) | |||
259 | 259 | ||
260 | /* | 260 | /* |
261 | */ | 261 | */ |
262 | static struct hda_pcm_stream ca0110_pcm_analog_playback = { | 262 | static const struct hda_pcm_stream ca0110_pcm_analog_playback = { |
263 | .substreams = 1, | 263 | .substreams = 1, |
264 | .channels_min = 2, | 264 | .channels_min = 2, |
265 | .channels_max = 8, | 265 | .channels_max = 8, |
@@ -270,7 +270,7 @@ static struct hda_pcm_stream ca0110_pcm_analog_playback = { | |||
270 | }, | 270 | }, |
271 | }; | 271 | }; |
272 | 272 | ||
273 | static struct hda_pcm_stream ca0110_pcm_analog_capture = { | 273 | static const struct hda_pcm_stream ca0110_pcm_analog_capture = { |
274 | .substreams = 1, | 274 | .substreams = 1, |
275 | .channels_min = 2, | 275 | .channels_min = 2, |
276 | .channels_max = 2, | 276 | .channels_max = 2, |
@@ -280,7 +280,7 @@ static struct hda_pcm_stream ca0110_pcm_analog_capture = { | |||
280 | }, | 280 | }, |
281 | }; | 281 | }; |
282 | 282 | ||
283 | static struct hda_pcm_stream ca0110_pcm_digital_playback = { | 283 | static const struct hda_pcm_stream ca0110_pcm_digital_playback = { |
284 | .substreams = 1, | 284 | .substreams = 1, |
285 | .channels_min = 2, | 285 | .channels_min = 2, |
286 | .channels_max = 2, | 286 | .channels_max = 2, |
@@ -291,7 +291,7 @@ static struct hda_pcm_stream ca0110_pcm_digital_playback = { | |||
291 | }, | 291 | }, |
292 | }; | 292 | }; |
293 | 293 | ||
294 | static struct hda_pcm_stream ca0110_pcm_digital_capture = { | 294 | static const struct hda_pcm_stream ca0110_pcm_digital_capture = { |
295 | .substreams = 1, | 295 | .substreams = 1, |
296 | .channels_min = 2, | 296 | .channels_min = 2, |
297 | .channels_max = 2, | 297 | .channels_max = 2, |
@@ -389,7 +389,7 @@ static void ca0110_free(struct hda_codec *codec) | |||
389 | kfree(codec->spec); | 389 | kfree(codec->spec); |
390 | } | 390 | } |
391 | 391 | ||
392 | static struct hda_codec_ops ca0110_patch_ops = { | 392 | static const struct hda_codec_ops ca0110_patch_ops = { |
393 | .build_controls = ca0110_build_controls, | 393 | .build_controls = ca0110_build_controls, |
394 | .build_pcms = ca0110_build_pcms, | 394 | .build_pcms = ca0110_build_pcms, |
395 | .init = ca0110_init, | 395 | .init = ca0110_init, |
@@ -468,13 +468,13 @@ static void parse_input(struct hda_codec *codec) | |||
468 | spec->dig_in = nid; | 468 | spec->dig_in = nid; |
469 | continue; | 469 | continue; |
470 | } | 470 | } |
471 | for (j = 0; j < AUTO_PIN_LAST; j++) | 471 | for (j = 0; j < cfg->num_inputs; j++) |
472 | if (cfg->input_pins[j] == pin) | 472 | if (cfg->inputs[j].pin == pin) |
473 | break; | 473 | break; |
474 | if (j >= AUTO_PIN_LAST) | 474 | if (j >= cfg->num_inputs) |
475 | continue; | 475 | continue; |
476 | spec->input_pins[n] = pin; | 476 | spec->input_pins[n] = pin; |
477 | spec->input_labels[n] = auto_pin_cfg_labels[j]; | 477 | spec->input_labels[n] = hda_get_input_pin_label(codec, pin, 1); |
478 | spec->adcs[n] = nid; | 478 | spec->adcs[n] = nid; |
479 | n++; | 479 | n++; |
480 | } | 480 | } |
@@ -489,7 +489,7 @@ static void parse_digital(struct hda_codec *codec) | |||
489 | if (cfg->dig_outs && | 489 | if (cfg->dig_outs && |
490 | snd_hda_get_connections(codec, cfg->dig_out_pins[0], | 490 | snd_hda_get_connections(codec, cfg->dig_out_pins[0], |
491 | &spec->dig_out, 1) == 1) | 491 | &spec->dig_out, 1) == 1) |
492 | spec->multiout.dig_out_nid = cfg->dig_out_pins[0]; | 492 | spec->multiout.dig_out_nid = spec->dig_out; |
493 | } | 493 | } |
494 | 494 | ||
495 | static int ca0110_parse_auto_config(struct hda_codec *codec) | 495 | static int ca0110_parse_auto_config(struct hda_codec *codec) |
@@ -539,7 +539,7 @@ static int patch_ca0110(struct hda_codec *codec) | |||
539 | /* | 539 | /* |
540 | * patch entries | 540 | * patch entries |
541 | */ | 541 | */ |
542 | static struct hda_codec_preset snd_hda_preset_ca0110[] = { | 542 | static const struct hda_codec_preset snd_hda_preset_ca0110[] = { |
543 | { .id = 0x1102000a, .name = "CA0110-IBG", .patch = patch_ca0110 }, | 543 | { .id = 0x1102000a, .name = "CA0110-IBG", .patch = patch_ca0110 }, |
544 | { .id = 0x1102000b, .name = "CA0110-IBG", .patch = patch_ca0110 }, | 544 | { .id = 0x1102000b, .name = "CA0110-IBG", .patch = patch_ca0110 }, |
545 | { .id = 0x1102000d, .name = "SB0880 X-Fi", .patch = patch_ca0110 }, | 545 | { .id = 0x1102000d, .name = "SB0880 X-Fi", .patch = patch_ca0110 }, |