1 /* ioctl API for radio devices. 2 * (C) 1997 Michael McCormack 3 * 4 * Adapted for wrkit and newer winradio receivers. 5 * (C) 1999-2000 <pab@users.sourceforge.net> 6 */ 7 8 #ifndef RADIO_H 9 #define RADIO_H 10 11 #include <linux/ioctl.h> 12 13 /* define ioctl() numbers for the radio */ 14 15 #define RADIO_ID 0x8C /* See linux/Documentation/ioctl-number.txt */ 16 17 #define RADIO_GET_POWER _IOR(RADIO_ID,0x00,long) 18 #define RADIO_SET_POWER _IOW(RADIO_ID,0x01,long) 19 #define RADIO_GET_MODE _IOR(RADIO_ID,0x02,long) 20 #define RADIO_SET_MODE _IOW(RADIO_ID,0x03,long) 21 #define RADIO_GET_MUTE _IOR(RADIO_ID,0x04,long) 22 #define RADIO_SET_MUTE _IOW(RADIO_ID,0x05,long) 23 #define RADIO_GET_ATTN _IOR(RADIO_ID,0x06,long) 24 #define RADIO_SET_ATTN _IOW(RADIO_ID,0x07,long) 25 #define RADIO_GET_VOL _IOR(RADIO_ID,0x08,long) 26 #define RADIO_SET_VOL _IOW(RADIO_ID,0x09,long) 27 #define RADIO_GET_FREQ _IOR(RADIO_ID,0x0a,long) /* Hz */ 28 #define RADIO_SET_FREQ _IOW(RADIO_ID,0x0b,long) 29 #define RADIO_GET_BFO _IOR(RADIO_ID,0x0c,long) /* Hz */ 30 #define RADIO_SET_BFO _IOW(RADIO_ID,0x0d,long) 31 /* 32 #define RADIO_GET_SSAM _IOR(RADIO_ID,0x0e,long) 33 #define RADIO_GET_SSFMN _IOR(RADIO_ID,0x0f,long) 34 #define RADIO_GET_SSFMW1 _IOR(RADIO_ID,0x10,long) 35 #define RADIO_GET_SSFMW2 _IOR(RADIO_ID,0x11,long) 36 */ 37 #define RADIO_GET_SS _IOR(RADIO_ID,0x12,long) /* 0..120 */ 38 #define RADIO_GET_IFS _IOR(RADIO_ID,0x13,long) /* Hz */ 39 #define RADIO_SET_IFS _IOW(RADIO_ID,0x14,long) 40 #define RADIO_GET_DESCR _IOR(RADIO_ID,0x15,char[256]) 41 42 #define RADIO_GET_AGC _IOR(RADIO_ID,0x16,long) 43 #define RADIO_SET_AGC _IOW(RADIO_ID,0x17,long) 44 #define RADIO_GET_IFG _IOR(RADIO_ID,0x18,long) 45 #define RADIO_SET_IFG _IOW(RADIO_ID,0x19,long) 46 /* Someone forgot 0x1A-0x1F ? */ 47 #define RADIO_GET_MAXVOL _IOR(RADIO_ID,0x20,long) 48 #define RADIO_GET_MAXIFG _IOR(RADIO_ID,0x21,long) 49 50 /* radio modes */ 51 52 typedef enum { 53 RADIO_CW = 0, 54 RADIO_AM = 1, 55 RADIO_FMN = 2, 56 RADIO_FMW = 3, 57 RADIO_LSB = 4, 58 RADIO_USB = 5, 59 RADIO_FMM = 6, 60 RADIO_FM6 = 7, 61 } radio_mode; 62 63 #endif /* RADIO_H */ 64