#ifndef __SOUND_ES1688_H #define __SOUND_ES1688_H /* * Header file for ES488/ES1688 * Copyright (c) by Jaroslav Kysela * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include #define ES1688_HW_AUTO 0x0000 #define ES1688_HW_688 0x0001 #define ES1688_HW_1688 0x0002 #define ES1688_HW_UNDEF 0x0003 struct snd_es1688 { unsigned long port; /* port of ESS chip */ struct resource *res_port; unsigned long mpu_port; /* MPU-401 port of ESS chip */ int irq; /* IRQ number of ESS chip */ int mpu_irq; /* MPU IRQ */ int dma8; /* 8-bit DMA */ unsigned short version; /* version of ESS chip */ unsigned short hardware; /* see to ES1688_HW_XXXX */ unsigned short trigger_value; unsigned char pad; unsigned int dma_size; struct snd_pcm *pcm; struct snd_pcm_substream *playback_substream; struct snd_pcm_substream *capture_substream; spinlock_t reg_lock; spinlock_t mixer_lock; }; /* I/O ports */ #define ES1688P(codec, x) ((codec)->port + e_s_s_ESS1688##x) #define e_s_s_ESS1688RESET 0x6 #define e_s_s_ESS1688READ 0xa #define e_s_s_ESS1688WRITE 0xc #define e_s_s_ESS1688COMMAND 0xc #define e_s_s_ESS1688STATUS 0xc #define e_s_s_ESS1688DATA_AVAIL 0xe #define e_s_s_ESS1688DATA_AVAIL_16 0xf #define e_s_s_ESS1688MIXER_ADDR 0x4 #define e_s_s_ESS1688MIXER_DATA 0x5 #define e_s_s_ESS1688OPL3_LEFT 0x0 #define e_s_s_ESS1688OPL3_RIGHT 0x2 #define e_s_s_ESS1688OPL3_BOTH 0x8 #define e_s_s_ESS1688ENABLE0 0x0 #define e_s_s_ESS1688ENABLE1 0x9 #define e_s_s_ESS1688ENABLE2 0xb #define e_s_s_ESS1688INIT1 0x7 #define ES1688_DSP_CMD_DMAOFF 0xd0 #define ES1688_DSP_CMD_SPKON 0xd1 #define ES1688_DSP_CMD_SPKOFF 0xd3 #define ES1688_DSP_CMD_DMAON 0xd4 #define ES1688_PCM_DEV 0x14 #define ES1688_MIC_DEV 0x1a #define ES1688_REC_DEV 0x1c #define ES1688_MASTER_DEV 0x32 #define ES1688_FM_DEV 0x36 #define ES1688_CD_DEV 0x38 #define ES1688_AUX_DEV 0x3a #define ES1688_SPEAKER_DEV 0x3c #define ES1688_LINE_DEV 0x3e #define ES1688_RECLEV_DEV 0xb4 #define ES1688_MIXS_MASK 0x17 #define ES1688_MIXS_MIC 0x00 #define ES1688_MIXS_MIC_MASTER 0x01 #define ES1688_MIXS_CD 0x02 #define ES1688_MIXS_AOUT 0x03 #define ES1688_MIXS_MIC1 0x04 #define ES1688_MIXS_REC_MIX 0x05 #define ES1688_MIXS_LINE 0x06 #define ES1688_MIXS_MASTER 0x07 #define ES1688_MIXS_MUTE 0x10 /* */ void snd_es1688_mixer_write(struct snd_es1688 *chip, unsigned char reg, unsigned char data); int snd_es1688_create(struct snd_card *card, struct snd_es1688 *chip, unsigned long port, unsigned long mpu_port, int irq, int mpu_irq, int dma8, unsigned short hardware); int snd_es1688_pcm(struct snd_card *card, struct snd_es1688 *chip, int device); int snd_es1688_mixer(struct snd_card *card, struct snd_es1688 *chip); int snd_es1688_reset(struct snd_es1688 *chip); #endif /* __SOUND_ES1688_H */ ls-mode'>-rw-r--r--aci.h2419logplain -rw-r--r--ad1816a.h5514logplain -rw-r--r--ad1843.h1516logplain -rw-r--r--adau1373.h699logplain -rw-r--r--aess.h1668logplain -rw-r--r--ak4113.h11112logplain -rw-r--r--ak4114.h10424logplain -rw-r--r--ak4117.h9193logplain -rw-r--r--ak4531_codec.h3173logplain -rw-r--r--ak4641.h622logplain -rw-r--r--ak4xxx-adda.h3416logplain -rw-r--r--alc5623.h497logplain -rw-r--r--asequencer.h3670logplain -rw-r--r--asound.h1285logplain -rw-r--r--asoundef.h17098logplain -rw-r--r--atmel-abdac.h639logplain -rw-r--r--atmel-ac97c.h1342logplain -rw-r--r--compress_driver.h6772logplain -rw-r--r--control.h8704logplain -rw-r--r--core.h14380logplain -rw-r--r--cs35l33.h1034logplain -rw-r--r--cs35l34.h887logplain -rw-r--r--cs4231-regs.h8480logplain -rw-r--r--cs4271.h1417logplain -rw-r--r--cs42l52.h738logplain -rw-r--r--cs42l56.h1192logplain -rw-r--r--cs42l73.h507logplain -rw-r--r--cs8403.h8833logplain -rw-r--r--cs8427.h10649logplain -rw-r--r--da7213.h1178logplain -rw-r--r--da7218.h2681logplain -rw-r--r--da7219-aad.h2476logplain -rw-r--r--da7219.h1064logplain -rw-r--r--da9055.h914logplain -rw-r--r--designware_i2s.h2249logplain -rw-r--r--dmaengine_pcm.h6157logplain -rw-r--r--emu10k1.h91396logplain -rw-r--r--emu10k1_synth.h1382logplain -rw-r--r--emu8000.h4109logplain -rw-r--r--emu8000_reg.h10459logplain -rw-r--r--emux_legacy.h5503logplain -rw-r--r--emux_synth.h7649logplain -rw-r--r--es1688.h3618logplain -rw-r--r--gus.h20691logplain -rw-r--r--hda_chmap.h2621logplain -rw-r--r--hda_hwdep.h1412logplain -rw-r--r--hda_i915.h1645logplain -rw-r--r--hda_register.h9475logplain -rw-r--r--hda_regmap.h6714logplain -rw-r--r--hda_verbs.h17130logplain -rw-r--r--hdaudio.h18455logplain -rw-r--r--hdaudio_ext.h7119logplain -rw-r--r--hdmi-codec.h2290logplain -rw-r--r--hwdep.h2624logplain -rw-r--r--i2c.h3555logplain -rw-r--r--info.h7584logplain