From: Nick Owens <mischief@offblast.org>
To: 9front@9front.org
Subject: Re: [9front] bug: audiohda broken in qemu
Date: Tue, 27 Oct 2020 03:23:30 -0700 [thread overview]
Message-ID: <CAH_zEu4zEzQcjsyhnBkkr2=WeQTiWubVmHOD7xzxN6GkgNRM+w@mail.gmail.com> (raw)
In-Reply-To: <DAF3620F280AC837FEC26D68359C9BE6@felloff.net>
On Tue, Oct 27, 2020 at 2:48 AM <cinap_lenrek@felloff.net> wrote:
>
> very odd, because we dont even use IRB interrupts at all.
> in hdacmd(), you can see we just poll the irb write
> pointer instead...
>
> note also that the irb ring has a variable size, it
> can go from 2, 16 to 256 entries. so programming that
> register with a out of range value might be a bad idea.
>
> i wonder why it fails with intcnt = 1, it seems the response
> counter is never reset in qemu so just bumping the count
> will just then make it fail after 0xC0 responses?
>
> maybe you can try running the vendor command in a loop
> with your change and see if it starts failing once we
> reach the count?
yes, running Getparm in enumcodec() in a loop (0xC0+n times) leads to
driver probing failure:
intel-hda: read CORBWP : 0xbf (ffff)
intel-hda: write CORBWP : 0xc0 (ffff)
intel-hda: intel_hda_corb_run: [rp 0xc0] verb 0x000f0000
hda-duplex: hda_audio_command: nid 0 (root), verb 0xf00, payload 0x0
intel-hda: intel_hda_response: [wp 0xc0] response 0x1af40022, extra
0x0
intel-hda: intel_hda_response: rirb count reached (192)
intel-hda: intel_hda_corb_run: corb ring empty
intel-hda: read RIRBWP : 0xc0 (ffff)
intel-hda: previous register op repeated 1 times
intel-hda: read CORBRP : 0xc0 (ffff)
intel-hda: read CORBWP : 0xc0 (ffff)
intel-hda: write CORBWP : 0xc1 (ffff)
intel-hda: intel_hda_corb_run: rirb count reached
intel-hda: read RIRBWP : 0xc0 (ffff)
#A0: no audio codecs found
>
> the fix might be that we need to clear the response
> interrupt status flag in rirbsts (bit 0) after or
> before each command?
FWICT qemu only resets the RIRB counter *if* you had RIRB interrupts
on previously, and we arent using RIRB interrupts:
https://git.qemu.org/?p=qemu.git;a=blob;f=hw/audio/intel-hda.c;h=4330213fff167071800216c49607c5f18022cc20;hb=HEAD#l555
so what is the solution here? use RIRB interrupts?
>
> --
> cinap
next prev parent reply other threads:[~2020-10-27 10:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 4:39 Nick Owens
2020-10-27 8:16 ` Anthony Martin
2020-10-27 9:04 ` Anthony Martin
2020-10-27 9:30 ` [9front] " Nick Owens
2020-10-27 9:48 ` [9front] " cinap_lenrek
2020-10-27 10:23 ` Nick Owens [this message]
2020-10-27 10:53 ` Nick Owens
2020-10-27 20:00 ` Nick Owens
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='CAH_zEu4zEzQcjsyhnBkkr2=WeQTiWubVmHOD7xzxN6GkgNRM+w@mail.gmail.com' \
--to=mischief@offblast.org \
--cc=9front@9front.org \
/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).