fx2lafw: Call dslogic_get_number_of_transfers into fx2lafw_get_number_of_transfers

This commit is contained in:
Joel Holdsworth 2017-06-08 15:25:33 -06:00 committed by Uwe Hermann
parent c33f32a922
commit 9082b5ccf7
2 changed files with 3 additions and 3 deletions

View File

@ -860,9 +860,6 @@ static int start_transfers(const struct sr_dev_inst *sdi)
num_transfers = fx2lafw_get_number_of_transfers(devc);
//if (devc->dslogic)
// num_transfers = dslogic_get_number_of_transfers(devc);
if (devc->dslogic) {
if (devc->cur_samplerate == SR_MHZ(100))
num_transfers = 16;

View File

@ -593,6 +593,9 @@ SR_PRIV unsigned int fx2lafw_get_number_of_transfers(struct dev_context *devc)
{
unsigned int n;
if (devc->dslogic)
return dslogic_get_number_of_transfers(devc);
/* Total buffer size should be able to hold about 500ms of data. */
n = (500 * to_bytes_per_ms(devc->cur_samplerate) /
fx2lafw_get_buffer_size(devc));