aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_via.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-09-09 08:21:17 -0400
committerTakashi Iwai <tiwai@suse.de>2010-09-09 10:45:58 -0400
commitb5786e85cb2ffd0b07e86dec38a442bd20765ad8 (patch)
treeb274f05600ab04ad189f48e342d02ebebc412140 /sound/pci/hda/patch_via.c
parent6cb3b707f95954ac18f19b4b3919af235738371a (diff)
ALSA: hda - Keep char arrays in input_mux items
Keep char array in the input_mux item itself instead of pointing to an external string. This is a preliminary work for improving the input-mux name based on the pin role. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_via.c')
-rw-r--r--sound/pci/hda/patch_via.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 93b86adbce63..9c1909d398e3 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -2376,7 +2376,7 @@ static void create_hp_imux(struct via_spec *spec)
2376 /* for hp mode select */ 2376 /* for hp mode select */
2377 i = 0; 2377 i = 0;
2378 while (texts[i] != NULL) { 2378 while (texts[i] != NULL) {
2379 imux->items[imux->num_items].label = texts[i]; 2379 strcpy(imux->items[imux->num_items].label, texts[i]);
2380 imux->items[imux->num_items].index = i; 2380 imux->items[imux->num_items].index = i;
2381 imux->num_items++; 2381 imux->num_items++;
2382 i++; 2382 i++;
@@ -2423,7 +2423,8 @@ static int vt_auto_create_analog_input_ctls(struct via_spec *spec,
2423 /* for internal loopback recording select */ 2423 /* for internal loopback recording select */
2424 for (idx = 0; idx < num_idxs; idx++) { 2424 for (idx = 0; idx < num_idxs; idx++) {
2425 if (pin_idxs[idx] == 0xff) { 2425 if (pin_idxs[idx] == 0xff) {
2426 imux->items[imux->num_items].label = "Stereo Mixer"; 2426 strcpy(imux->items[imux->num_items].label,
2427 "Stereo Mixer");
2427 imux->items[imux->num_items].index = idx; 2428 imux->items[imux->num_items].index = idx;
2428 imux->num_items++; 2429 imux->num_items++;
2429 break; 2430 break;
@@ -2445,8 +2446,8 @@ static int vt_auto_create_analog_input_ctls(struct via_spec *spec,
2445 type_idx, idx, cap_nid); 2446 type_idx, idx, cap_nid);
2446 if (err < 0) 2447 if (err < 0)
2447 return err; 2448 return err;
2448 imux->items[imux->num_items].label = 2449 snd_hda_get_input_pin_label(cfg, i,
2449 snd_hda_get_input_pin_label(cfg, i); 2450 imux->items[imux->num_items].label);
2450 imux->items[imux->num_items].index = idx; 2451 imux->items[imux->num_items].index = idx;
2451 imux->num_items++; 2452 imux->num_items++;
2452 } 2453 }
@@ -4336,7 +4337,7 @@ static int vt1702_auto_create_hp_ctls(struct via_spec *spec, hda_nid_t pin)
4336 /* for hp mode select */ 4337 /* for hp mode select */
4337 i = 0; 4338 i = 0;
4338 while (texts[i] != NULL) { 4339 while (texts[i] != NULL) {
4339 imux->items[imux->num_items].label = texts[i]; 4340 strcpy(imux->items[imux->num_items].label, texts[i]);
4340 imux->items[imux->num_items].index = i; 4341 imux->items[imux->num_items].index = i;
4341 imux->num_items++; 4342 imux->num_items++;
4342 i++; 4343 i++;
@@ -5520,7 +5521,7 @@ static int vt2002P_auto_create_analog_input_ctls(struct via_spec *spec,
5520 return err; 5521 return err;
5521 5522
5522 /* for digital mic select */ 5523 /* for digital mic select */
5523 imux->items[imux->num_items].label = "Digital Mic"; 5524 strcpy(imux->items[imux->num_items].label, "Digital Mic");
5524 imux->items[imux->num_items].index = 4; 5525 imux->items[imux->num_items].index = 4;
5525 imux->num_items++; 5526 imux->num_items++;
5526 5527
@@ -5843,7 +5844,7 @@ static int vt1812_auto_create_analog_input_ctls(struct via_spec *spec,
5843 return err; 5844 return err;
5844 5845
5845 /* for digital mic select */ 5846 /* for digital mic select */
5846 imux->items[imux->num_items].label = "Digital Mic"; 5847 strcpy(imux->items[imux->num_items].label, "Digital Mic");
5847 imux->items[imux->num_items].index = 6; 5848 imux->items[imux->num_items].index = 6;
5848 imux->num_items++; 5849 imux->num_items++;
5849 5850