Add AK4540 codec for ES1371

This commit is contained in:
RichardG867
2021-11-24 20:33:42 -03:00
parent 17d93758be
commit aefb90ee8b
3 changed files with 24 additions and 1 deletions

View File

@@ -101,7 +101,8 @@ enum {
AC97_CODEC_CS4297A,
AC97_CODEC_WM9701A,
AC97_CODEC_STAC9708,
AC97_CODEC_STAC9721
AC97_CODEC_STAC9721,
AC97_CODEC_AK4540
};
@@ -141,6 +142,7 @@ extern int ac97_codec_count, ac97_modem_codec_count,
#ifdef EMU_DEVICE_H
extern const device_t ad1881_device;
extern const device_t ak4540_device;
extern const device_t alc100_device;
extern const device_t cs4297_device;
extern const device_t cs4297a_device;

View File

@@ -44,6 +44,12 @@ static const struct {
.vendor_regs = (const ac97_vendor_reg_t[]) {{0x74, 0x0000, 0xff07}, {0x76, 0x0404, 0xdde5}, {0x78, 48000, 0x0000}, {0x7a, 48000, 0x0000}, {0}},
.device = &ad1881_device
},
[AC97_CODEC_AK4540] = {
.vendor_id = AC97_VENDOR_ID('A', 'K', 'M', 0x00),
.misc_flags = AC97_MONOOUT | AC97_PCBEEP | AC97_PHONE | AC97_VIDEO | AC97_AUXIN | AC97_MS | AC97_LPBK,
.powerdown_mask = 0x01f,
.device = &ak4540_device
},
[AC97_CODEC_ALC100] = {
.vendor_id = AC97_VENDOR_ID('A', 'L', 'C', 0x20),
.misc_flags = AC97_AUXOUT | AC97_MONOOUT | AC97_PCBEEP | AC97_PHONE | AC97_VIDEO | AC97_AUXIN | AC97_POP | AC97_MS | AC97_LPBK,
@@ -649,6 +655,18 @@ const device_t ad1881_device =
NULL
};
const device_t ak4540_device =
{
"Asahi Kasei AK4540",
DEVICE_AC97,
AC97_CODEC_AK4540,
ac97_codec_init, ac97_codec_close, ac97_codec_reset,
{ NULL },
NULL,
NULL,
NULL
};
const device_t alc100_device =
{
"Avance Logic ALC100",

View File

@@ -1896,6 +1896,9 @@ static const device_config_t es1371_config[] =
.type = CONFIG_SELECTION,
.selection = {
{
.description = "Asahi Kasei AK4540",
.value = AC97_CODEC_AK4540
}, {
.description = "Crystal CS4297",
.value = AC97_CODEC_CS4297
}, {