2.5.59 : sound/oss/vidc.c (CORRECTED)

2.5.59 : sound/oss/vidc.c (CORRECTED)

Post by Alexei Podtelezhniko » Sun, 09 Feb 2003 02:50:09




> 36 < hwrate < 3332

       ^^^^^^  should be 'newsize'

Yeap, and the following couple of lines:

                /* 36 < newsize 3332; rounding it off
                 * to the nearest power of 2, no less than 256
                 */
                for (new2size = 384; new2size < newsize; new2size <<= 1);
                new2size -= new2size / 3;

safely replace the whole following block:

                if (newsize < 208)
                        newsize = 208;
                if (newsize > 4096)
                        newsize = 4096;
                for (new2size = 128; new2size < newsize; new2size <<= 1);
                        if (new2size - newsize > newsize - (new2size >> 1))
                                new2size >>= 1;
                if (new2size > 4096) {
                        printk(KERN_ERR "VIDC: error: dma buffer (%d) %d > 4K\n",
                                newsize, new2size);
                        new2size = 4096;
                }

Would somebody test this?
A.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.59 : sound/oss/vidc.c (CORRECTED)

Post by John Bradfor » Sun, 09 Feb 2003 13:30:12



> > 36 < hwrate < 3332
>        ^^^^^^  should be 'newsize'

> Yeap, and the following couple of lines:

>                 /* 36 < newsize 3332; rounding it off
>                  * to the nearest power of 2, no less than 256
>                  */
>                 for (new2size = 384; new2size < newsize; new2size <<= 1);
>                 new2size -= new2size / 3;

> safely replace the whole following block:

>                 if (newsize < 208)
>                         newsize = 208;
>                 if (newsize > 4096)
>                         newsize = 4096;
>                 for (new2size = 128; new2size < newsize; new2size <<= 1);
>                         if (new2size - newsize > newsize - (new2size >> 1))
>                                 new2size >>= 1;
>                 if (new2size > 4096) {
>                         printk(KERN_ERR "VIDC: error: dma buffer (%d) %d > 4K\n",
>                                 newsize, new2size);
>                         new2size = 4096;
>                 }

> Would somebody test this?

The only change I'd make would be:

-                 /* 36 < newsize 3332; rounding it off
+                 /* 36 <= newsize <= 3332; rounding it off

John
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. 2.5.59 : sound/oss/vidc.c


NAK.  This one is correct before, AFAICT.

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Minix & Linux

3. kernbench: 2.5.59 vs 2.5.59-mm6 vs 2.5.59-mjb2

4. Dip Died - HELP!

5. 2.5.59 : sound/oss/cs46xx.c

6. solaris version 1.1

7. kernbench-16 on 2.5.59 vs 2.5.59-mm6

8. create my own list mailer from a script?

9. OSS/sb_mixer.c is broken on 2.5.59

10. Unable to make a proper initrd-2.5.59.img for kernel 2.5.59

11. 2.5.59 : sound/pci/es1968.c

12. STILL compile error in sound/isa/sb16.c in 2.5.59

13. ALSA sound and kernel 2.5.59