You are not logged in.

#1 2009-11-02 16:22:12

hungerfish
Member
Registered: 2009-09-13
Posts: 254

autoloading/unloading firmware

Hi,
I have a dvb-t usb-stick, and so far I've got it setup and working just fine. I needed to download a firmware file and place it in /lib/firmware for the stick to get initialised, but after doing that and creating ~/.mplayer/channel.conf using the scan utility I can now watch tv using smplayer quite nicely.

BUT: I don't really want my dvb-usb-stick to be 'active'(hot) all the time, only when I actually use it. Now I don't want to unplug/plug it back in constantly either, so I thought I could delay the firmware loading step until it is actually needed (say when smplayer starts, or even better, only when it requests the 'dvb-channels') much like the 'official windows software does that came with the stick.

How could I go about this task?


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#2 2009-11-02 19:56:54

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: autoloading/unloading firmware

I am not sure having the device physically plugged in but without a driver will help any with regards to power consumption, if that's what you're after. I think unplugging is the better solution then.

Anyway, if you want to 'automate' what you hae in mind, write a small wrapper script that loads before you launch mplayer and unloads the driver after. I think udev/modprobe take care of loading the firmware, never seen direct interaction with it - but that doesn't mean it's impossible of course.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2009-11-03 18:12:46

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: autoloading/unloading firmware

Well the device 'lights-up'(literally, in blue ) only when the kernel(? or udev) finds the appropriate firmware file  in /lib/firmware. If the firmware isn't in place, the device isn't initialised (according to dmesg). I'm not sure about power consumption, but because the usb-stick emits said light and also becomes quite warm when plugged in and properly initialised, I was hoping I could stop that.

I've thought about a wrapper script, which would be pretty simple, I was hoping there maybe a nicer way of doing this. Maybe a custom udev rule or something?? As it stands, for a wrapper-script to make any sense I would have to somehow modify the 'default' behaviour, which is, once the device gets plugged in, look for fimware and initialise. How can I 'stop' my system form doing that?
roll


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#4 2009-11-03 19:08:24

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: autoloading/unloading firmware

The firmware is loaded onto the device by some driver. The dmesg output showing the device being initialized (or not, as the case may be) should tell you that driver's name. You could try blacklisting that driver in rc.conf, at which point it will only load when you do "modprobe" on it - which gives you something to work with for a wrapper script.

Offline

#5 2009-11-04 02:29:00

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: autoloading/unloading firmware

Yes and no, I always assumed that modules blacklisted in /etc/rc.conf are those that aren't to be loaded during boot.
This obviously does not apply to my given situation(pluggin in a usb device), or does it? I've tried with blacklisting 'dib0700' which seems to be my driver..

usb 1-3.4: new high speed USB device using ehci_hcd and address 5
usb 1-3.4: configuration #1 chosen from 1 choice
dib0700: loaded with support for 9 different device-types
dvb-usb: found a 'AVerMedia AVerTV DVB-T Volar' in cold state, will try to load a firmware
usb 1-3.4: firmware: requesting dvb-usb-dib0700-1.20.fw
dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.20.fw'
dib0700: firmware started successfully.
dvb-usb: found a 'AVerMedia AVerTV DVB-T Volar' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (AVerMedia AVerTV DVB-T Volar)
DVB: registering adapter 0 frontend 0 (DiBcom 7000MA/MB/PA/PB/MC)...
MT2060: successfully identified (IF1 = 1220)
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:0f.3/usb1/1-3/1-3.4/input/input7
dvb-usb: schedule remote query interval to 50 msecs.
dvb-usb: AVerMedia AVerTV DVB-T Volar successfully initialized and connected.
usbcore: registered new interface driver dvb_usb_dib0700
usb 1-3.4: USB disconnect, address 5
dvb-usb: AVerMedia AVerTV DVB-T Volar successfully deinitialized and disconnected.

EDIT: What the hell is the line 'input: IR-receiver inside an USB DVB receiver...' refering to???

Last edited by hungerfish (2009-11-04 02:30:40)


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#6 2009-11-06 00:40:03

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: autoloading/unloading firmware

*bump* hmm


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

Board footer

Powered by FluxBB