[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sb16 FreeBSD guest fix (was: Re: [Qemu-devel] qemu FreeBSD port update,
From: |
Juergen Lock |
Subject: |
sb16 FreeBSD guest fix (was: Re: [Qemu-devel] qemu FreeBSD port update, unbreaking RELENG_5 and -current) |
Date: |
Mon, 25 Oct 2004 18:43:36 +0200 |
On Mon, Oct 25, 2004 at 04:13:31PM +0000, Norikatsu Shigemura wrote:
> On Sun, 24 Oct 2004 19:18:22 +0200
> Juergen Lock <address@hidden> wrote:
> > Hi!
> > Just FYI: I have submitted an update for the FreeBSD port,
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=72945
> > it has not been committed until now (maybe the ports committers are
> > too busy with other updates after the end of that long freeze...
>
> I'll handle this. Yes. Sorry, please wait:-).
>
OK :)
>...
> I have a patch which provides SB16 device on FreeBSD.
> On FreeBSD, sb16(sbc) driver finds it like following
> process.
>
> out(0x226, 3);
> (100 micro sec busy loop)
> out(0x226, 0);
> while( in(0x22e) & 0x80 ) {
> (20 micro sec busy loop / MAX 1000 repeat)
> }
> if( in(0x22a) == 0xaa ) {
> FOUND!
> } else {
> NOT FOUND!
> }
>
> So I changed (val == 1) to (val & 1), do you think so?
>
Maybe better do ((1 == val) || (3 == val)), to avoid false positives?
Fabrice? And does anyone know what bit 1 is supposed to be doing?
(i.e. why is the FreeBSD probe using 3 and not 1?)
Other than that it looks good to me, but then i'm no sb16 expert.
(actually i must say i haven't played with qemu sound emulation at
all yet, thats why i didn't notice this problem...)
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> --- qemu-snapshot-2004-08-26_23/hw/sb16.c.orig Tue Jun 8 05:58:31 2004
> +++ qemu-snapshot-2004-08-26_23/hw/sb16.c Sun Sep 5 09:55:31 2004
> @@ -463,7 +463,7 @@
> control (0);
> if (0 == val)
> dsp->v2x6 = 0;
> - else if ((1 == val) && (0 == dsp->v2x6)) {
> + else if ((val&0x1) && (0 == dsp->v2x6)) {
> dsp->v2x6 = 1;
> dsp_out_data(dsp, 0xaa);
> }
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Juergen