#define	_CYC_SIO		_IO
/* used to create numbers */
#define _CYC_SIOR(type,nr,size)	_IOC(_IOC_READ,(type),(nr),size)
#define _CYC_SIOW(type,nr,size)	_IOC(_IOC_WRITE,(type),(nr),size)
#define _CYC_SIOWR(type,nr,size)	_IOC(_IOC_READ|_IOC_WRITE,(type),(nr),size)

#define CYC_SNDCTL_SEQ_RESET		_CYC_SIO  ('Q', 0)
#define CYC_SNDCTL_SEQ_SYNC		_CYC_SIO  ('Q', 1)
#define CYC_SNDCTL_SYNTH_INFO		_CYC_SIOWR('Q', 2, 140)//struct synth_info)
#define CYC_SNDCTL_SEQ_CTRLRATE		_CYC_SIOWR('Q', 3, 4)	/* Set/get timer resolution (HZ) */
#define CYC_SNDCTL_SEQ_GETOUTCOUNT	_CYC_SIOR ('Q', 4, 4)
#define CYC_SNDCTL_SEQ_GETINCOUNT       _CYC_SIOR ('Q', 5, 4)
#define CYC_SNDCTL_SEQ_PERCMODE		_CYC_SIOW ('Q', 6, 4)
#define CYC_SNDCTL_FM_LOAD_INSTR	_CYC_SIOW ('Q', 7, 40)//struct sbi_instrument)	/* Obsolete. Don't use!!!!!! */
#define CYC_SNDCTL_SEQ_TESTMIDI		_CYC_SIOW ('Q', 8, 4)
#define CYC_SNDCTL_SEQ_RESETSAMPLES	_CYC_SIOW ('Q', 9, 4)
#define CYC_SNDCTL_SEQ_NRSYNTHS		_CYC_SIOR ('Q',10, 4)
#define CYC_SNDCTL_SEQ_NRMIDIS		_CYC_SIOR ('Q',11, 4)
#define CYC_SNDCTL_MIDI_INFO		_CYC_SIOWR('Q',12, 116)//struct midi_info)
#define CYC_SNDCTL_SEQ_THRESHOLD	_CYC_SIOW ('Q',13, 4)
#define CYC_SNDCTL_SYNTH_MEMAVL		_CYC_SIOWR('Q',14, 4)	/* in=dev#, out=memsize */
#define CYC_SNDCTL_FM_4OP_ENABLE	_CYC_SIOW ('Q',15, 4)	/* in=dev# */
#define CYC_SNDCTL_SEQ_PANIC		_CYC_SIO  ('Q',17)
#define CYC_SNDCTL_SEQ_OUTOFBAND	_CYC_SIOW ('Q',18, 8)//struct seq_event_rec)
#define CYC_SNDCTL_SEQ_GETTIME		_CYC_SIOR ('Q',19, 4)
#define CYC_SNDCTL_SYNTH_ID		_CYC_SIOWR('Q',20, 140)//struct synth_info)
#define CYC_SNDCTL_SYNTH_CONTROL	_CYC_SIOWR('Q',21, 4004)//struct synth_control)
#define CYC_SNDCTL_SYNTH_REMOVESAMPLE	_CYC_SIOWR('Q',22, 12)//struct remove_sample)

#define CYC_SNDCTL_TMR_TIMEBASE		_CYC_SIOWR('T', 1, 4)
#define CYC_SNDCTL_TMR_START		_CYC_SIO  ('T', 2)
#define CYC_SNDCTL_TMR_STOP		_CYC_SIO  ('T', 3)
#define CYC_SNDCTL_TMR_CONTINUE		_CYC_SIO  ('T', 4)
#define CYC_SNDCTL_TMR_TEMPO		_CYC_SIOWR('T', 5, 4)
#define CYC_SNDCTL_TMR_SOURCE		_CYC_SIOWR('T', 6, 4)
#define CYC_SNDCTL_TMR_METRONOME	_CYC_SIOW ('T', 7, 4)
#define CYC_SNDCTL_TMR_SELECT		_CYC_SIOW ('T', 8, 4)

#define CYC_SNDCTL_MIDI_PRETIME		_CYC_SIOWR('m', 0, 4)
#define CYC_SNDCTL_MIDI_MPUMODE		_CYC_SIOWR('m', 1, 4)
#define CYC_SNDCTL_MIDI_MPUCMD		_CYC_SIOWR('m', 2, 33)//mpu_command_rec)

