[FBSD 6.2-PRE + OSS 4.0rc2 (build 172]: ENVY24 DMA buffer b.

OSS specific BSD discussion (FreeBSD/NetBSD/OpenBSD)

Moderators: hannu, dev, cesium, kodachi

[FBSD 6.2-PRE + OSS 4.0rc2 (build 172]: ENVY24 DMA buffer b.

Postby uripui » Mon Oct 09, 2006 10:41 pm

Hi,

Code: Select all
root@freebsd:/usr/lib/oss/build# ossinfo
Version info: OSS 4.0rc2 (build 172/200609212314) (0x00040000)

Number of audio devices:        0
Number of MIDI devices:         0
Number of mixer devices:        1


Device objects
0: envy240 M Audio Audiophile 2496
1: softoss0 OSS Virtual Mixer v3.0

MIDI devices (/dev/midi*)

Mixer devices (/dev/mixer*)
0: M Audio Audiophile 2496 (Mixer 0 of device object 0)

Audio devices (/dev/dsp*)


and

Code: Select all
root@freebsd:/usr/lib/oss/build# uname -a
FreeBSD freebsd.local 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Mon Oct  9 04:09:26 CEST 2006     root@freebsd.local:/usr/obj/usr/src/sys/i686  i386


produces

Code: Select all
root@freebsd:/usr/lib/oss/build# dmesg | grep envy
envy24: Got DMA buffer beyond address 256M.
envy24: Reboot and try again
envy240: <M Audio Audiophile 2496> port 0xec00-0xec1f,0xe800-0xe80f,0xe400-0xe40f,0xe000-0xe03f irq 16 at device 12.0 on pci0
envy240: detached
envy24: Got DMA buffer beyond address 256M.
envy24: Reboot and try again
envy240: <M Audio Audiophile 2496> port 0xec00-0xec1f,0xe800-0xe80f,0xe400-0xe40f,0xe000-0xe03f irq 16 at device 12.0 on pci0
envy240: detached
envy24: Got DMA buffer beyond address 256M.
envy24: Reboot and try again
envy240: <M Audio Audiophile 2496> port 0xec00-0xec1f,0xe800-0xe80f,0xe400-0xe40f,0xe000-0xe03f irq 16 at device 12.0 on pci0
envy240: detached
envy24: Got DMA buffer beyond address 256M.
envy24: Reboot and try again
envy240: <M Audio Audiophile 2496> port 0xec00-0xec1f,0xe800-0xe80f,0xe400-0xe40f,0xe000-0xe03f irq 16 at device 12.0 on pci0


while

Code: Select all
root@freebsd:/usr/lib/oss/modules# dmesg | grep nvidia
nvidia0: <GeForce 6800 LE> mem 0xde000000-0xdeffffff,0xd0000000-0xd7ffffff,0xdd000000-0xddffffff irq 16 at device 0.0 on pci1
nvidia0: [GIANT-LOCKED]


Situation:
0) I have 1GB of RAM
1) using or disabling nvidia.ko makes no difference
2) using 'osscore_load="yes"' and 'envy24_load="yes"' in '/boot/loader.conf' after copying all OSS-modules to '/boot/modules' produces a nice kernel panic during boot
3) using original FreeBSD-6.1-RELEASE or my own 6.2-kernel makes NO difference at all. I haven't tested 7.0-kernel 'cause I would like to keep my nvidia driver

Any ideas?

Cheers,
Uri
uripui
 
Posts: 10
Joined: Wed Nov 17, 2004 10:38 pm

