aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 10:14:10 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:27:58 -0500
commit09668b441dacdf4640509b640ad73e24efd5204f (patch)
tree177d0548acbcca4432f82ce6f3aa397cba5ba528 /include
parentfe8be10786c040bce53c18048d75b1b23aec64ae (diff)
[ALSA] emu10k1 - Add PM support
Modules: EMU10K1/EMU10K2 driver Add PM support to emu10k1 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/sound/emu10k1.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index d14c543b1608..3d0496cc1090 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1071,7 +1071,8 @@ struct snd_emu10k1 {
1071 1071
1072 unsigned long port; /* I/O port number */ 1072 unsigned long port; /* I/O port number */
1073 unsigned int tos_link: 1, /* tos link detected */ 1073 unsigned int tos_link: 1, /* tos link detected */
1074 rear_ac97: 1; /* rear channels are on AC'97 */ 1074 rear_ac97: 1, /* rear channels are on AC'97 */
1075 enable_ir: 1;
1075 /* Contains profile of card capabilities */ 1076 /* Contains profile of card capabilities */
1076 const struct snd_emu_chip_details *card_capabilities; 1077 const struct snd_emu_chip_details *card_capabilities;
1077 unsigned int audigy; /* is Audigy? */ 1078 unsigned int audigy; /* is Audigy? */
@@ -1108,6 +1109,7 @@ struct snd_emu10k1 {
1108 struct snd_pcm *pcm; 1109 struct snd_pcm *pcm;
1109 struct snd_pcm *pcm_mic; 1110 struct snd_pcm *pcm_mic;
1110 struct snd_pcm *pcm_efx; 1111 struct snd_pcm *pcm_efx;
1112 struct snd_pcm *pcm_multi;
1111 struct snd_pcm *pcm_p16v; 1113 struct snd_pcm *pcm_p16v;
1112 1114
1113 spinlock_t synth_lock; 1115 spinlock_t synth_lock;
@@ -1153,6 +1155,17 @@ struct snd_emu10k1 {
1153 1155
1154 unsigned int efx_voices_mask[2]; 1156 unsigned int efx_voices_mask[2];
1155 unsigned int next_free_voice; 1157 unsigned int next_free_voice;
1158
1159#ifdef CONFIG_PM
1160 unsigned int *saved_ptr;
1161 unsigned int *saved_gpr;
1162 unsigned int *tram_val_saved;
1163 unsigned int *tram_addr_saved;
1164 unsigned int *saved_icode;
1165 unsigned int *p16v_saved;
1166 unsigned int saved_a_iocfg, saved_hcfg;
1167#endif
1168
1156}; 1169};
1157 1170
1158int snd_emu10k1_create(struct snd_card *card, 1171int snd_emu10k1_create(struct snd_card *card,
@@ -1178,11 +1191,11 @@ int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device, struct snd_hwdep
1178 1191
1179irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs); 1192irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs);
1180 1193
1181/* initialization */
1182void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice); 1194void snd_emu10k1_voice_init(struct snd_emu10k1 * emu, int voice);
1183int snd_emu10k1_init_efx(struct snd_emu10k1 *emu); 1195int snd_emu10k1_init_efx(struct snd_emu10k1 *emu);
1184void snd_emu10k1_free_efx(struct snd_emu10k1 *emu); 1196void snd_emu10k1_free_efx(struct snd_emu10k1 *emu);
1185int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size); 1197int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size);
1198int snd_emu10k1_done(struct snd_emu10k1 * emu);
1186 1199
1187/* I/O functions */ 1200/* I/O functions */
1188unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn); 1201unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn);
@@ -1206,6 +1219,20 @@ unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg);
1206void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data); 1219void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data);
1207unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate); 1220unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate);
1208 1221
1222#ifdef CONFIG_PM
1223void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu);
1224void snd_emu10k1_resume_init(struct snd_emu10k1 *emu);
1225void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu);
1226int snd_emu10k1_efx_alloc_pm_buffer(struct snd_emu10k1 *emu);
1227void snd_emu10k1_efx_free_pm_buffer(struct snd_emu10k1 *emu);
1228void snd_emu10k1_efx_suspend(struct snd_emu10k1 *emu);
1229void snd_emu10k1_efx_resume(struct snd_emu10k1 *emu);
1230int snd_p16v_alloc_pm_buffer(struct snd_emu10k1 *emu);
1231void snd_p16v_free_pm_buffer(struct snd_emu10k1 *emu);
1232void snd_p16v_suspend(struct snd_emu10k1 *emu);
1233void snd_p16v_resume(struct snd_emu10k1 *emu);
1234#endif
1235
1209/* memory allocation */ 1236/* memory allocation */
1210struct snd_util_memblk *snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream); 1237struct snd_util_memblk *snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substream);
1211int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk); 1238int snd_emu10k1_free_pages(struct snd_emu10k1 *emu, struct snd_util_memblk *blk);