]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 267492 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Thu, 3 Jun 2010 17:21:06 +0000 (17:21 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 3 Jun 2010 17:21:06 +0000 (17:21 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r267492 | mmichelson | 2010-06-03 12:09:11 -0500 (Thu, 03 Jun 2010) | 6 lines

  Remove unnecessary code relating to PLC.

  The logic for handling generic PLC is now handled in ast_write in
  channel.c instead of in translation code.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@267507 65c4cc65-6c06-0410-ace0-fbb531ad65f3

codecs/codec_adpcm.c
codecs/codec_alaw.c
codecs/codec_dahdi.c
codecs/codec_g722.c
codecs/codec_g726.c
codecs/codec_gsm.c
codecs/codec_lpc10.c
codecs/codec_ulaw.c
include/asterisk/translate.h
main/translate.c

index d43ed44d0c7f13b2738f5183df13f2cb82cf54e2..a1b0680a518a8ff073cf762833e2121234ecfca0 100644 (file)
@@ -293,7 +293,6 @@ static struct ast_translator adpcmtolin = {
        .desc_size = sizeof(struct adpcm_decoder_pvt),
        .buffer_samples = BUFFER_SAMPLES,
        .buf_size = BUFFER_SAMPLES * 2,
-       .plc_samples = 160,
 };
 
 static struct ast_translator lintoadpcm = {
@@ -308,28 +307,9 @@ static struct ast_translator lintoadpcm = {
        .buf_size = BUFFER_SAMPLES/ 2,  /* 2 samples per byte */
 };
 
-static int parse_config(int reload)
-{
-       struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
-       struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
-       struct ast_variable *var;
-       if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID)
-               return 0;
-       for (var = ast_variable_browse(cfg, "plc"); var ; var = var->next) {
-               if (!strcasecmp(var->name, "genericplc")) {
-                       adpcmtolin.useplc = ast_true(var->value) ? 1 : 0;
-                       ast_verb(3, "codec_adpcm: %susing generic PLC\n", adpcmtolin.useplc ? "" : "not ");
-               }
-       }
-       ast_config_destroy(cfg);
-       return 0;
-}
-
 /*! \brief standard module glue */
 static int reload(void)
 {
-       if (parse_config(1))
-               return AST_MODULE_LOAD_DECLINE;
        return AST_MODULE_LOAD_SUCCESS;
 }
 
@@ -347,8 +327,6 @@ static int load_module(void)
 {
        int res;
 
-       if (parse_config(0))
-               return AST_MODULE_LOAD_DECLINE;
        res = ast_register_translator(&adpcmtolin);
        if (!res)
                res = ast_register_translator(&lintoadpcm);
index 4ca897820d4e44ba9b1cc8c8648536a569486f89..bb749d003f43d03b065839430390ff5a0abfeb6c 100644 (file)
@@ -79,7 +79,6 @@ static struct ast_translator alawtolin = {
        .sample = alaw_sample,
        .buffer_samples = BUFFER_SAMPLES,
        .buf_size = BUFFER_SAMPLES * 2,
-       .plc_samples = 160,
 };
 
 static struct ast_translator lintoalaw = {
@@ -92,29 +91,10 @@ static struct ast_translator lintoalaw = {
        .buf_size = BUFFER_SAMPLES,
 };
 
-static int parse_config(int reload)
-{
-       struct ast_variable *var;
-       struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
-       struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
-       if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID)
-               return 0;
-       for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
-               if (!strcasecmp(var->name, "genericplc")) {
-                       alawtolin.useplc = ast_true(var->value) ? 1 : 0;
-                       ast_verb(3, "codec_alaw: %susing generic PLC\n", alawtolin.useplc ? "" : "not ");
-               }
-       }
-       ast_config_destroy(cfg);
-       return 0;
-}
-
 /*! \brief standard module stuff */
 
 static int reload(void)
 {
-       if (parse_config(1))
-               return AST_MODULE_LOAD_DECLINE;
        return AST_MODULE_LOAD_SUCCESS;
 }
 
@@ -132,8 +112,6 @@ static int load_module(void)
 {
        int res;
 
-       if (parse_config(0))
-               return AST_MODULE_LOAD_DECLINE;
        res = ast_register_translator(&alawtolin);
        if (!res)
                res = ast_register_translator(&lintoalaw);
index 4790aec9654c0db3a98ef4d3072f82f1edd02c55..84c5b2c0cc72e3c0bf8c4e2963cae5db2906b3e7 100644 (file)
@@ -56,8 +56,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #define G723_SAMPLES 240
 #define G729_SAMPLES 160
 
-static unsigned int global_useplc = 0;
-
 static struct channel_usage {
        int total;
        int encoders;
@@ -493,29 +491,14 @@ static int register_translator(int dst, int src)
        if (is_encoder(zt)) {
                zt->t.framein = dahdi_encoder_framein;
                zt->t.frameout = dahdi_encoder_frameout;
-#if 0
-               zt->t.buffer_samples = 0;
-#endif
        } else {
                zt->t.framein = dahdi_decoder_framein;
                zt->t.frameout = dahdi_decoder_frameout;
-#if 0
-               if (AST_FORMAT_G723_1 == zt->t.srcfmt) {
-                       zt->t.plc_samples = G723_SAMPLES;
-               } else {
-                       zt->t.plc_samples = G729_SAMPLES;
-               }
-               zt->t.buffer_samples = zt->t.plc_samples * 8;
-#endif
        }
        zt->t.destroy = dahdi_destroy;
        zt->t.buffer_samples = 0;
        zt->t.newpvt = dahdi_new;
        zt->t.sample = fakesrc_sample;
-#if 0
-       zt->t.useplc = global_useplc;
-#endif
-       zt->t.useplc = 0;
        zt->t.native_plc = 0;
 
        zt->t.desc_size = sizeof(struct codec_dahdi_pvt);
@@ -567,27 +550,6 @@ static void unregister_translators(void)
        AST_LIST_UNLOCK(&translators);
 }
 
-static int parse_config(int reload)
-{
-       struct ast_variable *var;
-       struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
-       struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
-
-       if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID)
-               return 0;
-
-       for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
-              if (!strcasecmp(var->name, "genericplc")) {
-                      global_useplc = ast_true(var->value);
-                      ast_verb(3, "codec_dahdi: %susing generic PLC\n",
-                               global_useplc ? "" : "not ");
-              }
-       }
-
-       ast_config_destroy(cfg);
-       return 0;
-}
-
 static void build_translators(struct format_map *map, unsigned int dstfmts, unsigned int srcfmts)
 {
        unsigned int src, dst;
@@ -664,14 +626,6 @@ static int reload(void)
 {
        struct translator *cur;
 
-       if (parse_config(1))
-               return AST_MODULE_LOAD_DECLINE;
-
-       AST_LIST_LOCK(&translators);
-       AST_LIST_TRAVERSE(&translators, cur, entry)
-               cur->t.useplc = global_useplc;
-       AST_LIST_UNLOCK(&translators);
-
        return AST_MODULE_LOAD_SUCCESS;
 }
 
@@ -686,8 +640,6 @@ static int unload_module(void)
 static int load_module(void)
 {
        ast_ulaw_init();
-       if (parse_config(0))
-               return AST_MODULE_LOAD_DECLINE;
        find_transcoders();
        ast_cli_register_multiple(cli, ARRAY_LEN(cli));
        return AST_MODULE_LOAD_SUCCESS;
index bdd175e574aeee1efb48532a67ae007166160954..22196da011114e58785ba8250e6222a46a2c35bc 100644 (file)
@@ -142,7 +142,6 @@ static struct ast_translator g722tolin = {
        .desc_size = sizeof(struct g722_decoder_pvt),
        .buffer_samples = BUFFER_SAMPLES / sizeof(int16_t),
        .buf_size = BUFFER_SAMPLES,
-       .plc_samples = 160,
 };
 
 static struct ast_translator lintog722 = {
@@ -167,7 +166,6 @@ static struct ast_translator g722tolin16 = {
        .desc_size = sizeof(struct g722_decoder_pvt),
        .buffer_samples = BUFFER_SAMPLES / sizeof(int16_t),
        .buf_size = BUFFER_SAMPLES,
-       .plc_samples = 160,
 };
 
 static struct ast_translator lin16tog722 = {
@@ -182,29 +180,8 @@ static struct ast_translator lin16tog722 = {
        .buf_size = BUFFER_SAMPLES,
 };
 
-static int parse_config(int reload)
-{
-       struct ast_variable *var;
-       struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
-       struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
-
-       if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID)
-               return 0;
-       for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
-               if (!strcasecmp(var->name, "genericplc")) {
-                       g722tolin.useplc = ast_true(var->value) ? 1 : 0;
-                       ast_verb(3, "codec_g722: %susing generic PLC\n",
-                                       g722tolin.useplc ? "" : "not ");
-               }
-       }
-       ast_config_destroy(cfg);
-       return 0;
-}
-
 static int reload(void)
 {
-       if (parse_config(1))
-               return AST_MODULE_LOAD_DECLINE;
        return AST_MODULE_LOAD_SUCCESS;
 }
 
@@ -224,9 +201,6 @@ static int load_module(void)
 {
        int res = 0;
 
-       if (parse_config(0))
-               return AST_MODULE_LOAD_DECLINE;
-
        res |= ast_register_translator(&g722tolin);
        res |= ast_register_translator(&lintog722);
        res |= ast_register_translator(&g722tolin16);
index b02bae0814466758265ecb33eb66bcac48b5e37f..cc9b1cb31e5864a3d646640396ab6c80f13666e8 100644 (file)
@@ -779,7 +779,6 @@ static struct ast_translator g726tolin = {
        .desc_size = sizeof(struct g726_coder_pvt),
        .buffer_samples = BUFFER_SAMPLES,
        .buf_size = BUFFER_SAMPLES * 2,
-       .plc_samples = 160,
 };
 
 static struct ast_translator lintog726 = {
@@ -804,7 +803,6 @@ static struct ast_translator g726aal2tolin = {
        .desc_size = sizeof(struct g726_coder_pvt),
        .buffer_samples = BUFFER_SAMPLES,
        .buf_size = BUFFER_SAMPLES * 2,
-       .plc_samples = 160,
 };
 
 static struct ast_translator lintog726aal2 = {
@@ -819,29 +817,8 @@ static struct ast_translator lintog726aal2 = {
        .buf_size = BUFFER_SAMPLES / 2,
 };
 
-static int parse_config(int reload)
-{
-       struct ast_variable *var;
-       struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
-       struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
-
-       if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID)
-               return 0;
-       for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
-               if (!strcasecmp(var->name, "genericplc")) {
-                       g726tolin.useplc = ast_true(var->value) ? 1 : 0;
-                       ast_verb(3, "codec_g726: %susing generic PLC\n",
-                                       g726tolin.useplc ? "" : "not ");
-               }
-       }
-       ast_config_destroy(cfg);
-       return 0;
-}
-
 static int reload(void)
 {
-       if (parse_config(1))
-               return AST_MODULE_LOAD_DECLINE;
        return AST_MODULE_LOAD_SUCCESS;
 }
 
@@ -862,10 +839,6 @@ static int load_module(void)
 {
        int res = 0;
 
-
-       if (parse_config(0))
-               return AST_MODULE_LOAD_DECLINE;
-
        res |= ast_register_translator(&g726tolin);
        res |= ast_register_translator(&lintog726);
 
index 03ea4bc21ae2216a3d9a3d23988ce6aa7af7d3fa..ab28154457aa86421cb83276a7d91346334e6f7c 100644 (file)
@@ -177,7 +177,6 @@ static struct ast_translator gsmtolin = {
        .buffer_samples = BUFFER_SAMPLES,
        .buf_size = BUFFER_SAMPLES * 2,
        .desc_size = sizeof (struct gsm_translator_pvt ),
-       .plc_samples = GSM_SAMPLES,
 };
 
 static struct ast_translator lintogsm = {
@@ -193,30 +192,9 @@ static struct ast_translator lintogsm = {
        .buf_size = (BUFFER_SAMPLES * GSM_FRAME_LEN + GSM_SAMPLES - 1)/GSM_SAMPLES,
 };
 
-
-static int parse_config(int reload)
-{
-       struct ast_variable *var;
-       struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
-       struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
-       if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID)
-               return 0;
-       for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
-              if (!strcasecmp(var->name, "genericplc")) {
-                      gsmtolin.useplc = ast_true(var->value) ? 1 : 0;
-                          ast_verb(3, "codec_gsm: %susing generic PLC\n", gsmtolin.useplc ? "" : "not ");
-              }
-       }
-       ast_config_destroy(cfg);
-       return 0;
-}
-
 /*! \brief standard module glue */
 static int reload(void)
 {
-       if (parse_config(1)) {
-               return AST_MODULE_LOAD_DECLINE;
-       }
        return AST_MODULE_LOAD_SUCCESS;
 }
 
@@ -235,8 +213,6 @@ static int load_module(void)
 {
        int res;
 
-       if (parse_config(0))
-               return AST_MODULE_LOAD_DECLINE;
        res = ast_register_translator(&gsmtolin);
        if (!res) 
                res=ast_register_translator(&lintogsm);
index 33ccbb241d9bd40136429be6a6c6267001ecca3e..d61729c9547248553197cd0e765d12b0c41738c2 100644 (file)
@@ -201,7 +201,6 @@ static struct ast_translator lpc10tolin = {
        .sample = lpc10_sample,
        .desc_size = sizeof(struct lpc10_coder_pvt),
        .buffer_samples = BUFFER_SAMPLES,
-       .plc_samples = LPC10_SAMPLES_PER_FRAME,
        .buf_size = BUFFER_SAMPLES * 2,
 };
 
@@ -219,28 +218,8 @@ static struct ast_translator lintolpc10 = {
        .buf_size = LPC10_BYTES_IN_COMPRESSED_FRAME * (1 + BUFFER_SAMPLES / LPC10_SAMPLES_PER_FRAME),
 };
 
-static int parse_config(int reload)
-{
-       struct ast_variable *var;
-       struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
-       struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
-       if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID)
-               return 0;
-       for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
-               if (!strcasecmp(var->name, "genericplc")) {
-                       lpc10tolin.useplc = ast_true(var->value) ? 1 : 0;
-                       ast_verb(3, "codec_lpc10: %susing generic PLC\n",
-                                       lpc10tolin.useplc ? "" : "not ");
-               }
-       }
-       ast_config_destroy(cfg);
-       return 0;
-}
-
 static int reload(void)
 {
-       if (parse_config(1))
-               return AST_MODULE_LOAD_DECLINE;
        return AST_MODULE_LOAD_SUCCESS;
 }
 
@@ -259,8 +238,6 @@ static int load_module(void)
 {
        int res;
 
-       if (parse_config(0))
-               return AST_MODULE_LOAD_DECLINE;
        res = ast_register_translator(&lpc10tolin);
        if (!res) 
                res = ast_register_translator(&lintolpc10);
index 4d1c8a1ae0c7b77dd3283f1a7993bd324dd9db83..bbc8894a71c57ad7420b58dd657f70eda8b68eb2 100644 (file)
@@ -84,7 +84,6 @@ static struct ast_translator ulawtolin = {
        .sample = ulaw_sample,
        .buffer_samples = BUFFER_SAMPLES,
        .buf_size = BUFFER_SAMPLES * 2,
-       .plc_samples = 160,
 };
 
 /*!
@@ -101,27 +100,8 @@ static struct ast_translator lintoulaw = {
        .buffer_samples = BUFFER_SAMPLES,
 };
 
-static int parse_config(int reload)
-{
-       struct ast_variable *var;
-       struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
-       struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
-       if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID)
-               return 0;
-       for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
-               if (!strcasecmp(var->name, "genericplc")) {
-                       ulawtolin.useplc = ast_true(var->value) ? 1 : 0;
-                       ast_verb(3, "codec_ulaw: %susing generic PLC\n", ulawtolin.useplc ? "" : "not ");
-               }
-       }
-       ast_config_destroy(cfg);
-       return 0;
-}
-
 static int reload(void)
 {
-       if (parse_config(1))
-               return AST_MODULE_LOAD_DECLINE;
        return AST_MODULE_LOAD_SUCCESS;
 }
 
@@ -139,8 +119,6 @@ static int load_module(void)
 {
        int res;
 
-       if (parse_config(0))
-               return AST_MODULE_LOAD_DECLINE;
        res = ast_register_translator(&ulawtolin);
        if (!res)
                res = ast_register_translator(&lintoulaw);
index 01841ee017f7094f0234e9ee67c4d274711f2eb2..734081518db5168cfae84728adc08fe7931fc7eb 100644 (file)
@@ -104,10 +104,8 @@ struct ast_translator {
         */
        int buf_size;
 
-       int desc_size;                  /*!< size of private descriptor in pvt->pvt, if any */
-       int plc_samples;                /*!< set to the plc block size if used, 0 otherwise */
-       int useplc;                     /*!< current status of plc, changed at runtime */
-       int native_plc;                 /*!< true if the translator can do native plc */
+       int desc_size;                         /*!< size of private descriptor in pvt->pvt, if any */
+       int native_plc;                        /*!< true if the translator can do native plc */
 
        struct ast_module *module;      /* opaque reference to the parent module */
 
index 1e85a3744d912fdbfb28b15cff0c61777081ece2..293ab3203306303c6311a398808ce1aaffb27555 100644 (file)
@@ -88,22 +88,19 @@ static force_inline int powerof(unsigned int d)
 
 /*!
  * \brief Allocate the descriptor, required outbuf space,
- * and possibly also plc and desc.
+ * and possibly desc.
  */
 static void *newpvt(struct ast_translator *t)
 {
        struct ast_trans_pvt *pvt;
        int len;
-       int useplc = t->plc_samples > 0 && t->useplc;   /* cache, because it can change on the fly */
        char *ofs;
 
        /*
         * compute the required size adding private descriptor,
-        * plc, buffer, AST_FRIENDLY_OFFSET.
+        * buffer, AST_FRIENDLY_OFFSET.
         */
        len = sizeof(*pvt) + t->desc_size;
-       if (useplc)
-               len += sizeof(plc_state_t);
        if (t->buf_size)
                len += AST_FRIENDLY_OFFSET + t->buf_size;
        pvt = ast_calloc(1, len);
@@ -115,10 +112,6 @@ static void *newpvt(struct ast_translator *t)
                pvt->pvt = ofs;
                ofs += t->desc_size;
        }
-       if (useplc) {                   /* then plc state */
-               pvt->plc = (plc_state_t *)ofs;
-               ofs += sizeof(plc_state_t);
-       }
        if (t->buf_size)                /* finally buffer and header */
                pvt->outbuf.c = ofs + AST_FRIENDLY_OFFSET;
        /* call local init routine, if present */
@@ -151,10 +144,9 @@ static void destroy(struct ast_trans_pvt *pvt)
        ast_module_unref(t->module);
 }
 
-/*! \brief framein wrapper, deals with plc and bound checks.  */
+/*! \brief framein wrapper, deals with bound checks.  */
 static int framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
 {
-       int16_t *dst = pvt->outbuf.i16;
        int ret;
        int samples = pvt->samples;     /* initial value */
        
@@ -168,18 +160,8 @@ static int framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
                ast_log(LOG_WARNING, "no samples for %s\n", pvt->t->name);
        }
        if (pvt->t->buffer_samples) {   /* do not pass empty frames to callback */
-               if (f->datalen == 0) { /* perform PLC with nominal framesize of 20ms/160 samples */
-                       if (pvt->plc) {
-                               int l = pvt->t->plc_samples;
-                               if (pvt->samples + l > pvt->t->buffer_samples) {
-                                       ast_log(LOG_WARNING, "Out of buffer space\n");
-                                       return -1;
-                               }
-                               l = plc_fillin(pvt->plc, dst + pvt->samples, l);
-                               pvt->samples += l;
-                               pvt->datalen = pvt->samples * 2;        /* SLIN has 2bytes for 1sample */
-                       }
-                       /* We don't want generic PLC. If the codec has native PLC, then do that */
+               if (f->datalen == 0) { /* perform native PLC if available */
+                       /* If the codec has native PLC, then do that */
                        if (!pvt->t->native_plc)
                                return 0;
                }
@@ -192,13 +174,6 @@ static int framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
         * it otherwise.
         */
        ret = pvt->t->framein(pvt, f);
-       /* possibly store data for plc */
-       if (!ret && pvt->plc) {
-               int l = pvt->t->plc_samples;
-               if (pvt->samples < l)
-                       l = pvt->samples;
-               plc_rx(pvt->plc, dst + pvt->samples - l, l);
-       }
        /* diagnostic ... */
        if (pvt->samples == samples)
                ast_log(LOG_WARNING, "%s did not update samples %d\n",
@@ -644,16 +619,7 @@ int __ast_register_translator(struct ast_translator *t, struct ast_module *mod)
                ast_log(LOG_WARNING, "Invalid translator path: (%s codec is not valid)\n", t->srcfmt == -1 ? "starting" : "ending");
                return -1;
        }
-       if (t->plc_samples) {
-               if (t->buffer_samples < t->plc_samples) {
-                       ast_log(LOG_WARNING, "plc_samples %d buffer_samples %d\n",
-                               t->plc_samples, t->buffer_samples);
-                       return -1;
-               }
-               if (t->dstfmt != powerof(AST_FORMAT_SLINEAR))
-                       ast_log(LOG_WARNING, "plc_samples %d format %x\n",
-                               t->plc_samples, t->dstfmt);
-       }
+
        if (t->srcfmt >= MAX_FORMAT) {
                ast_log(LOG_WARNING, "Source format %s is larger than MAX_FORMAT\n", ast_getformatname(t->srcfmt));
                return -1;