Skip to content

Commit e8289fd

Browse files
ossilatortiwai
authored andcommitted
ALSA: emu10k1: fix E-MU dock initialization
A side effect of making the dock monitoring interrupt-driven was that we'd be very quick to program a freshly connected dock. However, for unclear reasons, the dock does not work when we do that - despite the FPGA netlist upload going just fine. We work around this by adding a delay before programming the dock; for safety, the value is several times as much as was determined empirically. Note that a badly timed dock hot-plug would have triggered the problem even before the referenced commit - but now it would happen 100% instead of about 3% of the time, thus making it impossible to work around by re-plugging. Fixes: fbb64ee ("ALSA: emu10k1: make E-MU dock monitoring interrupt-driven") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218584 Signed-off-by: Oswald Buddenhagen <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Message-ID: <[email protected]>
1 parent 2d3f481 commit e8289fd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sound/pci/emu10k1/emu10k1_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,12 @@ static void snd_emu1010_load_dock_firmware(struct snd_emu10k1 *emu)
737737
u32 tmp, tmp2;
738738
int err;
739739

740+
// The docking events clearly arrive prematurely - while the
741+
// Dock's FPGA seems to be successfully programmed, the Dock
742+
// fails to initialize subsequently if we don't give it some
743+
// time to "warm up" here.
744+
msleep(200);
745+
740746
dev_info(emu->card->dev, "emu1010: Loading Audio Dock Firmware\n");
741747
/* Return to Audio Dock programming mode */
742748
snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG,

0 commit comments

Comments
 (0)