| 1 | /* |
| 2 | * The Linux soundcard driver for 1200 baud and 9600 baud packet radio |
| 3 | * (C) 1996-1998 by Thomas Sailer, HB9JNX/AE4WA |
| 4 | */ |
| 5 | |
| 6 | #ifndef _SOUNDMODEM_H |
| 7 | #define _SOUNDMODEM_Hcxx . . $ `hdlcutil/soundmodem.h:7:9`! |
| 8 | |
| 9 | /* -------------------------------------------------------------------- */ |
| 10 | /* |
| 11 | * structs for the IOCTL commands |
| 12 | */ |
| 13 | |
| 14 | struct sm_debug_datacxx . . $ sm_debug_data# { |
| 15 | unsigned int int_ratecxx . . $ sm_debug_data#int_rate.; |
| 16 | unsigned int mod_cyclescxx . . $ sm_debug_data#mod_cycles.; |
| 17 | unsigned int demod_cyclescxx . . $ sm_debug_data#demod_cycles.; |
| 18 | unsigned int dma_residuecxx . . $ sm_debug_data#dma_residue.; |
| 19 | }; |
| 20 | |
| 21 | struct sm_diag_datacxx . . $ sm_diag_data# { |
| 22 | unsigned int modecxx . . $ sm_diag_data#mode.; |
| 23 | unsigned int flagscxx . . $ sm_diag_data#flags.; |
| 24 | unsigned int samplesperbitcxx . . $ sm_diag_data#samplesperbit.; |
| 25 | unsigned int datalencxx . . $ sm_diag_data#datalen.; |
| 26 | short *datacxx . . $ sm_diag_data#data.; |
| 27 | }; |
| 28 | |
| 29 | struct sm_mixer_datacxx . . $ sm_mixer_data# { |
| 30 | unsigned int mixer_typecxx . . $ sm_mixer_data#mixer_type.; |
| 31 | unsigned int sample_ratecxx . . $ sm_mixer_data#sample_rate.; |
| 32 | unsigned int bit_ratecxx . . $ sm_mixer_data#bit_rate.; |
| 33 | unsigned int regcxx . . $ sm_mixer_data#reg.; |
| 34 | unsigned int datacxx . . $ sm_mixer_data#data.; |
| 35 | }; |
| 36 | |
| 37 | struct sm_configcxx . . $ sm_config# { |
| 38 | int hardwarecxx . . $ sm_config#hardware.; |
| 39 | int modecxx . . $ sm_config#mode.; |
| 40 | }; |
| 41 | |
| 42 | struct sm_ioctlcxx . . $ sm_ioctl# { |
| 43 | int cmdcxx . . $ sm_ioctl#cmd.; |
| 44 | unioncxx . . $ sm_ioctl#$anonymous_type_0# { |
| 45 | struct sm_configcxx . . $ sm_config# cfgcxx . . $ sm_ioctl#$anonymous_type_0#cfg.; |
| 46 | struct sm_diag_datacxx . . $ sm_diag_data# diagcxx . . $ sm_ioctl#$anonymous_type_0#diag.; |
| 47 | struct sm_mixer_datacxx . . $ sm_mixer_data# mixcxx . . $ sm_ioctl#$anonymous_type_0#mix.; |
| 48 | struct sm_debug_datacxx . . $ sm_debug_data# dbgcxx . . $ sm_ioctl#$anonymous_type_0#dbg.; |
| 49 | } datacxx . . $ sm_ioctl#data.; |
| 50 | }; |
| 51 | |
| 52 | /* -------------------------------------------------------------------- */ |
| 53 | |
| 54 | /* |
| 55 | * diagnose modes |
| 56 | */ |
| 57 | #define SM_DIAGMODE_OFFcxx . . $ `hdlcutil/soundmodem.h:57:9`! 0 |
| 58 | #define SM_DIAGMODE_INPUTcxx . . $ `hdlcutil/soundmodem.h:58:9`! 1 |
| 59 | #define SM_DIAGMODE_DEMODcxx . . $ `hdlcutil/soundmodem.h:59:9`! 2 |
| 60 | #define SM_DIAGMODE_CONSTELLATIONcxx . . $ `hdlcutil/soundmodem.h:60:9`! 3 |
| 61 | |
| 62 | /* |
| 63 | * diagnose flags |
| 64 | */ |
| 65 | #define SM_DIAGFLAG_DCDGATEcxx . . $ `hdlcutil/soundmodem.h:65:9`! (1<<0) |
| 66 | #define SM_DIAGFLAG_VALIDcxx . . $ `hdlcutil/soundmodem.h:66:9`! (1<<1) |
| 67 | |
| 68 | /* |
| 69 | * mixer types |
| 70 | */ |
| 71 | #define SM_MIXER_INVALIDcxx . . $ `hdlcutil/soundmodem.h:71:9`! 0 |
| 72 | #define SM_MIXER_AD1848cxx . . $ `hdlcutil/soundmodem.h:72:9`! 0x10 |
| 73 | #define SM_MIXER_CRYSTALcxx . . $ `hdlcutil/soundmodem.h:73:9`! 0x11 |
| 74 | #define SM_MIXER_CT1335cxx . . $ `hdlcutil/soundmodem.h:74:9`! 0x20 |
| 75 | #define SM_MIXER_CT1345cxx . . $ `hdlcutil/soundmodem.h:75:9`! 0x21 |
| 76 | #define SM_MIXER_CT1745cxx . . $ `hdlcutil/soundmodem.h:76:9`! 0x22 |
| 77 | |
| 78 | /* |
| 79 | * ioctl values |
| 80 | */ |
| 81 | #define SMCTL_DIAGNOSEcxx . . $ `hdlcutil/soundmodem.h:81:9`! 0x82 |
| 82 | #define SMCTL_GETMIXERcxx . . $ `hdlcutil/soundmodem.h:82:9`! 0x83 |
| 83 | #define SMCTL_SETMIXERcxx . . $ `hdlcutil/soundmodem.h:83:9`! 0x84 |
| 84 | #define SMCTL_GETDEBUGcxx . . $ `hdlcutil/soundmodem.h:84:9`! 0x85 |
| 85 | |
| 86 | /* -------------------------------------------------------------------- */ |
| 87 | |
| 88 | #endif /* _SOUNDMODEM_H */ |
| 89 | |
| 90 | /* --------------------------------------------------------------------- */ |