Re: [FBSD 6.2-PRE + OSS 4.0rc2 (build 172]: ENVY24 DMA buffe

Postby dev » Tue Oct 10, 2006 2:29 am

uripui wrote:Hi,

Code: Select all
root@freebsd:/usr/lib/oss/build# ossinfo
Version info: OSS 4.0rc2 (build 172/200609212314) (0x00040000)

Number of audio devices:        0
Number of MIDI devices:         0
Number of mixer devices:        1


Device objects
0: envy240 M Audio Audiophile 2496
1: softoss0 OSS Virtual Mixer v3.0

MIDI devices (/dev/midi*)

Mixer devices (/dev/mixer*)
0: M Audio Audiophile 2496 (Mixer 0 of device object 0)

Audio devices (/dev/dsp*)


and

Code: Select all
root@freebsd:/usr/lib/oss/build# uname -a
FreeBSD freebsd.local 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Mon Oct  9 04:09:26 CEST 2006     root@freebsd.local:/usr/obj/usr/src/sys/i686  i386


produces

Code: Select all
root@freebsd:/usr/lib/oss/build# dmesg | grep envy
envy24: Got DMA buffer beyond address 256M.
envy24: Reboot and try again
envy240: <M Audio Audiophile 2496> port 0xec00-0xec1f,0xe800-0xe80f,0xe400-0xe40f,0xe000-0xe03f irq 16 at device 12.0 on pci0
envy240: detached
envy24: Got DMA buffer beyond address 256M.
envy24: Reboot and try again
envy240: <M Audio Audiophile 2496> port 0xec00-0xec1f,0xe800-0xe80f,0xe400-0xe40f,0xe000-0xe03f irq 16 at device 12.0 on pci0
envy240: detached
envy24: Got DMA buffer beyond address 256M.
envy24: Reboot and try again
envy240: <M Audio Audiophile 2496> port 0xec00-0xec1f,0xe800-0xe80f,0xe400-0xe40f,0xe000-0xe03f irq 16 at device 12.0 on pci0
envy240: detached
envy24: Got DMA buffer beyond address 256M.
envy24: Reboot and try again
envy240: <M Audio Audiophile 2496> port 0xec00-0xec1f,0xe800-0xe80f,0xe400-0xe40f,0xe000-0xe03f irq 16 at device 12.0 on pci0


while

Code: Select all
root@freebsd:/usr/lib/oss/modules# dmesg | grep nvidia
nvidia0: <GeForce 6800 LE> mem 0xde000000-0xdeffffff,0xd0000000-0xd7ffffff,0xdd000000-0xddffffff irq 16 at device 0.0 on pci1
nvidia0: [GIANT-LOCKED]


Situation:
0) I have 1GB of RAM
1) using or disabling nvidia.ko makes no difference
2) using 'osscore_load="yes"' and 'envy24_load="yes"' in '/boot/loader.conf' after copying all OSS-modules to '/boot/modules' produces a nice kernel panic during boot
3) using original FreeBSD-6.1-RELEASE or my own 6.2-kernel makes NO difference at all. I haven't tested 7.0-kernel 'cause I would like to keep my nvidia driver

Any ideas?

Cheers,
Uri


Hi,

Have you checked to see if OSS 3.99.4 works?. OSS 4.0rc2 hasn't been tested with all memory models but you can see /usr/lib/oss/build/osscore.c to see why the memory is being allocated beyond 256MB - this Envy24 can only access < 256MB .


regards
Dev Mazumdar
dev
 
Posts: 577
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA

Postby uripui » Tue Oct 10, 2006 4:16 pm

but you can see /usr/lib/oss/build/osscore.c to see why the memory is being allocated beyond 256MB

Yeah, you're my man, Dev. That's the hint I was looking for. :D

After applying following patch:
Code: Select all
root@freebsd:/usr/lib/oss/build# diff -u osscore.c.orig osscore.c
--- osscore.c.orig      Tue Oct 10 18:04:02 2006
+++ osscore.c   Tue Oct 10 17:35:15 2006
@@ -250,6 +250,7 @@
   char *tmpbuf;
   *phaddr=0;

+  if (memlimit > 268435456ul) memlimit = 268435456ul;
   tmpbuf =
     (char *) contigmalloc (buffsize, M_DEVBUF, M_NOWAIT, 0ul, memlimit,
                           PAGE_SIZE, 0ul);
@@ -261,6 +262,7 @@
       return NULL;
     }
   *phaddr=vtophys(tmpbuf);