#define CYC_SNDCTL_DSP_RESET		_CYC_SIO  ('P', 0)
#define CYC_SNDCTL_DSP_SYNC		_CYC_SIO  ('P', 1)
#define CYC_SNDCTL_DSP_SPEED		_CYC_SIOWR('P', 2, 4)
#define CYC_SNDCTL_DSP_STEREO		_CYC_SIOWR('P', 3, 4)
#define CYC_SNDCTL_DSP_GETBLKSIZE		_CYC_SIOWR('P', 4, 4)
#define CYC_SNDCTL_DSP_SAMPLESIZE		CYC_SNDCTL_DSP_SETFMT
#define CYC_SNDCTL_DSP_CHANNELS		_CYC_SIOWR('P', 6, 4)
#define CYC_SOUND_PCM_WRITE_CHANNELS	CYC_SNDCTL_DSP_CHANNELS
#define CYC_SOUND_PCM_WRITE_FILTER		_CYC_SIOWR('P', 7, 4)
#define CYC_SNDCTL_DSP_POST			_CYC_SIO  ('P', 8)
#define CYC_SNDCTL_DSP_SUBDIVIDE		_CYC_SIOWR('P', 9, 4)
#define CYC_SNDCTL_DSP_SETFRAGMENT		_CYC_SIOWR('P',10, 4)

/*	Audio data formats (Note! U8=8 and S16_LE=16 for compatibility) */
#define CYC_SNDCTL_DSP_GETFMTS		_CYC_SIOR ('P',11, 4) /* Returns a mask */
#define CYC_SNDCTL_DSP_SETFMT		_CYC_SIOWR('P',5, 4) /* Selects ONE fmt*/

#define CYC_SNDCTL_DSP_GETOSPACE		_CYC_SIOR ('P',12, 16)//audio_buf_info
#define CYC_SNDCTL_DSP_GETISPACE		_CYC_SIOR ('P',13, 16)//audio_buf_info
#define CYC_SNDCTL_DSP_NONBLOCK		_CYC_SIO  ('P',14)
#define CYC_SNDCTL_DSP_GETCAPS		_CYC_SIOR ('P',15, 4)

#define CYC_SNDCTL_DSP_GETTRIGGER		_CYC_SIOR ('P',16, 4)
#define CYC_SNDCTL_DSP_SETTRIGGER		_CYC_SIOW ('P',16, 4)

#define CYC_SNDCTL_DSP_GETIPTR		_CYC_SIOR ('P',17, 12)//count_info)
#define CYC_SNDCTL_DSP_GETOPTR		_CYC_SIOR ('P',18, 12)//count_info)

#define CYC_SNDCTL_DSP_MAPINBUF		_CYC_SIOR ('P', 19, 8)//buffmem_desc)
#define CYC_SNDCTL_DSP_MAPOUTBUF		_CYC_SIOR ('P', 20, 8)//buffmem_desc)
#define CYC_SNDCTL_DSP_SETSYNCRO		_CYC_SIO  ('P', 21)
#define CYC_SNDCTL_DSP_SETDUPLEX		_CYC_SIO  ('P', 22)
#define CYC_SNDCTL_DSP_GETODELAY		_CYC_SIOR ('P', 23, 4)

#define CYC_SNDCTL_DSP_GETCHANNELMASK		_CYC_SIOWR('P', 64, 4)
#define CYC_SNDCTL_DSP_BIND_CHANNEL		_CYC_SIOWR('P', 65, 4)

#define CYC_SNDCTL_DSP_SETSPDIF		_CYC_SIOW ('P', 66, 4)
#define CYC_SNDCTL_DSP_GETSPDIF		_CYC_SIOR ('P', 67, 4)

#define CYC_SNDCTL_DSP_PROFILE		_CYC_SIOW ('P', 23, 4)

#define CYC_SOUND_PCM_READ_RATE		_CYC_SIOR ('P', 2, 4)
#define CYC_SOUND_PCM_READ_CHANNELS		_CYC_SIOR ('P', 6, 4)
#define CYC_SOUND_PCM_READ_BITS		_CYC_SIOR ('P', 5, 4)
#define CYC_SOUND_PCM_READ_FILTER		_CYC_SIOR ('P', 7, 4)

