blob: 4c7f3d49cbee82a6504029c5bb289b0ea65f484a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
Some DVB cards and many newer frontends require proprietary,
binary-only firmware.
The DVB drivers will be converted to use the request_firmware()
hotplug interface (see linux/Documentation/firmware_class/).
(CONFIG_FW_LOADER)
The firmware can be loaded automatically via the hotplug manager
or manually with the steps described below.
Currently the drivers still use various different methods
to load their firmwares, so here's just a short list of the
current state:
Drivers using the firmware hotplug interface:
- dvb-ttpci
- tda1004x:
Proprietary solutions which need to be converted:
- ttusb-budget: firmware is compiled in (dvb-ttusb-dspbootcode.h)
- sp887x: firmware is compiled in (sp887x_firm.h)
- alps_tdlb7: firmware is loaded from path specified by
"mcfile" module parameter; the binary must be
extracted from the Windows driver (Sc_main.mc).
- ttusb-dec: see "ttusb-dec.txt" for details
1) Automatic firmware loading
You need to install recent hotplug scripts if your distribution did not do it
for you already, especially the /etc/hotplug/firmware.agent.
http://linux-hotplug.sourceforge.net/ (Call /sbin/hotplug without arguments
to find out if the firmware agent is installed.)
The firmware.agent script expects firmware binaries in
/usr/lib/hotplug/firmware/. To avoid naming and versioning
conflicts we propose the following naming scheme:
/usr/lib/hotplug/firmware/dvb-{driver}-{ver}.fw for MPEG decoders etc.
/usr/lib/hotplug/firmware/dvb-fe-{driver}-{ver}.fw for frontends
{driver} name is the basename of the driver kernel module (e.g. dvb-ttpci)
{ver} is a version number/name that should change only when the
driver/firmware internal API changes (so users are free to install the
latest firmware compatible with the driver).
2) Manually loading the firmware into a driver
Step a) Mount sysfs-filesystem.
Sysfs provides a means to export kernel data structures, their attributes,
and the linkages between them to userspace.
For detailed informations have a look at Documentation/filesystems/sysfs.txt
All you need to know at the moment is that firmware loading only works through
sysfs.
> mkdir /sys
> mount -t sysfs sysfs /sys
Step b) Exploring the firmware loading facilities
Firmware_class support is located in
/sys/class/firmware
> dir /sys/class/firmware
The "timeout" values specifies the amount of time that is waited before the
firmware upload process is cancelled. The default values is 10 seconds. If
you use a hotplug script for the firmware upload, this is sufficient. If
you want to upload the firmware by hand, however, this might be too fast.
> echo "180" > /sys/class/firmware/timeout
Step c) Getting a usable firmware file
- For the dvb-ttpci driver/av7110 card you can download the firmware files from
http://linuxtv.org/download/dvb/
Please note that in case of the dvb-ttpci driver this is *not* the "Root"
file you probably know from the 2.4 DVB releases driver.
The ttpci-firmware utility from linuxtv.org CVS can be used to
convert Dpram and Root files into a usable firmware image.
See dvb-kerrnel/scripts/ in http://linuxtv.org/cvs/.
> wget http://www.linuxtv.org/download/dvb/dvb-ttpci-01.fw
gets you the version 01 of the firmware fot the ttpci driver.
- The tda1004x 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
added reasonably painlessly.
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
Step d) Loading the driver and uploading the firmware manually
"modprobe" will take care that every needed module will be loaded
automatically
> modprobe dvb-ttpci
or
> modprobe tda1004x
The "modprobe" process will hang until
a) you upload the firmware or
b) the timeout occurs.
Change to another terminal and have a look at
> dir /sys/class/firmware/
total 0
drwxr-xr-x 2 root root 0 Jul 29 11:00 0000:03:05.0
-rw-r--r-- 1 root root 0 Jul 29 10:41 timeout
"0000:03:05.0" is the id of the device that needs an firmware upload.
In this example, this is the pci id of my dvb-c card. It depends on the pci slot,
so it changes if you plug the card to different slots. For the tda1004x,
the id will be an artifical number consisting on the i2c bus the device is on.
You can upload the firmware like that:
> export DEVDIR=/sys/class/firmware/0000\:03\:05.0
> echo 1 > $DEVDIR/loading
For the dvb-ttpci card:
> cat dvb-ttpci-01.fw > $DEVDIR/data
For the tda1004x frontend:
> cat ttlcdacc.dll > $DEVDIR/data
> echo 0 > $DEVDIR/loading
That's it. The driver should be up and running now.
|