[media] drxk: Don't assume a default firmware name
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 24 Jul 2011 12:25:39 +0000 (09:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 21 Jan 2012 15:45:25 +0000 (13:45 -0200)
Move the ngene/ddbridge firmware into their drivers.

There are two reasons for that:
1) The firmware used there didn't work for a few devices
I tested here (Terratec H5, H6 and H7);
2) At least Terratec H7 doesn't seem to require a firmware
for it to work.

After this change, if firmware is not specified, the driver will
use a rom-based firmware (this seems to be the case for Terratec
H7, although I need to better check the USB dumps to be sure about
that).

In any case, the firmware seems to be optional, as the DRX-K driver
don't return the firmware load error.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/ddbridge/ddbridge-core.c
drivers/media/dvb/dvb-usb/az6007.c
drivers/media/dvb/frontends/drxk_hard.c
drivers/media/dvb/ngene/ngene-cards.c

index 2f31648bba90241406f914de5cbe81f89b6a2e5f..243dbb37bd5a8853581129d4976cfbef1d3698f5 100644 (file)
@@ -578,6 +578,7 @@ static int demod_attach_drxk(struct ddb_input *input)
        struct drxk_config config;
 
        memset(&config, 0, sizeof(config));
+       config.microcode_name = "drxk_a3.mc";
        config.adr = 0x29 + (input->nr & 1);
 
        fe = input->fe = dvb_attach(drxk_attach, &config, i2c);
index bb597c67cc9fbcd0e7e48c8a33535b88ab3580d1..523972f9ef56eafa739557b75bd8d4bdecb63d37 100644 (file)
@@ -55,7 +55,8 @@ static struct drxk_config terratec_h7_drxk = {
        .adr = 0x29,
        .single_master = 1,
        .no_i2c_bridge = 0,
-       .microcode_name = "dvb-usb-terratec-h5-drxk.fw",
+       .max_size = 64,
+//     .microcode_name = "dvb-usb-terratec-h5-drxk.fw",
 };
 
 static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable)
@@ -127,7 +128,8 @@ static int az6007_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value,
        debug_dump(b, blen, deb_xfer);
 
        if (blen > 64) {
-               err("az6007: doesn't suport I2C transactions longer than 64 bytes\n");
+               err("az6007: tried to write %d bytes, but I2C max size is 64 bytes\n",
+                   blen);
                return -EOPNOTSUPP;
        }
 
@@ -395,6 +397,7 @@ static int az6007_frontend_attach(struct dvb_usb_adapter *adap)
        adap->fe2->tuner_priv = adap->fe->tuner_priv;
        memcpy(&adap->fe2->ops.tuner_ops,
               &adap->fe->ops.tuner_ops, sizeof(adap->fe->ops.tuner_ops));
+
        return 0;
 
 out_free:
@@ -572,7 +575,6 @@ static struct dvb_usb_device_properties az6007_properties = {
        .num_adapters = 1,
        .adapter = {
                {
-                       /* .caps             = DVB_USB_ADAP_RECEIVES_204_BYTE_TS, */
                        .streaming_ctrl   = az6007_streaming_ctrl,
                        .frontend_attach  = az6007_frontend_attach,
 
index 6980ed7b8786b6048b5e4271db0f7758bb277204..4b99255f7ba0710a1960b9480b5a3c39b2012128 100644 (file)
@@ -6070,9 +6070,7 @@ static int init_drxk(struct drxk_state *state)
                if (status < 0)
                        goto error;
 
-               if (!state->microcode_name)
-                       load_microcode(state, "drxk_a3.mc");
-               else
+               if (state->microcode_name)
                        load_microcode(state, state->microcode_name);
 
                /* disable token-ring bus through OFDM block for possible ucode upload */
index 8418c02bcefeb8ec7015d42eb4517f9a8a4cbff6..7539a5d7102964aaa094be28cd0ae7b9de245687 100644 (file)
@@ -216,6 +216,7 @@ static int demod_attach_drxk(struct ngene_channel *chan,
        struct drxk_config config;
 
        memset(&config, 0, sizeof(config));
+       config.microcode_name = "drxk_a3.mc";
        config.adr = 0x29 + (chan->number ^ 2);
 
        chan->fe = dvb_attach(drxk_attach, &config, i2c);