linux/sound/pcmcia/pdaudiocf/pdaudiocf.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Driver for Sound Cors PDAudioCF soundcard
 *
 * Copyright (c) 2003 by Jaroslav Kysela <[email protected]>
 */

#ifndef __PDAUDIOCF_H
#define __PDAUDIOCF_H

#include <sound/pcm.h>
#include <linux/io.h>
#include <linux/interrupt.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>

#include <sound/ak4117.h>

/* PDAUDIOCF registers */
#define PDAUDIOCF_REG_MD
#define PDAUDIOCF_REG_WDP
#define PDAUDIOCF_REG_RDP
#define PDAUDIOCF_REG_TCR
#define PDAUDIOCF_REG_SCR
#define PDAUDIOCF_REG_ISR
#define PDAUDIOCF_REG_IER
#define PDAUDIOCF_REG_AK_IFR

/* PDAUDIOCF_REG_TCR */
#define PDAUDIOCF_ELIMAKMBIT
#define PDAUDIOCF_TESTDATASEL

/* PDAUDIOCF_REG_SCR */
#define PDAUDIOCF_AK_SBP
#define PDAUDIOCF_RST
#define PDAUDIOCF_PDN
#define PDAUDIOCF_CLKDIV0
#define PDAUDIOCF_CLKDIV1
#define PDAUDIOCF_RECORD
#define PDAUDIOCF_AK_SDD
#define PDAUDIOCF_RED_LED_OFF
#define PDAUDIOCF_BLUE_LED_OFF
#define PDAUDIOCF_DATAFMT0
#define PDAUDIOCF_DATAFMT1
#define PDAUDIOCF_FPGAREV(x)

/* PDAUDIOCF_REG_ISR */
#define PDAUDIOCF_IRQLVL
#define PDAUDIOCF_IRQOVR
#define PDAUDIOCF_IRQAKM

/* PDAUDIOCF_REG_IER */
#define PDAUDIOCF_IRQLVLEN0
#define PDAUDIOCF_IRQLVLEN1
#define PDAUDIOCF_IRQOVREN
#define PDAUDIOCF_IRQAKMEN
#define PDAUDIOCF_BLUEDUTY0
#define PDAUDIOCF_BLUEDUTY1
#define PDAUDIOCF_REDDUTY0
#define PDAUDIOCF_REDDUTY1
#define PDAUDIOCF_BLUESDD
#define PDAUDIOCF_BLUEMODULATE
#define PDAUDIOCF_REDMODULATE
#define PDAUDIOCF_HALFRATE

/* chip status */
#define PDAUDIOCF_STAT_IS_STALE
#define PDAUDIOCF_STAT_IS_CONFIGURED
#define PDAUDIOCF_STAT_IS_SUSPENDED

struct snd_pdacf {};

static inline void pdacf_reg_write(struct snd_pdacf *chip, unsigned char reg, unsigned short val)
{}

static inline unsigned short pdacf_reg_read(struct snd_pdacf *chip, unsigned char reg)
{}

struct snd_pdacf *snd_pdacf_create(struct snd_card *card);
int snd_pdacf_ak4117_create(struct snd_pdacf *pdacf);
void snd_pdacf_powerdown(struct snd_pdacf *chip);
#ifdef CONFIG_PM
int snd_pdacf_suspend(struct snd_pdacf *chip);
int snd_pdacf_resume(struct snd_pdacf *chip);
#endif
int snd_pdacf_pcm_new(struct snd_pdacf *chip);
irqreturn_t pdacf_interrupt(int irq, void *dev);
irqreturn_t pdacf_threaded_irq(int irq, void *dev);
void pdacf_reinit(struct snd_pdacf *chip, int resume);

#endif /* __PDAUDIOCF_H */