IVTV 0.1.10.pre2 changes: #100z_pages - have 4k buffers, for testing against 100z. #100z - Don't unmap OSD DMA for now, somethings odd there, but may have always caused a subtle problem in Myth. #100y - Using get_free_pages for encoder/decoder buffers, trying to get 32k together in chunks. #100x - OSD Framebuffer DMA changed to try and conserve memory and also not ever send too much and overflow the buffer. - way OSD checks and sends DMA hopefully improved, seems to have been lots of little problems there which could cause oddities. #100v - using 2meg for encoding buffers, seems to need a bit extra. - use get_free_page, zeroing them out seems slow. #100u - using pages per buffer for encoding/decoding now, basically just using __get_free_page() instead of kmalloc, not sure if this is enough, but seems more stable so far. #100t - changes to decoder and encoder buffer amounts, hopefully more stable. #100s - changed dma buffers to use 4k size chunks, hardwired for now because I think any other sizes than my defaults would be wrong. #100r - New Myth patch, changes the decoder chunk to 64k. - allow really small dma xfers, seems to work, may be better. #100q - lowered decoder DMA max xfer to 64k, and don't set DMA size, let the decoder use the default, whatever that is. - some cleanup of commented code #100p - don't check the buffers read anymore, just exit if count at end which seems better there, and possibly the problem was byteswapping twice sometimes, check the code to see. - don't strip the header off mpeg streams, seems odd. #100o - Encoder write function fixed so that buffers being read are only gathered up to a max amount, and seems like there were some possible bugs in the buffer handling which should now be fixed hopefully. - MythTV patches changed so the encoder read size isn't changed anymore the 05 is altered, 06 works in CVS. - Patch from Paolo to check the SAA 7115 stats, very cool, ivtvctl -I #100l - poll for encoding seems better yet, this seems like something that has to be tuned just right, vlc works better now, was locking up things. - use encoder DMA using frames, capture 15 at a time, or 1 GOP in NTSC, this figure may need tuning too, I think this form of encoding is better #100k - clear out decoder pts counters again, still seems wrong. - attempt to start playback multiple times if fails. #100j - fix for encoder poll, makes VLC and VLS work with ivtv well, old kludge to make it work now breaks it actually, opposite :-). #100i - small change to decoder buffers, halved them, keeps glitches from occuring possibly from too much buffering and overrunning the decoder. #100h - Hans patch for 64bit. - New Myth Patch, 05 - trying some different values for the decoding/osd timing. #100g - use very small 2k buffers for encoding, seems to work so far. #100f - Changes to help Myth work better. #100e - Fixed EOS/STREAMOFF/EOG support, now works like it should. #100d - changed poll function for decoding, seems better in Myth. #100c - buffers now 32k again - reduced OSD timeout to 1 HZ #100e - revert all 100d changes back to 100b. - Fixed EOS/STREAMOFF/EOG support, now works like it should. #100b - reduced DMA buffers for decoder again, seems really stable that way, although for some reason breaks Myth over long term I think. #100a - decoder timeout reloads firmware now. - fixed some compile warnings. #100 - checks jiffies since last DMA for dec, so are spaced a bit. - count vsync intervals - changed around buffer sizes so Myth will now work. #99z - made decoding dma buffers 2k, and reduced DMA xfers, trying to fix DMA decoding mode. #99y - cleanup - stop decode no longer waits. #99x - maybe found the problem with DMA in decoding, too many wake_up's for the decoder waitq may have been the problem. #99w - write with Processor IO now for decoder by default. #99v - New Myth patch, this one seems to really make things fast for the OSD, promise :-). - X patch updated, small fix for DMA, probably not needed but just in case. #99u - change block sizes to 128k for decoder, 64k makes the OSD jitter. #99t - bug where api call for osd dma wasn't returning an error and clearing the DMAP bit. #99s - make osd/dec able to work faster and be stable. #99r - Got ff/rw working again in Myth, had to adjust that function. #99p - redoing OSD locking somewhat, or way it waits, trying to rid us of the lockup and firmware crash potential there while decoding. - dma xfer increased again, don't see it helped, no reports. #99o - OSD is much faster, checks if decoder is running, won't wait if not. - free OSD DMA, or UNMAP it right. - check to make sure OSD DMA has actually finished, and free it properly. #99n - REBOOT before trying this one, settings are changed which may be held by the chip. - decoder input changed to max of 64k for now, to see if that helps some. - don't allow changing extra decoder buffers and don't use them, this may give more stability to things? #99m - Include X server in source and binary, Matthias + my DMA chunk code to send in 256k chunks. #99l - added Hans latest patches. #99k - just remove fb_write for 2.4 at the moment, don't know how to mask that function in 2.4. #99j - ah, figured out the channel changing culprit, decoder atomic variables needed to be incremented instead of set, since the decoder interface can be opened by multiple clients many times, works but confusing :-). #99i - fb really keeps you from writing to it now, and space allowed is only what is needed. #99h - stop decode just waits for DMA done now, too hard to wait for all buffers - OSD made safe, by removing ability to mmap and write to the fb directly, basically fix it so it's safe else this is not enabled. #99f - speed control allows setting outside of decoding again. - had commented out the stop/flush decode buffer clearing, back now. #99e - fixed OSD in Myth, now responds realtime. #99d - fix ff/rw problems in Myth. - fix channel changing. - fix DMA problems. - improve OSD and decoding interactions. - most Myth problems hopefully solved. #99c - reduce dma xfers, seems it is needed on my VIA afterall, maybe something still needs to be done there and it will work better that way. - Hans patch for v4l compat on 2.4 #99b - decoder uses streamoff flag, should allow stops to decode till end. - numerous fixes to decoder buffers in DMA sending functions. #99a - some fixes to poll, using DMA by default again, needs some tweaks. #99 - Decoder runs in Processor IO mode by default, uncomment define in ivtv-driver.h for /* DMA or PIO */ #define DEC_DMA_PIO to use DMA. #98v - Don't run work queue in ivtv_write every block processed, this seems like a bad thing to do. #98u - OSD should be a bit more solid with decoding now, somewhat slow at points when decoding is heavy, but doesn't interfere and seems to continue on. #98t - have mem_size return fixed, should report right buffers now. - reduced max xfer to 64k for decoder, to be safe for now, still not sure. - seems to be missing audio glitches and stable still, I think the mem_size rounding to nearest buffer size fix did this. #98s - seems way I am changing the mem_size and the return of the function for that are wrong, from not being able to be negative, need to rethink it more, this should fix it though but will print out funny still. #98r - patch from John Harvey fixing v4l compat in 2.4. #98q - counted buffers wrong to calculate max sent for decoder. #98p - had induced a buffer overrun bug in hopefully fixing one which seems to have still existed, so hopefully this really fixes it this time. #98o - have a ivtv_dec_buffer function which calculates the right size to send for decoder DMA, does all checks. #98n - have a ivtv_dma_status function to check status easier. #98m - do decoding work queue different, may fix some errors. #98l - Hans patch to fix 2.4 support, and print msp version. #98k - free decoder buffers upon next decoding schedule. #98j - buffers for decoding now are 2048 bytes. #98i - Added Hans patches, lots of fixes, adds GPL, fixes card detection, debugging. #98h - added Hans patch with fixes and improvements. #98g - decoder writing reduced by one buffer. - osd writing should now be safe for both DMA and normal writing. #98f - offset works right now for the memory register reading :-). #98e - now can search whole itvc memory space, just use 0x0-0x0200ffff. #98d - added Hans patch with documentation from David. #98c - more careful when reading registers to keep from crashing the firmware. #98b - can choose min/max registers now to show. #98a - itvc register get/set work now. #98 - register dumps and setting of the itvc, ivtvctl -O and -o. #97z - added ioctl to set/get registers of the itvc15/16. - fixed bug where decoding wasn't clearing the bytes used for buffers. #97x - change back to DMA mode for decoding, seems the other changes now may help, which changing it allowed me to see problems which were not DMA related but limitations of the card, when encoding/decoding happen they must be separated in time enough else the card seems to have problems. #97w - fixed decoder xfer size to hopefully work better in Myth. - disabled VIM Restart check for encoding. #97v - reduce DMA xfers to 64k, put in check for repeating dma xfers. - added Hans patch for decoder stop/start. #97u - OSD is much faster than ever, even while decoding :-). #97t - decoding is now processor driven without DMA. #97p - AMD 64 patch from Rutger. #97o - Hans patches added, streams dynamically allocated now. - fixed the messages from stream startup for the digitizer restart. #97m - have digitizer restart set a flag which we can use to know if it actually worked, very important for channel changes. - start capture waits to write till actually encoding, from above changes. - other odds n ends. #97l - firmware reloads now restart every stream properly - trying to improve channel changing and digitizer resets, reworking the ordering and things. - fixed bug in decoder streams restart. - removed unused OSD stream. #97k - Hans patch for VBI and other fixes. #97j - fixed ff/rw so are a bit nicer. - fixed channel changes. - fixed general decoder/osd responiveness through some timing changes. - added patch from David George which skips minors which are in use. #97i - fix for Myth ff/rw somewhat, Hans patches for VBI and WSS fixes. #97h - removed semaphore from OSD, it was causing it not to handle multiple instances like X and Myth :-). #97g - trying VIA fix for KT400 chipsets, probably still need more chipsets device id's there. #97f - trying to get decoder startup not to interfere with the OSD, but may be tricky, need to put the osd on hold at these times, the decoder really needs the DMA to flow at startup, might be something bigger xfers help. #97e - strange, found the decoder would mask encoder interrupts upon startup. #97d - OSD/DEC stop can interfere, have OSD able to get DMAP when the decoder isn't running and the OSD has set it and lost it. - stop decode fixes so stops the work queue and also properly stops and allows the OSD to continue on. #97c - trying to wait longer for the OSD to finish. #97b - fixed bug with OSD return, EAGAIN instead of IO. #97a - trying decoding using 128k block sizes, seems reasonable, also what I am setting the firmware DMA for anyways, and matches the encoder too. #97 - trying to fix problems dynamically allocating memory, something is possibly funny, or just prepdma on my mboard is bad, which may very well be, get io errors, used to dma error. - removed OSD stream, use the MPG one since basically with the other DMA that would be the onlything the OSD stream would contain (and can't do both at once, and lock each other, so not necessary. #96j - OSD memory is dynamically allocated and just for the size needed now. #96i - osd bug crept into last patch. #96h - cleanup of osd stream stuff. #96g - OSD uses old DMA with get_user_pages now. - have decoder and osd DMA signal the waitq's to go when done. #96f - added DMA functions for OSD using get_user_pages. #96e - starting to work in Myth again, still buggy using poll. #96d - lots of cleanup, since decoder seems figured out, now need to work with it when I'm not working against something impossible like before. - return a value to Myth when interrupted, else seems to not work great, probably from X and Myth fighting each other. #96c - change encoder back to using 32k buffers, but allocate 256 by default, seems to need more in tight situations like heavy DMA activity, will see. - don't allow users to change decoder buffer amounts, tuned to exactly what is needed, not to be changed ;-). #96b - can set the firmware dma xfer sizes and type in ivtv-driver.h now with the rest of the DMA settings. - found the big decoder bug, turns out we were writing one buffer too many from the logic of the decoder DMA mapping loop, this has been there since 0.1.9 and before I believe, no wonder we couldn't send too much data and possibly why the encoder and osd are affected so badly at times, that memory space is right next to them. #96a - Hans patch for a core dump from ivtvctl #96 - don't use api cmd for last DMA status, it slows down the OSD too much. - I changed the decoding buffers to 64k, seems like 32k isn't very good with our current methods of encoder xfers. - I changed the decoder dma xfers to always be 128k too just like the decoder, hopefully this works well everywhere, right now trying to get it working as optimized as possible, since these changes are allowing the osd to work better and encoding but may be too much for some systems. #95z - new debug level for DEC, shows all the debugging for the decoder DMA xfers which I added. - new way to keep track of the decoder DMA state, should improve our ability to fix the problems currently present. #95x - testing still, trying to wait for decoder information about DMA xfer. #95w - debug patch, prints out all decoder details of state, only for testing. #95v - don't zap dec dma api commands at mailbox, this was bad when waiting. - decrease decoder wait time in api again. #95u - no longer run work queue in fill_dec_buffers, only if full of buffers which seems to be a better place for it, now need to try reducing those, but this is running quite nice here with 128k decoder input on VIA. - use semaphores to lock work queue, which should make ff/rw nicer. #95t - don't print out annoying busy messages, seem like an INFO option or maybe even VERBOSE, part of the way I timeout dec/osd now. #95s - VIA works with bigger dma xfers now, so enabled same as Intel. - lowered DMA xfers to 128k for decoder, seems like enough, matches encoder, will see how it works. - for now encoder dma blocks are 128k again, seems the encoder can timeout when doing smaller ones probably from our inefficiency. - found flushing the work queue keeps things from crashing the system in ivtv_fill_dec_buffers before running the work queue. This seems to slow down things a bit though at startup possibly, yet seems to keep my VIA from crashing and possibly still handle alot more data input. #95r - Hans patch which fixes vbi buffer sizes and other fixes. #95q - default bitrates changed to more standard ones, 9800/15000 which are the normal top legal and max DVD rate. - changed dnr to be off, not automatic, think this was screwing with peoples encodings when on bad signals. - found if I have 32768 less than the decoders max buffer given as the max, things don't glitch with bigger DMA sizes, at least on Intel, so it's up to 512k for now, starts decodings faster. - some timing tuning, and removed debug messages. #95p - testing, do not touch, will spit debug messages out constantly :-). #95o - able to manually run dec/osd using cat/ivtvfbctl and not see problems, still trying to find what causes glitches and stoped decoding. #95n - working in Myth again with OSD/DEC seems ok, needs timing changes still. #95m - cleaning up some stuff, also trying to figure out some problems keeping decoding going longterm, seems to be the same old issue when being extra careful, then decoding can stop for some reason, need more debugging to figure it out. #95l - found way to keep both the OSD and decoder evenly flowing :-). #95k - took out my debugging messages :-) #95j - better OSD and DEC balancing. #95h - decoder seems better in Myth, trying to fix osd freezing decoding. #95g - fixes for Myth ff/pause and other problems seen. #95f - fixing bugs from new setup. #95d - getting things working ok on VIA, still dma errors though. - this has glitches, but much better design I think in the waitqueue. #95b - buffer size changes, api timeout changes for DMA, work queue fix. - Hans patch fixing streams. #95a - Hans patch for fixing autoload support and other fixes. #95 - Hans patch for updating tuner.h and latest tuners, plus Microtune 4049 FM5 #94z - Hans patch for cleanup and audio selection ioctls - Don't wait for OSD, may need to change DMA buffers too, will see. #94y - decoder queue empty for dma hopefully made safer. - decoder mailbox api no longer waits, just locks the semaphore. - clear out old decoder mailbox api commands which seems to be needed. when not waiting for the return. #94x - stop wait queues on module unload - mixed up the DMAP wait on firmware reloads, was opposite of what it should have been, oops. #94w - firmware reloads for DMA errors should work again. #94v - firmware reloads almost seamless now :-). #94u - separated firmware reload from decoder thread. #94t - decoder changed from using a thread to a work queue in 2.6, or a task queue in 2.4. #94s - test release #94r - reduced buffer amounts to free lots of memory, still wasteful, but should help those in dire problems right now. #94q - hopefully fix cat on VIA, can't test this, cat works great here though either way on Intel, strange. - Byteswap buffer after it is filled completely, before enqueue happens, was a temporary swap in userspace but now fully done after copy_from_ _user but not till an entire 32k buffer is gathered. #94p - fix for cat and dd with different block sizes while uses 32k buffers. #94n - more fixes for decoding api calls, way dma is sent and cleared, thread is called. - lowered block size so cat works again. - added Hans patch to fix oops. #94m - Hans patch added with more fixes. - new IO buf to allow buffers for decoder to be 32k and fully packed. - this may break cat and any input below 32k, but stable otherwise, once that support is fixed should work very well for them. #94k - Hans patch to fix more osd/dec issues. #94i - Hans patch to decoder/osd. #94e - tasklets in reset should not go crazy now after firmware reloads. #94d - EOS fix from Hans. #94c - increase buffer sizes on Intel, can do up to 128k DMA xfers now. #94b - Hans patch for filling decoding/osd buffers. #94a - Hans fix for not vbi reinserting for every encoding unless setup that way. #94 - fixed bug I induced for VIA motherboards, decoding would be glitchy. #93n - don't run thread on VIA motherboards, set tuner again to freq, have all standards there, but not setting the others for now, need to look them up. #93m - firmware reloads greatly improved. #93l - remove SA_INTERRUPT from IRQ handler so that other irqs can run during a cards interupts. - some VIA tweaks to make my system at home run nicer during decoding. - firmware reloads now use UNINTERUPTIBLE sleeping - have ivtv_sleep_timeout use option to not be interruptible. #93k - digitizer reset done like before, but check pause and digitizer separate now. - mailbox api timeout fixed up a bit different. #93j - mailbox API timeout changed to allow certain commands to not be interruptible, while others are. #93i - fix EOS and STREAMOFF commands. #93h - fixes cat on ordinary Intel motherboards, and print out PCI vendor information to collect types which have problems. #93g - fix firmware reloads hopefully, and VIA fix may activate properly now. #93f - firmware reloads locking improved so all streams are stopped and then restarted, sortof, not fully sent API commands yet, but at least main ones and locking should work better. #93e - hans newest patch, minus stoping encoding from continuing into passthru mode. - fixes for VIA motherboards and Intel, so they all work right together hopefully, now change the logic of the decoding for one or the other. #93a - working on OSD locking. #93 - reverted to using the dec DMA functions in the ivtv write function. this seems to work great so far, still testing, see what it does there. #92c - Trying this another way in the thread, to fix 92 shortcommings. #92 - Hans patch for cleanup, added tuner options. #90l - Hans patch for more cleanup to streams. #90k - Hans patch for stream fixes. #90h - removing restrictions of osd and decoder, dangerous somewhat, watchout. #90f - found way to detect decoder stoping very easily, now can restart it. #90e - alot of changes to try and do decoding/osd stuff right, busy bit is gone, semaphores lock the OSD/DEC, and ff/rw. #90d - Added Hans patch fixing multiple problems. #90c - fix for missing VIDIOC_S_CTRL_OLD define, odd. #90b - thread should exit properly now on module unload. #90a - trying to adjust sizes of buffers gathered before sending through DMA. #90 - waiting for OSD dma again, seems like firmware reloads work but DMA errors happen too often, something is odd. - don't reload firmware if osd times out, plus wait for free mailboxes a bit longer to give some slack there. #89l - smaller OSD buffers, trying to speed that up without instability. #89j - better spinlocks for OSD. #89i - don't wait for OSD DMA,this seems to make Myth not so great, and I suspect is just bad to do. #89h - trying small decoder buffers again, seems to be what works the best? #89g - Hans fix for ioctl in Myth. #89f - audio fix. #89e - some more changes to api for osd dma. #89d - use semaphore in ivtv_api for the OSD DMA. #89c - made myth work again with OSD and decoding, and CPU changes. #89b - thread for decoding now is really efficient, sleeps till data builds up. #89a - enabled ability to have different buffer sizes for VBI buffers, not different though for now, Hans may know better. - spinlocks were used dangerously for encoding, fixed. - put more checks for decoding thread, should keep from having cpu hogging. #89 - turn on framebuffer when sending DMA, it gets turned off sometimes and if sending DMA should be on. #88i - use semaphore to allow ff/rw tobe safe. #88h - more tweaks to try and get decoding w/osd and ff/rw to work nice. #88g - mailbox api for dec/osd DMA changed to not use semaphore, but wait for OSD DMA to complete. #88f - ff/rw wait for busy bit different, wake all streams after ff/rw. #88e - wait for osd DMA done and then unmap DMA, right after xfer. - schedule() in osd waitq now. - seems really good here so far :-). #88d - have wait for busy bit in dec thread, keeps from consuming cpu time. #88c - changed buffer sizes back to 64k, and 4k. This just seems to work the best. - call thread wakeup different, hopefully no longer have glitches. #88b - hans patch merged,and also tuner patch merged for SECAM. - buffer changes, sizes different, all 32k now. also have improved the decoding, but still eats CPU once in awhile. #88a - removed unused qlen options for dec mpg and yuv. - reduced buffer sizes, double what they should have been. - changed default buffer sizes to more DMA nice sizes, multiples of 8. #88 - buffer sizes were all wrong, changed them so now right, also use defines for all settings now, so should be easier to try different settings. #87k - Myth should display again properly, one line thing in dec thread was stoping it. #87j - found bug in how decoder and osd worked, probably will show up now ;-). #87i - framebuffer clear didn't work, but now check if encoding/decoding first so reloading the ivtv-fb module isn't dangerous. #87h - fixes to OSD - clear OSD safely now - cleanup of when decoder was not a thread - wait for OSD DMA again, have sched function doing this right now. #87g - tuner type patch. - thread may exit now - thread may take less CPU #87f - revert ivtv busy bit changes to osd and also increased osd buffer sizes #87c - decoder thread doesn't eat all the CPU now. #87b - reduced buffer sizes again. - firmware reloads changed around some to hopefully fix some things. #87 - decoder thread is back, very experimental in this patch. - but seems to work at least. #86c - fix for decoding problem in Myth, strange though, we need to be careful in ivtv_fill_dec_buffers() about amount of data collected at a time it seems, have to look at this closer. #86a - fix for saa7127 register dumps in ivtvctl - removed extra master_w waitq, no longer used by FB. - buffer sizes fixed, was giving too many to decoder. - YUV enabled by default, only 64 2k buffers for now. #86 - Hans patch added, more cleanup, ivtv_api worked upon, and ivtv-fb. #85h - fix osd so it is using the same logic to fill the buffers as the decoder, hopefully fixed Myth problem with polling decoding too. #85g - fix for making sure buffers are never overfilled for the decoder. #85f - fixing stop that could end up in a deadlock from the spinlocks not being unlocked from an abrupt stop of decoding, also command API settings improved to help stop decode and firmware checks to work smoother. #85e - Way decoder fills buffers wasn't locking right, could overfill buffers. - buffer sizes for decoding reduced to 2048, which seems to make many more data input sizes work. #85c - made so osd dma happens without sending false errors, and also now send in between decoder DMAs. #85b - crude form of sending OSD DMA through normal decoder sched function, use decoder mailbox 3 to store information and check that mailbox first instead of mailbox 9. Should be able to enhance the timing alot, this is just a start at doing it this way. #85a - some improvements in ff/rw and OSD speed, still gets stuck, firmware reloads still don't always save it either. #85 - Hans patches added for streams and table changes. - OSD is now just like the decoder DMA, uses DMAP, no OSD_DMA anymore. this is still a work in progress for ff/rw to work right, and still a bit problematic on the OSD. #84p - trying to fix a state that the module gets in during ff/rw which it is stuck somewhat, only get busy bit before ff/rw now, also don't wait for the OSD dma in ivtv_api too. #84o - reduce dec buffer size to 4k too, stop waiting for dec in ivtv_api, fix to finding reset for firmware in decoder dma sched. - removed change with VIDIOC_S_CTRL. #84n - using 4k size OSD DMA buffers, hopefully fixes jitter sending OSD DMA. #84m - fix from Hans for CC data, - fix for VIDIOC_S_CTRL missing. - fixes to decoding and OSD DMA. - hopefully get firmware reloads fixed. #84l - buffer size changes, seems to work better, slow, but works right. #84k - fix for fill_dec_buffers which should make it work all the time, with any input method. - changed all buffers to 64k, OSD/DEC. #84j - Hans changes to VBI, other stuff too, just his merges and changes since my last 84h patch. #84h - Trying to get OSD buffers to behave. - revert ivtv_fill_dec_buffers change for now. #84g - Hans fixed OSD stream minor number bug. - Trying to make both cat and ivtvplay/splicer to both work. #84f - strangely sending 1 4k buffer at atime worked with the decoder, fixing this though, seems really wrong, back to the way it was plus other fixes Hans found made cat work, hopefully all correct now. #84e - possibly fix odd data sizes input to the driver for good, found something that should do this right, fixes from Hans which should fix data timeouts too and help fix the odd input sizes problem. #84d - added part back in, possibly safe, still trying to figure that out. #84c - seems that part of the code filling extra buffers is corrupting them, should be fixed with this I think, only does it when sending odd sizes, like in splicer I send GOPs at a time. #84b - fixes to OSD size of buffers, otherwise screen moves around horizontally and vertically, have to be set to PAL size or smaller it seems, odd. #84 - cleanup of old fb dma structures and DMA setup, now completely removed. #83e - OSD now uses Streams DMA buffer, has own type, similar now to how the decoder does DMA somewhat, so quite a bit of a change. - Added Hans cleanup patch. #83d - check DMA sent to card by size rather than buffers. #83c - firmware reload locks decoder busy bit now. #83b - Hans patch for compatibility - Brians patch for the radio device #83a - ok, now trying the buffer size change again, this time should be enough data to know this will work. They are now set to 64 4k buffers, sending 16 at a time, and the DMA size is set to 65536. - you must use between 32 and 256 decoder mpeg buffers, and I'd recommend 64 which is the default, they are 4k now so no longer so big and the old values won't do you very nicely ;-). #83 - stop decode once again more work on getting it to stop nicely, making sure the lock doesn't get stuck mainly. - minor fixes for buffer flushing and some cleanup of commented out stuff #82h - fixed bug with feeding the decoder only GOPs, which are not always aligned perfectly into chunks, this works once again. #82g - Hans patch for enum input bug from Myth - fix for start capture, data Timeouts, was not waiting for start capture API which is why it was having problems. #82f - Hans patches to fix the ioctl calls and v4l compat. #82e - decoder EOS, now properly ends decoding, finishes all the buffers. #82d - changed EOS to hopefully work right again, for some reason isn't working everytime now. #82c - removed schedule() again, EOS tasklet ran different, decoder buffers changed back to 32k w/8 allocated and 2 used for DMA at a time. seems safer at these settings for the time being till I figure out how to rework the whole gathering buffers and filling them. #82b - brians patch for radio and modinfo gives driver version now. #82a - changes encoding, using spinlocks better for it, and schedule() again. - found bug in EOS capture ending, wasn't setting then right for jiffies. - bug in EOS for decoding, same as above. #82 - changed decoder buffers to 4k, 32 of them, and send up to 8 at a time, basically the buffers are able to handle different data sizes this way, and at the same time results in smaller DMA sizes to the card in most cases which should generally improve VIA performance I think, does here. - stop decode should work better now. #81e - addes Hans patches. #81d - fix for compiling on 2.4 kernel, lock_kernel include. - fix for define of rc in ivtv-fb to 0, shouldn't have affected it though. #81c - fixes for OSD, should be really stable, not messing with the BUSY bit, instead use the OSD_DMA bit and the stream semaphore exclusively. - fixes for ff/rw. #81-a-b _Hans reorganized the driver files, much nicer now :-). #80f - OSD is split up into multiple calls for DMA chunks, 512k for now. #80e - added Hans VBI patch for inserting VBI to the decoder, and much more. #80c - ported more fixes for decoding from the patches I backed out of, stuff to start support for different data sizes. - Hans patch for VBI documentation. #80b - saa7115 parts commented out for testing added back. - enabled code to keep fb state again, was disabled in this version - added compatibility for I2C_ADAP_CLASS_TV_ANALOG define - improved mailbox return - fix to encoder for DMA timeouts on certain motherboards and multiple cards working at the same time (think this is the reason it's needed). #80a - added Hans VBI patch, Jens patch. #71d - found more that could be wrong with osd commands, hopefully fixed. #71c - don't cache framebuffer commands for on/off state and alpha, seem to not be working for those, must need to be issued at times even if same value, kinda piled together so understand this is needed. #71b - better use of the semaphore to lock the decoder and osd. #71a - encoder timeout doesn't run anything anymore, seems like this would cause problems and may not be needed anymore. #71 - moved scatter gather arrays into stream structure, now really separate. - fixed DMA direction, made way dma was allocated and size checked work properly, dma was not setup for the proper direction for encoding, and also didn't really check if the buffers were below the amount allowed. - reworked decoder completely, all outside irq time and tasklets, no longer using decoder timeout since this isn't needed driving the decoder this way. - hopefully fixed firmware reloads not triggered when in the osd alone. #70n - don't run timeout for decoder, seems to be bad when decoding outside interrupts. #70m - fixed decoder stutter after long term playback in myth for live tv, hopefully, at least improves decoding and should fix it long term too. #70l - check for NULL buffers on decoder copy to user, still this won't fix the DMA errors it seems, but good to do so still. #70k - stop capture and stop decode worked over so timing on waiting for last DMA to finish should work better, also EOS should not be lost in most cases. - redid the decoder copy to user, needed to check if successful, maybe the source of DMA errors? #70j - divided tasklets amongst decoder/encoder again, this seems to be the best way to do it, otherwise things seem buggy. - fixed decoder timeout to not cause decoding be corrupted. #70h - moving decoder data req back into irqtime, is this safe??? well I'm trying to keep the decoding going which always stops if this isn't done in irqtime, I suspect I need to to something more to make it fully safe, this is just figuring out if it fixes the decoder stoping. #70e - cleanup, removed all defines for odd changes, no longer needed, was for testing. - found some bugs where I had a tasklet scheduled which shouldn't have been. - removed tasklet kill and disable at module unload, maybe caused a oops upon unload, think we need to be more careful there now tat the streams are a bit more separate even from tasklets, possibly only when unloading the module unproperly too, without stoping all activity. #70d - taking a dangerous leap, although it looks safe to me ;-). Moving to using spin_lock_bh() for all the streams locking, this seems to fix the whole problem with OSD/Dec/Enc DMA breaking the playback/recording and delaying it so it becomes jittery, this no longer occurs. There are tiny interruptions upon decoding startup if there is a very high amount of OSD DMA going on, otherwise seems amazingly stable. - speed up to module load, maybe safer? removed sleep from saa7115 load. I think this sleep would conflict with the msp3400 because it's a bit racey and uses task queues or something, and seems like the sleep didn't help it anyways, still locked up on occasion. #70c - got this working right, decoder frees buffers outside of irqtime. #70b - moved decoder deq out of irq time. #70a - trying different check which doesn't seem as good but better than before the last patch, still can cause decoding to pause till done slamming OSD DMA to the device while encoding/decoding. #70 - big bug fixed I think, seems that way, the OSD would wakeup the waitq for itself right after DMA was finished, this made it capable of taking over all DMA, now only do that when not decoding, strangly this makes encoding avoid the jitter too. - Also merged all tasklets into one global tasklet to try and make DMA never interfere with itself, this may be the actual fix for encoding, while decoding still needed the one above. #69l - framebuffer osd now gets and sets the state properly, including the on/off bit too. - Added Hans VBI patch to fix adding frame numbers. #69k - didn't fix scaling problems for pvr250 cards yet, bummer. - fixed ivtv bug where the framebuffer state was not given with the correct current settings, basically left out flicker reduction and on/off state. #69j - hopefully fixed scaling problems for pvr250 cards? - removed some byteswap in irq defines, just a test which isn't needed. - removed checking deq multiple times, if really needed it's not the right way to do it. - removed DMA done restriction on device open. #69i - discovered needed command to get passthrough mode not to have to clear out stored commands, was the decoder source one, which seems to switch it on/off so that even if same value is there it is needed. #69h - amd 64 support added mostly, from Sven Boeckelmann - found source of Myth Bug, heh, well some other things that can cause it, basically seems that the framebuffer checking reduced fixes it, but you may get jerky playback now when heavily using the OSD, price for fast OSD which Myth requires. #69g - found source of Myth Bug, waiting for write/read DMA to be done before running the OSD DMA seems to have been the problem, the whole timing stuff takes the place of that better anyways. #69f - Hans patch for encoder/decoder poll. #69e - trying to fix MythTV bug, well combination of the two actually. - changed status check in saa7115 to use a safer sleep and also it waits till attaching the client before doing the check. #69c - changed spinlocks and semaphores to no longer use cacheline stuff. think I needed to remove it from the global ivtv_lock too, and also initialize them all to unlocked, although odd that this was implied by the cacheline thing, weird. #69b - changed decoder timeout and timing between it and the OSD so hopefully it will act like the encoder does there and not even flinch when under high OSD usage. #69a - added back encoder timeout DMA tasklet launch and waitq wakeup, streams can stop again and that seems to be what had fixed it I guess. #69 - changed OSD jiffie check to 1 jiffie, this seems to allow the OSD to work while encoding, which broke before and I hadn't taken the time to tune it, should be interesting now. #68g - re-enabled OSD and encoder timing, seems more needed now, maybe the new DMA from the VBI differences or something, but always wanted to enable that, now should be able to browse Myth really fast while watching live TV and not cause the encoding to get jerky, seems this happens if the encoder DMA is ever held back too long. #68f - added the cache_smp stuff on every single lock, weird, but if even one is removed they all break. #68e - added back spinlock cache_in_smp stuff, ate buffers fast. #68c - clear framebuffer upon module load, should keep us from ever seeing that default crap on there again that looks really freaky :-). #68b - changed passthrough mode to work right on preemptive mode, and also altered so should allow captures to work too, was a missing subtype to for sending the data to the decoder properly. #68 - added Hans v4l compat patch. #67c - added Hans patch, added sleep again to channel changin. #67a - sleep longer for firmware reset, sleep less on firmware sleep for normal boot too. #67 - enabled timers for encoder/decoder, adjusted to no longer cause extra problems hopefully. - reduced osd wait on api commands. #66l - disabled timers for encoder/decoder, may have caused more problems than fix now, dma seems not to need them anymore. #66k - trying to find a way to detect the need to reload the firmware, even when firmware still responds, seems to get in a weird state. #66j - fixed more bugs in reloading firmware and locking it properly. #65i - put sap patch in to make part work. - better timing in encoder timeout and decoder timeout no longer runs dma tasklets. #65h - removed unused saa7114.c file, got in there from doing tests awhile back. - changed buffers back to 32k, got this to work better I think. #66g - still working on data timeouts, I think they can't happen anymore :-). #66f - trying firmware reset in dec_fill_buffer different than before. #66e - reworking timeout for encoder again, this time should try reseting, then firmware reloading, if those don't work it should stop/restart the stream then. I think the stop/restart is good, seems like what will make it always work if done right. - check dma status on open of device, hopefully will make live tv in myth work right, and makes sense to not start doing anything til we know dma is calm. - don't wait for firmware reset in places. - wait for dma to be done in reset by checking register, needed with bigger encoding dma sizes it seems. - wait for api cmd stop/start capture/decode again, that may have been a part of the problem. #66d - have decoder set at 65536 as DMA size, seems without this it gets a bit hungry for large chunks of DMA data. #66c - scart volume at 0db, or should be I think at least. - patch from Stephane for standard detection to work on the msp again. #66b - changed DMA size for encoder, now does it in bytes and gets a fixed size, the default actually, and it seems to be so different than frame based in size, seems interesting, so far working ok here. #66a - spliting up firmware dec/enc reload somewhat, also optimizing it or at least trying :-). #66 - took decoder enable/disable and allow firmware reloads to do so during them, gets rid of the green screen, but still a wait there, so I'm looking at minimizing the disable time. #65g - changed firmware reload to record whether capturing or not and decoding/osd is active, if so then record state and restore after reload. #65f - opening firmware file, if failed, would still try to close it. - changed locking seemed to work well, now can run firmware reloads multiple times and it does it right still, only one succeeds and the rest wait for it to finish. #65e - hopefully firmware lock works right now, last night I did some dumb stuff there :-)). #65d - firmware reload should be triggered correctly now. #65c - fixed Timeout for data loop, was broken, made it so firmware reloads and digitizer resets should be done correctly in all cases now. #65b - tuner support for SECAM fixed, patch had not been correct or something. #65a - increased decoder buffers back to 8, seems like that is just enough. - msp volume changed slightly from original for now, seems that this needs to be different still from looking at the data sheet. #65 - reworked data Timeout check and the way the digitizer reset/firmware reload works from there. #64m - changing stop capture to hopefully not affect decoding when occuring in the end gop mode. - changed firmware reload, don't find the mailboxes again if they work after the reload, may fix the green screen problem. - stop timer for encoder earlier in stop capture - don't run stop capture when start capture fails - digitizer reset wasn't tested more than once - reload firmware for encoder in a different area of the read function - kill off encoder dma tasklet if lingering DMA, may have been bad since the tasklet would be deferred and not really prioitized to go. - make decoder really turn off output on module unload, for some reason this doesn't happen - lock firmware relaod, clear bits better after done. - reload firmware when encoder start capture fails, test at least. - firmware reload improved to be faster for OSD wait and DEC wait. #64l - using api stuff from osd-stream, added the commands that don't need a result, so now shouldn't spend as much time per command sent, with command storage this should work really quick and efficient. - added sleep if not in an interrupt for api mailbox searching. - don't store a command when it fails - wait for start capture, this is important and works with my previous changes, I was testing to see if needed, it does need to wait, which keeps captures from stoping before starting, since I check and if start capture fails I close the stream and exit instead of stop capture. - choose whether or not to wait for the api commands that can avoid it. #64k - put stuff to print out audio changes to msp3400 for debugging better. #64j - fixed bug in api cmd storage, should work better now :-). - msp videodev2.h include changed. #64i - STORE_API_CMD define at the top of ivtv.h now is there, if uncommented enables new api command storage. This may have some problems still, so this should debug that. #64h - made a storage system for api commands, now saves the send/return values, won't bombard firmware with redundant control settings. - firmware reloads now for each card from api cmd, take the itv structure into there now so can do the api storage too. #64g - made firmware reload go a little smoother, still the green screen #64f - patch from Stephane Zermatten to fix the SAP/Bilingual support right. #64e - changing digitizer sleep back for now, till Myth is fixed. #64d - put osd memory free back in, trying it before the allocation of new osd memory if it is already been allocated before. #64c - fix the m179 the right way, actually just needed to not call the vbi ioctl and then everything works great :-). #64b - need more buffers for VBI to sit happy, changed to 32. - fixed msp setup for the m179 from changes in the sap/bilingual patch, was working fine but now save some i2c traffic trying to send to 0x00. #64a - made saa7115 work for either m179 or 350/250 cards without modification commented out misc changes, may be needed for something??? don't know, works fine on either cards without them #64 - added audio patch, SAP support, bilingual :-). all from Stephane Zermatten at http://www.geocities.com/szermatt/bilingual.html. #63u - have buffers try 3 times again to find free ones, - don't check for busy bit when dec polling #63t - made decoder_poll only check if data needed. #63s - actually got the gcc patch in by manually adding it, weird, it just didn't apply even though said it did and also wouldn't apply again, maybe there were two there. #63r - default pcm and vbi buffers raised, saw buffer overflows on those and now have found that the buffers in general can run out and need more tuning like this. - startout with osd alpha at 255, seems Myth counts on that value. - removed all restrictions from decoder poll besides making sure theres a value greater than 0 in dec reg 9 showing it wanting data. #63q - removed buffer free aggressive looping in encoder deq, caused myth to act funny. #63p - check for busy bit in poll #63o - applied patch for older gcc versions #63n - removed spinlock I added, it only is ran on module unload and seems to cause oops's with it included. - fixed decoder startup where capture bit wasn't set atomically. - removed some old commented out code - reworked ivtv_dec_poll to check the dec status and only return if needed or not, not running dma calls, fixes bug in myth. #63m - for some reason the changes for the new card type stuff being used in the firmware reset code got lost somewhere, readded that. This also should make the osd work with 350 rev2 cards, shouldn't have worked before since it didn't allow usage if not a rev1 350. #63l - changed byteswap so can be done in irq or outside depending on define in ivtv.h - testing byteswap back in irq time. #63k - put a spinlock in that I missed. #63j - removed loop for waiting for encoder buffers to free. #63i - secam patch added for secam tuner support from bruno which Mean dug out of the mail archive. #63h - found that decoding needs to use irq interrupts, at least some times, reoccuring decoder freezing happens it seems on a system using multiple cards. I have switched back to tasklets for all decoder DMA but also have the OSD still waiting for it's api calls, this hopefully works stable, also have an idea about trying to do the decoder DMA different in irqtime, waiting if not in it but do if so. #63g - big bug, encoder would get requests for 0 buffers, possibly would happen when decoding, so thought didn't have enough, now just return. #63f - looking at buffer overflows for encoding closer w/debug messages. - clear encoding bits per stream stop instead of after last stream stops. #63e - waiting for result from osd/dec dma calls, since can now outside irq, seems like this makes ff/rw smoother, seems like the right way to do it. - clear the OSD bit when reloading the firmware, this is obviously a bug which was causing some of the problems there. #63d - trying to wait for osd api calls. - moved decoding schedule outside of irq time or tasklets - able to save alpha settings right when reloading firmware - cleanup of some stuff left around from last couple changes. #63c - fix for osd where firmware needed to be reloaded to clear a stuck busy bit, may be better way but this should test and find out. #63b - tuning api calls more, when decoding, there's now better checking and only clearing the decoder api call when safe to do so. - use decoder api semlock for osd call outside osd api call instead of inside api, I think this should keep osd/dec commands from piling up and causing collisions. #63a - worked on mailbox api, seems decoding works better if the start/stop and speed commands are setup right, also trying different tests with settings that I've found to work well with certain commands from testing - worked on decoding stop, like encoding now, try to finish last DMA right, this makes splicing work much nicer now, the stop command is important. #63 - fixes for ff/rw and firmware reloads for api failure. #62e - changed over to new mailbox api stuff used for the dma calls, helps start/stop captures to work smoother. - don't wait for return to stop capture, it makes things work better when starting a capture. - use video pause in channel changing again, found that if you disable the digitizer, it is better, but only if you run the refresh intput, just like starting a capture but in mid encode needs to refresh, makes sense and seems to be the only way it won't crash. #62d - found way to properly bail out when user stops capturing before it even started, return error from startcap and then run stop capture to cleanup, seems to work. #62c - fixed string thing in encoder.c #62b - another fix to osd in Myth, although may cause encoding and osd interaction problems. #62a - change to fix osd in Myth and X - changed channel changing problem, removing video pause again #62 - pip and m179 cards work now if you uncomment the #define M179 out of saa7115.c #61d - fixes in osd, reverted some unneeded changes from getting fw reloads to work. #61c - bug in osd waitq clearing flags where it shouldn't. #61b - channel change, trying to make that nicer. #61a - found a place that was causing the wait to still happen on the firmware reloads, now should only take 3sec to trigger, was 33 #61 - fixes to firmware reloads on dec dma errors, got one and was able to find plenty of things to fix the long wait it took, but it still worked. - changed dma tasklet for decoding to run the tasklet statements for each dec irq, instead of all in the same one, may help keep them separate. #60 - added encoder command in utils, encoder.c which can capture the program stream ending, also can do lots of things, check out with -h arg for help. #59r - Made radio device variable atomic for the radio user, used i_flags. - removed the spinlock_irq on the open when choosing a device, seems like this isn't needed and dangerous. - improved way digitizer is reset so it no longer can lockup the machine during a start capture, hopefully :-). - changed stop capture and start capture to always enable device event notification, seems needed for properly switching between both. - fixed end gop ioctl command. #59q - trying to deq buffers more aggressively, try looping 3 times, sleep when freeing them, may help hopefully, at least an interesting test. #59p - put Brians byteswap outside of IRQ time back in, think this is one thing holding up the buffers being free. #59o - split spinlocks, now one for each stream, no global one, should allow decoding/encoding to not cause each other to starve for buffers. #59n - fixed firmware reloads, should be faster, and have them setup the decoder safer now. #59m - added streamoff and end_gop ioctl commands to test_ioctl -E 0|1 forthe end GOP setting, and -S for streamoff, doesn't really seem to work here yet, weird. #59l - fixed some bugs from how I did the enc_timeout stop. #59k - got streamoff working again, so can capture the end GOP or the last P frame for splicing :-). #59j - removed spinlocks from decoder/osd api dma calls. - added sleep to keep ivtvfbctl sane at it's speed upon the fb, can be turned off with -nosleep. - increased encoder timeout, affected by osd usage when high. - added osd dma jiffies count, like decoder, check and slow down osd dma in encoder timeout if needed. - added extra check for osd busy flag, now can't slow down the decoder or encoder DMA with the osd. #59i - fixing missed spinlocks, put in tasklets for DMA done stuff - better way to finish EOS DMA. - removed commented out spinlocks and things. #59h - missed a spinlock on buffer overflow dma rerunning for the encoder. - print out more information on buffer overflow. - try even if didn't free buffers to rerun DMA, think the free buffer thing doesn't really mean none are available, just locked by the decoder. #59g - removing global spinlocking, probably dangerous, but I want to see it happen, so far is working fine on preemptible, they just need to be removed carefully. #59f - trying to remove schedule() from ivtv_read, changing back. #59e - put test decoder/osd timeout checks in, may be able to keep freezes from stoping things. #59d - put back spinlock on open. #59c - another place tasklets were not commented right for USE_TASKLET to disable them right. - checking dma status on encoder timeout, if sense an error, go on and run the timeout even if no DMA pending. #59b - added patch for svideo/composite at the same time for 350 output. - trying encoder timeout later on stop_capture call. #59a - now tasklets actually can be disabled, I forgot the stuff in ivtv-api.c - change to the waiting for osd/dec to be unbusy when reloading the firmware. #59 - removed all changes before 55b - don't do video pause when changing channels - don't mute video when starting a capture, or unmute, leave as is. - using tasklets for firmware reloads - made USE_TASKLET define work again, now at top of ivtv.h #58b - checking the irq req during the decoder timeout was bad on decoding. #58a - was wrong on interrupt mask checking for if it had been masked while decoding, so now fixed, didn't seem affect it outside of ff/rw. #58 - removed osd DMA changes again, seemed to make things freeze decoding - Firmware reloads seem to work well most of the time. - clear stale bit no longer cleared. - now clear the interrupt mask in the decoder timeout if lost. #57 - fixes to firmware reloading. - made ivtvfbctl wait 33333 usec so it won't overpower the decoder. - enable firmware reloads again. - clear stale busy bit now in dec timeout. #56 - trying OSD DMA unmapping hopefully the right way this time. #55b - stop captures with the streamoff api won't work right with these changes right now, need to find a different way now, but otherwise this may fix encoder timeouts. - Have encoder timeout active now, hopefully will stop encoding timeouts - placed a decoder timeout hopefully into a better position when scheduling decoding. #55a - When encoding, and grabbing free buffers, allow there to be less sent than asked for, encoder seems to work fine like this. - added code to the deq function for buffers, should allow for us not to get null buffers as often, tries more than once to allocate, and won't send back NULL ones. #55 - trying down() instead of down_interruptible on semlocking. #53 - ck, need to learn, never use more than one decoder mailbox :-). with decoding DMA especially. #52 - found bug with audio input for the radio. #51 - try using both decoder mailboxes for DMA, may be safe now. - couple of small fixes for the ff/rw and dec dma errors. #50 - fixed waitq in encoder possibly, should behave better when encoding especially with other streams too. - Added a encoder timeout function, need to implement like the dec one. - fixed problem with stop capture where it cleared things even if there are 2 captures going on so shouldn't be cleared. - Used tasklets to halt the encoder dma and start back up when stop/start captures, may improve things there. - trying to use tasklets to stop DMA for resetting the firmware. - stop decoder dma tasklet and other fixes to rewind/fast forward. - have DMA jiffies stat now to tell if decoder BUSY flag is stuck and reset that, wake up the streams. #49 - added video pause back for channel changes, still need more testing with it enabled to make sure, seems needed for radio stuff. - only use one decoder mailbox for DMA, seems to need that for keeping freezes from occuring. - set API cmd 0xD6 for encoder, needed for saa7114... /* 0x00EF = saa7114 0x00FO = saa7115 0x0106 = mic*/ - check if capturing is occuring before pausing the video. #48 - fixed radio bug, closing radio device, we were freeing up the id before the radio stream was deconstructed, which wasn't a working radio stream anymore after 1 use until module reload, this should be fixed. #47 - Made changes to mailbox api to search for free mailboxes when doing DMA calls, know how many decoder/encoder has, not need a semlock for enc/dec DMA calls, should optimize way mailbox api works in general without too much design changes. Also now don't make excessive read calls to mbox flags and don't write out to each of the 16 cmd args, it does not make sense to do this. #46 - Commented out OSD memory free in DMA done, breaks 2.4. - Made USE_TASKLET define work since #45a broke that somewhat. #45a - Changed all other instances of DMA calls to tasklets, seems DMA errors were happening otherwise #45 - enabled decoder prebuffer again, seeing if it helps ff/rw at all. - Added decoder timeout printing of the DMA status register. - Merged back tasklets from osd_stream and ck-ng patches, should be the best implementation yet since I used the prior experiences to hopefully set them up better. There are now t_flags which are used to flag the tasklets actions needed. #44 - Followed Jens information and changed the get_user_pages() flags back to what they were before, was wrong there. #43 - I have found a major problem in the OSD/FB memory usage, seems that it was not properly mapping/freeing the user pages, this was causing kswap to go crazy after loading data into the framebuffer for extended periods of time. It seems to have not always been easily triggered though and from what I can tell was not always a problem depending on the method or application and possibly timing of loading. This could be wrong but seems right, just a mystery why this wasn't causing more obvious behavior problems, but then again the way the framebuffer acts it just could be showing up in that subtle indirect way of just making the fb flaky. #42 - Added generic mailbox command ioctl, fwapi in utils directory can use this, should allow for figuring out mailbox and firmware behavior. #41 - Digitizer reset had capture setup rerun again, removed that since it probably is worse to do so. - Found problem with 350 cards, actual reason that is, YUV buffer kludge which defines 0 YUV buffers for decoding wasn't included in my merging. #40 - used copy_to_user stuff for decoding input, left out rest of changes till get_user_X problem solved. #39 - Added Hans patches for compiler warnings, lirc_i2c checking, and using pointer arithmetic on firmware searching. #38b - fixed problem with 350 cards loading. #38a - fixes from Jim Sager merged. #38 - removed digitizer off/on stuff on channel changes. #37 - Merged Yaun/m179 patches, please test since I have no idea if this will work for them, I don't own any. #36 - Try to turn digitizer off/on when changing channels, seems better than the video pause at least, may slow it down though? - Disable firmware reloads for now, from API command timeouts, seems dangerous. #35 - Fixed up EOS captures so hopefully work better, seem to catch the Last GOP everytime now, would miss it at times, DMA wasn't finished till 2 seconds it seems. - On startcapture clear proper IRQ bits from last capture, use spin_lock to make sure other start captures and the last stop capture are done, this will make sure since the spinlock will wait till the IRQ handler finishes from a prior startcapture. #34 - fixed PAL firmware reload for decoder output. #33 - trying encoder firmware reload better, not conflict with digitizer resets. - removed pause for encoder when changing channels, seems like it only would induce black screens and data timeouts. #32 - remove part checking for active capture before pausing sleep in encoding unmute/resume, probably doesn't matter and may induce other problems. - refresh encoder input after each channel change. - after digitizer reset, reload encoder settings, may be needed for Myth. - Don't reload decoder settings in NTSC for decoding, seems bad here, not sure why, makes the output all black, may be the previous channel sleeping thing, hmm. #31 - try and reset encoder settings after a digitizer reset. #30 - semlock wasn't held when changing channels in certain ioctl calls, including the main one, so this may have caused channel change lockups. - don't sleep on channel freq changes when not capturing. #28 - put register setting stuff in for i2c changes to the saa7127 and saa7115 #27 - firmware reloads fixed so PAL works with them, reset decoder settings, fb settings, capture settings after reload. - improved flags for reloading firmware, enabled global reload from the ivtv_api function for decoding and capture, should work well hopefully. #26 - added spin_locks back into ivtv-fb.c, seem like they are needed. #25 - removed spinlocks in ivtv-fb.c, seeing if it helps some myth cursor problems. #24 - removed firmware reload for now, was not just one card ;-). - print all stream status when debugging. #23 - Added Hans patch. #22 - Added NTSC 7.5 IRE setup. - Added EndofGOP capture so it will work when picked as an optional ioctl. #21 - Added firmware reload for when api commands crash firmware. - Added digitizer reset from Kevin. - setup encoder separate so that it can be done upon fw reload. #20 - firmware reloads and decoding continues, seems like it should do so live too, without doing it though an ioctl. #19 - trying to get firmware reload to continue decoding. #18 - Moving decoding back into irq time, should be fine and hopefully gets rid of these dma freezes there. #17 - unmask irq in vsync and dec timeouts, think the irq is getting masked somehow and has to be unmasked again. - fixes to firmware reload, still probably doesn't work. #16 - reworking way timeout works, and how decoder checks if data is needed, problem seems to be the OSD keep the decoder going fine, so need the wake_up stuff running like it does there and clear the BUSY bit when waiting too long. #15 - Worked on making decoder timer keep decoder streams DMA running, seems when running multiple ones they can freeze in rare occasions, like the encoder used to do. Have timeout do this job now, seems to work great. #14 - Changed speed control to allow reverse playback and setting B frames when in reverse. - Haven't had a DMA error yet to test firmware reloading, seems good I guess, doing 4 decodes/1 osd/4 encodings at a time to try and trigger it. #13 - Reworked stop decode to finish last DMA before exiting, like for capture - wait longer for decoder stop. - Re-Added timeout for decoder, seems to be needed with multiple streams decoding on more than one card, also doubled the timeout too. #12 - Tried reloading firmware different, before it would lock the machine so now trying a full reload and different methods of stoping encoding and decoding during it. #11 - Multiple changes to fix DMA errors when decoding, keep machine from crashing. - Removed decoder timeout stuff, isn't needed anymore. - Fixed decoder stop with OSD active, so won't stomp on the current OSD DMA - Fixed OSD flags and BUSY flags bugs so they don't get cleared, seems so far to fix the DMAP errors on decoding. - Reworked firmware reload, haven't tested this yet, but hopefully can revive the decoding when a DMA error occurs. #8-10 - Testing, DO NOT USE 8-10 ;-). #7 - Added code for firmware reset, not active or used, but in place and ready. #1-6 - See mailing list