From: Attila K. <ki...@gm...> - 2003-08-26 02:56:13
|
Hoi Hans-Andreas, hey people, /* * i hope this mail goes out somewhen. * We lost our adsl carrier someone last * wednesday (for the n'th time in the last 6 * weeks) and Swisscom doesn't seem to be able * to do anything about it (and doesn't want to). */ On Mon, 17 Mar 2003 09:32:04 +0100 Hans-Andreas Engel <en...@no...> wrote: > With a > mknod /dev/mga_vid0 c 178 0 > mknod /dev/mga_vid1 c 179 0 > one can then run mplayer on both cards at the same time: > mplayer -slave -vo mga:/dev/mga_vid0 movie1.avi & > mplayer -vo mga:/dev/mga_vid1 movie2.avi That's what i call an ugly hack. 10l to Hans-Andreas for not writing it properly the first time 100l to Alex for commiting it 1000l to me for not seeing it earlier. Well at least it was a good oppurtunity to review mga_vid a bit and clean some stuff. The attached patch does following: * Add multi device support. For the moment up to 16 cards are supported. More can be added easily by changing 2 defines. This makes 90% of the patch (mostly stupid s/$var/card->$var/) The different devices can be accessed by different minor numbers (0-15): mknod /dev/mga_vid0 c 178 0 mknod /dev/mga_vid1 c 178 1 mknod /dev/mga_vid2 c 178 2 mknod /dev/mga_vid3 c 178 3 ... ln -s mga_vid /dev/mga_vid * Change the devfs code to let the kernel assign us a major and a minor number (what is the sense behind using devfs anyways if we dont do that ?) Subdevices for the different cards are created. mga_vid uses the first card (for compatibility) * Fix a possible error when mmap() is called before the card is configured by a ioctl(). I tested this patch with and without devfs and it seems to work. Due the lack of hardware i couldn't test the multi device support itself. The irq support seems to work but i couldn't really test it as it freezes my machine on module unloading (is it still needed anyways or just legacy ?) Could you please test it and give some comments ? (btw: someone could send me some pci matrox cards for further multidevice development, i have some ideas what could be done ;) Greetings Attila "offline" Kinali -- Chu beyond the blackest chu, Deeper then the deepest pika, King of pikachu who shines like gold on the sea of electric. I call upon thee, swear myself to thee, Let the fools who stand before me be destroyed by the power you and I possess... PIKASLAVE!!! -- http://bash.org/?23393 |