diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/emu10k1/emu10k1_main.c | 7 | ||||
-rw-r--r-- | sound/pci/emu10k1/io.c | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index c8aa4143ac4f..5b8a5ba825bd 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -683,7 +683,7 @@ static int snd_emu1010_load_firmware(struct snd_emu10k1 *emu, int dock, return err; } - snd_emu1010_load_firmware_entry(emu, *fw); + snd_emu1010_load_firmware_entry(emu, dock, *fw); return 0; } @@ -699,9 +699,6 @@ static void snd_emu1010_load_dock_firmware(struct snd_emu10k1 *emu) msleep(200); dev_info(emu->card->dev, "emu1010: Loading Audio Dock Firmware\n"); - /* Return to Audio Dock programming mode */ - snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, - EMU_HANA_FPGA_CONFIG_AUDIODOCK); err = snd_emu1010_load_firmware(emu, 1, &emu->dock_fw); if (err < 0) return; @@ -820,8 +817,6 @@ static int snd_emu10k1_emu1010_init(struct snd_emu10k1 *emu) snd_emu1010_fpga_lock(emu); dev_info(emu->card->dev, "emu1010: Loading Hana Firmware\n"); - snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, - EMU_HANA_FPGA_CONFIG_HANA); err = snd_emu1010_load_firmware(emu, 0, &emu->firmware); if (err < 0) { dev_info(emu->card->dev, "emu1010: Loading Firmware failed\n"); diff --git a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c index fafa299efa5c..b60ab5671e00 100644 --- a/sound/pci/emu10k1/io.c +++ b/sound/pci/emu10k1/io.c @@ -422,7 +422,7 @@ void snd_emu1010_update_clock(struct snd_emu10k1 *emu) snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2, leds); } -void snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu, +void snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu, int dock, const struct firmware *fw_entry) { __always_unused u16 write_post; @@ -440,6 +440,11 @@ void snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu, // GPO6 -> FPGA CCLK & FPGA input // GPO5 -> FPGA DIN (dual function) + // If the FPGA is already programmed, return it to programming mode + snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, + dock ? EMU_HANA_FPGA_CONFIG_AUDIODOCK : + EMU_HANA_FPGA_CONFIG_HANA); + // Assert reset line for 100uS outw(0x00, emu->port + A_GPIO); write_post = inw(emu->port + A_GPIO); |