Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133093
b: refs/heads/master
c: 6565e4f
h: refs/heads/master
i:
  133091: 6b094b4
v: v3
  • Loading branch information
Takashi Iwai committed Mar 2, 2009
1 parent 6a14bbd commit c9dec8d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d78d7a90adf793943cc29a414b6f4364a700aad5
refs/heads/master: 6565e4faca257fc51a4c55199d72e2701ba7e819
33 changes: 33 additions & 0 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -3949,6 +3949,36 @@ static void stac92xx_power_down(struct hda_codec *codec)
static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid,
int enable);

/* override some hints from the hwdep entry */
static void stac_store_hints(struct hda_codec *codec)
{
struct sigmatel_spec *spec = codec->spec;
const char *p;
int val;

val = snd_hda_get_bool_hint(codec, "hp_detect");
if (val >= 0)
spec->hp_detect = val;
p = snd_hda_get_hint(codec, "gpio_mask");
if (p) {
spec->gpio_mask = simple_strtoul(p, NULL, 0);
spec->eapd_mask = spec->gpio_dir = spec->gpio_data =
spec->gpio_mask;
}
p = snd_hda_get_hint(codec, "gpio_dir");
if (p)
spec->gpio_dir = simple_strtoul(p, NULL, 0) & spec->gpio_mask;
p = snd_hda_get_hint(codec, "gpio_data");
if (p)
spec->gpio_data = simple_strtoul(p, NULL, 0) & spec->gpio_mask;
p = snd_hda_get_hint(codec, "eapd_mask");
if (p)
spec->eapd_mask = simple_strtoul(p, NULL, 0) & spec->gpio_mask;
val = snd_hda_get_bool_hint(codec, "eapd_switch");
if (val >= 0)
spec->eapd_switch = val;
}

static int stac92xx_init(struct hda_codec *codec)
{
struct sigmatel_spec *spec = codec->spec;
Expand All @@ -3965,6 +3995,9 @@ static int stac92xx_init(struct hda_codec *codec)
spec->adc_nids[i], 0,
AC_VERB_SET_POWER_STATE, AC_PWRST_D3);

/* override some hints */
stac_store_hints(codec);

/* set up GPIO */
gpio = spec->gpio_data;
/* turn on EAPD statically when spec->eapd_switch isn't set.
Expand Down

0 comments on commit c9dec8d

Please sign in to comment.