snd_cs423x: Actually fix the startup crash, caused by co-existing with VIA 686 SBPro compatibility
This commit is contained in:
parent
7696eea94e
commit
7f0c8fae5c
@ -1577,7 +1577,7 @@ pipc_init(const device_t *info)
|
||||
dev->ac97 = device_add(&ac97_via_device);
|
||||
ac97_via_set_slot(dev->ac97, dev->slot, PCI_INTC);
|
||||
|
||||
dev->sb = device_add(&sb_pro_compat_device);
|
||||
dev->sb = device_add_inst(&sb_pro_compat_device, 2);
|
||||
#ifndef VIA_PIPC_FM_EMULATION
|
||||
dev->sb->opl_enabled = 1;
|
||||
#endif
|
||||
|
@ -708,7 +708,7 @@ cs423x_reset(void *priv)
|
||||
/* Reset PnP resource data, state and logical devices. */
|
||||
dev->pnp_enable = 1;
|
||||
cs423x_pnp_enable(dev, 1, 1);
|
||||
if (dev->pnp_card)
|
||||
if (dev->pnp_card && dev->sb)
|
||||
isapnp_reset_card(dev->pnp_card);
|
||||
|
||||
/* Reset SLAM. */
|
||||
@ -776,17 +776,17 @@ cs423x_init(const device_t *info)
|
||||
if ((dev->eeprom_data[0] == 0x55) && (dev->eeprom_data[1] == 0xbb))
|
||||
dev->eeprom = i2c_eeprom_init(i2c_gpio_get_bus(dev->i2c), 0x50, dev->eeprom_data, sizeof(dev->eeprom_data), 1);
|
||||
|
||||
/* Initialize ISAPnP. */
|
||||
dev->pnp_card = isapnp_add_card(NULL, 0, cs423x_pnp_config_changed, NULL, NULL, NULL, dev);
|
||||
|
||||
/* Initialize SBPro codec. The WSS codec is initialized later by cs423x_reset */
|
||||
dev->sb = device_add(&sb_pro_compat_device);
|
||||
dev->sb = device_add_inst(&sb_pro_compat_device, 1);
|
||||
sound_set_cd_audio_filter(sbpro_filter_cd_audio, dev->sb); /* CD audio filter for the default context */
|
||||
|
||||
/* Initialize RAM, registers and WSS codec. */
|
||||
cs423x_reset(dev);
|
||||
sound_add_handler(cs423x_get_buffer, dev);
|
||||
|
||||
/* Initialize ISAPnP. */
|
||||
dev->pnp_card = isapnp_add_card(NULL, 0, cs423x_pnp_config_changed, NULL, NULL, NULL, dev);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user