linux/sound/pci/ice1712/pontis.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *   ALSA driver for ICEnsemble VT1724 (Envy24HT)
 *
 *   Lowlevel functions for Pontis MS300
 *
 *	Copyright (c) 2004 Takashi Iwai <[email protected]>
 */

#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/mutex.h>

#include <sound/core.h>
#include <sound/info.h>
#include <sound/tlv.h>

#include "ice1712.h"
#include "envy24ht.h"
#include "pontis.h"

/* I2C addresses */
#define WM_DEV
#define CS_DEV

/* WM8776 registers */
#define WM_HP_ATTEN_L
#define WM_HP_ATTEN_R
#define WM_HP_MASTER
					/* override LLR */
#define WM_DAC_ATTEN_L
#define WM_DAC_ATTEN_R
#define WM_DAC_MASTER
#define WM_PHASE_SWAP
#define WM_DAC_CTRL1
#define WM_DAC_MUTE
#define WM_DAC_CTRL2
#define WM_DAC_INT
#define WM_ADC_INT
#define WM_MASTER_CTRL
#define WM_POWERDOWN
#define WM_ADC_ATTEN_L
#define WM_ADC_ATTEN_R
#define WM_ALC_CTRL1
#define WM_ALC_CTRL2
#define WM_ALC_CTRL3
#define WM_NOISE_GATE
#define WM_LIMITER
#define WM_ADC_MUX
#define WM_OUT_MUX
#define WM_RESET

/*
 * GPIO
 */
#define PONTIS_CS_CS
#define PONTIS_CS_CLK
#define PONTIS_CS_RDATA
#define PONTIS_CS_WDATA


/*
 * get the current register value of WM codec
 */
static unsigned short wm_get(struct snd_ice1712 *ice, int reg)
{}

/*
 * set the register value of WM codec and remember it
 */
static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val)
{}

static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
{}

/*
 * DAC volume attenuation mixer control (-64dB to 0dB)
 */

#define DAC_0dB
#define DAC_RES
#define DAC_MIN

static int wm_dac_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{}

static int wm_dac_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int wm_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

/*
 * ADC gain mixer control (-64dB to 0dB)
 */

#define ADC_0dB
#define ADC_RES
#define ADC_MIN

static int wm_adc_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{}

static int wm_adc_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int wm_adc_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

/*
 * ADC input mux mixer control
 */
#define wm_adc_mux_info

static int wm_adc_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int wm_adc_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

/*
 * Analog bypass (In -> Out)
 */
#define wm_bypass_info

static int wm_bypass_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int wm_bypass_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

/*
 * Left/Right swap
 */
#define wm_chswap_info

static int wm_chswap_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int wm_chswap_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

/*
 * write data in the SPI mode
 */
static void set_gpio_bit(struct snd_ice1712 *ice, unsigned int bit, int val)
{}

static void spi_send_byte(struct snd_ice1712 *ice, unsigned char data)
{}

static unsigned int spi_read_byte(struct snd_ice1712 *ice)
{}


static void spi_write(struct snd_ice1712 *ice, unsigned int dev, unsigned int reg, unsigned int data)
{}

static unsigned int spi_read(struct snd_ice1712 *ice, unsigned int dev, unsigned int reg)
{}


/*
 * SPDIF input source
 */
static int cs_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{}

static int cs_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int cs_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}


/*
 * GPIO controls
 */
static int pontis_gpio_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{}

static int pontis_gpio_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}
	
static int pontis_gpio_mask_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int pontis_gpio_dir_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}
	
static int pontis_gpio_dir_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int pontis_gpio_data_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int pontis_gpio_data_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static const DECLARE_TLV_DB_SCALE(db_scale_volume, -6400, 50, 1);

/*
 * mixers
 */

static const struct snd_kcontrol_new pontis_controls[] =;


/*
 * WM codec registers
 */
static void wm_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{}

static void wm_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{}

static void wm_proc_init(struct snd_ice1712 *ice)
{}

static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{}

static void cs_proc_init(struct snd_ice1712 *ice)
{}


static int pontis_add_controls(struct snd_ice1712 *ice)
{}


/*
 * initialize the chip
 */
static int pontis_init(struct snd_ice1712 *ice)
{}


/*
 * Pontis boards don't provide the EEPROM data at all.
 * hence the driver needs to sets up it properly.
 */

static const unsigned char pontis_eeprom[] =;

/* entry point */
struct snd_ice1712_card_info snd_vt1720_pontis_cards[] =;