linux kernel 2.6.36+ ioctl

All posts related to PCI MAX transmittors go here!

Moderators: Sir Nigel, Nina, pcs, 5r, phpBB2 - Administrators

Post Reply
hamsandwich
New registered user
New registered user
Posts: 1
Joined: Wed May 02, 2012 1:10 am

linux kernel 2.6.36+ ioctl

Post by hamsandwich »

Does anyone have a fix to make the code from http://code.google.com/p/pcimaxfm/ work with 2.6.36+ kernels? Apparently ioctl went away:
/usr/local/src/pcimaxfm/src/driver/linux/main.c:477: error: unknown field 'ioctl' specified in initializer
/usr/local/src/pcimaxfm/src/driver/linux/main.c:477: warning: initialization from incompatible pointer type

I tried just changing it to unlocked_ioctl as is suggested in some forums, and this allows it to compile with just the warning:
/usr/local/src/pcimaxfm/src/driver/linux/main.c:477: warning: initialization from incompatible pointer type
But the bin produced doesn't work, when trying to display or set any setting it just says Killed

The last commit to the google code was 3 years ago
User avatar
pcs
Site master
Site master
Posts: 3132
Joined: Fri Jan 18, 2002 1:00 am
Location: Radio Land
Contact:

Post by pcs »

I think the work on the linux driver stopped with 2007+ model cards.

That is a pity since the new PCIMAX 3000+ cards are much easier to program. I hope someone will pick up the work and move to the new pcimax 3000+ model.
Best regards,
Marko - PCS Electronics
--------------------------------------------------------
Turn your PC into a FM radio station!
http://www.pcs-electronics.com
fax +386 4 2316 128
User avatar
pcs
Site master
Site master
Posts: 3132
Joined: Fri Jan 18, 2002 1:00 am
Location: Radio Land
Contact:

Post by pcs »

Someone picked up the work on the linux driver for the card so you may want to tune in for news in the coming weeks.
Best regards,
Marko - PCS Electronics
--------------------------------------------------------
Turn your PC into a FM radio station!
http://www.pcs-electronics.com
fax +386 4 2316 128
w3rn
New registered user
New registered user
Posts: 10
Joined: Fri Jul 24, 2009 11:04 pm

Post by w3rn »

This may help!!!


Special Notes:
If you receive this error: "rds.c:1:0: error: code model ‘kernel’ not supported in the 32 bit mode" here is what you need to do!! The issue has to do with a cflag in the /src/common/Makefile.am. Delete this on the cflag line "-mcmodel=kernel" and then you will be able to compile on 32bit linux. You do not have to do this on 64bit linux systems. On stock debian 5 systems the driver fragged the kernel with of panics and traces. But it stable on current ubuntu systems and seems to work fine without fault.

Newer Kernels may produce this error: "main.c:477:2: error: unknown field ‘ioctl’ specified in initializer". To solve this problem change ".ioctl = radioModIoctl" to ".unlocked_ioctl = radioModIoctl" in main.c line 477. Remove this prototype from the ioctl function handler "struct inode *inode,". Also change "int" to "long" for return type for the ioctl function. Lastly, you may have to do a "sudo depmod".

As of ubuntu v11.10 the radio module may load using modprobe but cards may not be FOUND. This is because of a netjet driver loaded at startup/bootup. You can remove this module by issuing the command "sudo rmmod netjet". For a permenet fix edit the file "/etc/modprobe.d/blacklist" and add "blacklist netjet" "and blacklist hisax".
Dan
New registered user
New registered user
Posts: 6
Joined: Tue Feb 06, 2007 7:00 pm
Contact:

Post by Dan »

The driver is updated to work with modern kernels (tested with 3.8.1). The repo have changed to Git, so you will have to re-checkout the code: https://code.google.com/p/pcimaxfm/source/checkout

Transmitters newer than 2007+ are probably not supported, but patches are of course welcome. :)
User avatar
pcs
Site master
Site master
Posts: 3132
Joined: Fri Jan 18, 2002 1:00 am
Location: Radio Land
Contact:

Post by pcs »

Too bad you're not supporting 3000+, it is a much better product than the old 2007.

But thanks for the great work nevertheless.
Best regards,
Marko - PCS Electronics
--------------------------------------------------------
Turn your PC into a FM radio station!
http://www.pcs-electronics.com
fax +386 4 2316 128
Post Reply