Bug 1818 - Kingst LA5016 not recognised
Summary: Kingst LA5016 not recognised
Status: CONFIRMED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Device handling (show other bugs)
Version: unreleased development snapshot
Hardware: All Windows
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-30 00:09 CET by Arkadiusz
Modified: 2022-12-30 13:10 CET (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arkadiusz 2022-12-30 00:09:29 CET
Hi ho.
I have problem with LA5016

 [00:30.053000] kingst-la2016: USB enum found 77a1:01a2 at path usb/2-3, 2.20.
sr: [00:30.062000] kingst-la2016: USB PID 01a2, MCU firmware 'kingst-la-01a2.fw'.
sr: [00:30.066000] kingst-la2016: Manufacture date bytes 22 11 dd ee.
sr: [00:30.066000] kingst-la2016: Manufacture date: 2022-11.
sr: [00:30.069000] kingst-la2016: EEPROM magic bytes 0c f3 00 00 0c f3 10 ef.
sr: [00:30.069000] kingst-la2016: Using secondary magic 12 (16).
sr: [00:30.070000] kingst-la2016: Cannot identify as one of the supported models.
sr: [00:30.070000] kingst-la2016: Unknown or unsupported device type.
sr: [00:30.071000] hwdriver: Scan found 0 devices (kingst-la2016).
Comment 1 Gerhard Sittig 2022-12-30 00:17:29 CET
That was fixed in 1776a1976bfa on 2022-09-14. Should not reproduce with 
more recent builds.
Comment 2 Arkadiusz 2022-12-30 00:21:30 CET
Still exist.
I check at last Nightly build because Stable 4.2 not support Kingst.

This log is from last nightly debug.
Comment 3 Arkadiusz 2022-12-30 02:11:31 CET
I check in sources:

  45 static const struct kingst_model models[] = {
  46         { 0x02, 0x01, "LA2016", "la2016a1", SR_MHZ(200), 16, 1, 0, },
  47         { 0x02, 0x00, "LA2016", "la2016",   SR_MHZ(200), 16, 1, 0, },
  48         { 0x03, 0x01, "LA1016", "la1016a1", SR_MHZ(100), 16, 1, 0, },
  49         { 0x03, 0x00, "LA1016", "la1016",   SR_MHZ(100), 16, 1, 0, },
  50         { 0x04, 0x00, "LA1010", "la1010a0", SR_MHZ(100), 16, 0, SR_MHZ(800), },
  51         { 0x05, 0x00, "LA5016", "la5016a1", SR_MHZ(500), 16, 2, SR_MHZ(800), },
  52         { 0x06, 0x00, "LA5032", "la5032a0", SR_MHZ(500), 32, 4, SR_MHZ(800), },
  53         { 0x07, 0x00, "LA1010", "la1010a1", SR_MHZ(100), 16, 0, SR_MHZ(800), },
  54         { 0x08, 0x00, "LA2016", "la2016a1", SR_MHZ(200), 16, 1, 0, },
  55         { 0x09, 0x00, "LA1016", "la1016a1", SR_MHZ(100), 16, 1, 0, },
  56         { 0x0a, 0x00, "LA1010", "la1010a2", SR_MHZ(100), 16, 0, SR_MHZ(800), },
  57         { 0x0c, 0x10, "LA5016", "la5016a2", SR_MHZ(500), 16, 2, SR_MHZ(800), },
  58         { 0x0c, 0x00, "LA5016", "la5016a2", SR_MHZ(500), 16, 2, SR_MHZ(800), },
  59         { 0x41, 0x00, "LA5016", "la5016a1", SR_MHZ(500), 16, 2, SR_MHZ(800), },
  60 };

My magic numbers are supported. 0x0C , 0x10  (12 , 16) but PulseView not say me so my hardware, are unknown.
Comment 4 Arkadiusz 2022-12-30 02:38:08 CET
Look here:

1839     for (model_idx = 0; model_idx < ARRAY_SIZE(models); model_idx++) {
1840                 model = &models[model_idx];
1841                 if (model->magic != magic)
1842                         continue;
1843                 if (model->magic2 && model->magic2 != magic2)
1844                         continue;
1845                 devc->model = model;
1846                 sr_info("Model '%s', %zu channels, max %" PRIu64 "MHz.",
1847                         model->name, model->channel_count,
1848                         model->samplerate / SR_MHZ(1));
1849                 devc->fpga_bitstream = g_strdup_printf(FPGA_FWFILE_FMT,
1850                         model->fpga_stem);
1851                 sr_info("FPGA bitstream file '%s'.", devc->fpga_bitstream);
1852                 if (!model->channel_count) {
1853                         sr_warn("Device lacks logic channels. Not supported.");
1854                         devc->model = NULL;
1855                 }
1856                 break;
1857         }
1858         if (!devc->model) {
1859                 sr_err("Cannot identify as one of the supported models.");
1860                 return SR_ERR_DATA;
1861         }


IMHO correct be:
1843                 if (model->magic2 != magic2)
1844                         continue;
Comment 5 Arkadiusz 2022-12-30 03:15:48 CET
Also not all are compiled.
In final exe we have only:

LA2016 la2016a1 la2016 
LA1016 la1016a1 la1016 
LA1010 la1010a0 la1010a1 la1010a2
LA5016 la5016a1 
LA5032 la5032a0

In source we have much more:

LA5016 la5016a1 la5016a2
Comment 6 Arkadiusz 2022-12-30 13:10:03 CET
(In reply to Gerhard Sittig from comment #1)
> That was fixed in 1776a1976bfa on 2022-09-14. Should not reproduce with 
> more recent builds.

Hi ho.
I found some problems, but I have no env. to recompile from source.