11da177e4SLinus Torvalds #ifndef __SOUND_EWS_H 21da177e4SLinus Torvalds #define __SOUND_EWS_H 31da177e4SLinus Torvalds 41da177e4SLinus Torvalds /* 51da177e4SLinus Torvalds * ALSA driver for ICEnsemble ICE1712 (Envy24) 61da177e4SLinus Torvalds * 71da177e4SLinus Torvalds * Lowlevel functions for Terratec EWS88MT/D, EWX24/96, DMX 6Fire 81da177e4SLinus Torvalds * 91da177e4SLinus Torvalds * Copyright (c) 2000 Jaroslav Kysela <perex@suse.cz> 101da177e4SLinus Torvalds * 2002 Takashi Iwai <tiwai@suse.de> 111da177e4SLinus Torvalds * 121da177e4SLinus Torvalds * This program is free software; you can redistribute it and/or modify 131da177e4SLinus Torvalds * it under the terms of the GNU General Public License as published by 141da177e4SLinus Torvalds * the Free Software Foundation; either version 2 of the License, or 151da177e4SLinus Torvalds * (at your option) any later version. 161da177e4SLinus Torvalds * 171da177e4SLinus Torvalds * This program is distributed in the hope that it will be useful, 181da177e4SLinus Torvalds * but WITHOUT ANY WARRANTY; without even the implied warranty of 191da177e4SLinus Torvalds * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 201da177e4SLinus Torvalds * GNU General Public License for more details. 211da177e4SLinus Torvalds * 221da177e4SLinus Torvalds * You should have received a copy of the GNU General Public License 231da177e4SLinus Torvalds * along with this program; if not, write to the Free Software 241da177e4SLinus Torvalds * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 251da177e4SLinus Torvalds * 261da177e4SLinus Torvalds */ 271da177e4SLinus Torvalds 281da177e4SLinus Torvalds #define EWS_DEVICE_DESC \ 291da177e4SLinus Torvalds "{TerraTec,EWX 24/96},"\ 301da177e4SLinus Torvalds "{TerraTec,EWS 88MT},"\ 311da177e4SLinus Torvalds "{TerraTec,EWS 88D},"\ 321da177e4SLinus Torvalds "{TerraTec,DMX 6Fire},"\ 331da177e4SLinus Torvalds "{TerraTec,Phase 88}," 341da177e4SLinus Torvalds 351da177e4SLinus Torvalds #define ICE1712_SUBDEVICE_EWX2496 0x3b153011 361da177e4SLinus Torvalds #define ICE1712_SUBDEVICE_EWS88MT 0x3b151511 371da177e4SLinus Torvalds #define ICE1712_SUBDEVICE_EWS88MT_NEW 0x3b152511 381da177e4SLinus Torvalds #define ICE1712_SUBDEVICE_EWS88D 0x3b152b11 391da177e4SLinus Torvalds #define ICE1712_SUBDEVICE_DMX6FIRE 0x3b153811 401da177e4SLinus Torvalds #define ICE1712_SUBDEVICE_PHASE88 0x3b155111 411da177e4SLinus Torvalds 421da177e4SLinus Torvalds /* entry point */ 43*bf748ed7SRalf Baechle extern struct snd_ice1712_card_info snd_ice1712_ews_cards[]; 441da177e4SLinus Torvalds 451da177e4SLinus Torvalds 461da177e4SLinus Torvalds /* TerraTec EWX 24/96 configuration definitions */ 471da177e4SLinus Torvalds 481da177e4SLinus Torvalds #define ICE1712_EWX2496_AK4524_CS 0x01 /* AK4524 chip select; low = active */ 491da177e4SLinus Torvalds #define ICE1712_EWX2496_AIN_SEL 0x02 /* input sensitivity switch; high = louder */ 501da177e4SLinus Torvalds #define ICE1712_EWX2496_AOUT_SEL 0x04 /* output sensitivity switch; high = louder */ 511da177e4SLinus Torvalds #define ICE1712_EWX2496_RW 0x08 /* read/write switch for i2c; high = write */ 521da177e4SLinus Torvalds #define ICE1712_EWX2496_SERIAL_DATA 0x10 /* i2c & ak4524 data */ 531da177e4SLinus Torvalds #define ICE1712_EWX2496_SERIAL_CLOCK 0x20 /* i2c & ak4524 clock */ 541da177e4SLinus Torvalds #define ICE1712_EWX2496_TX2 0x40 /* MIDI2 (not used) */ 551da177e4SLinus Torvalds #define ICE1712_EWX2496_RX2 0x80 /* MIDI2 (not used) */ 561da177e4SLinus Torvalds 571da177e4SLinus Torvalds /* TerraTec EWS 88MT/D configuration definitions */ 581da177e4SLinus Torvalds /* RW, SDA snd SCLK are identical with EWX24/96 */ 591da177e4SLinus Torvalds #define ICE1712_EWS88_CS8414_RATE 0x07 /* CS8414 sample rate: gpio 0-2 */ 601da177e4SLinus Torvalds #define ICE1712_EWS88_RW 0x08 /* read/write switch for i2c; high = write */ 611da177e4SLinus Torvalds #define ICE1712_EWS88_SERIAL_DATA 0x10 /* i2c & ak4524 data */ 621da177e4SLinus Torvalds #define ICE1712_EWS88_SERIAL_CLOCK 0x20 /* i2c & ak4524 clock */ 631da177e4SLinus Torvalds #define ICE1712_EWS88_TX2 0x40 /* MIDI2 (only on 88D) */ 641da177e4SLinus Torvalds #define ICE1712_EWS88_RX2 0x80 /* MIDI2 (only on 88D) */ 651da177e4SLinus Torvalds 661da177e4SLinus Torvalds /* i2c address */ 671da177e4SLinus Torvalds #define ICE1712_EWS88MT_CS8404_ADDR (0x40>>1) 681da177e4SLinus Torvalds #define ICE1712_EWS88MT_INPUT_ADDR (0x46>>1) 691da177e4SLinus Torvalds #define ICE1712_EWS88MT_OUTPUT_ADDR (0x48>>1) 701da177e4SLinus Torvalds #define ICE1712_EWS88MT_OUTPUT_SENSE 0x40 /* mask */ 711da177e4SLinus Torvalds #define ICE1712_EWS88D_PCF_ADDR (0x40>>1) 721da177e4SLinus Torvalds 731da177e4SLinus Torvalds /* TerraTec DMX 6Fire configuration definitions */ 741da177e4SLinus Torvalds #define ICE1712_6FIRE_AK4524_CS_MASK 0x07 /* AK4524 chip select #1-#3 */ 751da177e4SLinus Torvalds #define ICE1712_6FIRE_RW 0x08 /* read/write switch for i2c; high = write */ 761da177e4SLinus Torvalds #define ICE1712_6FIRE_SERIAL_DATA 0x10 /* i2c & ak4524 data */ 771da177e4SLinus Torvalds #define ICE1712_6FIRE_SERIAL_CLOCK 0x20 /* i2c & ak4524 clock */ 781da177e4SLinus Torvalds #define ICE1712_6FIRE_TX2 0x40 /* MIDI2 */ 791da177e4SLinus Torvalds #define ICE1712_6FIRE_RX2 0x80 /* MIDI2 */ 801da177e4SLinus Torvalds 811da177e4SLinus Torvalds #define ICE1712_6FIRE_PCF9554_ADDR (0x40>>1) 821da177e4SLinus Torvalds #define ICE1712_6FIRE_CS8427_ADDR (0x22) 831da177e4SLinus Torvalds 841da177e4SLinus Torvalds #endif /* __SOUND_EWS_H */ 85