home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lxapi32.zip / Include / Linux / audiochip.h next >
C/C++ Source or Header  |  2002-04-26  |  3KB  |  73 lines

  1. /* $Id: audiochip.h,v 1.2 2002/04/26 23:09:03 smilcke Exp $ */
  2.  
  3. #ifndef AUDIOCHIP_H
  4. #define AUDIOCHIP_H
  5.  
  6. /* ---------------------------------------------------------------------- */
  7.  
  8. #define MIN(a,b) (((a)>(b))?(b):(a))
  9. #define MAX(a,b) (((a)>(b))?(a):(b))
  10.  
  11. /* v4l device was opened in Radio mode */
  12. #define AUDC_SET_RADIO        _IO('m',2)
  13. /* select from TV,radio,extern,MUTE */
  14. #define AUDC_SET_INPUT        _IOW('m',17,int)
  15.  
  16. /* audio inputs */
  17. #define AUDIO_TUNER        0x00
  18. #define AUDIO_RADIO        0x01
  19. #define AUDIO_EXTERN       0x02
  20. #define AUDIO_INTERN       0x03
  21. #define AUDIO_OFF          0x04
  22. #define AUDIO_ON           0x05
  23. #define AUDIO_MUTE         0x80
  24. #define AUDIO_UNMUTE       0x81
  25.  
  26. /* all the stuff below is obsolete and just here for reference.  I'll
  27.  * remove it once the driver is tested and works fine.
  28.  *
  29.  * Instead creating alot of tiny API's for all kinds of different
  30.  * chips, we'll just pass throuth the v4l ioctl structs (v4l2 not
  31.  * yet...).  It is a bit less flexible, but most/all used i2c chips
  32.  * make sense in v4l context only.  So I think that's acceptable...
  33.  */
  34.  
  35. #if 0
  36.  
  37. /* TODO (if it is ever [to be] accessible in the V4L[2] spec):
  38.  *   maybe fade? (back/front)
  39.  * notes:
  40.  * NEWCHANNEL and SWITCH_MUTE are here because the MSP3400 has a special
  41.  * routine to go through when it tunes in to a new channel before turning
  42.  * back on the sound.
  43.  * Either SET_RADIO, NEWCHANNEL, and SWITCH_MUTE or SET_INPUT need to be
  44.  * implemented (MSP3400 uses SET_RADIO to select inputs, and SWITCH_MUTE for
  45.  * channel-change mute -- TEA6300 et al use SET_AUDIO to select input [TV,
  46.  * radio, external, or MUTE]).  If both methods are implemented, you get a
  47.  * cookie for doing such a good job! :)
  48.  */
  49.  
  50. #define AUDC_SET_TVNORM       _IOW('m',1,int)  /* TV mode + PAL/SECAM/NTSC  */
  51. #define AUDC_NEWCHANNEL       _IO('m',3)       /* indicate new chan - off mute */
  52.  
  53. #define AUDC_GET_VOLUME_LEFT  _IOR('m',4,__u16)
  54. #define AUDC_GET_VOLUME_RIGHT _IOR('m',5,__u16)
  55. #define AUDC_SET_VOLUME_LEFT  _IOW('m',6,__u16)
  56. #define AUDC_SET_VOLUME_RIGHT _IOW('m',7,__u16)
  57.  
  58. #define AUDC_GET_STEREO       _IOR('m',8,__u16)
  59. #define AUDC_SET_STEREO       _IOW('m',9,__u16)
  60.  
  61. #define AUDC_GET_DC           _IOR('m',10,__u16)/* ??? */
  62.  
  63. #define AUDC_GET_BASS         _IOR('m',11,__u16)
  64. #define AUDC_SET_BASS         _IOW('m',12,__u16)
  65. #define AUDC_GET_TREBLE       _IOR('m',13,__u16)
  66. #define AUDC_SET_TREBLE       _IOW('m',14,__u16)
  67.  
  68. #define AUDC_GET_UNIT         _IOR('m',15,int) /* ??? - unimplemented in MSP3400 */
  69. #define AUDC_SWITCH_MUTE      _IO('m',16)      /* turn on mute */
  70. #endif
  71.  
  72. #endif /* AUDIOCHIP_H */
  73.