File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -84,10 +84,10 @@ struct snd_usb_endpoint {
84
84
dma_addr_t sync_dma ; /* DMA address of syncbuf */
85
85
86
86
unsigned int pipe ; /* the data i/o pipe */
87
- unsigned int framesize [2 ]; /* small/large frame sizes in samples */
88
- unsigned int sample_rem ; /* remainder from division fs/fps */
87
+ unsigned int packsize [2 ]; /* small/large packet sizes in samples */
88
+ unsigned int sample_rem ; /* remainder from division fs/pps */
89
89
unsigned int sample_accum ; /* sample accumulator */
90
- unsigned int fps ; /* frames per second */
90
+ unsigned int pps ; /* packets per second */
91
91
unsigned int freqn ; /* nominal sampling rate in fs/fps in Q16.16 format */
92
92
unsigned int freqm ; /* momentary sampling rate in fs/fps in Q16.16 format */
93
93
int freqshift ; /* how much to shift the feedback value to get Q16.16 */
Original file line number Diff line number Diff line change @@ -159,11 +159,11 @@ int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep)
159
159
return ep -> maxframesize ;
160
160
161
161
ep -> sample_accum += ep -> sample_rem ;
162
- if (ep -> sample_accum >= ep -> fps ) {
163
- ep -> sample_accum -= ep -> fps ;
164
- ret = ep -> framesize [1 ];
162
+ if (ep -> sample_accum >= ep -> pps ) {
163
+ ep -> sample_accum -= ep -> pps ;
164
+ ret = ep -> packsize [1 ];
165
165
} else {
166
- ret = ep -> framesize [0 ];
166
+ ret = ep -> packsize [0 ];
167
167
}
168
168
169
169
return ret ;
@@ -1088,16 +1088,15 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,
1088
1088
1089
1089
if (snd_usb_get_speed (ep -> chip -> dev ) == USB_SPEED_FULL ) {
1090
1090
ep -> freqn = get_usb_full_speed_rate (rate );
1091
- ep -> fps = 1000 ;
1091
+ ep -> pps = 1000 >> ep -> datainterval ;
1092
1092
} else {
1093
1093
ep -> freqn = get_usb_high_speed_rate (rate );
1094
- ep -> fps = 8000 ;
1094
+ ep -> pps = 8000 >> ep -> datainterval ;
1095
1095
}
1096
- ep -> fps >>= ep -> datainterval ;
1097
1096
1098
- ep -> sample_rem = rate % ep -> fps ;
1099
- ep -> framesize [0 ] = rate / ep -> fps ;
1100
- ep -> framesize [1 ] = (rate + (ep -> fps - 1 )) / ep -> fps ;
1097
+ ep -> sample_rem = rate % ep -> pps ;
1098
+ ep -> packsize [0 ] = rate / ep -> pps ;
1099
+ ep -> packsize [1 ] = (rate + (ep -> pps - 1 )) / ep -> pps ;
1101
1100
1102
1101
/* calculate the frequency in 16.16 format */
1103
1102
ep -> freqm = ep -> freqn ;
You can’t perform that action at this time.
0 commit comments