1 --- mgetty-1.1.30.orig/voice/libvoice/Lucent.c 2001-04-13 04:01:44.000000000 -0700
2 +++ mgetty-1.1.30/voice/libvoice/Lucent.c 2003-09-07 14:58:41.000000000 -0700
5 static int Lucent_set_compression (int *compression, int *speed, int *bits)
7 + char buffer[VOICE_BUF_LEN];
10 if (*compression == 0)
15 - if (voice_command("AT+VSM=128", "OK") != VMA_USER_1)
16 + sprintf(buffer, "AT+VSM=128,%d", *speed);
17 + if (voice_command(buffer, "OK") != VMA_USER_1)
26 - if (voice_command("AT+VSM=129", "OK") != VMA_USER_1)
27 + sprintf(buffer, "AT+VSM=129,%d", *speed);
28 + if (voice_command(buffer, "OK") != VMA_USER_1)
37 - if (voice_command("AT+VSM=130,8000", "OK") != VMA_USER_1)
38 + sprintf(buffer, "AT+VSM=130,%d", *speed);
39 + if (voice_command(buffer, "OK") != VMA_USER_1)
44 voice_modem_name, *speed);
47 - if (voice_command("AT+VSM=131,8000", "OK") != VMA_USER_1)
51 + sprintf(buffer, "AT+VSM=131,%d", *speed);
52 + if (voice_command(buffer, "OK") != VMA_USER_1)
60 - if ( *speed != 8000 )
61 + if ((*speed != 8000) && (*speed != 7200) && (*speed != 11025))
63 lprintf(L_WARN, "%s: Illegal sample rate (%d)",
64 voice_modem_name, *speed);
67 - if (voice_command("AT+VSM=132,8000", "OK") != VMA_USER_1)
71 + sprintf(buffer, "AT+VSM=132,%d", *speed);
72 + if (voice_command(buffer, "OK") != VMA_USER_1)
78 lprintf(L_WARN, "%s: Illegal voice compression method (%d)",
79 --- mgetty-1.1.30.orig/voice/pvftools/pvftormd.c 2002-11-19 07:39:34.000000000 -0800
80 +++ mgetty-1.1.30/voice/pvftools/pvftormd.c 2003-09-07 14:11:26.000000000 -0700
85 - if (header_in.speed != 8000)
86 + if ((header_in.speed != 7200) && (header_in.speed != 8000) &&
87 + (header_in.speed != 11025))
89 fprintf(stderr, "%s: Unsupported sample speed (%d)\n",
90 program_name, header_in.speed);
92 - "%s: The Lucent only supports 8000 samples/second\n",
93 + "%s: The Lucent only supports 7.2k, 8k and 11.025k samples/second\n",
97 --- mgetty-1.1.30.orig/voice/libvoice/V253modem.c 2002-11-25 13:14:51.000000000 -0800
98 +++ mgetty-1.1.30/voice/libvoice/V253modem.c 2003-09-11 08:40:51.000000000 -0700
100 case 2: /* 2bit ADPCM for some ELSA-modems */
103 - if (voice_command("AT+VSM=140,7200", "OK")!= VMA_USER_1)
105 + sprintf(buffer, "AT+VSM=140,%d", *speed);
106 + if (voice_command(buffer, "OK") != VMA_USER_1)
108 /* there are two diffrent implementations trying one first,
109 if this fails we try the other one later */
110 - Kompressionmethod = 129;
114 - Kompressionmethod = 140;
117 + Kompressionmethod = 129;
121 + Kompressionmethod = 140;
125 case 4: /* 4bit ADPCM for some ELSA-modems */
127 - if (voice_command("AT+VSM=141,7200", "OK")!= VMA_USER_1)
128 + sprintf(buffer, "AT+VSM=141,%d", *speed);
129 + if (voice_command(buffer, "OK")!= VMA_USER_1)
131 /* there are two diffrent implementations trying one first,
132 if this fails we try the other one later */
134 Kompressionmethod = 131;
138 Kompressionmethod = 141;