From: Nick Owens <mischief@offblast.org>
To: 9front@9front.org
Subject: Re: [9front] Re: bug: audiohda broken in qemu
Date: Tue, 27 Oct 2020 02:30:19 -0700 [thread overview]
Message-ID: <CAH_zEu79CGL8RwKmDaHtsufHkrUW-Cg=3Y_L9R_VhazUKUJuTA@mail.gmail.com> (raw)
In-Reply-To: <20201027081643.GA103807@alice>
you are in a maze of twisty little passages, all alike.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/hda
it looks like snd_hdac_bus_get_response() in hdac_controller.c
conditionally supports polling.
On Tue, Oct 27, 2020 at 1:17 AM Anthony Martin <ality@pbrane.org> wrote:
>
> Nick Owens <mischief@offblast.org> once said:
> > i looked a bit at this 'rirb count reached' message and surmised that
> > we needed to change RINTCNT. i looked at the linux driver and they set
> > it to 1, and to 0xC0 for some 'quirky' cards. i tried 1 but that just
> > makes subsequent commands after Getparam/Vendorid fail, but setting it
> > to 0xC0 made all commands work and the device is enumerated, and
> > #A/audio works.
> >
> > diff --git a/sys/src/9/pc/audiohda.c b/sys/src/9/pc/audiohda.c
> > --- a/sys/src/9/pc/audiohda.c
> > +++ b/sys/src/9/pc/audiohda.c
> > @@ -1732,6 +1732,7 @@ hdastart(Ctlr *ctlr)
> > csr32(ctlr, Rirblbase) = pa;
> > csr32(ctlr, Rirbubase) = pa >> 32;
> > csr16(ctlr, Rirbwp) = Rirbptrrst;
> > + csr16(ctlr, Rintcnt) = 0xC0;
> > csr8(ctlr, Rirbctl) = Rirbdma;
> > waitup8(ctlr, Rirbctl, Rirbdma, Rirbdma);
> >
> > note that i have no idea what i am doing.
>
> That's weird. There are two ways to figure out if there are responses
> in the response input ring buffer (RIRB): either enable interrupts or
> poll the write pointer. We do the latter and set the Rirbint field to
> zero in the Rirbctl register. The value of Rintcnt should not matter
> at all if RIRB interrupts are disabled.
>
> Which method are they using in Linux?
>
> Anthony
next prev parent reply other threads:[~2020-10-27 9:30 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 ` Nick Owens [this message]
2020-10-27 9:48 ` [9front] " cinap_lenrek
2020-10-27 10:23 ` Nick Owens
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_zEu79CGL8RwKmDaHtsufHkrUW-Cg=3Y_L9R_VhazUKUJuTA@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).