linux/include/sound/es1688.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __SOUND_ES1688_H
#define __SOUND_ES1688_H

/*
 *  Header file for ES488/ES1688
 *  Copyright (c) by Jaroslav Kysela <[email protected]>
 */

#include <sound/control.h>
#include <sound/pcm.h>
#include <linux/interrupt.h>

#define ES1688_HW_AUTO
#define ES1688_HW_688
#define ES1688_HW_1688
#define ES1688_HW_UNDEF

struct snd_es1688 {};

/* I/O ports */

#define ES1688P(codec, x)

#define e_s_s_ESS1688RESET
#define e_s_s_ESS1688READ
#define e_s_s_ESS1688WRITE
#define e_s_s_ESS1688COMMAND
#define e_s_s_ESS1688STATUS
#define e_s_s_ESS1688DATA_AVAIL
#define e_s_s_ESS1688DATA_AVAIL_16
#define e_s_s_ESS1688MIXER_ADDR
#define e_s_s_ESS1688MIXER_DATA
#define e_s_s_ESS1688OPL3_LEFT
#define e_s_s_ESS1688OPL3_RIGHT
#define e_s_s_ESS1688OPL3_BOTH
#define e_s_s_ESS1688ENABLE0
#define e_s_s_ESS1688ENABLE1
#define e_s_s_ESS1688ENABLE2
#define e_s_s_ESS1688INIT1

#define ES1688_DSP_CMD_DMAOFF
#define ES1688_DSP_CMD_SPKON
#define ES1688_DSP_CMD_SPKOFF
#define ES1688_DSP_CMD_DMAON

#define ES1688_PCM_DEV
#define ES1688_MIC_DEV
#define ES1688_REC_DEV
#define ES1688_MASTER_DEV
#define ES1688_FM_DEV
#define ES1688_CD_DEV
#define ES1688_AUX_DEV
#define ES1688_SPEAKER_DEV
#define ES1688_LINE_DEV
#define ES1688_RECLEV_DEV

#define ES1688_MIXS_MASK
#define ES1688_MIXS_MIC
#define ES1688_MIXS_MIC_MASTER
#define ES1688_MIXS_CD
#define ES1688_MIXS_AOUT
#define ES1688_MIXS_MIC1
#define ES1688_MIXS_REC_MIX
#define ES1688_MIXS_LINE
#define ES1688_MIXS_MASTER
#define ES1688_MIXS_MUTE

/*

 */

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 */