public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* About Si2168 Part, Revision and ROM detection.
@ 2015-06-06  5:03 Unembossed Name
  2015-06-08 15:22 ` Antti Palosaari
  0 siblings, 1 reply; 6+ messages in thread
From: Unembossed Name @ 2015-06-06  5:03 UTC (permalink / raw)
  To: linux-media

Hi,

Information below was given by a hardware vendor, who uses these demodulators on their dvb-t2 products. As an explanation on our 
questions for Si2168 Linux driver development.
I think it can give more clue with Part, Revision and ROM detection algorithm in Linux driver for that demodulator.

Also, I would like to suggest a following naming method for files containing firmware patches. It's self explaining:
dvb-demod-si2168-a30-rom3_0_2-patch-build3_0_20.fw
dvb-demod-si2168-b40-rom4_0_2-patch-build4_0_19.fw.tar.gz
dvb-demod-si2168-b40-rom4_0_2-startup-without-patch-stub.fw
(Stub code to startup B40 without patch at all: 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00)
I think such naming scheme can help to avoid possible mess with fw patch versions.

Here is a detection code:
NTSTATUS si2168_cmd_part_info(tPART_INFO *part_info)
{
    NTSTATUS ntStatus;

    BYTE cmdBuffer[1] = {Si2168_PART_INFO_CMD};
    BYTE rspBuffer[13] = {0};

    ntStatus = si2168_cmd_rsp(cmdBuffer, sizeof(cmdBuffer), rspBuffer, sizeof(rspBuffer));
    if (ntStatus != STATUS_SUCCESS)
        return ntStatus;

    part_info->chiprev = rspBuffer[1] & 0x0F;
    part_info->part = rspBuffer[2];
    part_info->pmajor = rspBuffer[3];
    part_info->pminor = rspBuffer[4];
    part_info->pbuild = rspBuffer[5];
    part_info->serial = ((ULONG)rspBuffer[11] << 24) | ((ULONG)rspBuffer[10] << 16) | ((ULONG)rspBuffer[9] << 8) | 
((ULONG)rspBuffer[8]);
    part_info->romid = rspBuffer[12];

    DBGPRINT(("CHIP REV   : %d\n", part_info->chiprev));
    DBGPRINT(("CHIP PART  : %d\n", part_info->part));
    DBGPRINT(("CHIP PMAJOR: %c\n", part_info->pmajor));
    DBGPRINT(("CHIP PMINOR: %c\n", part_info->pminor));
    DBGPRINT(("CHIP PBUILD: %d\n", part_info->pbuild));
    DBGPRINT(("CHIP SERIAL: %08X\n", part_info->serial ));
    DBGPRINT(("CHIP ROMID : %d\n", part_info->romid));

    return STATUS_SUCCESS;
}

Best regards. 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-09  3:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-06  5:03 About Si2168 Part, Revision and ROM detection Unembossed Name
2015-06-08 15:22 ` Antti Palosaari
2015-06-08 22:14   ` Unembossed Name
2015-06-08 23:46     ` Antti Palosaari
2015-06-09  1:57       ` Unembossed Name
2015-06-09  3:50       ` Unembossed Name

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox