From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: qemu-devel@nongnu.org
Cc: yhalperi@redhat.com, alevy@redhat.com, kraxel@redhat.com,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [Qemu-devel] [PATCH 1/2] hda: do not mix output and input streams, RHBZ #740493
Date: Tue, 4 Oct 2011 18:07:11 +0200 [thread overview]
Message-ID: <1317744432-1874-2-git-send-email-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <1317744432-1874-1-git-send-email-marcandre.lureau@redhat.com>
Windows 7 may use the same stream number for input and output.
That will result in lot of garbage on playback.
The hardcoded value of 4 needs to be in sync with GCAP streams
description and IN/OUT registers.
---
hw/intel-hda.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/intel-hda.c b/hw/intel-hda.c
index 4272204..c6a3fec 100644
--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -389,14 +389,15 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t stnr, bool output,
{
HDACodecBus *bus = DO_UPCAST(HDACodecBus, qbus, dev->qdev.parent_bus);
IntelHDAState *d = container_of(bus, IntelHDAState, codecs);
- IntelHDAStream *st = NULL;
target_phys_addr_t addr;
uint32_t s, copy, left;
+ IntelHDAStream *st;
bool irq = false;
- for (s = 0; s < ARRAY_SIZE(d->st); s++) {
- if (stnr == ((d->st[s].ctl >> 20) & 0x0f)) {
- st = d->st + s;
+ st = output ? d->st + 4 : d->st;
+ for (s = 0; s < 4; s++) {
+ if (stnr == ((st[s].ctl >> 20) & 0x0f)) {
+ st = st + s;
break;
}
}
--
1.7.6.2
next prev parent reply other threads:[~2011-10-04 16:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-04 16:07 [Qemu-devel] [PATCH 0/2] HDA fixes for Windows 7 Marc-André Lureau
2011-10-04 16:07 ` Marc-André Lureau [this message]
2011-10-04 16:07 ` [Qemu-devel] [PATCH 2/2] hda: do not mix output and input stream states, RHBZ #740493 Marc-André Lureau
2011-10-04 17:21 ` Juan Quintela
2011-10-05 1:43 ` Marc-André Lureau
2011-10-14 11:38 ` Gerd Hoffmann
-- strict thread matches above, loose matches on Subject: below --
2011-10-17 10:58 [Qemu-devel] [PATCH 1/2] hda: do not mix output and input streams, " Marc-André Lureau
2011-10-25 14:53 Marc-André Lureau
2011-10-25 15:17 ` malc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317744432-1874-2-git-send-email-marcandre.lureau@redhat.com \
--to=marcandre.lureau@gmail.com \
--cc=alevy@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=yhalperi@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).