Add CS4297 codec to onboard ES1371 implementations

This commit is contained in:
RichardG867
2021-07-22 16:06:45 -03:00
parent 58973ce036
commit c2e9ba1db5
4 changed files with 24 additions and 5 deletions

View File

@@ -41,6 +41,7 @@ extern ac97_codec_t **ac97_codec, **ac97_modem_codec;
extern int ac97_codec_count, ac97_modem_codec_count;
extern const device_t alc100_device;
extern const device_t cs4297_device;
extern const device_t cs4297a_device;
extern const device_t wm9701a_device;

View File

@@ -468,8 +468,10 @@ machine_at_tsunamiatx_init(const machine_t *model)
device_add(&i440bx_device);
device_add(&piix4e_device);
if (sound_card_current == SOUND_INTERNAL)
device_add(&es1371_onboard_device);
if (sound_card_current == SOUND_INTERNAL) {
device_add(&es1371_onboard_device);
device_add(&cs4297_device); /* found on other Tyan boards around the same time */
}
device_add(&pc87309_device);
device_add(&keyboard_ps2_ami_pci_device);
@@ -678,8 +680,10 @@ machine_at_ms6168_common_init(const machine_t *model)
if (gfxcard == VID_INTERNAL)
device_add(&voodoo_3_2000_agp_onboard_8m_device);
if (sound_card_current == SOUND_INTERNAL)
device_add(&es1371_onboard_device);
if (sound_card_current == SOUND_INTERNAL) {
device_add(&es1371_onboard_device);
device_add(&cs4297_device);
}
}

View File

@@ -30,6 +30,7 @@
enum {
AC97_CODEC_ALC100 = AC97_CODEC_ID('A', 'L', 'C', 0x20),
AC97_CODEC_CS4297 = AC97_CODEC_ID('C', 'R', 'Y', 0x03),
AC97_CODEC_CS4297A = AC97_CODEC_ID('C', 'R', 'Y', 0x11),
AC97_CODEC_WM9701A = AC97_CODEC_ID('W', 'M', 'L', 0x00)
};
@@ -228,6 +229,18 @@ const device_t alc100_device =
NULL
};
const device_t cs4297_device =
{
"Crystal CS4297",
DEVICE_AC97,
AC97_CODEC_CS4297,
ac97_codec_init, ac97_codec_close, ac97_codec_reset,
{ NULL },
NULL,
NULL,
NULL
};
const device_t cs4297a_device =
{
"Crystal CS4297A",

View File

@@ -1366,7 +1366,8 @@ static void *es1371_init(const device_t *info)
ac97_codec = &es1371->codec;
ac97_codec_count = 1;
device_add(&cs4297a_device);
if (!info->local)
device_add(&cs4297a_device);
return es1371;
}