27 #include <linux/pci.h>
28 #include <linux/time.h>
29 #include <linux/module.h>
38 "{Creative Labs,SB Audigy}}");
40 #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
64 MODULE_PARM_DESC(extin,
"Available external inputs for FX8010. Zero=default.");
66 MODULE_PARM_DESC(extout,
"Available external outputs for FX8010. Zero=default.");
68 MODULE_PARM_DESC(seq_ports,
"Allocated sequencer ports for internal synthesizer.");
70 MODULE_PARM_DESC(max_synth_voices,
"Maximum number of voices for WaveTable.");
78 MODULE_PARM_DESC(delay_pcm_irq,
"Delay PCM interrupt by specified number of samples (default 0).");
107 struct snd_emu10k1 *
emu;
123 if (max_buffer_size[dev] < 32)
124 max_buffer_size[
dev] = 32;
125 else if (max_buffer_size[dev] > 1024)
126 max_buffer_size[
dev] = 1024;
128 (
long)max_buffer_size[dev] * 1024 * 1024,
129 enable_ir[dev], subsystem[dev],
133 emu->delay_pcm_irq = delay_pcm_irq[
dev] & 0x1f;
141 if (emu->card_capabilities->ca0151_chip) {
143 1024, &emu->p16v_buffer)) < 0)
155 if (emu->card_capabilities->ca0151_chip) {
187 "%s (rev.%d, serial:0x%x) at 0x%lx, irq %i",
188 card->
shortname, emu->revision, emu->serial, emu->port, emu->irq);
193 pci_set_drvdata(pci, card);
205 pci_set_drvdata(pci,
NULL);
209 #ifdef CONFIG_PM_SLEEP
210 static int snd_emu10k1_suspend(
struct device *dev)
218 snd_pcm_suspend_all(emu->pcm);
219 snd_pcm_suspend_all(emu->pcm_mic);
220 snd_pcm_suspend_all(emu->pcm_efx);
221 snd_pcm_suspend_all(emu->pcm_multi);
222 snd_pcm_suspend_all(emu->pcm_p16v);
224 snd_ac97_suspend(emu->ac97);
226 snd_emu10k1_efx_suspend(emu);
227 snd_emu10k1_suspend_regs(emu);
228 if (emu->card_capabilities->ca0151_chip)
229 snd_p16v_suspend(emu);
239 static int snd_emu10k1_resume(
struct device *dev)
249 "disabling device\n");
255 snd_emu10k1_resume_init(emu);
256 snd_emu10k1_efx_resume(emu);
257 snd_ac97_resume(emu->ac97);
258 snd_emu10k1_resume_regs(emu);
260 if (emu->card_capabilities->ca0151_chip)
261 snd_p16v_resume(emu);
267 static SIMPLE_DEV_PM_OPS(snd_emu10k1_pm, snd_emu10k1_suspend, snd_emu10k1_resume);
268 #define SND_EMU10K1_PM_OPS &snd_emu10k1_pm
270 #define SND_EMU10K1_PM_OPS NULL
274 .name = KBUILD_MODNAME,
275 .id_table = snd_emu10k1_ids,
276 .probe = snd_card_emu10k1_probe,