aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_via.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-09-09 14:50:17 +0200
committerTakashi Iwai <tiwai@suse.de>2010-09-09 16:46:01 +0200
commit86e2959a10828dd2614e037fb2502bc833adca52 (patch)
tree4d5d2a60d23958d49ac8aebcb985b71d27305b01 /sound/pci/hda/patch_via.c
parentALSA: hda - Keep char arrays in input_mux items (diff)
downloadlinux-dev-86e2959a10828dd2614e037fb2502bc833adca52.tar.xz
linux-dev-86e2959a10828dd2614e037fb2502bc833adca52.zip
ALSA: hda - Remove AUTO_PIN_FRONT_{MIC|LINE}
We can assign multiple pins to a single role now, let's reduce the redundant FRONT_MIC and FRONT_LINE. Also, autocfg->input_pins[] is no longer used, so this is removed as well. 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.c16
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)
hda_nid_t nid = cfg->inputs[i].pin;
if (spec->smart51_enabled && is_smart51_pins(spec, nid))
ctl = PIN_OUT;
- else if (i <= AUTO_PIN_FRONT_MIC)
+ else if (i == AUTO_PIN_MIC)
ctl = PIN_VREF50;
else
ctl = PIN_IN;
@@ -1328,7 +1328,7 @@ static int is_smart51_pins(struct via_spec *spec, hda_nid_t pin)
for (i = 0; i < cfg->num_inputs; i++) {
if (pin == cfg->inputs[i].pin)
- return cfg->inputs[i].type < AUTO_PIN_FRONT_LINE;
+ return cfg->inputs[i].type <= AUTO_PIN_LINE_IN;
}
return 0;
}
@@ -1356,9 +1356,9 @@ static int via_smart51_get(struct snd_kcontrol *kcontrol,
hda_nid_t nid = cfg->inputs[i].pin;
int ctl = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
- if (cfg->inputs[i].type >= AUTO_PIN_FRONT_LINE)
+ if (cfg->inputs[i].type > AUTO_PIN_LINE_IN)
continue;
- if (cfg->inputs[i].type == AUTO_PIN_FRONT_MIC &&
+ if (cfg->inputs[i].type == AUTO_PIN_MIC &&
spec->hp_independent_mode && spec->codec_type != VT1718S)
continue; /* ignore FMic for independent HP */
if ((ctl & AC_PINCTL_IN_EN) && !(ctl & AC_PINCTL_OUT_EN))
@@ -1382,9 +1382,9 @@ static int via_smart51_put(struct snd_kcontrol *kcontrol,
hda_nid_t nid = cfg->inputs[i].pin;
unsigned int parm;
- if (cfg->inputs[i].type >= AUTO_PIN_FRONT_LINE)
+ if (cfg->inputs[i].type > AUTO_PIN_LINE_IN)
continue;
- if (cfg->inputs[i].type == AUTO_PIN_FRONT_MIC &&
+ if (cfg->inputs[i].type == AUTO_PIN_MIC &&
spec->hp_independent_mode && spec->codec_type != VT1718S)
continue; /* don't retask FMic for independent HP */
@@ -1404,7 +1404,7 @@ static int via_smart51_put(struct snd_kcontrol *kcontrol,
codec, nid, HDA_OUTPUT, 0, HDA_AMP_MUTE,
HDA_AMP_UNMUTE);
}
- if (cfg->inputs[i].type == AUTO_PIN_FRONT_MIC) {
+ if (cfg->inputs[i].type == AUTO_PIN_MIC) {
if (spec->codec_type == VT1708S
|| spec->codec_type == VT1716S) {
/* input = index 1 (AOW3) */
@@ -1450,7 +1450,7 @@ static int via_smart51_build(struct via_spec *spec)
for (i = 0; i < cfg->num_inputs; i++) {
nid = cfg->inputs[i].pin;
- if (cfg->inputs[i].type < AUTO_PIN_FRONT_LINE) {
+ if (cfg->inputs[i].type <= AUTO_PIN_LINE_IN) {
knew = via_clone_control(spec, &via_smart51_mixer[1]);
if (knew == NULL)
return -ENOMEM;