aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ctxfi/xfi.c
diff options
context:
space:
mode:
authorWai Yew CHAY <wychay@ctl.creative.com>2009-06-22 08:52:34 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-22 08:53:51 -0400
commit29959a09cc1aabd2d5f4f03afc0305de6bd29248 (patch)
treee7e4ed3d33995ab9e83ae378bb9d42fce63f8fde /sound/pci/ctxfi/xfi.c
parenta8f4310be59a2e7fc80fba945bcb32b18f4ad54f (diff)
ALSA: ctxfi - Add PM support
Added the suspend/resume support to ctxfi driver. The team tested on the following seems ok: AMD Athlon 64 3500+ / ASUS A8N-E / 512MB DDR ATI / Radeon X1300 20k1 & 20k2 cards Signed-off-by: Wai Yew CHAY <wychay@ctl.creative.com> Singed-off-by: Ryan RICHARDS <ryan_richards@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/xfi.c')
-rw-r--r--sound/pci/ctxfi/xfi.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/pci/ctxfi/xfi.c b/sound/pci/ctxfi/xfi.c
index 2d3dd89af151..76541748e7bc 100644
--- a/sound/pci/ctxfi/xfi.c
+++ b/sound/pci/ctxfi/xfi.c
@@ -121,11 +121,33 @@ static void __devexit ct_card_remove(struct pci_dev *pci)
121 pci_set_drvdata(pci, NULL); 121 pci_set_drvdata(pci, NULL);
122} 122}
123 123
124#ifdef CONFIG_PM
125static int ct_card_suspend(struct pci_dev *pci, pm_message_t state)
126{
127 struct snd_card *card = pci_get_drvdata(pci);
128 struct ct_atc *atc = card->private_data;
129
130 return atc->suspend(atc, state);
131}
132
133static int ct_card_resume(struct pci_dev *pci)
134{
135 struct snd_card *card = pci_get_drvdata(pci);
136 struct ct_atc *atc = card->private_data;
137
138 return atc->resume(atc);
139}
140#endif
141
124static struct pci_driver ct_driver = { 142static struct pci_driver ct_driver = {
125 .name = "SB-XFi", 143 .name = "SB-XFi",
126 .id_table = ct_pci_dev_ids, 144 .id_table = ct_pci_dev_ids,
127 .probe = ct_card_probe, 145 .probe = ct_card_probe,
128 .remove = __devexit_p(ct_card_remove), 146 .remove = __devexit_p(ct_card_remove),
147#ifdef CONFIG_PM
148 .suspend = ct_card_suspend,
149 .resume = ct_card_resume,
150#endif
129}; 151};
130 152
131static int __init ct_card_init(void) 153static int __init ct_card_init(void)