From 8395f5078fc9effa42407e7b604c80049fa52d19 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 19 Jan 2025 17:45:35 -0300 Subject: [PATCH] CS423x: Fixes to PnP in EEPROM-less mode --- src/sound/snd_cs423x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sound/snd_cs423x.c b/src/sound/snd_cs423x.c index d7d99b7b3..b8d54ca3f 100644 --- a/src/sound/snd_cs423x.c +++ b/src/sound/snd_cs423x.c @@ -100,9 +100,8 @@ static const uint8_t cs4236b_default[] = { 0x75, 0xb9, 0xfc, /* IRQ routing */ 0x10, 0x03, /* DMA routing */ - /* Default PnP resources */ - /* TODO: broken, not picked up by VS440FX BIOS, pending hardware research of the actual defaults */ - 0x0e, 0x63, 0x42, 0x36, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0a, 0x10, 0x00, 0x14, 0x41, 0xd0, 0xff, 0xff, 0x79, 0x00 + /* Default PnP data */ + 0x0e, 0x63, 0x42, 0x35, 0xff, 0xff, 0xff, 0xff, 0x00 /* hinted by documentation to be just the header */ // clang-format on }; @@ -343,6 +342,7 @@ cs423x_write(uint16_t addr, uint8_t val, void *priv) dev->ram_dl = CRYSTAL_RAM_CMD; /* Update PnP state and resource data. */ + dev->pnp_size = 384; /* we don't know the length */ cs423x_pnp_enable(dev, 1, 0); } break; @@ -756,7 +756,7 @@ cs423x_reset(void *priv) /* Load default configuration data to RAM. */ memcpy(&dev->ram_data[0x4000], cs4236b_default, sizeof(cs4236b_default)); - dev->pnp_size = 19; + dev->pnp_size = 9; if (dev->eeprom) { /* Load EEPROM data to RAM if the magic bytes are present. */