vx_core.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. /*
  2. * Driver for Digigram VX soundcards
  3. *
  4. * Hardware core part
  5. *
  6. * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. */
  22. #ifndef __SOUND_VX_COMMON_H
  23. #define __SOUND_VX_COMMON_H
  24. #include <sound/pcm.h>
  25. #include <sound/hwdep.h>
  26. #include <linux/interrupt.h>
  27. #if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
  28. #if !defined(CONFIG_USE_VXLOADER) && !defined(CONFIG_SND_VX_LIB) /* built-in kernel */
  29. #define SND_VX_FW_LOADER /* use the standard firmware loader */
  30. #endif
  31. #endif
  32. struct firmware;
  33. struct device;
  34. typedef struct snd_vx_core vx_core_t;
  35. typedef struct vx_pipe vx_pipe_t;
  36. #define VX_DRIVER_VERSION 0x010000 /* 1.0.0 */
  37. /*
  38. */
  39. #define SIZE_MAX_CMD 0x10
  40. #define SIZE_MAX_STATUS 0x10
  41. struct vx_rmh {
  42. u16 LgCmd; /* length of the command to send (WORDs) */
  43. u16 LgStat; /* length of the status received (WORDs) */
  44. u32 Cmd[SIZE_MAX_CMD];
  45. u32 Stat[SIZE_MAX_STATUS];
  46. u16 DspStat; /* status type, RMP_SSIZE_XXX */
  47. };
  48. typedef u64 pcx_time_t;
  49. #define VX_MAX_PIPES 16
  50. #define VX_MAX_PERIODS 32
  51. #define VX_MAX_CODECS 2
  52. struct vx_ibl_info {
  53. int size; /* the current IBL size (0 = query) in bytes */
  54. int max_size; /* max. IBL size in bytes */
  55. int min_size; /* min. IBL size in bytes */
  56. int granularity; /* granularity */
  57. };
  58. struct vx_pipe {
  59. int number;
  60. unsigned int is_capture: 1;
  61. unsigned int data_mode: 1;
  62. unsigned int running: 1;
  63. unsigned int prepared: 1;
  64. int channels;
  65. unsigned int differed_type;
  66. pcx_time_t pcx_time;
  67. snd_pcm_substream_t *substream;
  68. int hbuf_size; /* H-buffer size in bytes */
  69. int buffer_bytes; /* the ALSA pcm buffer size in bytes */
  70. int period_bytes; /* the ALSA pcm period size in bytes */
  71. int hw_ptr; /* the current hardware pointer in bytes */
  72. int position; /* the current position in frames (playback only) */
  73. int transferred; /* the transferred size (per period) in frames */
  74. int align; /* size of alignment */
  75. u64 cur_count; /* current sample position (for playback) */
  76. unsigned int references; /* an output pipe may be used for monitoring and/or playback */
  77. vx_pipe_t *monitoring_pipe; /* pointer to the monitoring pipe (capture pipe only)*/
  78. struct tasklet_struct start_tq;
  79. };
  80. struct snd_vx_ops {
  81. /* low-level i/o */
  82. unsigned char (*in8)(vx_core_t *chip, int reg);
  83. unsigned int (*in32)(vx_core_t *chip, int reg);
  84. void (*out8)(vx_core_t *chip, int reg, unsigned char val);
  85. void (*out32)(vx_core_t *chip, int reg, unsigned int val);
  86. /* irq */
  87. int (*test_and_ack)(vx_core_t *chip);
  88. void (*validate_irq)(vx_core_t *chip, int enable);
  89. /* codec */
  90. void (*write_codec)(vx_core_t *chip, int codec, unsigned int data);
  91. void (*akm_write)(vx_core_t *chip, int reg, unsigned int data);
  92. void (*reset_codec)(vx_core_t *chip);
  93. void (*change_audio_source)(vx_core_t *chip, int src);
  94. void (*set_clock_source)(vx_core_t *chp, int src);
  95. /* chip init */
  96. int (*load_dsp)(vx_core_t *chip, int idx, const struct firmware *fw);
  97. void (*reset_dsp)(vx_core_t *chip);
  98. void (*reset_board)(vx_core_t *chip, int cold_reset);
  99. int (*add_controls)(vx_core_t *chip);
  100. /* pcm */
  101. void (*dma_write)(vx_core_t *chip, snd_pcm_runtime_t *runtime,
  102. vx_pipe_t *pipe, int count);
  103. void (*dma_read)(vx_core_t *chip, snd_pcm_runtime_t *runtime,
  104. vx_pipe_t *pipe, int count);
  105. };
  106. struct snd_vx_hardware {
  107. const char *name;
  108. int type; /* VX_TYPE_XXX */
  109. /* hardware specs */
  110. unsigned int num_codecs;
  111. unsigned int num_ins;
  112. unsigned int num_outs;
  113. unsigned int output_level_max;
  114. };
  115. /* hwdep id string */
  116. #define SND_VX_HWDEP_ID "VX Loader"
  117. /* hardware type */
  118. enum {
  119. /* VX222 PCI */
  120. VX_TYPE_BOARD, /* old VX222 PCI */
  121. VX_TYPE_V2, /* VX222 V2 PCI */
  122. VX_TYPE_MIC, /* VX222 Mic PCI */
  123. /* VX-pocket */
  124. VX_TYPE_VXPOCKET, /* VXpocket V2 */
  125. VX_TYPE_VXP440, /* VXpocket 440 */
  126. VX_TYPE_NUMS
  127. };
  128. /* chip status */
  129. enum {
  130. VX_STAT_XILINX_LOADED = (1 << 0), /* devices are registered */
  131. VX_STAT_DEVICE_INIT = (1 << 1), /* devices are registered */
  132. VX_STAT_CHIP_INIT = (1 << 2), /* all operational */
  133. VX_STAT_IN_SUSPEND = (1 << 10), /* in suspend phase */
  134. VX_STAT_IS_STALE = (1 << 15) /* device is stale */
  135. };
  136. /* min/max values for analog output for old codecs */
  137. #define VX_ANALOG_OUT_LEVEL_MAX 0xe3
  138. struct snd_vx_core {
  139. /* ALSA stuff */
  140. snd_card_t *card;
  141. snd_pcm_t *pcm[VX_MAX_CODECS];
  142. int type; /* VX_TYPE_XXX */
  143. int irq;
  144. /* ports are defined externally */
  145. /* low-level functions */
  146. struct snd_vx_hardware *hw;
  147. struct snd_vx_ops *ops;
  148. spinlock_t lock;
  149. spinlock_t irq_lock;
  150. struct tasklet_struct tq;
  151. unsigned int chip_status;
  152. unsigned int pcm_running;
  153. struct device *dev;
  154. snd_hwdep_t *hwdep;
  155. struct vx_rmh irq_rmh; /* RMH used in interrupts */
  156. unsigned int audio_info; /* see VX_AUDIO_INFO */
  157. unsigned int audio_ins;
  158. unsigned int audio_outs;
  159. struct vx_pipe **playback_pipes;
  160. struct vx_pipe **capture_pipes;
  161. /* clock and audio sources */
  162. unsigned int audio_source; /* current audio input source */
  163. unsigned int audio_source_target;
  164. unsigned int clock_mode; /* clock mode (VX_CLOCK_MODE_XXX) */
  165. unsigned int clock_source; /* current clock source (INTERNAL_QUARTZ or UER_SYNC) */
  166. unsigned int freq; /* current frequency */
  167. unsigned int freq_detected; /* detected frequency from digital in */
  168. unsigned int uer_detected; /* VX_UER_MODE_XXX */
  169. unsigned int uer_bits; /* IEC958 status bits */
  170. struct vx_ibl_info ibl; /* IBL information */
  171. /* mixer setting */
  172. int output_level[VX_MAX_CODECS][2]; /* analog output level */
  173. int audio_gain[2][4]; /* digital audio level (playback/capture) */
  174. unsigned char audio_active[4]; /* mute/unmute on digital playback */
  175. int audio_monitor[4]; /* playback hw-monitor level */
  176. unsigned char audio_monitor_active[4]; /* playback hw-monitor mute/unmute */
  177. struct semaphore mixer_mutex;
  178. const struct firmware *firmware[4]; /* loaded firmware data */
  179. };
  180. /*
  181. * constructor
  182. */
  183. vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw,
  184. struct snd_vx_ops *ops, int extra_size);
  185. int snd_vx_setup_firmware(vx_core_t *chip);
  186. int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *dsp);
  187. int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *dsp);
  188. int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp);
  189. void snd_vx_free_firmware(vx_core_t *chip);
  190. /*
  191. * interrupt handler; exported for pcmcia
  192. */
  193. irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs);
  194. /*
  195. * lowlevel functions
  196. */
  197. static inline int vx_test_and_ack(vx_core_t *chip)
  198. {
  199. snd_assert(chip->ops->test_and_ack, return -ENXIO);
  200. return chip->ops->test_and_ack(chip);
  201. }
  202. static inline void vx_validate_irq(vx_core_t *chip, int enable)
  203. {
  204. snd_assert(chip->ops->validate_irq, return);
  205. chip->ops->validate_irq(chip, enable);
  206. }
  207. static inline unsigned char snd_vx_inb(vx_core_t *chip, int reg)
  208. {
  209. snd_assert(chip->ops->in8, return 0);
  210. return chip->ops->in8(chip, reg);
  211. }
  212. static inline unsigned int snd_vx_inl(vx_core_t *chip, int reg)
  213. {
  214. snd_assert(chip->ops->in32, return 0);
  215. return chip->ops->in32(chip, reg);
  216. }
  217. static inline void snd_vx_outb(vx_core_t *chip, int reg, unsigned char val)
  218. {
  219. snd_assert(chip->ops->out8, return);
  220. chip->ops->out8(chip, reg, val);
  221. }
  222. static inline void snd_vx_outl(vx_core_t *chip, int reg, unsigned int val)
  223. {
  224. snd_assert(chip->ops->out32, return);
  225. chip->ops->out32(chip, reg, val);
  226. }
  227. #define vx_inb(chip,reg) snd_vx_inb(chip, VX_##reg)
  228. #define vx_outb(chip,reg,val) snd_vx_outb(chip, VX_##reg,val)
  229. #define vx_inl(chip,reg) snd_vx_inl(chip, VX_##reg)
  230. #define vx_outl(chip,reg,val) snd_vx_outl(chip, VX_##reg,val)
  231. void snd_vx_delay(vx_core_t *chip, int msec);
  232. static inline void vx_reset_dsp(vx_core_t *chip)
  233. {
  234. snd_assert(chip->ops->reset_dsp, return);
  235. chip->ops->reset_dsp(chip);
  236. }
  237. int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh);
  238. int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh);
  239. int vx_send_rih(vx_core_t *chip, int cmd);
  240. int vx_send_rih_nolock(vx_core_t *chip, int cmd);
  241. void vx_reset_codec(vx_core_t *chip, int cold_reset);
  242. /*
  243. * check the bit on the specified register
  244. * returns zero if a bit matches, or a negative error code.
  245. * exported for vxpocket driver
  246. */
  247. int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time);
  248. #define vx_check_isr(chip,mask,bit,time) snd_vx_check_reg_bit(chip, VX_ISR, mask, bit, time)
  249. #define vx_wait_isr_bit(chip,bit) vx_check_isr(chip, bit, bit, 200)
  250. #define vx_wait_for_rx_full(chip) vx_wait_isr_bit(chip, ISR_RX_FULL)
  251. /*
  252. * pseudo-DMA transfer
  253. */
  254. static inline void vx_pseudo_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime,
  255. vx_pipe_t *pipe, int count)
  256. {
  257. snd_assert(chip->ops->dma_write, return);
  258. chip->ops->dma_write(chip, runtime, pipe, count);
  259. }
  260. static inline void vx_pseudo_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime,
  261. vx_pipe_t *pipe, int count)
  262. {
  263. snd_assert(chip->ops->dma_read, return);
  264. chip->ops->dma_read(chip, runtime, pipe, count);
  265. }
  266. /* error with hardware code,
  267. * the return value is -(VX_ERR_MASK | actual-hw-error-code)
  268. */
  269. #define VX_ERR_MASK 0x1000000
  270. #define vx_get_error(err) (-(err) & ~VX_ERR_MASK)
  271. /*
  272. * pcm stuff
  273. */
  274. int snd_vx_pcm_new(vx_core_t *chip);
  275. void vx_pcm_update_intr(vx_core_t *chip, unsigned int events);
  276. /*
  277. * mixer stuff
  278. */
  279. int snd_vx_mixer_new(vx_core_t *chip);
  280. void vx_toggle_dac_mute(vx_core_t *chip, int mute);
  281. int vx_sync_audio_source(vx_core_t *chip);
  282. int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active);
  283. /*
  284. * IEC958 & clock stuff
  285. */
  286. void vx_set_iec958_status(vx_core_t *chip, unsigned int bits);
  287. int vx_set_clock(vx_core_t *chip, unsigned int freq);
  288. void vx_set_internal_clock(vx_core_t *chip, unsigned int freq);
  289. int vx_change_frequency(vx_core_t *chip);
  290. /*
  291. * hardware constants
  292. */
  293. #define vx_has_new_dsp(chip) ((chip)->type != VX_TYPE_BOARD)
  294. #define vx_is_pcmcia(chip) ((chip)->type >= VX_TYPE_VXPOCKET)
  295. /* audio input source */
  296. enum {
  297. VX_AUDIO_SRC_DIGITAL,
  298. VX_AUDIO_SRC_LINE,
  299. VX_AUDIO_SRC_MIC
  300. };
  301. /* clock source */
  302. enum {
  303. INTERNAL_QUARTZ,
  304. UER_SYNC
  305. };
  306. /* clock mode */
  307. enum {
  308. VX_CLOCK_MODE_AUTO, /* depending on the current audio source */
  309. VX_CLOCK_MODE_INTERNAL, /* fixed to internal quartz */
  310. VX_CLOCK_MODE_EXTERNAL /* fixed to UER sync */
  311. };
  312. /* SPDIF/UER type */
  313. enum {
  314. VX_UER_MODE_CONSUMER,
  315. VX_UER_MODE_PROFESSIONAL,
  316. VX_UER_MODE_NOT_PRESENT,
  317. };
  318. /* register indices */
  319. enum {
  320. VX_ICR,
  321. VX_CVR,
  322. VX_ISR,
  323. VX_IVR,
  324. VX_RXH,
  325. VX_TXH = VX_RXH,
  326. VX_RXM,
  327. VX_TXM = VX_RXM,
  328. VX_RXL,
  329. VX_TXL = VX_RXL,
  330. VX_DMA,
  331. VX_CDSP,
  332. VX_RFREQ,
  333. VX_RUER_V2,
  334. VX_GAIN,
  335. VX_DATA = VX_GAIN,
  336. VX_MEMIRQ,
  337. VX_ACQ,
  338. VX_BIT0,
  339. VX_BIT1,
  340. VX_MIC0,
  341. VX_MIC1,
  342. VX_MIC2,
  343. VX_MIC3,
  344. VX_PLX0,
  345. VX_PLX1,
  346. VX_PLX2,
  347. VX_LOFREQ, // V2: ACQ, VP: RFREQ
  348. VX_HIFREQ, // V2: BIT0, VP: RUER_V2
  349. VX_CSUER, // V2: BIT1, VP: BIT0
  350. VX_RUER, // V2: RUER_V2, VP: BIT1
  351. VX_REG_MAX,
  352. /* aliases for VX board */
  353. VX_RESET_DMA = VX_ISR,
  354. VX_CFG = VX_RFREQ,
  355. VX_STATUS = VX_MEMIRQ,
  356. VX_SELMIC = VX_MIC0,
  357. VX_COMPOT = VX_MIC1,
  358. VX_SCOMPR = VX_MIC2,
  359. VX_GLIMIT = VX_MIC3,
  360. VX_INTCSR = VX_PLX0,
  361. VX_CNTRL = VX_PLX1,
  362. VX_GPIOC = VX_PLX2,
  363. /* aliases for VXPOCKET board */
  364. VX_MICRO = VX_MEMIRQ,
  365. VX_CODEC2 = VX_MEMIRQ,
  366. VX_DIALOG = VX_ACQ,
  367. };
  368. /* RMH status type */
  369. enum {
  370. RMH_SSIZE_FIXED = 0, /* status size given by the driver (in LgStat) */
  371. RMH_SSIZE_ARG = 1, /* status size given in the LSB byte */
  372. RMH_SSIZE_MASK = 2, /* status size given in bitmask */
  373. };
  374. /* bits for ICR register */
  375. #define ICR_HF1 0x10
  376. #define ICR_HF0 0x08
  377. #define ICR_TREQ 0x02 /* Interrupt mode + HREQ set on for transfer (->DSP) request */
  378. #define ICR_RREQ 0x01 /* Interrupt mode + RREQ set on for transfer (->PC) request */
  379. /* bits for CVR register */
  380. #define CVR_HC 0x80
  381. /* bits for ISR register */
  382. #define ISR_HF3 0x10
  383. #define ISR_HF2 0x08
  384. #define ISR_CHK 0x10
  385. #define ISR_ERR 0x08
  386. #define ISR_TX_READY 0x04
  387. #define ISR_TX_EMPTY 0x02
  388. #define ISR_RX_FULL 0x01
  389. /* Constants used to access the DATA register */
  390. #define VX_DATA_CODEC_MASK 0x80
  391. #define VX_DATA_XICOR_MASK 0x80
  392. /* Constants used to access the CSUER register (both for VX2 and VXP) */
  393. #define VX_SUER_FREQ_MASK 0x0c
  394. #define VX_SUER_FREQ_32KHz_MASK 0x0c
  395. #define VX_SUER_FREQ_44KHz_MASK 0x00
  396. #define VX_SUER_FREQ_48KHz_MASK 0x04
  397. #define VX_SUER_DATA_PRESENT_MASK 0x02
  398. #define VX_SUER_CLOCK_PRESENT_MASK 0x01
  399. #define VX_CUER_HH_BITC_SEL_MASK 0x08
  400. #define VX_CUER_MH_BITC_SEL_MASK 0x04
  401. #define VX_CUER_ML_BITC_SEL_MASK 0x02
  402. #define VX_CUER_LL_BITC_SEL_MASK 0x01
  403. #define XX_UER_CBITS_OFFSET_MASK 0x1f
  404. /* bits for audio_info */
  405. #define VX_AUDIO_INFO_REAL_TIME (1<<0) /* real-time processing available */
  406. #define VX_AUDIO_INFO_OFFLINE (1<<1) /* offline processing available */
  407. #define VX_AUDIO_INFO_MPEG1 (1<<5)
  408. #define VX_AUDIO_INFO_MPEG2 (1<<6)
  409. #define VX_AUDIO_INFO_LINEAR_8 (1<<7)
  410. #define VX_AUDIO_INFO_LINEAR_16 (1<<8)
  411. #define VX_AUDIO_INFO_LINEAR_24 (1<<9)
  412. /* DSP Interrupt Request values */
  413. #define VXP_IRQ_OFFSET 0x40 /* add 0x40 offset for vxpocket and vx222/v2 */
  414. /* call with vx_send_irq_dsp() */
  415. #define IRQ_MESS_WRITE_END 0x30
  416. #define IRQ_MESS_WRITE_NEXT 0x32
  417. #define IRQ_MESS_READ_NEXT 0x34
  418. #define IRQ_MESS_READ_END 0x36
  419. #define IRQ_MESSAGE 0x38
  420. #define IRQ_RESET_CHK 0x3A
  421. #define IRQ_CONNECT_STREAM_NEXT 0x26
  422. #define IRQ_CONNECT_STREAM_END 0x28
  423. #define IRQ_PAUSE_START_CONNECT 0x2A
  424. #define IRQ_END_CONNECTION 0x2C
  425. /* Is there async. events pending ( IT Source Test ) */
  426. #define ASYNC_EVENTS_PENDING 0x008000
  427. #define HBUFFER_EVENTS_PENDING 0x004000 // Not always accurate
  428. #define NOTIF_EVENTS_PENDING 0x002000
  429. #define TIME_CODE_EVENT_PENDING 0x001000
  430. #define FREQUENCY_CHANGE_EVENT_PENDING 0x000800
  431. #define END_OF_BUFFER_EVENTS_PENDING 0x000400
  432. #define FATAL_DSP_ERROR 0xff0000
  433. /* Stream Format Header Defines */
  434. #define HEADER_FMT_BASE 0xFED00000
  435. #define HEADER_FMT_MONO 0x000000C0
  436. #define HEADER_FMT_INTEL 0x00008000
  437. #define HEADER_FMT_16BITS 0x00002000
  438. #define HEADER_FMT_24BITS 0x00004000
  439. #define HEADER_FMT_UPTO11 0x00000200 /* frequency is less or equ. to 11k.*/
  440. #define HEADER_FMT_UPTO32 0x00000100 /* frequency is over 11k and less then 32k.*/
  441. /* Constants used to access the Codec */
  442. #define XX_CODEC_SELECTOR 0x20
  443. /* codec commands */
  444. #define XX_CODEC_ADC_CONTROL_REGISTER 0x01
  445. #define XX_CODEC_DAC_CONTROL_REGISTER 0x02
  446. #define XX_CODEC_LEVEL_LEFT_REGISTER 0x03
  447. #define XX_CODEC_LEVEL_RIGHT_REGISTER 0x04
  448. #define XX_CODEC_PORT_MODE_REGISTER 0x05
  449. #define XX_CODEC_STATUS_REPORT_REGISTER 0x06
  450. #define XX_CODEC_CLOCK_CONTROL_REGISTER 0x07
  451. /*
  452. * Audio-level control values
  453. */
  454. #define CVAL_M110DB 0x000 /* -110dB */
  455. #define CVAL_M99DB 0x02C
  456. #define CVAL_M21DB 0x163
  457. #define CVAL_M18DB 0x16F
  458. #define CVAL_M10DB 0x18F
  459. #define CVAL_0DB 0x1B7
  460. #define CVAL_18DB 0x1FF /* +18dB */
  461. #define CVAL_MAX 0x1FF
  462. #define AUDIO_IO_HAS_MUTE_LEVEL 0x400000
  463. #define AUDIO_IO_HAS_MUTE_MONITORING_1 0x200000
  464. #define AUDIO_IO_HAS_MUTE_MONITORING_2 0x100000
  465. #define VALID_AUDIO_IO_DIGITAL_LEVEL 0x01
  466. #define VALID_AUDIO_IO_MONITORING_LEVEL 0x02
  467. #define VALID_AUDIO_IO_MUTE_LEVEL 0x04
  468. #define VALID_AUDIO_IO_MUTE_MONITORING_1 0x08
  469. #define VALID_AUDIO_IO_MUTE_MONITORING_2 0x10
  470. #endif /* __SOUND_VX_COMMON_H */