From 1224ef0741b8a5a78f8efd526f7b77f4ea91d523 Mon Sep 17 00:00:00 2001 From: sruffell Date: Fri, 10 Oct 2008 22:37:48 +0000 Subject: - Ensure that the source format is considered when selecting a transcoder. - When a command is to be retried, turn off the TX_COMPLETE flag before resubmitting it to the hardware. This should elimate some of the warnings printed to the kernel log in the wctc4xxp_transmit_cmd function. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4564 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- kernel/wctc4xxp/base.c | 1 + kernel/zttranscode.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/wctc4xxp/base.c b/kernel/wctc4xxp/base.c index bfb67fb..097321a 100644 --- a/kernel/wctc4xxp/base.c +++ b/kernel/wctc4xxp/base.c @@ -2846,6 +2846,7 @@ wctc4xxp_watchdog(unsigned long data) /* Move this to the local list because we're * going to resend it once we free the locks */ list_move_tail(&cmd->node, &cmds_to_retry); + cmd->flags &= ~(TX_COMPLETE); } else { /* The command is still sitting on the tx * descriptor ring. We don't want to move it diff --git a/kernel/zttranscode.c b/kernel/zttranscode.c index cc26492..239189d 100644 --- a/kernel/zttranscode.c +++ b/kernel/zttranscode.c @@ -212,7 +212,7 @@ __find_free_channel(struct list_head *list, const struct zt_transcoder_formats * unsigned int match = 0; list_for_each_entry(tc, list, node) { - if ((tc->dstfmts & fmts->dstfmt)) { + if ((tc->dstfmts & fmts->dstfmt) && (tc->srcfmts & fmts->srcfmt)) { /* We found a transcoder that can handle our formats. * Now look for an available channel. */ match = 1; -- cgit v1.2.3