Commit ee2dfacc authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[sound/oss i810] fix reads/writes % 4 != 0

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.
parent 8cd3762c
......@@ -1498,15 +1498,6 @@ static ssize_t i810_read(struct file *file, char *buffer, size_t count, loff_t *
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;
/*
......@@ -1654,15 +1645,6 @@ static ssize_t i810_write(struct file *file, const char *buffer, size_t count, l
#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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment