Lines Matching defs:card
3 * Driver for the Korg 1212 IO PCI card
48 // Valid states of the Korg 1212 I/O card.
51 K1212_STATE_NONEXISTENT, // there is no card here
52 K1212_STATE_UNINITIALIZED, // the card is awaiting DSP download
53 K1212_STATE_DSP_IN_PROCESS, // the card is currently downloading its DSP code
54 K1212_STATE_DSP_COMPLETE, // the card has finished the DSP download
55 K1212_STATE_READY, // the card can be opened by an application. Any application
58 K1212_STATE_OPEN, // an application has opened the card
59 K1212_STATE_SETUP, // the card has been setup for play
60 K1212_STATE_PLAYING, // the card is playing
61 K1212_STATE_MONITOR, // the card is in the monitor mode
62 K1212_STATE_CALIBRATING, // the card is currently calibrating
63 K1212_STATE_ERRORSTOP, // the card has stopped itself because of an error and we
69 // The following enumeration defines the constants written to the card's
70 // host-to-card doorbell to initiate a command.
73 K1212_DB_RequestForData = 0, // sent by the card to request a buffer fill.
74 K1212_DB_TriggerPlay = 1, // starts playback/record on the card.
76 K1212_DB_ConfigureBufferMemory = 3, // tells card where the host audio buffers are.
77 K1212_DB_RequestAdatTimecode = 4, // asks the card for the latest ADAT timecode value.
78 K1212_DB_SetClockSourceRate = 5, // sets the clock source and rate for the card.
79 K1212_DB_ConfigureMiscMemory = 6, // tells card where other buffers are.
80 K1212_DB_TriggerFromAdat = 7, // tells card to trigger from Adat at a specific
84 K1212_DB_RebootCard = 0xA0, // instructs the card to reboot.
85 K1212_DB_BootFromDSPPage4 = 0xA4, // instructs the card to boot from the DSP microcode
86 // on page 4 (local page to card).
87 K1212_DB_DSPDownloadDone = 0xAE, // sent by the card to indicate the download has
89 K1212_DB_StartDSPDownload = 0xAF // tells the card to download its DSP firmware.
103 // the card's current state. (or the wave device's
105 K1212_CMDRET_CardUninitialized, // the card is uninitialized and cannot be used
106 K1212_CMDRET_BadIndex, // an out of range card index was specified
107 K1212_CMDRET_BadHandle, // an invalid card handle was specified
110 K1212_CMDRET_NoAckFromCard, // the card never acknowledged a command
119 // mode for the card in the SelectPlayMode command.
122 K1212_MODE_SetupPlay = 0x00000001, // provides card with pre-play information
123 K1212_MODE_MonitorOn = 0x00000002, // tells card to turn on monitor mode
124 K1212_MODE_MonitorOff = 0x00000004, // tells card to turn off monitor mode
125 K1212_MODE_StopPlay = 0x00000008 // stops playback on the card
130 // mode for the card in the SetMonitorMode command.
133 K1212_MONMODE_Off = 0, // tells card to turn off monitor mode
134 K1212_MONMODE_On // tells card to turn on monitor mode
153 // the card.
218 // the following constants are used in setting the 1212 I/O card's input
243 #define STOPCARD_DELAY 300 // max # RTC ticks for the card to stop once we write
246 // from the card after sending a command.
303 struct snd_card *card;
343 u32 __iomem * outDoorbellPtr; // address of the host->card doorbell register
344 u32 __iomem * inDoorbellPtr; // address of the card->host doorbell register
345 u32 __iomem * mailbox0Ptr; // address of mailbox 0 on the card
346 u32 __iomem * mailbox1Ptr; // address of mailbox 1 on the card
347 u32 __iomem * mailbox2Ptr; // address of mailbox 2 on the card
348 u32 __iomem * mailbox3Ptr; // address of mailbox 3 on the card
365 int idleMonitorOn; // indicates whether the card is in idle monitor mode.
366 u32 cmdRetryCount; // tracks how many times we have retried sending to the card.
394 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
395 static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */
528 writel(doorbellVal, korg1212->outDoorbellPtr); // interrupt the card
541 // See if the card acknowledged the command. Wait a bit, then
883 // the card's eeprom control register.
892 // card's control register.
898 // make sure the card is not in monitor mode when we do this update.
909 // we are about to send new values to the card, so clear the new values queued
1002 // Also, if the card was in monitor mode, restore it.
1028 // tell the card to boot
1038 // Let the card know where all the buffers are.
1044 ((kNumBuffers * kPlayBufferFrames) / 2), // size given to the card
1068 // Initialize the routing and volume tables, then update the card's state.
1128 // an error occurred - stop the card
1142 // the card has stopped by our request. Clear the command word and signal
1195 // verify the state of the card before proceeding.
2029 snd_iprintf(buffer, korg1212->card->longname);
2030 snd_iprintf(buffer, " (index #%d)\n", korg1212->card->number + 1);
2053 snd_card_ro_proc_new(korg1212->card, "korg1212", korg1212,
2058 snd_korg1212_free(struct snd_card *card)
2060 struct snd_korg1212 *korg1212 = card->private_data;
2066 static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci)
2074 struct snd_korg1212 *korg1212 = card->private_data;
2081 korg1212->card = card;
2143 card->sync_irq = korg1212->irq;
2144 card->private_free = snd_korg1212_free;
2159 K1212_DEBUG_PRINTK("K1212_DEBUG: card registers:\n"
2279 err = snd_pcm_new(korg1212->card, "korg1212", 0, 1, 1, &korg1212->pcm);
2294 err = snd_ctl_add(korg1212->card, snd_ctl_new1(&snd_korg1212_controls[i], korg1212));
2314 struct snd_card *card;
2325 sizeof(*korg1212), &card);
2328 korg1212 = card->private_data;
2330 err = snd_korg1212_create(card, pci);
2334 strcpy(card->driver, "korg1212");
2335 strcpy(card->shortname, "korg1212");
2336 sprintf(card->longname, "%s at 0x%lx, irq %d", card->shortname,
2339 K1212_DEBUG_PRINTK("K1212_DEBUG: %s\n", card->longname);
2341 err = snd_card_register(card);
2344 pci_set_drvdata(pci, card);
2349 snd_card_free(card);