#define CYC_SNDCTL_COPR_RESET             _CYC_SIO  ('C',  0)
#define CYC_SNDCTL_COPR_LOAD	      _CYC_SIOWR('C',  1, 4016)//copr_buffer)
#define CYC_SNDCTL_COPR_RDATA	      _CYC_SIOWR('C',  2, 20)//copr_debug_buf)
#define CYC_SNDCTL_COPR_RCODE	      _CYC_SIOWR('C',  3, 20)//copr_debug_buf)
#define CYC_SNDCTL_COPR_WDATA	      _CYC_SIOW ('C',  4, 20)//copr_debug_buf)
#define CYC_SNDCTL_COPR_WCODE	      _CYC_SIOW ('C',  5, 20)//copr_debug_buf)
#define CYC_SNDCTL_COPR_RUN		      _CYC_SIOWR('C',  6, 20)//copr_debug_buf)
#define CYC_SNDCTL_COPR_HALT	      _CYC_SIOWR('C',  7, 20)//copr_debug_buf)
#define CYC_SNDCTL_COPR_SENDMSG	      _CYC_SIOWR('C',  8, 4004)//copr_msg)
#define CYC_SNDCTL_COPR_RCVMSG	      _CYC_SIOR ('C',  9, 4004)//copr_msg)

#define CYC_MIXER_READ(dev)		_SIOR('M', dev, 4)
#define CYC_SOUND_MIXER_READ_VOLUME		CYC_MIXER_READ(SOUND_MIXER_VOLUME)
#define CYC_SOUND_MIXER_READ_BASS		CYC_MIXER_READ(SOUND_MIXER_BASS)
#define CYC_SOUND_MIXER_READ_TREBLE		CYC_MIXER_READ(SOUND_MIXER_TREBLE)
#define CYC_SOUND_MIXER_READ_SYNTH		CYC_MIXER_READ(SOUND_MIXER_SYNTH)
#define CYC_SOUND_MIXER_READ_PCM		CYC_MIXER_READ(SOUND_MIXER_PCM)
#define CYC_SOUND_MIXER_READ_SPEAKER	CYC_MIXER_READ(SOUND_MIXER_SPEAKER)
#define CYC_SOUND_MIXER_READ_LINE		CYC_MIXER_READ(SOUND_MIXER_LINE)
#define CYC_SOUND_MIXER_READ_MIC		CYC_MIXER_READ(SOUND_MIXER_MIC)
#define CYC_SOUND_MIXER_READ_CD		CYC_MIXER_READ(SOUND_MIXER_CD)
#define CYC_SOUND_MIXER_READ_IMIX		CYC_MIXER_READ(SOUND_MIXER_IMIX)
#define CYC_SOUND_MIXER_READ_ALTPCM		CYC_MIXER_READ(SOUND_MIXER_ALTPCM)
#define CYC_SOUND_MIXER_READ_RECLEV		CYC_MIXER_READ(SOUND_MIXER_RECLEV)
#define CYC_SOUND_MIXER_READ_IGAIN		CYC_MIXER_READ(SOUND_MIXER_IGAIN)
#define CYC_SOUND_MIXER_READ_OGAIN		CYC_MIXER_READ(SOUND_MIXER_OGAIN)
#define CYC_SOUND_MIXER_READ_LINE1		CYC_MIXER_READ(SOUND_MIXER_LINE1)
#define CYC_SOUND_MIXER_READ_LINE2		CYC_MIXER_READ(SOUND_MIXER_LINE2)
#define CYC_SOUND_MIXER_READ_LINE3		CYC_MIXER_READ(SOUND_MIXER_LINE3)

/* Obsolete macros */
#define CYC_SOUND_MIXER_READ_MUTE		CYC_MIXER_READ(SOUND_MIXER_MUTE)
#define CYC_SOUND_MIXER_READ_ENHANCE	CYC_MIXER_READ(SOUND_MIXER_ENHANCE)
#define CYC_SOUND_MIXER_READ_LOUD		CYC_MIXER_READ(SOUND_MIXER_LOUD)

#define CYC_SOUND_MIXER_READ_RECSRC		CYC_MIXER_READ(SOUND_MIXER_RECSRC)
#define CYC_SOUND_MIXER_READ_DEVMASK	CYC_MIXER_READ(SOUND_MIXER_DEVMASK)
#define CYC_SOUND_MIXER_READ_RECMASK	CYC_MIXER_READ(SOUND_MIXER_RECMASK)
#define CYC_SOUND_MIXER_READ_STEREODEVS	CYC_MIXER_READ(SOUND_MIXER_STEREODEVS)
#define CYC_SOUND_MIXER_READ_CAPS		CYC_MIXER_READ(SOUND_MIXER_CAPS)

