Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260797
b: refs/heads/master
c: d02667e
h: refs/heads/master
i:
  260795: 5b1aaf4
v: v3
  • Loading branch information
Vitaliy Kulikov authored and Takashi Iwai committed Jul 26, 2011
1 parent 8d64016 commit a3bb00c
Show file tree
Hide file tree
Showing 4 changed files with 18 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: 0c27c1805269f9ff01cc1d77752a662065ebcfe5
refs/heads/master: d02667e6206fb3be0990c38af8447a4ed2b74c11
2 changes: 2 additions & 0 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -5103,6 +5103,8 @@ int snd_hda_resume(struct hda_bus *bus)
struct hda_codec *codec;

list_for_each_entry(codec, &bus->codec_list, list) {
if (codec->patch_ops.pre_resume)
codec->patch_ops.pre_resume(codec);
if (snd_hda_codec_needs_resume(codec))
hda_call_codec_resume(codec);
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,9 @@ struct hda_codec_ops {
int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid);
#endif
void (*reboot_notify)(struct hda_codec *codec);
#ifdef SND_HDA_NEEDS_RESUME
int (*pre_resume)(struct hda_codec *codec);
#endif
};

/* record for amp information cache */
Expand Down
12 changes: 12 additions & 0 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4935,6 +4935,17 @@ static void stac927x_proc_hook(struct snd_info_buffer *buffer,
#endif

#ifdef SND_HDA_NEEDS_RESUME
static int stac92xx_pre_resume(struct hda_codec *codec)
{
struct sigmatel_spec *spec = codec->spec;

/* sync mute LED */
if (spec->gpio_led)
stac_gpio_set(codec, spec->gpio_mask,
spec->gpio_dir, spec->gpio_data);
return 0;
}

static int stac92xx_resume(struct hda_codec *codec)
{
struct sigmatel_spec *spec = codec->spec;
Expand Down Expand Up @@ -5013,6 +5024,7 @@ static const struct hda_codec_ops stac92xx_patch_ops = {
#ifdef SND_HDA_NEEDS_RESUME
.suspend = stac92xx_suspend,
.resume = stac92xx_resume,
.pre_resume = stac92xx_pre_resume,
#endif
.reboot_notify = stac92xx_shutup,
};
Expand Down

0 comments on commit a3bb00c

Please sign in to comment.