diff options
Diffstat (limited to 'sound/pci/hda/patch_via.c')
-rw-r--r-- | sound/pci/hda/patch_via.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 9c1909d398e3..de5f61d1b725 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -568,7 +568,7 @@ static void via_auto_init_analog_input(struct hda_codec *codec) | |||
568 | hda_nid_t nid = cfg->inputs[i].pin; | 568 | hda_nid_t nid = cfg->inputs[i].pin; |
569 | if (spec->smart51_enabled && is_smart51_pins(spec, nid)) | 569 | if (spec->smart51_enabled && is_smart51_pins(spec, nid)) |
570 | ctl = PIN_OUT; | 570 | ctl = PIN_OUT; |
571 | else if (i <= AUTO_PIN_FRONT_MIC) | 571 | else if (i == AUTO_PIN_MIC) |
572 | ctl = PIN_VREF50; | 572 | ctl = PIN_VREF50; |
573 | else | 573 | else |
574 | ctl = PIN_IN; | 574 | ctl = PIN_IN; |
@@ -1328,7 +1328,7 @@ static int is_smart51_pins(struct via_spec *spec, hda_nid_t pin) | |||
1328 | 1328 | ||
1329 | for (i = 0; i < cfg->num_inputs; i++) { | 1329 | for (i = 0; i < cfg->num_inputs; i++) { |
1330 | if (pin == cfg->inputs[i].pin) | 1330 | if (pin == cfg->inputs[i].pin) |
1331 | return cfg->inputs[i].type < AUTO_PIN_FRONT_LINE; | 1331 | return cfg->inputs[i].type <= AUTO_PIN_LINE_IN; |
1332 | } | 1332 | } |
1333 | return 0; | 1333 | return 0; |
1334 | } | 1334 | } |
@@ -1356,9 +1356,9 @@ static int via_smart51_get(struct snd_kcontrol *kcontrol, | |||
1356 | hda_nid_t nid = cfg->inputs[i].pin; | 1356 | hda_nid_t nid = cfg->inputs[i].pin; |
1357 | int ctl = snd_hda_codec_read(codec, nid, 0, | 1357 | int ctl = snd_hda_codec_read(codec, nid, 0, |
1358 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); | 1358 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); |
1359 | if (cfg->inputs[i].type >= AUTO_PIN_FRONT_LINE) | 1359 | if (cfg->inputs[i].type > AUTO_PIN_LINE_IN) |
1360 | continue; | 1360 | continue; |
1361 | if (cfg->inputs[i].type == AUTO_PIN_FRONT_MIC && | 1361 | if (cfg->inputs[i].type == AUTO_PIN_MIC && |
1362 | spec->hp_independent_mode && spec->codec_type != VT1718S) | 1362 | spec->hp_independent_mode && spec->codec_type != VT1718S) |
1363 | continue; /* ignore FMic for independent HP */ | 1363 | continue; /* ignore FMic for independent HP */ |
1364 | if ((ctl & AC_PINCTL_IN_EN) && !(ctl & AC_PINCTL_OUT_EN)) | 1364 | if ((ctl & AC_PINCTL_IN_EN) && !(ctl & AC_PINCTL_OUT_EN)) |
@@ -1382,9 +1382,9 @@ static int via_smart51_put(struct snd_kcontrol *kcontrol, | |||
1382 | hda_nid_t nid = cfg->inputs[i].pin; | 1382 | hda_nid_t nid = cfg->inputs[i].pin; |
1383 | unsigned int parm; | 1383 | unsigned int parm; |
1384 | 1384 | ||
1385 | if (cfg->inputs[i].type >= AUTO_PIN_FRONT_LINE) | 1385 | if (cfg->inputs[i].type > AUTO_PIN_LINE_IN) |
1386 | continue; | 1386 | continue; |
1387 | if (cfg->inputs[i].type == AUTO_PIN_FRONT_MIC && | 1387 | if (cfg->inputs[i].type == AUTO_PIN_MIC && |
1388 | spec->hp_independent_mode && spec->codec_type != VT1718S) | 1388 | spec->hp_independent_mode && spec->codec_type != VT1718S) |
1389 | continue; /* don't retask FMic for independent HP */ | 1389 | continue; /* don't retask FMic for independent HP */ |
1390 | 1390 | ||
@@ -1404,7 +1404,7 @@ static int via_smart51_put(struct snd_kcontrol *kcontrol, | |||
1404 | codec, nid, HDA_OUTPUT, 0, HDA_AMP_MUTE, | 1404 | codec, nid, HDA_OUTPUT, 0, HDA_AMP_MUTE, |
1405 | HDA_AMP_UNMUTE); | 1405 | HDA_AMP_UNMUTE); |
1406 | } | 1406 | } |
1407 | if (cfg->inputs[i].type == AUTO_PIN_FRONT_MIC) { | 1407 | if (cfg->inputs[i].type == AUTO_PIN_MIC) { |
1408 | if (spec->codec_type == VT1708S | 1408 | if (spec->codec_type == VT1708S |
1409 | || spec->codec_type == VT1716S) { | 1409 | || spec->codec_type == VT1716S) { |
1410 | /* input = index 1 (AOW3) */ | 1410 | /* input = index 1 (AOW3) */ |
@@ -1450,7 +1450,7 @@ static int via_smart51_build(struct via_spec *spec) | |||
1450 | 1450 | ||
1451 | for (i = 0; i < cfg->num_inputs; i++) { | 1451 | for (i = 0; i < cfg->num_inputs; i++) { |
1452 | nid = cfg->inputs[i].pin; | 1452 | nid = cfg->inputs[i].pin; |
1453 | if (cfg->inputs[i].type < AUTO_PIN_FRONT_LINE) { | 1453 | if (cfg->inputs[i].type <= AUTO_PIN_LINE_IN) { |
1454 | knew = via_clone_control(spec, &via_smart51_mixer[1]); | 1454 | knew = via_clone_control(spec, &via_smart51_mixer[1]); |
1455 | if (knew == NULL) | 1455 | if (knew == NULL) |
1456 | return -ENOMEM; | 1456 | return -ENOMEM; |