diff --git a/src/include/86box/sound.h b/src/include/86box/sound.h index c364d25ef..16ab290de 100644 --- a/src/include/86box/sound.h +++ b/src/include/86box/sound.h @@ -144,7 +144,9 @@ extern const device_t cs4238b_device; /* C-Media CMI8x38 */ extern const device_t cmi8338_device; +extern const device_t cmi8338_onboard_device; extern const device_t cmi8738_device; +extern const device_t cmi8738_onboard_device; #endif #endif /*EMU_SOUND_H*/ diff --git a/src/machine/m_at_socket370.c b/src/machine/m_at_socket370.c index ae8754f80..1443fb5e5 100644 --- a/src/machine/m_at_socket370.c +++ b/src/machine/m_at_socket370.c @@ -430,6 +430,9 @@ machine_at_cuv4xls_init(const machine_t *model) spd_register(SPD_TYPE_SDRAM, 0xF, 1024); device_add(&as99127f_device); /* fans: Chassis, CPU, Power; temperatures: MB, JTPWR, CPU */ + if (sound_card_current == SOUND_INTERNAL) + device_add(&cmi8738_onboard_device); + return ret; } diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 0fc34e930..e1c6aa599 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -913,7 +913,7 @@ const machine_t machines[] = { { "[VIA Apollo Pro 133A] Acorp 6VIA90AP", "6via90ap", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 150000000, 1300, 3500, MACHINE_MULTIPLIER_FIXED, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_BUS_AC97 | MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_GAMEPORT, 16384,3145728, 8192, 255, machine_at_6via90ap_init, NULL }, /* Has the VIA VT82C686B southbridge with on-chip KBC identical to the VIA VT82C42N. */ - { "[VIA Apollo Pro 133A] ASUS CUV4X-LS", "cuv4xls", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 150000000, 1300, 3500, 1.5, 8.0, (MACHINE_AGP & ~MACHINE_AT) | MACHINE_BUS_PS2 | MACHINE_BUS_AC97 | MACHINE_IDE_DUAL,16384,4194304, 8192, 255, machine_at_cuv4xls_init, NULL }, + { "[VIA Apollo Pro 133A] ASUS CUV4X-LS", "cuv4xls", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 150000000, 1300, 3500, 1.5, 8.0, (MACHINE_AGP & ~MACHINE_AT) | MACHINE_BUS_PS2 | MACHINE_BUS_AC97 | MACHINE_IDE_DUAL | MACHINE_SOUND, 16384,4194304, 8192, 255, machine_at_cuv4xls_init, NULL }, /* Has a Winbond W83977EF Super I/O chip with on-chip KBC with AMIKey-2 KBC firmware. */ { "[VIA Apollo Pro 133A] BCM GT694VA", "gt694va", MACHINE_TYPE_SOCKET370, CPU_PKG_SOCKET370, 0, 66666667, 133333333, 1300, 3500, 1.5, 8.0, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_SOUND, 16384,3145728, 8192, 255, machine_at_gt694va_init, at_gt694va_get_device }, diff --git a/src/sound/snd_cmi8x38.c b/src/sound/snd_cmi8x38.c index 206d15fa9..1e7f7ff83 100644 --- a/src/sound/snd_cmi8x38.c +++ b/src/sound/snd_cmi8x38.c @@ -767,8 +767,8 @@ cmi8x38_init(const device_t *info) memset(dev, 0, sizeof(cmi8x38_t)); /* Set the chip type. */ + cmi8x38_log("CMI8x38: init(%03X)\n", info->local); dev->type = info->local; - cmi8x38_log("CMI8x38: init(%02X)\n", dev->type); /* Initialize Sound Blaster 16. */ dev->sb = device_add_inst(&sb_16_compat_device, 1); @@ -827,6 +827,19 @@ const device_t cmi8338_device = NULL }; +const device_t cmi8338_onboard_device = +{ + "C-Media CMI8338 (On-Board)", + "cmi8338_onboard", + DEVICE_PCI, + CMEDIA_CMI8338 | 0x100, + cmi8x38_init, cmi8x38_close, cmi8x38_reset, + { NULL }, + cmi8x38_speed_changed, + NULL, + NULL +}; + const device_t cmi8738_device = { "C-Media CMI8738", @@ -839,3 +852,16 @@ const device_t cmi8738_device = NULL, NULL }; + +const device_t cmi8738_onboard_device = +{ + "C-Media CMI8738 (On-Board)", + "cmi8738_onboard", + DEVICE_PCI, + CMEDIA_CMI8738 | 0x100, + cmi8x38_init, cmi8x38_close, cmi8x38_reset, + { NULL }, + cmi8x38_speed_changed, + NULL, + NULL +};