|
|
@ -394,7 +394,7 @@ static int dahdi_translate(struct ast_trans_pvt *pvt, int dest, int source)
|
|
|
|
dahdip->fmts.srcfmt = (1 << source);
|
|
|
|
dahdip->fmts.srcfmt = (1 << source);
|
|
|
|
dahdip->fmts.dstfmt = (1 << dest);
|
|
|
|
dahdip->fmts.dstfmt = (1 << dest);
|
|
|
|
|
|
|
|
|
|
|
|
ast_log(LOG_DEBUG, "Opening transcoder channel from %d to %d.\n", source, dest);
|
|
|
|
ast_debug(1, "Opening transcoder channel from %d to %d.\n", source, dest);
|
|
|
|
|
|
|
|
|
|
|
|
retry:
|
|
|
|
retry:
|
|
|
|
if (ioctl(fd, DAHDI_TC_ALLOCATE, &dahdip->fmts)) {
|
|
|
|
if (ioctl(fd, DAHDI_TC_ALLOCATE, &dahdip->fmts)) {
|
|
|
@ -408,11 +408,11 @@ retry:
|
|
|
|
* we'll just convert from ulaw to signed linear in
|
|
|
|
* we'll just convert from ulaw to signed linear in
|
|
|
|
* software. */
|
|
|
|
* software. */
|
|
|
|
if (AST_FORMAT_SLINEAR == dahdip->fmts.srcfmt) {
|
|
|
|
if (AST_FORMAT_SLINEAR == dahdip->fmts.srcfmt) {
|
|
|
|
ast_log(LOG_DEBUG, "Using soft_slin support on source\n");
|
|
|
|
ast_debug(1, "Using soft_slin support on source\n");
|
|
|
|
dahdip->softslin = 1;
|
|
|
|
dahdip->softslin = 1;
|
|
|
|
dahdip->fmts.srcfmt = AST_FORMAT_ULAW;
|
|
|
|
dahdip->fmts.srcfmt = AST_FORMAT_ULAW;
|
|
|
|
} else if (AST_FORMAT_SLINEAR == dahdip->fmts.dstfmt) {
|
|
|
|
} else if (AST_FORMAT_SLINEAR == dahdip->fmts.dstfmt) {
|
|
|
|
ast_log(LOG_DEBUG, "Using soft_slin support on destination\n");
|
|
|
|
ast_debug(1, "Using soft_slin support on destination\n");
|
|
|
|
dahdip->softslin = 1;
|
|
|
|
dahdip->softslin = 1;
|
|
|
|
dahdip->fmts.dstfmt = AST_FORMAT_ULAW;
|
|
|
|
dahdip->fmts.dstfmt = AST_FORMAT_ULAW;
|
|
|
|
}
|
|
|
|
}
|
|
|
|