diff options
author | Michael Hunold <devnull@localhost> | 2004-05-04 12:45:59 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2004-05-04 12:45:59 +0000 |
commit | 2a77e20acbf8325244b37b7ba29b6440c078d21b (patch) | |
tree | a8eb140b21f0bd6e1aa9ccf34888721c0aee8081 /linux/drivers/media/dvb/frontends | |
parent | bc9d48fabba539dbafe275a77d9458ea2f1dbcb1 (diff) | |
download | mediapointer-dvb-s2-2a77e20acbf8325244b37b7ba29b6440c078d21b.tar.gz mediapointer-dvb-s2-2a77e20acbf8325244b37b7ba29b6440c078d21b.tar.bz2 |
- fixed and tested firmware loading. works like this if you want to do it by hand:
TT Budget-CI with tda10045h:
mount -t sysfs none /sys/
echo "255" > /sys/class/firmware/timeout
depmod -ae;modprobe budget-ci;modprobe tda1004x
<change to another console>
cd /sys/class/firmware/0-0008/
echo "1" > loading ; cat /tmp/tda1004x.bin > data ;echo "0" > loading
Diffstat (limited to 'linux/drivers/media/dvb/frontends')
-rw-r--r-- | linux/drivers/media/dvb/frontends/Kconfig | 13 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda1004x.c | 47 |
2 files changed, 23 insertions, 37 deletions
diff --git a/linux/drivers/media/dvb/frontends/Kconfig b/linux/drivers/media/dvb/frontends/Kconfig index 42d1f5f24..3ca05d76a 100644 --- a/linux/drivers/media/dvb/frontends/Kconfig +++ b/linux/drivers/media/dvb/frontends/Kconfig @@ -162,19 +162,6 @@ config DVB_TDA1004X DVB adapter simply enable all supported frontends, the right one will get autodetected. -config DVB_TDA1004X_FIRMWARE_FILE - string "Full pathname of tda1004x.bin firmware file" - depends on DVB_TDA1004X - default "/usr/lib/hotplug/firmware/tda1004x.bin" - help - The TDA1004X requires additional firmware in order to function. - The firmware file can obtained as follows: - wget http://www.technotrend.de/new/215/TTweb_215a_budget_20_05_2003.zip - unzip -j TTweb_215a_budget_20_05_2003.zip Software/Oem/PCI/App/ttlcdacc.dll - mv ttlcdacc.dll /usr/lib/hotplug/firmware/tda1004x.bin - Note: even if you're using a USB device, you MUST get the file from the - TechnoTrend PCI drivers. - config DVB_NXT6000 tristate "Frontends with NxtWave Communications NXT6000 demodulator (OFDM)" depends on DVB_CORE diff --git a/linux/drivers/media/dvb/frontends/tda1004x.c b/linux/drivers/media/dvb/frontends/tda1004x.c index 53163099c..e02981cd6 100644 --- a/linux/drivers/media/dvb/frontends/tda1004x.c +++ b/linux/drivers/media/dvb/frontends/tda1004x.c @@ -21,15 +21,17 @@ */ /* - This driver needs a copy of the DLL "ttlcdacc.dll" from the Haupauge or Technotrend - windows driver saved as '/usr/lib/hotplug/firmware/tda1004x.bin'. - You can also pass the complete file name with the module parameter 'tda1004x_firmware'. + This driver needs a copy of the DLL "ttlcdacc.dll" from the Haupauge or Technotrend + windows driver. + + Currently the DLL from v2.15a of the technotrend driver is supported. Other versions can + be added reasonably painlessly. - Currently the DLL from v2.15a of the technotrend driver is supported. Other versions can - be added reasonably painlessly. + Windows driver URL: http://www.technotrend.de/ - Windows driver URL: http://www.technotrend.de/ - */ + wget http://www.technotrend.de/new/215/TTweb_215a_budget_20_05_2003.zip + unzip -j TTweb_215a_budget_20_05_2003.zip Software/Oem/PCI/App/ttlcdacc.dll +*/ #include <linux/kernel.h> @@ -369,6 +371,8 @@ static int tda1004x_fwupload(struct i2c_adapter *i2c, struct tda1004x_state *tda struct fwinfo* fwInfo = NULL; unsigned long timeout; + u8 data1, data2; + // DSP parameters switch(tda_state->fe_type) { case FE_TYPE_TDA10045H: @@ -404,6 +408,8 @@ static int tda1004x_fwupload(struct i2c_adapter *i2c, struct tda1004x_state *tda fw_size = fwInfo[fwinfo_idx].fw_size; fw_offset = fwInfo[fwinfo_idx].fw_offset; + firmware = fw->data + fw_offset; + // set some valid bandwith parameters before uploading switch(tda_state->fe_type) { case FE_TYPE_TDA10045H: @@ -481,8 +487,11 @@ static int tda1004x_fwupload(struct i2c_adapter *i2c, struct tda1004x_state *tda // check upload was OK tda1004x_write_mask(i2c, tda_state, TDA1004X_CONFC4, 0x10, 0); // we want to read from the DSP tda1004x_write_byte(i2c, tda_state, TDA1004X_DSP_CMD, 0x67); - if ((tda1004x_read_byte(i2c, tda_state, TDA1004X_DSP_DATA1) != 0x67) || - (tda1004x_read_byte(i2c, tda_state, TDA1004X_DSP_DATA2) != dspVersion)) { + + data1 = tda1004x_read_byte(i2c, tda_state, TDA1004X_DSP_DATA1); + data2 = tda1004x_read_byte(i2c, tda_state, TDA1004X_DSP_DATA2); + printk("d1:0x%02x, d2:0x%02x\n",data1,data2); + if (data1 != 0x67 || data2 != dspVersion) { printk("%s: firmware upload failed!\n", __FUNCTION__); return -EIO; } @@ -1443,6 +1452,7 @@ static int attach_adapter(struct i2c_adapter *adapter) kfree(client); return -ENOMEM; } + state->i2c = adapter; ret = tda1004x_attach(adapter, state); if (ret) { @@ -1467,6 +1477,7 @@ static int attach_adapter(struct i2c_adapter *adapter) BUG_ON(!state->dvb); /* request the firmware, this will block until someone uploads it */ + printk("tda1004x: waiting for firmware upload...\n"); ret = request_firmware(&fw, "tda1004x.fw", &client->dev); if (ret) { printk("tda1004x: firmware upload timeout\n"); @@ -1477,12 +1488,14 @@ static int attach_adapter(struct i2c_adapter *adapter) printk("tda1004x: firmware upload failed\n"); goto out; } - + switch(state->fe_type) { case FE_TYPE_TDA10045H: ret = dvb_register_frontend_new (tda1004x_ioctl, state->dvb, (void*) state, &tda10045h_info); + break; case FE_TYPE_TDA10046H: ret = dvb_register_frontend_new (tda1004x_ioctl, state->dvb, (void*) state, &tda10046h_info); + break; default: BUG_ON(1); } @@ -1515,16 +1528,6 @@ static int detach_client(struct i2c_client *client) static int command (struct i2c_client *client, unsigned int cmd, void *arg) { struct tda1004x_state *state = (struct tda1004x_state*)i2c_get_clientdata(client); - struct dvb_frontend_info *info = NULL; - - switch(state->fe_type) { - case FE_TYPE_TDA10045H: - info = &tda10045h_info; - case FE_TYPE_TDA10046H: - info = &tda10046h_info; - default: - BUG_ON(1); - } dprintk ("%s\n", __FUNCTION__); @@ -1579,7 +1582,3 @@ MODULE_LICENSE("GPL"); MODULE_PARM(tda1004x_debug, "i"); MODULE_PARM_DESC(tda1004x_debug, "enable verbose debug messages"); - -MODULE_PARM(tda1004x_firmware, "s"); -MODULE_PARM_DESC(tda1004x_firmware, "Where to find the firmware file"); - |