aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-05-13 03:24:39 -0400
committerJaroslav Kysela <perex@perex.cz>2008-05-19 07:19:17 -0400
commit4a4bc53bc52978dd6c918531921da925fd047d95 (patch)
tree3705801799fa4673f8ced7640e4bcf66049e38fd /sound/pci/oxygen/oxygen.c
parent92215f3a178080bd9d7c65879499e9474e54d55c (diff)
[ALSA] oxygen: add PM support
Add suspend/resume support. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/oxygen/oxygen.c')
-rw-r--r--sound/pci/oxygen/oxygen.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index 800ae304a247..7c8ae31eb468 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -192,6 +192,12 @@ static void generic_cleanup(struct oxygen *chip)
192{ 192{
193} 193}
194 194
195static void generic_resume(struct oxygen *chip)
196{
197 ak4396_registers_init(chip);
198 wm8785_registers_init(chip);
199}
200
195static void set_ak4396_params(struct oxygen *chip, 201static void set_ak4396_params(struct oxygen *chip,
196 struct snd_pcm_hw_params *params) 202 struct snd_pcm_hw_params *params)
197{ 203{
@@ -278,6 +284,7 @@ static const struct oxygen_model model_generic = {
278 .owner = THIS_MODULE, 284 .owner = THIS_MODULE,
279 .init = generic_init, 285 .init = generic_init,
280 .cleanup = generic_cleanup, 286 .cleanup = generic_cleanup,
287 .resume = generic_resume,
281 .set_dac_params = set_ak4396_params, 288 .set_dac_params = set_ak4396_params,
282 .set_adc_params = set_wm8785_params, 289 .set_adc_params = set_wm8785_params,
283 .update_dac_volume = update_ak4396_volume, 290 .update_dac_volume = update_ak4396_volume,
@@ -305,6 +312,7 @@ static const struct oxygen_model model_meridian = {
305 .owner = THIS_MODULE, 312 .owner = THIS_MODULE,
306 .init = meridian_init, 313 .init = meridian_init,
307 .cleanup = generic_cleanup, 314 .cleanup = generic_cleanup,
315 .resume = ak4396_registers_init,
308 .set_dac_params = set_ak4396_params, 316 .set_dac_params = set_ak4396_params,
309 .set_adc_params = set_ak5385_params, 317 .set_adc_params = set_ak5385_params,
310 .update_dac_volume = update_ak4396_volume, 318 .update_dac_volume = update_ak4396_volume,
@@ -353,6 +361,10 @@ static struct pci_driver oxygen_driver = {
353 .id_table = oxygen_ids, 361 .id_table = oxygen_ids,
354 .probe = generic_oxygen_probe, 362 .probe = generic_oxygen_probe,
355 .remove = __devexit_p(oxygen_pci_remove), 363 .remove = __devexit_p(oxygen_pci_remove),
364#ifdef CONFIG_PM
365 .suspend = oxygen_pci_suspend,
366 .resume = oxygen_pci_resume,
367#endif
356}; 368};
357 369
358static int __init alsa_card_oxygen_init(void) 370static int __init alsa_card_oxygen_init(void)