From dffca679c0a9980b4ac6d342373ac4902e31c303 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 18 Jul 2021 19:03:01 -0300 Subject: [PATCH] Make CS423x Sound Blaster Pro a generic compatibility device in preparation for VT82C686 --- src/include/86box/sound.h | 2 +- src/sound/snd_cs423x.c | 2 +- src/sound/snd_sb.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/include/86box/sound.h b/src/include/86box/sound.h index b15724cdd..1ca29ea18 100644 --- a/src/include/86box/sound.h +++ b/src/include/86box/sound.h @@ -110,7 +110,7 @@ extern const device_t sb_2_device; extern const device_t sb_pro_v1_device; extern const device_t sb_pro_v2_device; extern const device_t sb_pro_mcv_device; -extern const device_t sb_pro_cs423x_device; +extern const device_t sb_pro_compat_device; extern const device_t sb_16_device; extern const device_t sb_16_pnp_device; extern const device_t sb_32_pnp_device; diff --git a/src/sound/snd_cs423x.c b/src/sound/snd_cs423x.c index 03a258f30..17b386360 100644 --- a/src/sound/snd_cs423x.c +++ b/src/sound/snd_cs423x.c @@ -788,7 +788,7 @@ cs423x_init(const device_t *info) /* Initialize SBPro codec first to get the correct CD audio filter for the default context, which is SBPro. The WSS codec is initialized later by cs423x_reset */ - dev->sb = (sb_t *) device_add(&sb_pro_cs423x_device); + dev->sb = device_add(&sb_pro_compat_device); /* Initialize RAM, registers and WSS codec. */ cs423x_reset(dev); diff --git a/src/sound/snd_sb.c b/src/sound/snd_sb.c index 8e1ea61a4..9e458c740 100644 --- a/src/sound/snd_sb.c +++ b/src/sound/snd_sb.c @@ -1625,12 +1625,12 @@ sb_pro_mcv_init(const device_t *info) static void * -sb_pro_cs423x_init(const device_t *info) +sb_pro_compat_init(const device_t *info) { sb_t *sb = malloc(sizeof(sb_t)); memset(sb, 0, sizeof(sb_t)); - sb->opl_enabled = 0; /* updated by cs423x code */ + sb->opl_enabled = 0; /* CS423x updates this, while VT82C686 lacks OPL */ opl3_init(&sb->opl); sb_dsp_init(&sb->dsp, SBPRO2, SB_SUBTYPE_DEFAULT, sb); @@ -2534,12 +2534,12 @@ const device_t sb_pro_mcv_device = NULL }; -const device_t sb_pro_cs423x_device = +const device_t sb_pro_compat_device = { - "Crystal CS423x Sound Blaster Pro compatibility", + "Sound Blaster Pro (Compatibility)", DEVICE_ISA | DEVICE_AT, 0, - sb_pro_cs423x_init, sb_close, NULL, { NULL }, + sb_pro_compat_init, sb_close, NULL, { NULL }, sb_speed_changed, NULL, NULL