diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-02-03 06:04:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-03 11:32:08 -0500 |
commit | 66ac5a294db70aa377c0d7bbdb0c4e3ef2349b7b (patch) | |
tree | 15af88490e32c4d2f0c8a7350da701595a746b07 /drivers/telephony/ixj.c | |
parent | f0c00257d63463fa9d692e632fae037d6c0e67b0 (diff) |
[PATCH] ixj: fix writing silence check
j->write_buffer_rp is a pointer.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/telephony/ixj.c')
-rw-r--r-- | drivers/telephony/ixj.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c index f6704688ee8c..5578a9dd04e8 100644 --- a/drivers/telephony/ixj.c +++ b/drivers/telephony/ixj.c | |||
@@ -3558,10 +3558,16 @@ static void ixj_write_frame(IXJ *j) | |||
3558 | } | 3558 | } |
3559 | /* Add word 0 to G.729 frames for the 8021. Right now we don't do VAD/CNG */ | 3559 | /* Add word 0 to G.729 frames for the 8021. Right now we don't do VAD/CNG */ |
3560 | if (j->play_codec == G729 && (cnt == 0 || cnt == 10 || cnt == 20)) { | 3560 | if (j->play_codec == G729 && (cnt == 0 || cnt == 10 || cnt == 20)) { |
3561 | if(j->write_buffer_rp + cnt == 0 && j->write_buffer_rp + cnt + 1 == 0 && j->write_buffer_rp + cnt + 2 == 0 && | 3561 | if (j->write_buffer_rp[cnt] == 0 && |
3562 | j->write_buffer_rp + cnt + 3 == 0 && j->write_buffer_rp + cnt + 4 == 0 && j->write_buffer_rp + cnt + 5 == 0 && | 3562 | j->write_buffer_rp[cnt + 1] == 0 && |
3563 | j->write_buffer_rp + cnt + 6 == 0 && j->write_buffer_rp + cnt + 7 == 0 && j->write_buffer_rp + cnt + 8 == 0 && | 3563 | j->write_buffer_rp[cnt + 2] == 0 && |
3564 | j->write_buffer_rp + cnt + 9 == 0) { | 3564 | j->write_buffer_rp[cnt + 3] == 0 && |
3565 | j->write_buffer_rp[cnt + 4] == 0 && | ||
3566 | j->write_buffer_rp[cnt + 5] == 0 && | ||
3567 | j->write_buffer_rp[cnt + 6] == 0 && | ||
3568 | j->write_buffer_rp[cnt + 7] == 0 && | ||
3569 | j->write_buffer_rp[cnt + 8] == 0 && | ||
3570 | j->write_buffer_rp[cnt + 9] == 0) { | ||
3565 | /* someone is trying to write silence lets make this a type 0 frame. */ | 3571 | /* someone is trying to write silence lets make this a type 0 frame. */ |
3566 | outb_p(0x00, j->DSPbase + 0x0C); | 3572 | outb_p(0x00, j->DSPbase + 0x0C); |
3567 | outb_p(0x00, j->DSPbase + 0x0D); | 3573 | outb_p(0x00, j->DSPbase + 0x0D); |