From owner-freebsd-multimedia Sat Mar 21 16:16:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA27682 for freebsd-multimedia-outgoing; Sat, 21 Mar 1998 16:16:46 -0800 (PST) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from titus.stade.co.uk (root@stade.demon.co.uk [158.152.29.164]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA27620 for ; Sat, 21 Mar 1998 16:16:28 -0800 (PST) (envelope-from aw1@titus.stade.co.uk) Received: (from aw1@localhost) by titus.stade.co.uk (8.8.8/8.8.3) id AAA03361; Sun, 22 Mar 1998 00:15:35 GMT Message-ID: <19980322001535.26033@stade.co.uk> Date: Sun, 22 Mar 1998 00:15:35 +0000 From: Adrian Wontroba To: Luigi Rizzo Cc: multimedia@FreeBSD.ORG Subject: Re: patch for Vibra16X -- test please! Reply-To: aw1@stade.co.uk Mail-Followup-To: Luigi Rizzo , multimedia@freebsd.org References: <199803201714.SAA05208@labinfo.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <199803201714.SAA05208@labinfo.iet.unipi.it>; from Luigi Rizzo on Fri, Mar 20, 1998 at 06:14:52PM +0100 Organization: Stade Computers Ltd, UK X-Phone: +(44) 121 681 6677 Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, Mar 20, 1998 at 06:14:52PM +0100, Luigi Rizzo wrote: > [forgive me for the crosspost but I'm trying to get some feedback > quickly... since this might go into -stable and the deadline is > close...] > > By popular demand, enclosed is a small patch to hopefully add > PARTIAL Vibra16X support for playback (there is also some still > non-functional code for the ESS -- don't worry about that bu i > prefer not to handcraft the patchfile). This is mostly derived from > code contributed by Torsten Ackemann. > > The diff is against snd980215 which is essentially what is now in > -current and -stable. The modified files are only sb_dsp.c and > sbcard.h Well, I'm happy to report a fair amount of success. My ViBRA16X card now plays sounds. Thank you! mpg123 seems to work perfectly on .mp2 files. Cat'ing .au files to /dev/audio results in sounds, and lots of "rdintr but read DMA inactive!" console messages. The patches didn't apply entirely properly, and I got a number of warnings about ess_write and ess_read. More details below. I did add the Vendor ID. Nit-picking: Three files are patched - sound.c is the third. Patches and source changes -------------------------- One hunk was rejected, but it looks as if 2.2.6-BETA has the line which the hunk comments out removed. I added these prototypes to sb_dsp.c to get rid of the warning messages: static int ess_write(int io_base, u_char reg, int val); static int ess_read(int io_base, u_char reg); |diff -ubwr snd/sb_dsp.c /sys/i386/isa/snd/sb_dsp.c |--- snd/sb_dsp.c Tue Jan 27 21:01:49 1998 |+++ /sys/i386/isa/snd/sb_dsp.c Fri Mar 20 19:32:52 1998 -------------------------- Patching file snd/sb_dsp.c using Plan A... Hunk #1 succeeded at 275. Hunk #2 succeeded at 305. Hunk #3 succeeded at 313. Hunk #4 succeeded at 356. Hunk #5 succeeded at 395. Hunk #6 succeeded at 432. Hunk #7 succeeded at 484. Hunk #8 failed at 650. <----------------------------- Hunk #9 succeeded at 692 (offset -1 lines). Hunk #10 succeeded at 765 (offset -1 lines). Hunk #11 succeeded at 787 (offset -1 lines). Hunk #12 succeeded at 838 (offset -1 lines). Hunk #13 succeeded at 1210 (offset -1 lines). Hunk #14 succeeded at 1244 (offset -1 lines). Hunk #15 succeeded at 1283 (offset -1 lines). 1 out of 15 hunks failed--saving rejects to snd/sb_dsp.c.rej Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |Only in /sys/i386/isa/snd: sb_dsp.c.v16 |diff -ubwr snd/sbcard.h /sys/i386/isa/snd/sbcard.h |--- snd/sbcard.h Fri Jan 16 19:03:44 1998 |+++ /sys/i386/isa/snd/sbcard.h Thu Mar 12 09:40:16 1998 -------------------------- Patching file snd/sbcard.h using Plan A... Hunk #1 succeeded at 19. Hunk #2 succeeded at 138. Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff -ubwr snd/sound.c /sys/i386/isa/snd/sound.c |--- snd/sound.c Fri Feb 13 15:33:08 1998 |+++ /sys/i386/isa/snd/sound.c Sat Mar 14 23:11:35 1998 -------------------------- Patching file snd/sound.c using Plan A... Hunk #1 succeeded at 688 (offset -29 lines). Hmm... Ignoring the trailing garbage. done The rejected hunk ----------------- The changed line appears to have been removed from 2.2.6-BETA. *************** *** 618,624 **** printf("ESS1868 (rev %d)\n", rev); else printf("ESS688 (rev %d)\n", rev); - d->audio_fmt |= AFMT_S16_LE; /* in fact it is U16_LE */ break ; /* XXX */ } else { printf("Unknown card 0x%x 0x%x -- hope it is SBPRO\n", --- 650,656 ---- printf("ESS1868 (rev %d)\n", rev); else printf("ESS688 (rev %d)\n", rev); + /* d->audio_fmt |= AFMT_S16_LE; */ /* not yet... */ break ; /* XXX */ } else { printf("Unknown card 0x%x 0x%x -- hope it is SBPRO\n", pnpinfo output -------------- Checking for Plug-n-Play devices... Card assigned CSN #1 Vendor ID CTL00f0 (0xf0008c0e), Serial Number 0xffffffff PnP Version 1.0, Vendor Version 16 Device Description: Creative ViBRA16X PnP Logical Device ID: CTL0043 0x43008c0e #0 Device Description: Audio TAG Start DF Good Configuration IRQ: 5 - only one type (true/edge) DMA: channel(s) 1 8-bit, not a bus master, count by byte, , Compatibility mode DMA: channel(s) 3 8-bit, not a bus master, count by byte, , Compatibility mode I/O Range 0x220 .. 0x220, alignment 0x1, len 0x10 [16-bit addr] I/O Range 0x330 .. 0x330, alignment 0x1, len 0x2 [16-bit addr] I/O Range 0x388 .. 0x388, alignment 0x1, len 0x4 [16-bit addr] TAG Start DF Acceptable Configuration IRQ: 5 7 9 10 - only one type (true/edge) DMA: channel(s) 0 1 3 8-bit, not a bus master, count by byte, , Compatibility mode DMA: channel(s) 0 1 3 8-bit, not a bus master, count by byte, , Compatibility mode I/O Range 0x220 .. 0x280, alignment 0x20, len 0x10 [16-bit addr] I/O Range 0x300 .. 0x330, alignment 0x30, len 0x2 [16-bit addr] I/O Range 0x388 .. 0x388, alignment 0x1, len 0x4 [16-bit addr] TAG Start DF Acceptable Configuration IRQ: 5 7 9 10 - only one type (true/edge) DMA: channel(s) 0 1 3 8-bit, not a bus master, count by byte, , Compatibility mode DMA: channel(s) 0 1 3 8-bit, not a bus master, count by byte, , Compatibility mode I/O Range 0x220 .. 0x280, alignment 0x20, len 0x10 [16-bit addr] I/O Range 0x300 .. 0x330, alignment 0x30, len 0x2 [16-bit addr] TAG Start DF Acceptable Configuration IRQ: 5 7 9 10 - only one type (true/edge) DMA: channel(s) 0 1 3 8-bit, not a bus master, count by byte, , Compatibility mode DMA: channel(s) 0 1 3 8-bit, not a bus master, count by byte, , Compatibility mode I/O Range 0x220 .. 0x280, alignment 0x20, len 0x10 [16-bit addr] TAG Start DF Sub-optimal Configuration IRQ: 5 7 9 10 - only one type (true/edge) DMA: channel(s) 0 1 3 8-bit, not a bus master, count by byte, , Compatibility mode I/O Range 0x220 .. 0x280, alignment 0x20, len 0x10 [16-bit addr] I/O Range 0x300 .. 0x330, alignment 0x10, len 0x2 [16-bit addr] I/O Range 0x388 .. 0x394, alignment 0x4, len 0x4 [16-bit addr] TAG Start DF Sub-optimal Configuration IRQ: 5 7 9 10 - only one type (true/edge) DMA: channel(s) 0 1 3 8-bit, not a bus master, count by byte, , Compatibility mode I/O Range 0x220 .. 0x280, alignment 0x20, len 0x10 [16-bit addr] TAG End DF Logical Device ID: CTL7005 0x05708c0e #1 Compatible Device ID: PNPb02f (2fb0d041) Device Description: Game TAG Start DF Good Configuration I/O Range 0x201 .. 0x201, alignment 0x1, len 0x1 [16-bit addr] TAG Start DF Acceptable Configuration I/O Range 0x200 .. 0x20f, alignment 0x1, len 0x1 [16-bit addr] TAG End DF End Tag Successfully got 48 resources, 2 logical fdevs -- card select # 0x0001 CSN CTL00f0 (0xf0008c0e), Serial Number 0xffffffff Logical device #0 IO: 0x0220 0x0000 0x0388 0x0000 0x0000 0x0000 0x0000 0x0000 IRQ 5 0 DMA 0 1 IO range check 0x00 activate 0x01 Logical device #1 IO: 0x0201 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 IRQ 0 0 DMA 4 4 IO range check 0x00 activate 0x01 Extracts from /var/log/messages ------------------------------- Mar 21 23:05:18 titus /kernel: Trying Read_Port at 203 Mar 21 23:05:18 titus /kernel: CSN 1 Vendor ID: CTL00f0 [0xf0008c0e] Serial 0xffffffff Mar 21 23:05:18 titus /kernel: PnP: override config for CSN 1 LDN 0 vend_id 0xf0008c0e Mar 21 23:05:18 titus /kernel: pnp1:0 port 0x0000 0x0000 0x0000 0x0000 irq 0:0 drq 4:4 en 0 fl 0x0 Mar 21 23:05:18 titus /kernel: PnP: override config for CSN 1 LDN 1 vend_id 0xf0008c0e Mar 21 23:05:18 titus /kernel: pnp1:1 port 0x0201 0x0000 0x0000 0x0000 irq 0:0 drq 4:4 en 1 fl 0x0 Mar 21 23:05:18 titus /kernel: pnp1:0 port 0x0220 0x0300 0x0388 0x0000 irq 5:0 drq 0:1 en 1 fl 0x0 Mar 21 23:05:18 titus /kernel: pnp1:0 port 0x0220 0x0300 0x0388 0x0000 irq 5:0 drq 0:1 en 1 fl 0x0 Mar 21 23:05:18 titus /kernel: pcm1 (SB16pnp sn 0xffffffff) at 0x220 irq 5 drq 0 flags 0x11 id 12 Mar 21 23:05:20 titus /kernel: mss_probe: no address supplied, try default 0x530 Mar 21 23:05:20 titus /kernel: mss_detect error, busy still set (0xff) Mar 21 23:05:20 titus /kernel: sb_probe: no address supplied, try defaults (0x220,0x240) Mar 21 23:05:20 titus /kernel: device at 0x220 already attached as unit 1 Mar 21 23:16:08 titus /kernel: WARNING: rdintr but read DMA inactive! Mar 21 23:16:39 titus last message repeated 86 times Mar 21 23:17:03 titus last message repeated 64 times Mar 21 23:17:03 titus /kernel: WARNING: rdintr but read DMA inactive! Mar 21 23:17:04 titus last message repeated 4 times Mar 21 23:20:02 titus /kernel: WARNING: rdintr but read DMA inactive! Mar 21 23:21:30 titus last message repeated 225 times To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message