]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/mgetty/mgetty-1.1.30/50-pending-voice-zoom-2949l-c
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / mgetty / mgetty-1.1.30 / 50-pending-voice-zoom-2949l-c
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
3 @@ -66,6 +66,7 @@
4  
5  static int Lucent_set_compression (int *compression, int *speed, int *bits)
6       {
7 +     char buffer[VOICE_BUF_LEN];
8       reset_watchdog();
9  
10       if (*compression == 0)
11 @@ -86,7 +87,8 @@
12                           return(FAIL); 
13                  }
14  
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)
18                      return(FAIL);
19  
20                 break;
21 @@ -100,8 +102,8 @@
22                           return(FAIL); 
23                  }
24                
25 -
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)
29                      return(FAIL);
30  
31                 break;
32 @@ -115,8 +117,8 @@
33                           return(FAIL); 
34                  }
35  
36 -
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)
40                      return(FAIL);
41  
42                 break;
43 @@ -130,24 +132,27 @@
44                                   voice_modem_name, *speed);
45                 return(FAIL); 
46               }
47 -               if (voice_command("AT+VSM=131,8000", "OK") != VMA_USER_1)
48 -                    return(FAIL);
49 -
50 -               break;
51 +           sprintf(buffer, "AT+VSM=131,%d", *speed);
52 +           if (voice_command(buffer, "OK") != VMA_USER_1)
53 +             return(FAIL);
54 +           
55 +           break;
56  
57           case 5:
58             *bits = 4;
59  
60 -           if ( *speed != 8000 )
61 +           if ((*speed != 8000) && (*speed != 7200) && (*speed != 11025))
62               {
63                 lprintf(L_WARN, "%s: Illegal sample rate (%d)", 
64                                   voice_modem_name, *speed);
65                 return(FAIL); 
66               }
67 -               if (voice_command("AT+VSM=132,8000", "OK") != VMA_USER_1)
68 -                    return(FAIL);
69  
70 -               break;
71 +           sprintf(buffer, "AT+VSM=132,%d", *speed);
72 +           if (voice_command(buffer, "OK") != VMA_USER_1)
73 +             return(FAIL);
74 +           
75 +           break;
76  
77            default:
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
81 @@ -535,12 +535,13 @@
82            {
83            header_out.bits = 4;
84  
85 -          if (header_in.speed != 8000) 
86 +         if ((header_in.speed != 7200)  && (header_in.speed != 8000) &&
87 +             (header_in.speed != 11025))
88               {
89                  fprintf(stderr, "%s: Unsupported sample speed (%d)\n",
90                   program_name, header_in.speed);
91                  fprintf(stderr,
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",
94                   program_name);
95                  fclose(fd_out);
96
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
99 @@ -177,26 +177,26 @@
100         case 2:       /*  2bit ADPCM for some ELSA-modems */
101         {
102           *bits = 2;
103 -         if (voice_command("AT+VSM=140,7200", "OK")!= VMA_USER_1)
104 -         {
105 +        sprintf(buffer, "AT+VSM=140,%d", *speed);
106 +        if (voice_command(buffer, "OK") != VMA_USER_1)
107 +        {
108           /* there are two diffrent implementations trying one first,
109              if this fails we try the other one later */
110 -           Kompressionmethod = 129;
111 -         }
112 -         else
113 -         {
114 -           Kompressionmethod = 140;
115 -         }
116 -         *speed=7200;
117 +          Kompressionmethod = 129;
118 +        }
119 +        else
120 +        {
121 +          Kompressionmethod = 140;
122 +        }
123           break;
124          }
125         case 4:           /* 4bit ADPCM for some ELSA-modems */
126         {
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)
130           {
131           /* there are two diffrent implementations trying one first,
132              if this fails we try the other one later */
133 -
134             Kompressionmethod = 131;
135           }
136           else
137 @@ -204,7 +204,6 @@
138             Kompressionmethod = 141;
139           }
140           *bits=4;
141 -         *speed=7200;
142           break;
143         }
144         case 5:
145