Re! From: ZIGLIO Frediano <Frediano.Ziglio@xxxxxxxxxxxxxxxxxx> > > > But you read signal with other info, so if a radio program check for > > > stereo receiving with a polling you change frequency, making > > > noise... > > > > No, just do it when the radio card should change frequency. You get a > > static value for signal strength. When the station disapears > > afterwards the driver would still report a signal. This value would > > just get updates on frequency change... > > > Could work (you have also to take in account that program change > frequency during scanning very frequently, so you have to cache a > range of frequency...) No cache (in the driver) is needed. Otherwise you lose the chance to ever update the signal strength. Of course does the program change the frequency nearly continiously during scan - but withouth signal strength there is no need for scanning at all... <-: > But another problem can raise... in this mode my process must keep > in kernel quite a lot... The change-freq-ioctl() will indeed block longer. I don't see a better solution. - Instead the radio app is recommended to use threads or multiple tasks if in need to avoid blocking the whole application. > I don't stop computer for a while? Also my program freeze... Use something like if(current->need_resched) { schedule(); if (signal_pending(current)) return -ERESTARTSYS; } to avoid 'stopping you computer'. - The corresponding task/thread which is doing that ioctl() is of course blocked (hopefully interruptible - that depends on the code in your driver...). Bye, Robert