diff options
Diffstat (limited to 'sound/pci/korg1212/korg1212.c')
-rw-r--r-- | sound/pci/korg1212/korg1212.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index f4c85b52bde3..4a44c0f20f76 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c | |||
@@ -260,14 +260,6 @@ enum MonitorModeSelector { | |||
260 | #define COMMAND_ACK_DELAY 13 // number of RTC ticks to wait for an acknowledgement | 260 | #define COMMAND_ACK_DELAY 13 // number of RTC ticks to wait for an acknowledgement |
261 | // from the card after sending a command. | 261 | // from the card after sending a command. |
262 | 262 | ||
263 | #ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL | ||
264 | #include "korg1212-firmware.h" | ||
265 | static const struct firmware static_dsp_code = { | ||
266 | .data = (u8 *)dspCode, | ||
267 | .size = sizeof dspCode | ||
268 | }; | ||
269 | #endif | ||
270 | |||
271 | enum ClockSourceIndex { | 263 | enum ClockSourceIndex { |
272 | K1212_CLKIDX_AdatAt44_1K = 0, // selects source as ADAT at 44.1 kHz | 264 | K1212_CLKIDX_AdatAt44_1K = 0, // selects source as ADAT at 44.1 kHz |
273 | K1212_CLKIDX_AdatAt48K, // selects source as ADAT at 48 kHz | 265 | K1212_CLKIDX_AdatAt48K, // selects source as ADAT at 48 kHz |
@@ -412,9 +404,7 @@ struct snd_korg1212 { | |||
412 | MODULE_DESCRIPTION("korg1212"); | 404 | MODULE_DESCRIPTION("korg1212"); |
413 | MODULE_LICENSE("GPL"); | 405 | MODULE_LICENSE("GPL"); |
414 | MODULE_SUPPORTED_DEVICE("{{KORG,korg1212}}"); | 406 | MODULE_SUPPORTED_DEVICE("{{KORG,korg1212}}"); |
415 | #ifndef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL | ||
416 | MODULE_FIRMWARE("korg/k1212.dsp"); | 407 | MODULE_FIRMWARE("korg/k1212.dsp"); |
417 | #endif | ||
418 | 408 | ||
419 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ | 409 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ |
420 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ | 410 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ |
@@ -2348,9 +2338,6 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev * | |||
2348 | korg1212->AdatTimeCodePhy = korg1212->sharedBufferPhy + | 2338 | korg1212->AdatTimeCodePhy = korg1212->sharedBufferPhy + |
2349 | offsetof(struct KorgSharedBuffer, AdatTimeCode); | 2339 | offsetof(struct KorgSharedBuffer, AdatTimeCode); |
2350 | 2340 | ||
2351 | #ifdef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL | ||
2352 | dsp_code = &static_dsp_code; | ||
2353 | #else | ||
2354 | err = request_firmware(&dsp_code, "korg/k1212.dsp", &pci->dev); | 2341 | err = request_firmware(&dsp_code, "korg/k1212.dsp", &pci->dev); |
2355 | if (err < 0) { | 2342 | if (err < 0) { |
2356 | release_firmware(dsp_code); | 2343 | release_firmware(dsp_code); |
@@ -2358,15 +2345,12 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev * | |||
2358 | snd_korg1212_free(korg1212); | 2345 | snd_korg1212_free(korg1212); |
2359 | return err; | 2346 | return err; |
2360 | } | 2347 | } |
2361 | #endif | ||
2362 | 2348 | ||
2363 | if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), | 2349 | if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), |
2364 | dsp_code->size, &korg1212->dma_dsp) < 0) { | 2350 | dsp_code->size, &korg1212->dma_dsp) < 0) { |
2365 | snd_printk(KERN_ERR "korg1212: cannot allocate dsp code memory (%zd bytes)\n", dsp_code->size); | 2351 | snd_printk(KERN_ERR "korg1212: cannot allocate dsp code memory (%zd bytes)\n", dsp_code->size); |
2366 | snd_korg1212_free(korg1212); | 2352 | snd_korg1212_free(korg1212); |
2367 | #ifndef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL | ||
2368 | release_firmware(dsp_code); | 2353 | release_firmware(dsp_code); |
2369 | #endif | ||
2370 | return -ENOMEM; | 2354 | return -ENOMEM; |
2371 | } | 2355 | } |
2372 | 2356 | ||
@@ -2376,9 +2360,7 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev * | |||
2376 | 2360 | ||
2377 | memcpy(korg1212->dma_dsp.area, dsp_code->data, dsp_code->size); | 2361 | memcpy(korg1212->dma_dsp.area, dsp_code->data, dsp_code->size); |
2378 | 2362 | ||
2379 | #ifndef CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL | ||
2380 | release_firmware(dsp_code); | 2363 | release_firmware(dsp_code); |
2381 | #endif | ||
2382 | 2364 | ||
2383 | rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_RebootCard, 0, 0, 0, 0); | 2365 | rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_RebootCard, 0, 0, 0, 0); |
2384 | 2366 | ||