#define CYC_MIXER_WRITE(dev)		_CYC_SIOWR('M', dev, 4)
#define CYC_SOUND_MIXER_WRITE_VOLUME	CYC_MIXER_WRITE(SOUND_MIXER_VOLUME)
#define CYC_SOUND_MIXER_WRITE_BASS		CYC_MIXER_WRITE(SOUND_MIXER_BASS)
#define CYC_SOUND_MIXER_WRITE_TREBLE	CYC_MIXER_WRITE(SOUND_MIXER_TREBLE)
#define CYC_SOUND_MIXER_WRITE_SYNTH		CYC_MIXER_WRITE(SOUND_MIXER_SYNTH)
#define CYC_SOUND_MIXER_WRITE_PCM		CYC_MIXER_WRITE(SOUND_MIXER_PCM)
#define CYC_SOUND_MIXER_WRITE_SPEAKER	CYC_MIXER_WRITE(SOUND_MIXER_SPEAKER)
#define CYC_SOUND_MIXER_WRITE_LINE		CYC_MIXER_WRITE(SOUND_MIXER_LINE)
#define CYC_SOUND_MIXER_WRITE_MIC		CYC_MIXER_WRITE(SOUND_MIXER_MIC)
#define CYC_SOUND_MIXER_WRITE_CD		CYC_MIXER_WRITE(SOUND_MIXER_CD)
#define CYC_SOUND_MIXER_WRITE_IMIX		CYC_MIXER_WRITE(SOUND_MIXER_IMIX)
#define CYC_SOUND_MIXER_WRITE_ALTPCM	CYC_MIXER_WRITE(SOUND_MIXER_ALTPCM)
#define CYC_SOUND_MIXER_WRITE_RECLEV	CYC_MIXER_WRITE(SOUND_MIXER_RECLEV)
#define CYC_SOUND_MIXER_WRITE_IGAIN		CYC_MIXER_WRITE(SOUND_MIXER_IGAIN)
#define CYC_SOUND_MIXER_WRITE_OGAIN		CYC_MIXER_WRITE(SOUND_MIXER_OGAIN)
#define CYC_SOUND_MIXER_WRITE_LINE1		CYC_MIXER_WRITE(SOUND_MIXER_LINE1)
#define CYC_SOUND_MIXER_WRITE_LINE2		CYC_MIXER_WRITE(SOUND_MIXER_LINE2)
#define CYC_SOUND_MIXER_WRITE_LINE3		CYC_MIXER_WRITE(SOUND_MIXER_LINE3)

/* Obsolete macros */
#define CYC_SOUND_MIXER_WRITE_MUTE		CYC_MIXER_WRITE(SOUND_MIXER_MUTE)
#define CYC_SOUND_MIXER_WRITE_ENHANCE	CYC_MIXER_WRITE(SOUND_MIXER_ENHANCE)
#define CYC_SOUND_MIXER_WRITE_LOUD		CYC_MIXER_WRITE(SOUND_MIXER_LOUD)

#define CYC_SOUND_MIXER_WRITE_RECSRC	CYC_MIXER_WRITE(SOUND_MIXER_RECSRC)

#define CYC_SOUND_MIXER_INFO		_CYC_SIOR ('M', 101, 92)//mixer_info)
#define CYC_SOUND_OLD_MIXER_INFO		_CYC_SIOR ('M', 101,48)// _old_mixer_info)

#define CYC_SOUND_MIXER_ACCESS		_CYC_SIOWR('M', 102, 128)//mixer_record)

#define CYC_SOUND_MIXER_AGC  _CYC_SIOWR('M', 103, 4)
#define CYC_SOUND_MIXER_3DSE  _CYC_SIOWR('M', 104, 4)

#define CYC_SOUND_MIXER_PRIVATE1		_CYC_SIOWR('M', 111, 4)
#define CYC_SOUND_MIXER_PRIVATE2		_CYC_SIOWR('M', 112, 4)
#define CYC_SOUND_MIXER_PRIVATE3		_CYC_SIOWR('M', 113, 4)
#define CYC_SOUND_MIXER_PRIVATE4		_CYC_SIOWR('M', 114, 4)
#define CYC_SOUND_MIXER_PRIVATE5		_CYC_SIOWR('M', 115, 4)

#define CYC_SOUND_MIXER_GETLEVELS		_CYC_SIOWR('M', 116, 164)// mixer_vol_table)
#define CYC_SOUND_MIXER_SETLEVELS		_CYC_SIOWR('M', 117, 164)//mixer_vol_table)

#define CYC_OSS_GETVERSION			_CYC_SIOR ('M', 118, 4)
