waveartist.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * linux/sound/oss/waveartist.h
  4. *
  5. * def file for Rockwell RWA010 chip set, as installed in Rebel.com NetWinder
  6. */
  7. //registers
  8. #define CMDR 0
  9. #define DATR 2
  10. #define CTLR 4
  11. #define STATR 5
  12. #define IRQSTAT 12
  13. //bit defs
  14. //reg STATR
  15. #define CMD_WE 0x80
  16. #define CMD_RF 0x40
  17. #define DAT_WE 0x20
  18. #define DAT_RF 0x10
  19. #define IRQ_REQ 0x08
  20. #define DMA1 0x04
  21. #define DMA0 0x02
  22. //bit defs
  23. //reg CTLR
  24. #define CMD_WEIE 0x80
  25. #define CMD_RFIE 0x40
  26. #define DAT_WEIE 0x20
  27. #define DAT_RFIE 0x10
  28. #define RESET 0x08
  29. #define DMA1_IE 0x04
  30. #define DMA0_IE 0x02
  31. #define IRQ_ACK 0x01
  32. //commands
  33. #define WACMD_SYSTEMID 0x00
  34. #define WACMD_GETREV 0x00
  35. #define WACMD_INPUTFORMAT 0x10 //0-8S, 1-16S, 2-8U
  36. #define WACMD_INPUTCHANNELS 0x11 //1-Mono, 2-Stereo
  37. #define WACMD_INPUTSPEED 0x12 //sampling rate
  38. #define WACMD_INPUTDMA 0x13 //0-8bit, 1-16bit, 2-PIO
  39. #define WACMD_INPUTSIZE 0x14 //samples to interrupt
  40. #define WACMD_INPUTSTART 0x15 //start ADC
  41. #define WACMD_INPUTPAUSE 0x16 //pause ADC
  42. #define WACMD_INPUTSTOP 0x17 //stop ADC
  43. #define WACMD_INPUTRESUME 0x18 //resume ADC
  44. #define WACMD_INPUTPIO 0x19 //PIO ADC
  45. #define WACMD_OUTPUTFORMAT 0x20 //0-8S, 1-16S, 2-8U
  46. #define WACMD_OUTPUTCHANNELS 0x21 //1-Mono, 2-Stereo
  47. #define WACMD_OUTPUTSPEED 0x22 //sampling rate
  48. #define WACMD_OUTPUTDMA 0x23 //0-8bit, 1-16bit, 2-PIO
  49. #define WACMD_OUTPUTSIZE 0x24 //samples to interrupt
  50. #define WACMD_OUTPUTSTART 0x25 //start ADC
  51. #define WACMD_OUTPUTPAUSE 0x26 //pause ADC
  52. #define WACMD_OUTPUTSTOP 0x27 //stop ADC
  53. #define WACMD_OUTPUTRESUME 0x28 //resume ADC
  54. #define WACMD_OUTPUTPIO 0x29 //PIO ADC
  55. #define WACMD_GET_LEVEL 0x30
  56. #define WACMD_SET_LEVEL 0x31
  57. #define WACMD_SET_MIXER 0x32
  58. #define WACMD_RST_MIXER 0x33
  59. #define WACMD_SET_MONO 0x34
  60. /*
  61. * Definitions for left/right recording input mux
  62. */
  63. #define ADC_MUX_NONE 0
  64. #define ADC_MUX_MIXER 1
  65. #define ADC_MUX_LINE 2
  66. #define ADC_MUX_AUX2 3
  67. #define ADC_MUX_AUX1 4
  68. #define ADC_MUX_MIC 5
  69. /*
  70. * Definitions for mixer gain settings
  71. */
  72. #define MIX_GAIN_LINE 0 /* line in */
  73. #define MIX_GAIN_AUX1 1 /* aux1 */
  74. #define MIX_GAIN_AUX2 2 /* aux2 */
  75. #define MIX_GAIN_XMIC 3 /* crossover mic */
  76. #define MIX_GAIN_MIC 4 /* normal mic */
  77. #define MIX_GAIN_PREMIC 5 /* preamp mic */
  78. #define MIX_GAIN_OUT 6 /* output */
  79. #define MIX_GAIN_MONO 7 /* mono in */
  80. int wa_sendcmd(unsigned int cmd);
  81. int wa_writecmd(unsigned int cmd, unsigned int arg);