hoontech.h 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #ifndef __SOUND_HOONTECH_H
  2. #define __SOUND_HOONTECH_H
  3. /*
  4. * ALSA driver for ICEnsemble ICE1712 (Envy24)
  5. *
  6. * Lowlevel functions for Hoontech STDSP24
  7. *
  8. * Copyright (c) 2000 Jaroslav Kysela <perex@perex.cz>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. *
  24. */
  25. #define HOONTECH_DEVICE_DESC \
  26. "{Hoontech,SoundTrack DSP 24}," \
  27. "{Hoontech,SoundTrack DSP 24 Value}," \
  28. "{Hoontech,SoundTrack DSP 24 Media 7.1}," \
  29. "{Event Electronics,EZ8},"
  30. #define ICE1712_SUBDEVICE_STDSP24 0x12141217 /* Hoontech SoundTrack Audio DSP 24 */
  31. #define ICE1712_SUBDEVICE_STDSP24_VALUE 0x00010010 /* A dummy id for Hoontech SoundTrack Audio DSP 24 Value */
  32. #define ICE1712_SUBDEVICE_STDSP24_MEDIA7_1 0x16141217 /* Hoontech ST Audio DSP24 Media 7.1 */
  33. #define ICE1712_SUBDEVICE_EVENT_EZ8 0x00010001 /* A dummy id for EZ8 */
  34. #define ICE1712_SUBDEVICE_STAUDIO_ADCIII 0x00010002 /* A dummy id for STAudio ADCIII */
  35. extern struct snd_ice1712_card_info snd_ice1712_hoontech_cards[];
  36. /* Hoontech SoundTrack Audio DSP 24 GPIO definitions */
  37. #define ICE1712_STDSP24_0_BOX(r, x) r[0] = ((r[0] & ~3) | ((x)&3))
  38. #define ICE1712_STDSP24_0_DAREAR(r, x) r[0] = ((r[0] & ~4) | (((x)&1)<<2))
  39. #define ICE1712_STDSP24_1_CHN1(r, x) r[1] = ((r[1] & ~1) | ((x)&1))
  40. #define ICE1712_STDSP24_1_CHN2(r, x) r[1] = ((r[1] & ~2) | (((x)&1)<<1))
  41. #define ICE1712_STDSP24_1_CHN3(r, x) r[1] = ((r[1] & ~4) | (((x)&1)<<2))
  42. #define ICE1712_STDSP24_2_CHN4(r, x) r[2] = ((r[2] & ~1) | ((x)&1))
  43. #define ICE1712_STDSP24_2_MIDIIN(r, x) r[2] = ((r[2] & ~2) | (((x)&1)<<1))
  44. #define ICE1712_STDSP24_2_MIDI1(r, x) r[2] = ((r[2] & ~4) | (((x)&1)<<2))
  45. #define ICE1712_STDSP24_3_MIDI2(r, x) r[3] = ((r[3] & ~1) | ((x)&1))
  46. #define ICE1712_STDSP24_3_MUTE(r, x) r[3] = ((r[3] & ~2) | (((x)&1)<<1))
  47. #define ICE1712_STDSP24_3_INSEL(r, x) r[3] = ((r[3] & ~4) | (((x)&1)<<2))
  48. #define ICE1712_STDSP24_SET_ADDR(r, a) r[a&3] = ((r[a&3] & ~0x18) | (((a)&3)<<3))
  49. #define ICE1712_STDSP24_CLOCK(r, a, c) r[a&3] = ((r[a&3] & ~0x20) | (((c)&1)<<5))
  50. #define ICE1712_STDSP24_CLOCK_BIT (1<<5)
  51. /* Hoontech SoundTrack Audio DSP 24 box configuration definitions */
  52. #define ICE1712_STDSP24_DAREAR (1<<0)
  53. #define ICE1712_STDSP24_MUTE (1<<1)
  54. #define ICE1712_STDSP24_INSEL (1<<2)
  55. #define ICE1712_STDSP24_BOX_CHN1 (1<<0) /* input channel 1 */
  56. #define ICE1712_STDSP24_BOX_CHN2 (1<<1) /* input channel 2 */
  57. #define ICE1712_STDSP24_BOX_CHN3 (1<<2) /* input channel 3 */
  58. #define ICE1712_STDSP24_BOX_CHN4 (1<<3) /* input channel 4 */
  59. #define ICE1712_STDSP24_BOX_MIDI1 (1<<8)
  60. #define ICE1712_STDSP24_BOX_MIDI2 (1<<9)
  61. /* Hoontech SoundTrack Audio DSP 24 Value definitions for modified hardware */
  62. #define ICE1712_STDSP24_AK4524_CS 0x03 /* AK4524 chip select; low = active */
  63. #define ICE1712_STDSP24_SERIAL_DATA 0x0c /* ak4524 data */
  64. #define ICE1712_STDSP24_SERIAL_CLOCK 0x30 /* ak4524 clock */
  65. #endif /* __SOUND_HOONTECH_H */