diff options
author | Russ Meyerriecks <rmeyerreicks@digium.com> | 2012-10-04 20:24:55 +0000 |
---|---|---|
committer | Russ Meyerriecks <rmeyerreicks@digium.com> | 2012-10-04 20:24:55 +0000 |
commit | 6a9a66d0a8deac8fde0cae39aa12e56564d14092 (patch) | |
tree | 11898041f6a404c3f74ab73a5c884a982dbd8e00 /drivers/dahdi/wct4xxp/base.c | |
parent | f59631e312dd2a3a7ed6f92cb3cda427835eb761 (diff) |
wct4xxp: EC channel calculation in TONEDETECT assumes TE820.
Since r10290 "wct4xxp: Add support for TE820 and VPMOCT256." [1],
the TONEDETECT ioctl was not calculating the VPM channel correctly
on non TE820 cards. This fixes a regression first introduced in
2.6.0.
[1] http://svnview.digium.com/svn/dahdi?view=revision&revision=10290
Internal-Issue-ID: DAHLIN-302
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10733 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wct4xxp/base.c')
-rw-r--r-- | drivers/dahdi/wct4xxp/base.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 7891c61..be172d2 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -1236,9 +1236,11 @@ static int t4_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long dat else clear_bit(chan->chanpos - 1, &ts->dtmfmutemask); - channel = (chan->chanpos) << 3; - if (!has_e1_span(wc)) - channel += (4 << 3); + channel = has_e1_span(wc) ? chan->chanpos : chan->chanpos + 4; + if (is_octal(wc)) + channel = channel << 3; + else + channel = channel << 2; channel |= chan->span->offset; vpm450m_setdtmf(wc->vpm, channel, j & DAHDI_TONEDETECT_ON, j & DAHDI_TONEDETECT_MUTE); |