Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170318
b: refs/heads/master
c: fb8d1a3
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Nov 10, 2009
1 parent 553b409 commit 1ede44e
Show file tree
Hide file tree
Showing 5 changed files with 22 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: 167eae5a17b3cd44a324dbb972c338e489413f54
refs/heads/master: fb8d1a344dbe963f16249d07eee8415e93f9f3c2
17 changes: 17 additions & 0 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -3404,6 +3404,23 @@ static void cleanup_dig_out_stream(struct hda_codec *codec, hda_nid_t nid)
}
}

/* call each reboot notifier */
void snd_hda_bus_reboot_notify(struct hda_bus *bus)
{
struct hda_codec *codec;

if (!bus)
return;
list_for_each_entry(codec, &bus->codec_list, list) {
#ifdef CONFIG_SND_HDA_POWER_SAVE
if (!codec->power_on)
continue;
#endif
if (codec->patch_ops.reboot_notify)
codec->patch_ops.reboot_notify(codec);
}
}

/*
* open the digital out in the exclusive mode
*/
Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ struct hda_codec_ops {
#ifdef CONFIG_SND_HDA_POWER_SAVE
int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid);
#endif
void (*reboot_notify)(struct hda_codec *codec);
};

/* record for amp information cache */
Expand Down Expand Up @@ -910,6 +911,7 @@ int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid,
* Misc
*/
void snd_hda_get_codec_name(struct hda_codec *codec, char *name, int namelen);
void snd_hda_bus_reboot_notify(struct hda_bus *bus);

/*
* power management
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2150,6 +2150,7 @@ static int azx_resume(struct pci_dev *pci)
static int azx_halt(struct notifier_block *nb, unsigned long event, void *buf)
{
struct azx *chip = container_of(nb, struct azx, reboot_notifier);
snd_hda_bus_reboot_notify(chip->bus);
azx_stop_chip(chip);
return NOTIFY_OK;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4831,6 +4831,7 @@ static struct hda_codec_ops stac92xx_patch_ops = {
.suspend = stac92xx_suspend,
.resume = stac92xx_resume,
#endif
.reboot_notify = stac92xx_shutup,
};

static int patch_stac9200(struct hda_codec *codec)
Expand Down

0 comments on commit 1ede44e

Please sign in to comment.