- if ((err = snd_es1688_create(card, port[dev], mpu_port[dev],
- xess_irq, xmpu_irq, xess_dma,
- ES1688_HW_1688, &es1688)) < 0)
+ if (port[dev] != SNDRV_AUTO_PORT) {
+ err = snd_es1688_create(card, port[dev], mpu_port[dev],
+ xess_irq, xmpu_irq, xess_dma,
+ ES1688_HW_1688, &es1688);
+ } else {
+ /* auto-probe legacy ports */
+ static unsigned long possible_ports[] = {0x220, 0x240, 0x260};
+ int i;
+ for (i = 0; i < ARRAY_SIZE(possible_ports); i++) {
+ err = snd_es1688_create(card,
+ possible_ports[i],
+ mpu_port[dev],
+ xess_irq, xmpu_irq, xess_dma,
+ ES1688_HW_1688, &es1688);
+ if (err >= 0) {
+ port[dev] = possible_ports[i];
+ break;
+ }
+ }
+ }
+ if (err < 0)