diff options
author | creslin287 <matt@fredricknet.net> | 2010-03-26 12:57:31 -0500 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-02-05 20:26:25 +0100 |
commit | cd8b86f124d5da7f30089c9e6ac722f92c3c03f0 (patch) | |
tree | f066f4a45a1b6fb5ac70ce2d817852c0bc2333e0 | |
parent | 69245a0496445c6f06d9d00547883ce508c42558 (diff) |
Working audio data version
-rw-r--r-- | openbsc/src/input/dahdi.c | 14 | ||||
-rw-r--r-- | openbsc/src/input/lapd.h | 1 |
2 files changed, 8 insertions, 7 deletions
diff --git a/openbsc/src/input/dahdi.c b/openbsc/src/input/dahdi.c index 9b899ff75..c850edc35 100644 --- a/openbsc/src/input/dahdi.c +++ b/openbsc/src/input/dahdi.c @@ -374,7 +374,7 @@ static void init_flip_bits(void) static u_int8_t * flip_buf_bits ( u_int8_t * buf , int len) { int i; - char * start = buf; + u_int8_t * start = buf; for (i = 0 ; i < len; i++) { buf[i] = flip_table[(u_int8_t)buf[i]]; @@ -383,7 +383,7 @@ static u_int8_t * flip_buf_bits ( u_int8_t * buf , int len) return start; } -#define D_BCHAN_TX_GRAN 1024 +#define D_BCHAN_TX_GRAN 160 /* write to a B channel TS */ static int handle_tsX_write(struct bsc_fd *bfd) { @@ -417,7 +417,7 @@ static int handle_tsX_write(struct bsc_fd *bfd) return ret; } -#define D_TSX_ALLOC_SIZE 1024 +#define D_TSX_ALLOC_SIZE (D_BCHAN_TX_GRAN) /* FIXME: read from a B channel TS */ static int handle_tsX_read(struct bsc_fd *bfd) { @@ -448,7 +448,7 @@ static int handle_tsX_read(struct bsc_fd *bfd) ret = e1inp_rx_ts(e1i_ts, msg, 0, 0); /* physical layer indicates that data has been sent, * we thus can send some more data */ - //ret = handle_tsX_write(bfd); + ret = handle_tsX_write(bfd); msgb_free(msg); return ret; @@ -532,9 +532,9 @@ void dahdi_set_bufinfo(int fd, int as_sigchan) bi.numbufs = 4; bi.bufsize = 512; } else { - bi.numbufs = 4; + bi.numbufs = 8; bi.bufsize = D_BCHAN_TX_GRAN; - //bi.txbufpolicy = DAHDI_POLICY_WHEN_FULL; + bi.txbufpolicy = DAHDI_POLICY_WHEN_FULL; } if (ioctl(fd, DAHDI_SET_BUFINFO, &bi)) { @@ -592,7 +592,7 @@ static int mi_e1_setup(struct e1inp_line *line, int release_l2) /* We never include the mISDN B-Channel FD into the * writeset, since it doesn't support poll() based * write flow control */ - bfd->when = BSC_FD_READ | BSC_FD_WRITE; + bfd->when = BSC_FD_READ;// | BSC_FD_WRITE; break; } diff --git a/openbsc/src/input/lapd.h b/openbsc/src/input/lapd.h index 73195d6f7..671fd9082 100644 --- a/openbsc/src/input/lapd.h +++ b/openbsc/src/input/lapd.h @@ -8,6 +8,7 @@ typedef enum { LAPD_MPH_DEACTIVATE_IND, LAPD_DL_DATA_IND, + LAPD_DL_UNITDATA_IND, } lapd_mph_type; |