Re: [PATCH RFC] media: si2157: optionally load firmare for SI2146_A10 and

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> + case SI2146_A10:
> + fw_required = false;
> + fallthrough;
> case SI2141_A10:
> fw_name = SI2141_A10_FIRMWARE;
> break;

I don't think this form of firmware name aliasing is
a good idea. The SiLabs code has a dedicated source
file for the ROM patch for each tuner model, even if
some are binary identical.

And in this particular case, there are not even
binary identical firmware patches available for these
two tuners, so they definitely should NOT share the
same firmware filename.

So I propose having a clean 1:1 model <-> firmware
filename mapping. For si2157/si2177 and si2148/si2158
it's already too late, but we should not expand this
error even further.

More broadly, the SiLabs code actually matches the
applicable firmware patch to the rom_id returned by
the tuner. So if we wanted to do a real cleanup,
I would propose having a const struct table, e.g.

const struct {
    unsigned char part;
    unsigned char chiprev;
    unsigned char pmajor;
    unsigned char pminor;
    unsigned char rom_id;
    const char *  firmware_name
} supported_models[] = {
    { /*Si21*/41, 'A', 1, 0, 0x60, "dvb-tuner-si2141-a10-00.fw" },
    { /*Si21*/41, 'A', 1, 0, 0x61, "dvb-tuner-si2141-a10-01.fw" },
    { /*Si21*/57, 'A', 3, 0, 0x50, "dvb-tuner-si2157-a30-01.fw" },
(etc)
};

Best Regards,
-Robert Schlabbach



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux