[Asterisk-bugs] [Zaptel 0010244]: Allow modification of ZT_CHUNKSIZE

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Jul 22 02:31:40 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10244 
====================================================================== 
Reported By:                UVSoft
Assigned To:                
====================================================================== 
Project:                    Zaptel
Issue ID:                   10244
Category:                   General
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
Zaptel Version:              1.2.19  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             07-20-2007 02:37 CDT
Last Modified:              07-22-2007 02:31 CDT
====================================================================== 
Summary:                    Allow modification of ZT_CHUNKSIZE
Description: 
I've made a patch that makes ZT_CHUNKSIZE variable, thus someone can change
it to whatever he wants. It's very useful, e.g. I'm working on a driver for
some device and the device requires ZT_CHUNKSIZE to be much more, it's hard
for the device to operate with chunks of 8 samples, but 80 will do. The
problem is that there are some pieces of the code, where ZT_CHUNKSIZE is
implied to be 8, and if I just change ZT_CHUNKSIZE to 80, all the timeouts
will become crazy, the patch tries to fix this issue.
====================================================================== 

---------------------------------------------------------------------- 
 UVSoft - 07-22-07 02:31  
---------------------------------------------------------------------- 
The patch shows the idea. I don't offer someone just apply it and '$ make',
it won't do, because wct4xxp requires ZT_CHUNKSIZE to be 8:

wct4xxp/base.c:

1859: #if (ZT_CHUNKSIZE != 8)
1860: #error Sorry, nextgen does not support chunksize != 8
1861: #endif

I've uploaded a new version of the patch (v4) that doesn't change
ZT_CHUNKSIZE and fixes Makefile and Makefile.kernel26 to exclude wct4xxp if
ZT_CHUNKSIZE differs from 8.

About magic 8, actually there's no magic here at all, it's just a way to
move from samples to ms, therefore if someone wants to change ZT_CHUNKSIZE
and knows sample rate of the device he intends communicating with, there
won't be any problem to set ZT_CHUNTIME properly. In most cases you don't
need to care about ZT_CHUNKTIME, because most likely you have 8kHz (8
samples = 1 ms).

As for the 1.2 trunk and 1.4, I don't have such patches, but if someone is
interested in it, there won't be any problem to make them. Moreover I do
think that the patch can be applied for the 1.2 trunk. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-22-07 02:31  UVSoft         Note Added: 0067716                          
======================================================================




More information about the asterisk-bugs mailing list