From 57aeaa4413205c22b129463929c57c754cbc1a7c Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 7 Mar 2022 10:45:10 -0300 Subject: [PATCH] CMI8x38: Improve CMI8738 variant selection --- src/include/86box/sound.h | 1 + src/sound/snd_cmi8x38.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/include/86box/sound.h b/src/include/86box/sound.h index b5afed7e6..2696954ef 100644 --- a/src/include/86box/sound.h +++ b/src/include/86box/sound.h @@ -146,6 +146,7 @@ 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; +extern const device_t cmi8738_6ch_onboard_device; #endif #endif /*EMU_SOUND_H*/ diff --git a/src/sound/snd_cmi8x38.c b/src/sound/snd_cmi8x38.c index 6a3e3541f..9922c59f7 100644 --- a/src/sound/snd_cmi8x38.c +++ b/src/sound/snd_cmi8x38.c @@ -1376,7 +1376,7 @@ static const device_config_t cmi8x38_config[] = { }; static const device_config_t cmi8738_config[] = { - { "six_channel", "MX variant (6-channel)", CONFIG_BINARY, "", 1 }, + { "six_channel", "6CH variant (6-channel)", CONFIG_BINARY, "", 1 }, { "receive_input", "Receive input (MPU-401)", CONFIG_BINARY, "", 1 }, { "", "", -1 } }; @@ -1428,3 +1428,15 @@ const device_t cmi8738_onboard_device = { NULL, cmi8x38_config }; + +const device_t cmi8738_6ch_onboard_device = { + "C-Media CMI8738-6CH (On-Board)", + "cmi8738_6ch_onboard", + DEVICE_PCI, + CMEDIA_CMI8738_6CH | (1 << 13), + cmi8x38_init, cmi8x38_close, cmi8x38_reset, + { NULL }, + cmi8x38_speed_changed, + NULL, + cmi8x38_config +};