linux/sound/pci/cs5535audio/cs5535audio.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __SOUND_CS5535AUDIO_H
#define __SOUND_CS5535AUDIO_H

#define cs_writel(cs5535au, reg, val)
#define cs_writeb(cs5535au, reg, val)
#define cs_readl(cs5535au, reg)
#define cs_readw(cs5535au, reg)
#define cs_readb(cs5535au, reg)

#define CS5535AUDIO_MAX_DESCRIPTORS

/* acc_codec bar0 reg addrs */
#define ACC_GPIO_STATUS
#define ACC_CODEC_STATUS
#define ACC_CODEC_CNTL
#define ACC_IRQ_STATUS
#define ACC_BM0_CMD
#define ACC_BM1_CMD
#define ACC_BM0_PRD
#define ACC_BM1_PRD
#define ACC_BM0_STATUS
#define ACC_BM1_STATUS
#define ACC_BM0_PNTR
#define ACC_BM1_PNTR

/* acc_codec bar0 reg bits */
/* ACC_IRQ_STATUS */
#define IRQ_STS
#define WU_IRQ_STS
#define BM0_IRQ_STS
#define BM1_IRQ_STS
/* ACC_BMX_STATUS */
#define EOP
#define BM_EOP_ERR
/* ACC_BMX_CTL */
#define BM_CTL_EN
#define BM_CTL_PAUSE
#define BM_CTL_DIS
#define BM_CTL_BYTE_ORD_LE
#define BM_CTL_BYTE_ORD_BE
/* cs5535 specific ac97 codec register defines */
#define CMD_MASK
#define CMD_NEW
#define STS_NEW
#define PRM_RDY_STS
#define ACC_CODEC_CNTL_WR_CMD
#define ACC_CODEC_CNTL_RD_CMD
#define ACC_CODEC_CNTL_LNK_SHUTDOWN
#define ACC_CODEC_CNTL_LNK_WRM_RST
#define PRD_JMP
#define PRD_EOP
#define PRD_EOT

enum {};

struct cs5535audio;

struct cs5535audio_dma_ops {};

struct cs5535audio_dma_desc {};

struct cs5535audio_dma {};

struct cs5535audio {};

extern const struct dev_pm_ops snd_cs5535audio_pm;

#ifdef CONFIG_OLPC
void olpc_prequirks(struct snd_card *card,
		    struct snd_ac97_template *ac97);
int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97);
void olpc_quirks_cleanup(void);
void olpc_analog_input(struct snd_ac97 *ac97, int on);
void olpc_mic_bias(struct snd_ac97 *ac97, int on);

static inline void olpc_capture_open(struct snd_ac97 *ac97)
{
	/* default to Analog Input off */
	olpc_analog_input(ac97, 0);
	/* enable MIC Bias for recording */
	olpc_mic_bias(ac97, 1);
}

static inline void olpc_capture_close(struct snd_ac97 *ac97)
{
	/* disable Analog Input */
	olpc_analog_input(ac97, 0);
	/* disable the MIC Bias (so the recording LED turns off) */
	olpc_mic_bias(ac97, 0);
}
#else
static inline void olpc_prequirks(struct snd_card *card,
		struct snd_ac97_template *ac97) {}
static inline int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
{}
static inline void olpc_quirks_cleanup(void) {}
static inline void olpc_analog_input(struct snd_ac97 *ac97, int on) {}
static inline void olpc_mic_bias(struct snd_ac97 *ac97, int on) {}
static inline void olpc_capture_open(struct snd_ac97 *ac97) {}
static inline void olpc_capture_close(struct snd_ac97 *ac97) {}
#endif

int snd_cs5535audio_pcm(struct cs5535audio *cs5535audio);

#endif /* __SOUND_CS5535AUDIO_H */