+  printf ("OSS: Allocated %lu bytes for a DMA buffer at: %p\n", buffsize, tmpbuf);
   return tmpbuf;
}

I've got my Audiophile 2496 driver-loaded and working after creating a symbolic link '/dev/dsp -> /dev/dsp0'. 'though with 'poor' Latency of 24ms in artsd (in comparision to my VIA8233-onboard-sound with 5ms latency [kernel driver module used for that]).
Code: Select all
OSS: Allocated 24576 bytes for a DMA buffer at: 0xe9668000
OSS: Allocated 24576 bytes for a DMA buffer at: 0xe966e000
envy240: <M Audio Audiophile 2496> port 0xec00-0xec1f,0xe800-0xe80f,0xe400-0xe40f,0xe000-0xe03f irq 16 at device 12.0 on pci0


Have you checked to see if OSS 3.99.4 works?


Under OSS 3.99.4 the only thing that's working is artsd. Nor XMMS with disabled artsd. I even had to disable some channels in the AP2496-driver config in order to get rid of the "couldn't allocate xxxx bytes for DMA buffer"-messages. Latency was worse than now with OSS-4.00RC2.

1) Is there a way to use '/dev/dsp' with multiple applications simultanously?
2) MIDI-support for Audiophile 2496 in near availability?


Regards,
Uri
uripui
 
Posts: 10
Joined: Wed Nov 17, 2004 10:38 pm

Postby dev » Tue Oct 10, 2006 7:28 pm

uripui wrote:
but you can see /usr/lib/oss/build/osscore.c to see why the memory is being allocated beyond 256MB

Yeah, you're my man, Dev. That's the hint I was looking for. :D

After applying following patch:
Code: Select all
root@freebsd:/usr/lib/oss/build# diff -u osscore.c.orig osscore.c
--- osscore.c.orig      Tue Oct 10 18:04:02 2006
+++ osscore.c   Tue Oct 10 17:35:15 2006
@@ -250,6 +250,7 @@
   char *tmpbuf;
   *phaddr=0;

+  if (memlimit > 268435456ul) memlimit = 268435456ul;
   tmpbuf =
     (char *) contigmalloc (buffsize, M_DEVBUF, M_NOWAIT, 0ul, memlimit,
                           PAGE_SIZE, 0ul);
@@ -261,6 +262,7 @@
       return NULL;
     }
   *phaddr=vtophys(tmpbuf);
+  printf ("OSS: Allocated %lu bytes for a DMA buffer at: %p\n", buffsize, tmpbuf);
   return tmpbuf;
}

I've got my Audiophile 2496 driver-loaded and working after creating a symbolic link '/dev/dsp -> /dev/dsp0'. 'though with 'poor' Latency of 24ms in artsd (in comparision to my VIA8233-onboard-sound with 5ms latency [kernel driver module used for that]).
Code: Select all
OSS: Allocated 24576 bytes for a DMA buffer at: 0xe9668000
OSS: Allocated 24576 bytes for a DMA buffer at: 0xe966e000
envy240: <M Audio Audiophile 2496> port 0xec00-0xec1f,0xe800-0xe80f,0xe400-0xe40f,0xe000-0xe03f irq 16 at device 12.0 on pci0


Have you checked to see if OSS 3.99.4 works?


Under OSS 3.99.4 the only thing that's working is artsd. Nor XMMS with disabled artsd. I even had to disable some channels in the AP2496-driver config in order to get rid of the "couldn't allocate xxxx bytes for DMA buffer"-messages. Latency was worse than now with OSS-4.00RC2.

1) Is there a way to use '/dev/dsp' with multiple applications simultanously?
2) MIDI-support for Audiophile 2496 in near availability?


Regards,
Uri


Excellant!!! Thanks. We are working on fixing up the automatic opening of devices.


best regards
Dev Mazumdar
dev
 
Posts: 577
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA


Return to BSD

Who is online

Users browsing this forum: No registered users and 1 guest