diff options
Diffstat (limited to 'sound/isa/sb/sb16_csp.c')
-rw-r--r-- | sound/isa/sb/sb16_csp.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c index f3fd7b4f4668..35f3d7b16536 100644 --- a/sound/isa/sb/sb16_csp.c +++ b/sound/isa/sb/sb16_csp.c | |||
@@ -35,13 +35,11 @@ | |||
35 | MODULE_AUTHOR("Uros Bizjak <uros@kss-loka.si>"); | 35 | MODULE_AUTHOR("Uros Bizjak <uros@kss-loka.si>"); |
36 | MODULE_DESCRIPTION("ALSA driver for SB16 Creative Signal Processor"); | 36 | MODULE_DESCRIPTION("ALSA driver for SB16 Creative Signal Processor"); |
37 | MODULE_LICENSE("GPL"); | 37 | MODULE_LICENSE("GPL"); |
38 | #ifndef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL | ||
39 | MODULE_FIRMWARE("sb16/mulaw_main.csp"); | 38 | MODULE_FIRMWARE("sb16/mulaw_main.csp"); |
40 | MODULE_FIRMWARE("sb16/alaw_main.csp"); | 39 | MODULE_FIRMWARE("sb16/alaw_main.csp"); |
41 | MODULE_FIRMWARE("sb16/ima_adpcm_init.csp"); | 40 | MODULE_FIRMWARE("sb16/ima_adpcm_init.csp"); |
42 | MODULE_FIRMWARE("sb16/ima_adpcm_playback.csp"); | 41 | MODULE_FIRMWARE("sb16/ima_adpcm_playback.csp"); |
43 | MODULE_FIRMWARE("sb16/ima_adpcm_capture.csp"); | 42 | MODULE_FIRMWARE("sb16/ima_adpcm_capture.csp"); |
44 | #endif | ||
45 | 43 | ||
46 | #ifdef SNDRV_LITTLE_ENDIAN | 44 | #ifdef SNDRV_LITTLE_ENDIAN |
47 | #define CSP_HDR_VALUE(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24)) | 45 | #define CSP_HDR_VALUE(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24)) |
@@ -168,17 +166,13 @@ int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep) | |||
168 | */ | 166 | */ |
169 | static void snd_sb_csp_free(struct snd_hwdep *hwdep) | 167 | static void snd_sb_csp_free(struct snd_hwdep *hwdep) |
170 | { | 168 | { |
171 | #ifndef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL | ||
172 | int i; | 169 | int i; |
173 | #endif | ||
174 | struct snd_sb_csp *p = hwdep->private_data; | 170 | struct snd_sb_csp *p = hwdep->private_data; |
175 | if (p) { | 171 | if (p) { |
176 | if (p->running & SNDRV_SB_CSP_ST_RUNNING) | 172 | if (p->running & SNDRV_SB_CSP_ST_RUNNING) |
177 | snd_sb_csp_stop(p); | 173 | snd_sb_csp_stop(p); |
178 | #ifndef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL | ||
179 | for (i = 0; i < ARRAY_SIZE(p->csp_programs); ++i) | 174 | for (i = 0; i < ARRAY_SIZE(p->csp_programs); ++i) |
180 | release_firmware(p->csp_programs[i]); | 175 | release_firmware(p->csp_programs[i]); |
181 | #endif | ||
182 | kfree(p); | 176 | kfree(p); |
183 | } | 177 | } |
184 | } | 178 | } |
@@ -701,18 +695,6 @@ static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __use | |||
701 | return err; | 695 | return err; |
702 | } | 696 | } |
703 | 697 | ||
704 | #ifdef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL | ||
705 | #include "sb16_csp_codecs.h" | ||
706 | |||
707 | static const struct firmware snd_sb_csp_static_programs[] = { | ||
708 | { .data = mulaw_main, .size = sizeof mulaw_main }, | ||
709 | { .data = alaw_main, .size = sizeof alaw_main }, | ||
710 | { .data = ima_adpcm_init, .size = sizeof ima_adpcm_init }, | ||
711 | { .data = ima_adpcm_playback, .size = sizeof ima_adpcm_playback }, | ||
712 | { .data = ima_adpcm_capture, .size = sizeof ima_adpcm_capture }, | ||
713 | }; | ||
714 | #endif | ||
715 | |||
716 | static int snd_sb_csp_firmware_load(struct snd_sb_csp *p, int index, int flags) | 698 | static int snd_sb_csp_firmware_load(struct snd_sb_csp *p, int index, int flags) |
717 | { | 699 | { |
718 | static const char *const names[] = { | 700 | static const char *const names[] = { |
@@ -727,14 +709,10 @@ static int snd_sb_csp_firmware_load(struct snd_sb_csp *p, int index, int flags) | |||
727 | BUILD_BUG_ON(ARRAY_SIZE(names) != CSP_PROGRAM_COUNT); | 709 | BUILD_BUG_ON(ARRAY_SIZE(names) != CSP_PROGRAM_COUNT); |
728 | program = p->csp_programs[index]; | 710 | program = p->csp_programs[index]; |
729 | if (!program) { | 711 | if (!program) { |
730 | #ifdef CONFIG_SND_SB16_CSP_FIRMWARE_IN_KERNEL | ||
731 | program = &snd_sb_csp_static_programs[index]; | ||
732 | #else | ||
733 | int err = request_firmware(&program, names[index], | 712 | int err = request_firmware(&program, names[index], |
734 | p->chip->card->dev); | 713 | p->chip->card->dev); |
735 | if (err < 0) | 714 | if (err < 0) |
736 | return err; | 715 | return err; |
737 | #endif | ||
738 | p->csp_programs[index] = program; | 716 | p->csp_programs[index] = program; |
739 | } | 717 | } |
740 | return snd_sb_csp_load(p, program->data, program->size, flags); | 718 | return snd_sb_csp_load(p, program->data, program->size, flags); |