]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/audio/intel-hda: fix stream reset
authorVolker Rümelin <vr_qemu@t-online.de>
Sun, 26 Dec 2021 15:40:17 +0000 (16:40 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 13 Jan 2022 09:47:52 +0000 (10:47 +0100)
Quote from:
High Definition Audio Specification 1.0a, section 3.3.35

Offset 80: {IOB}SDnCTL Stream Reset (SRST): Writing a 1 causes
the corresponding stream to be reset. The Stream Descriptor
registers (except the SRST bit itself) ... are reset.

Change the code to reset the Stream Descriptor Control and Status
registers except the SRST bit.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/757
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20211226154017.6067-3-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/audio/intel-hda.c

index 2b55d521503f56bcce0151e6b57071f2b936fe45..5f8a878f20c19c0c91f3b188cc34dc7d7db862b9 100644 (file)
@@ -581,7 +581,7 @@ static void intel_hda_set_st_ctl(IntelHDAState *d, const IntelHDAReg *reg, uint3
     if (st->ctl & 0x01) {
         /* reset */
         dprint(d, 1, "st #%d: reset\n", reg->stream);
-        st->ctl = SD_STS_FIFO_READY << 24;
+        st->ctl = SD_STS_FIFO_READY << 24 | SD_CTL_STREAM_RESET;
     }
     if ((st->ctl & 0x02) != (old & 0x02)) {
         uint32_t stnr = (st->ctl >> 20) & 0x0f;