![]() | |||||||||||||
Messages in this thread Patch in this message |
This patch removes another bogus chunk of code that breaks when the application does a partial write. In particular, a read/write of x bytes where x % 4 != 0 will loop forever. -- Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtIndex: kernel-source-2.4/drivers/sound/i810_audio.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.4/drivers/sound/i810_audio.c,v retrieving revision 1.17 diff -u -r1.17 i810_audio.c --- kernel-source-2.4/drivers/sound/i810_audio.c 23 Nov 2003 00:34:22 -0000 1.17 +++ kernel-source-2.4/drivers/sound/i810_audio.c 23 Nov 2003 10:59:46 -0000 @@ -1487,15 +1487,6 @@ if (cnt > count) cnt = count; - /* Lop off the last two bits to force the code to always - * write in full samples. This keeps software that sets - * O_NONBLOCK but doesn't check the return value of the - * write call from getting things out of state where they - * think a full 4 byte sample was written when really only - * a portion was, resulting in odd sound and stereo - * hysteresis. - */ - cnt &= ~0x3; if (cnt <= 0) { unsigned long tmo; /* @@ -1643,15 +1634,6 @@ #endif if (cnt > count) cnt = count; - /* Lop off the last two bits to force the code to always - * write in full samples. This keeps software that sets - * O_NONBLOCK but doesn't check the return value of the - * write call from getting things out of state where they - * think a full 4 byte sample was written when really only - * a portion was, resulting in odd sound and stereo - * hysteresis. - */ - cnt &= ~0x3; if (cnt <= 0) { unsigned long tmo; // There is data waiting to be played | ||||||||||||
| Last update: 2005-03-22 13:58 [from the cache] ©2003-2008 | |||||||||||||