introduce #defines for canonical length + use them
diff --git a/src/codec_efr.c b/src/codec_efr.c
index 55bbd11..a42b2a7 100644
--- a/src/codec_efr.c
+++ b/src/codec_efr.c
@@ -106,7 +106,7 @@
 	.type = CODEC_EFR,
 	.name = "efr",
 	.description = "GSM 06.60 Enhanced Full Rate codec",
-	.canon_frame_len = 31,
+	.canon_frame_len = EFR_CANON_LEN,
 #ifdef HAVE_OPENCORE_AMRNB
 	.codec_enc_format_type = FMT_AMR_EFR,
 	.codec_dec_format_type = FMT_AMR_EFR,
diff --git a/src/codec_fr.c b/src/codec_fr.c
index 1bda210..182eb73 100644
--- a/src/codec_fr.c
+++ b/src/codec_fr.c
@@ -81,7 +81,7 @@
 	.type = CODEC_FR,
 	.name = "fr",
 	.description = "GSM 06.10 Full Rate codec (classic gsm codec)",
-	.canon_frame_len = 33,
+	.canon_frame_len = FR_CANON_LEN,
 #ifdef HAVE_LIBGSM
 	.codec_enc_format_type = FMT_GSM,
 	.codec_dec_format_type = FMT_GSM,
diff --git a/src/codec_hr.c b/src/codec_hr.c
index d0e09ce..4377f19 100644
--- a/src/codec_hr.c
+++ b/src/codec_hr.c
@@ -69,7 +69,7 @@
 	.type = CODEC_HR,
 	.name = "hr",
 	.description = "GSM 06.20 Half Rate codec",
-	.canon_frame_len = 14,
+	.canon_frame_len = HR_CANON_LEN,
 #ifdef HAVE_LIBGSMHR
 	.codec_enc_format_type = FMT_HR_REF_ENC,
 	.codec_dec_format_type = FMT_HR_REF_DEC,
diff --git a/src/codec_pcm.c b/src/codec_pcm.c
index 34517b5..9fa8c1b 100644
--- a/src/codec_pcm.c
+++ b/src/codec_pcm.c
@@ -23,5 +23,5 @@
 	.type = CODEC_PCM,
 	.name = "pcm",
 	.description = "Raw PCM signed 16 bits samples",
-	.canon_frame_len = 320,
+	.canon_frame_len = PCM_CANON_LEN,
 };
diff --git a/src/fmt_rawpcm.c b/src/fmt_rawpcm.c
index 185d0ca..e20fcaf 100644
--- a/src/fmt_rawpcm.c
+++ b/src/fmt_rawpcm.c
@@ -54,7 +54,7 @@
 	.name			= "rawpcm-s16le",
 	.description		= "Raw PCM samples Signed 16 bits little endian",
 
-	.frame_len		= 320,
+	.frame_len		= PCM_CANON_LEN,
 	.conv_from_canon	= rawpcm_s16le_from_canon,
 	.conv_to_canon		= rawpcm_s16le_to_canon,
 };