hoontech.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. extern struct snd_ice1712_card_info snd_ice1712_hoontech_cards[];
  35. /* Hoontech SoundTrack Audio DSP 24 GPIO definitions */
  36. #define ICE1712_STDSP24_0_BOX(r, x) r[0] = ((r[0] & ~3) | ((x)&3))
  37. #define ICE1712_STDSP24_0_DAREAR(r, x) r[0] = ((r[0] & ~4) | (((x)&1)<<2))
  38. #define ICE1712_STDSP24_1_CHN1(r, x) r[1] = ((r[1] & ~1) | ((x)&1))
  39. #define ICE1712_STDSP24_1_CHN2(r, x) r[1] = ((r[1] & ~2) | (((x)&1)<<1))
  40. #define ICE1712_STDSP24_1_CHN3(r, x) r[1] = ((r[1] & ~4) | (((x)&1)<<2))
  41. #define ICE1712_STDSP24_2_CHN4(r, x) r[2] = ((r[2] & ~1) | ((x)&1))
  42. #define ICE1712_STDSP24_2_MIDIIN(r, x) r[2] = ((r[2] & ~2) | (((x)&1)<<1))
  43. #define ICE1712_STDSP24_2_MIDI1(r, x) r[2] = ((r[2] & ~4) | (((x)&1)<<2))
  44. #define ICE1712_STDSP24_3_MIDI2(r, x) r[3] = ((r[3] & ~1) | ((x)&1))
  45. #define ICE1712_STDSP24_3_MUTE(r, x) r[3] = ((r[3] & ~2) | (((x)&1)<<1))
  46. #define ICE1712_STDSP24_3_INSEL(r, x) r[3] = ((r[3] & ~4) | (((x)&1)<<2))
  47. #define ICE1712_STDSP24_SET_ADDR(r, a) r[a&3] = ((r[a&3] & ~0x18) | (((a)&3)<<3))
  48. #define ICE1712_STDSP24_CLOCK(r, a, c) r[a&3] = ((r[a&3] & ~0x20) | (((c)&1)<<5))
  49. #define ICE1712_STDSP24_CLOCK_BIT (1<<5)
  50. /* Hoontech SoundTrack Audio DSP 24 box configuration definitions */
  51. #define ICE1712_STDSP24_DAREAR (1<<0)
  52. #define ICE1712_STDSP24_MUTE (1<<1)
  53. #define ICE1712_STDSP24_INSEL (1<<2)
  54. #define ICE1712_STDSP24_BOX_CHN1 (1<<0) /* input channel 1 */
  55. #define ICE1712_STDSP24_BOX_CHN2 (1<<1) /* input channel 2 */
  56. #define ICE1712_STDSP24_BOX_CHN3 (1<<2) /* input channel 3 */
  57. #define ICE1712_STDSP24_BOX_CHN4 (1<<3) /* input channel 4 */
  58. #define ICE1712_STDSP24_BOX_MIDI1 (1<<8)
  59. #define ICE1712_STDSP24_BOX_MIDI2 (1<<9)
  60. /* Hoontech SoundTrack Audio DSP 24 Value definitions for modified hardware */
  61. #define ICE1712_STDSP24_AK4524_CS 0x03 /* AK4524 chip select; low = active */
  62. #define ICE1712_STDSP24_SERIAL_DATA 0x0c /* ak4524 data */
  63. #define ICE1712_STDSP24_SERIAL_CLOCK 0x30 /* ak4524 clock */
  64. #endif /* __SOUND_HOONTECH_H */