Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92201
b: refs/heads/master
c: 0fc9dec
h: refs/heads/master
i:
  92199: 05584c2
v: v3
  • Loading branch information
Matthew Ranostay authored and Takashi Iwai committed Apr 24, 2008
1 parent 691e7a4 commit 65cc6f4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 780c8be4ab6c7baf5cdfa1102f56480acb8a2479
refs/heads/master: 0fc9dec46fae19da9899c580a6b870202103f8bb
25 changes: 19 additions & 6 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ struct sigmatel_spec {
unsigned int hp_detect: 1;

/* gpio lines */
unsigned int eapd_mask;
unsigned int gpio_mask;
unsigned int gpio_dir;
unsigned int gpio_data;
Expand Down Expand Up @@ -3183,6 +3184,10 @@ static void stac92xx_hp_detect(struct hda_codec *codec, unsigned int res)
for (i = 0; i < cfg->speaker_outs; i++)
stac92xx_reset_pinctl(codec, cfg->speaker_pins[i],
AC_PINCTL_OUT_EN);
if (spec->eapd_mask)
stac_gpio_set(codec, spec->gpio_mask,
spec->gpio_dir, spec->gpio_data &
~spec->eapd_mask);
} else {
/* enable lineouts, disable hp */
for (i = 0; i < cfg->line_outs; i++)
Expand All @@ -3191,6 +3196,10 @@ static void stac92xx_hp_detect(struct hda_codec *codec, unsigned int res)
for (i = 0; i < cfg->speaker_outs; i++)
stac92xx_set_pinctl(codec, cfg->speaker_pins[i],
AC_PINCTL_OUT_EN);
if (spec->eapd_mask)
stac_gpio_set(codec, spec->gpio_mask,
spec->gpio_dir, spec->gpio_data |
spec->eapd_mask);
}
}

Expand Down Expand Up @@ -3478,7 +3487,7 @@ static int patch_stac92hd73xx(struct hda_codec *codec)
spec->num_dmuxes = ARRAY_SIZE(stac92hd73xx_dmux_nids);
spec->dinput_mux = &stac92hd73xx_dmux;
/* GPIO0 High = Enable EAPD */
spec->gpio_mask = spec->gpio_dir = 0x1;
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
spec->gpio_data = 0x01;

switch (spec->board_config) {
Expand Down Expand Up @@ -3584,7 +3593,10 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
spec->aloopback_shift = 0;

/* GPIO0 High = EAPD */
spec->gpio_mask = spec->gpio_dir = spec->gpio_data = 0x1;
spec->gpio_mask = 0x01;
spec->gpio_dir = 0x01;
spec->gpio_mask = 0x01;
spec->gpio_data = 0x01;

spec->mux_nids = stac92hd71bxx_mux_nids;
spec->adc_nids = stac92hd71bxx_adc_nids;
Expand Down Expand Up @@ -3770,7 +3782,7 @@ static int patch_stac927x(struct hda_codec *codec)
case STAC_D965_3ST:
case STAC_D965_5ST:
/* GPIO0 High = Enable EAPD */
spec->gpio_mask = spec->gpio_dir = 0x01;
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x01;
spec->gpio_data = 0x01;
spec->num_dmics = 0;

Expand All @@ -3794,7 +3806,7 @@ static int patch_stac927x(struct hda_codec *codec)
/* fallthru */
case STAC_DELL_3ST:
/* GPIO2 High = Enable EAPD */
spec->gpio_mask = spec->gpio_dir = 0x04;
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04;
spec->gpio_data = 0x04;
spec->dmic_nids = stac927x_dmic_nids;
spec->num_dmics = STAC927X_NUM_DMICS;
Expand All @@ -3806,7 +3818,7 @@ static int patch_stac927x(struct hda_codec *codec)
break;
default:
/* GPIO0 High = Enable EAPD */
spec->gpio_mask = spec->gpio_dir = 0x1;
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
spec->gpio_data = 0x01;
spec->num_dmics = 0;

Expand Down Expand Up @@ -3910,6 +3922,7 @@ static int patch_stac9205(struct hda_codec *codec)
(AC_USRSP_EN | STAC_HP_EVENT));

spec->gpio_dir = 0x0b;
spec->eapd_mask = 0x01;
spec->gpio_mask = 0x1b;
spec->gpio_mute = 0x10;
/* GPIO0 High = EAPD, GPIO1 Low = Headphone Mute,
Expand All @@ -3919,7 +3932,7 @@ static int patch_stac9205(struct hda_codec *codec)
break;
default:
/* GPIO0 High = EAPD */
spec->gpio_mask = spec->gpio_dir = 0x1;
spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
spec->gpio_data = 0x01;
break;
}
Expand Down

0 comments on commit 65cc6f4

Please sign in to comment.