diff options
Diffstat (limited to 'zaptel.c')
-rwxr-xr-x | zaptel.c | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -422,6 +422,8 @@ static char *sigstr(int sig) return "CAS"; case ZT_SIG_DACS: return "DACS"; + case ZT_SIG_DACS_RBS: + return "DACS+RBS"; case ZT_SIG_SF: return "SF (ToneOnly)"; case ZT_SIG_NONE: @@ -906,7 +908,7 @@ static void close_channel(struct zt_chan *chan) oldconf = chan->confna; /* initialize conference variables */ chan->_confn = 0; - if ((chan->sig & ZT_SIG_DACS) != ZT_SIG_DACS) { + if ((chan->sig & __ZT_SIG_DACS) != __ZT_SIG_DACS) { chan->confna = 0; chan->confmode = 0; } @@ -1970,7 +1972,7 @@ static int initialize_channel(struct zt_chan *chan) chan->iomask = 0; /* release conference resource if any */ if (chan->confna) zt_check_conf(chan->confna); - if ((chan->sig & ZT_SIG_DACS) != ZT_SIG_DACS) { + if ((chan->sig & __ZT_SIG_DACS) != __ZT_SIG_DACS) { chan->confna = 0; chan->confmode = 0; } @@ -2085,7 +2087,7 @@ static int zt_specchan_open(struct inode *inode, struct file *file, int unit, in res = -EBUSY; else if (chans[unit]->master != chans[unit]) res = -EBUSY; - else if (chans[unit]->sig == ZT_SIG_DACS) + else if ((chans[unit]->sig & __ZT_SIG_DACS) == __ZT_SIG_DACS) res = -EBUSY; else { /* Assume everything is going to be okay */ @@ -2929,7 +2931,7 @@ static int zt_ctl_ioctl(struct inode *inode, struct file *file, unsigned int cmd return -EINVAL; ch.sigtype = chans[ch.master]->sig; newmaster = chans[ch.master]; - } else if (ch.sigtype == ZT_SIG_DACS) { + } else if ((ch.sigtype & __ZT_SIG_DACS) == __ZT_SIG_DACS) { newmaster = chans[ch.chan]; if ((ch.idlebits < 1) || (ch.idlebits >= ZT_MAX_CHANNELS)) return -EINVAL; @@ -3003,7 +3005,7 @@ static int zt_ctl_ioctl(struct inode *inode, struct file *file, unsigned int cmd /* Clear FCS flag */ chans[ch.chan]->flags &= ~ZT_FLAG_FCS; } - if ((ch.sigtype & ZT_SIG_DACS) == ZT_SIG_DACS) { + if ((ch.sigtype & __ZT_SIG_DACS) == __ZT_SIG_DACS) { /* Setup conference properly */ chans[ch.chan]->confmode = ZT_CONF_DIGITALMON; chans[ch.chan]->confna = ch.idlebits; @@ -5766,6 +5768,16 @@ int zt_transmit(struct zt_span *span) __zt_real_transmit(&span->chans[x]); } } + if (span->chans[x].sig == ZT_SIG_DACS_RBS) { + if (chans[span->chans[x].confna]) { + /* Just set bits for our destination */ + if (span->chans[x].txsig != chans[span->chans[x].confna]->rxsig) { + span->chans[x].txsig = chans[span->chans[x].confna]->rxsig; + span->rbsbits(&span->chans[x], chans[span->chans[x].confna]->rxsig); + } + } + } + } spin_unlock_irqrestore(&span->chans[x].lock, flags); } |