diff options
author | David Woodhouse <dwmw2@infradead.org> | 2008-05-29 14:07:34 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-10 15:47:48 +0200 |
commit | 18ee6dfae89d9c131e3c9952939633ba8fa86247 (patch) | |
tree | 874daf2910c7ad12c9f979fb5a059ae2ae7bc27d /sound/pci/ymfpci/ymfpci_main.c | |
parent | firmware: convert maestro3 driver to use firmware loader exclusively (diff) | |
download | linux-18ee6dfae89d9c131e3c9952939633ba8fa86247.tar.xz linux-18ee6dfae89d9c131e3c9952939633ba8fa86247.zip |
firmware: convert ymfpci driver to use firmware loader exclusively
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'sound/pci/ymfpci/ymfpci_main.c')
-rw-r--r-- | sound/pci/ymfpci/ymfpci_main.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index 6298b29c66bb..2164e34e46b7 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c @@ -1994,65 +1994,6 @@ static void snd_ymfpci_disable_dsp(struct snd_ymfpci *chip) } } -#ifdef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL - -#include "ymfpci_image.h" - -static struct firmware snd_ymfpci_dsp_microcode = { - .size = YDSXG_DSPLENGTH, - .data = (u8 *)DspInst, -}; -static struct firmware snd_ymfpci_controller_microcode = { - .size = YDSXG_CTRLLENGTH, - .data = (u8 *)CntrlInst, -}; -static struct firmware snd_ymfpci_controller_1e_microcode = { - .size = YDSXG_CTRLLENGTH, - .data = (u8 *)CntrlInst1E, -}; - -#ifdef __BIG_ENDIAN -static int microcode_swapped; -static DEFINE_MUTEX(microcode_swap); - -static void snd_ymfpci_convert_to_le(const struct firmware *fw) -{ - int i; - u32 *data = (u32 *)fw->data; - - for (i = 0; i < fw->size / 4; ++i) - cpu_to_le32s(&data[i]); -} -#endif - -static int snd_ymfpci_request_firmware(struct snd_ymfpci *chip) -{ -#ifdef __BIG_ENDIAN - mutex_lock(µcode_swap); - if (!microcode_swapped) { - snd_ymfpci_convert_to_le(&snd_ymfpci_dsp_microcode); - snd_ymfpci_convert_to_le(&snd_ymfpci_controller_1e_microcode); - snd_ymfpci_convert_to_le(&snd_ymfpci_controller_microcode); - microcode_swapped = 1; - } - mutex_unlock(µcode_swap); -#endif - - chip->dsp_microcode = &snd_ymfpci_dsp_microcode; - if (chip->device_id == PCI_DEVICE_ID_YAMAHA_724F || - chip->device_id == PCI_DEVICE_ID_YAMAHA_740C || - chip->device_id == PCI_DEVICE_ID_YAMAHA_744 || - chip->device_id == PCI_DEVICE_ID_YAMAHA_754) - chip->controller_microcode = - &snd_ymfpci_controller_1e_microcode; - else - chip->controller_microcode = - &snd_ymfpci_controller_microcode; - return 0; -} - -#else /* use fw_loader */ - static int snd_ymfpci_request_firmware(struct snd_ymfpci *chip) { int err, is_1e; @@ -2091,8 +2032,6 @@ MODULE_FIRMWARE("yamaha/ds1_dsp.fw"); MODULE_FIRMWARE("yamaha/ds1_ctrl.fw"); MODULE_FIRMWARE("yamaha/ds1e_ctrl.fw"); -#endif - static void snd_ymfpci_download_image(struct snd_ymfpci *chip) { int i; @@ -2273,10 +2212,8 @@ static int snd_ymfpci_free(struct snd_ymfpci *chip) pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl); pci_disable_device(chip->pci); -#ifndef CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL release_firmware(chip->dsp_microcode); release_firmware(chip->controller_microcode); -#endif kfree(chip); return 0; } |