linux/sound/pci/ice1712/se.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *   ALSA driver for ICEnsemble VT1724 (Envy24HT)
 *
 *   Lowlevel functions for ONKYO WAVIO SE-90PCI and SE-200PCI
 *
 *	Copyright (c) 2007 Shin-ya Okada  sh_okada(at)d4.dion.ne.jp
 *                                        (at) -> @
 */      

#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/tlv.h>

#include "ice1712.h"
#include "envy24ht.h"
#include "se.h"

struct se_spec {};

/****************************************************************************/
/*  ONKYO WAVIO SE-200PCI                                                   */
/****************************************************************************/
/*
 *  system configuration ICE_EEP2_SYSCONF=0x4b
 *    XIN1 49.152MHz
 *    not have UART
 *    one stereo ADC and a S/PDIF receiver connected
 *    four stereo DACs connected
 *
 *  AC-Link configuration ICE_EEP2_ACLINK=0x80
 *    use I2C, not use AC97
 *
 *  I2S converters feature ICE_EEP2_I2S=0x78
 *    I2S codec has no volume/mute control feature
 *    I2S codec supports 96KHz and 192KHz
 *    I2S codec 24bits
 *
 *  S/PDIF configuration ICE_EEP2_SPDIF=0xc3
 *    Enable integrated S/PDIF transmitter
 *    internal S/PDIF out implemented
 *    S/PDIF is stereo
 *    External S/PDIF out implemented
 *
 *
 * ** connected chips **
 *
 *  WM8740
 *      A 2ch-DAC of main outputs.
 *      It setuped as I2S mode by wire, so no way to setup from software.
 *      The sample-rate are automatically changed. 
 *          ML/I2S (28pin) --------+
 *          MC/DM1 (27pin) -- 5V   |
 *          MD/DM0 (26pin) -- GND  |
 *          MUTEB  (25pin) -- NC   |
 *          MODE   (24pin) -- GND  |
 *          CSBIW  (23pin) --------+
 *                                 |
 *          RSTB   (22pin) --R(1K)-+
 *      Probably it reduce the noise from the control line.
 *
 *  WM8766
 *      A 6ch-DAC for surrounds.
 *      It's control wire was connected to GPIOxx (3-wire serial interface)
 *          ML/I2S (11pin) -- GPIO18
 *          MC/IWL (12pin) -- GPIO17
 *          MD/DM  (13pin) -- GPIO16
 *          MUTE   (14pin) -- GPIO01
 *
 *  WM8776
 *     A 2ch-ADC(with 10ch-selector) plus 2ch-DAC.
 *     It's control wire was connected to SDA/SCLK (2-wire serial interface)
 *          MODE (16pin) -- R(1K) -- GND
 *          CE   (17pin) -- R(1K) -- GND  2-wire mode (address=0x34)
 *          DI   (18pin) -- SDA
 *          CL   (19pin) -- SCLK
 *
 *
 * ** output pins and device names **
 *
 *   7.1ch name -- output connector color -- device (-D option)
 *
 *      FRONT 2ch                  -- green  -- plughw:0,0
 *      CENTER(Lch) SUBWOOFER(Rch) -- black  -- plughw:0,2,0
 *      SURROUND 2ch               -- orange -- plughw:0,2,1
 *      SURROUND BACK 2ch          -- white  -- plughw:0,2,2
 *
 */


/****************************************************************************/
/*  WM8740 interface                                                        */
/****************************************************************************/

static void se200pci_WM8740_init(struct snd_ice1712 *ice)
{}


static void se200pci_WM8740_set_pro_rate(struct snd_ice1712 *ice,
						unsigned int rate)
{}


/****************************************************************************/
/*  WM8766 interface                                                        */
/****************************************************************************/

static void se200pci_WM8766_write(struct snd_ice1712 *ice,
					unsigned int addr, unsigned int data)
{}

static void se200pci_WM8766_set_volume(struct snd_ice1712 *ice, int ch,
					unsigned int vol1, unsigned int vol2)
{}

static void se200pci_WM8766_init(struct snd_ice1712 *ice)
{}

static void se200pci_WM8766_set_pro_rate(struct snd_ice1712 *ice,
					unsigned int rate)
{}


/****************************************************************************/
/*  WM8776 interface                                                        */
/****************************************************************************/

static void se200pci_WM8776_write(struct snd_ice1712 *ice,
					unsigned int addr, unsigned int data)
{}


static void se200pci_WM8776_set_output_volume(struct snd_ice1712 *ice,
					unsigned int vol1, unsigned int vol2)
{}

static void se200pci_WM8776_set_input_volume(struct snd_ice1712 *ice,
					unsigned int vol1, unsigned int vol2)
{}

static const char * const se200pci_sel[] =;

static void se200pci_WM8776_set_input_selector(struct snd_ice1712 *ice,
					       unsigned int sel)
{}

static void se200pci_WM8776_set_afl(struct snd_ice1712 *ice, unsigned int afl)
{}

static const char * const se200pci_agc[] =;

static void se200pci_WM8776_set_agc(struct snd_ice1712 *ice, unsigned int agc)
{}

static void se200pci_WM8776_init(struct snd_ice1712 *ice)
{}

static void se200pci_WM8776_set_pro_rate(struct snd_ice1712 *ice,
						unsigned int rate)
{}


/****************************************************************************/
/*  runtime interface                                                       */
/****************************************************************************/

static void se200pci_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate)
{}

struct se200pci_control {};

static const struct se200pci_control se200pci_cont[] =;

static int se200pci_get_enum_count(int n)
{}

static int se200pci_cont_volume_info(struct snd_kcontrol *kc,
				     struct snd_ctl_elem_info *uinfo)
{}

#define se200pci_cont_boolean_info

static int se200pci_cont_enum_info(struct snd_kcontrol *kc,
				   struct snd_ctl_elem_info *uinfo)
{}

static int se200pci_cont_volume_get(struct snd_kcontrol *kc,
				    struct snd_ctl_elem_value *uc)
{}

static int se200pci_cont_boolean_get(struct snd_kcontrol *kc,
				     struct snd_ctl_elem_value *uc)
{}

static int se200pci_cont_enum_get(struct snd_kcontrol *kc,
				  struct snd_ctl_elem_value *uc)
{}

static void se200pci_cont_update(struct snd_ice1712 *ice, int n)
{}

static int se200pci_cont_volume_put(struct snd_kcontrol *kc,
				    struct snd_ctl_elem_value *uc)
{}

static int se200pci_cont_boolean_put(struct snd_kcontrol *kc,
				     struct snd_ctl_elem_value *uc)
{}

static int se200pci_cont_enum_put(struct snd_kcontrol *kc,
				  struct snd_ctl_elem_value *uc)
{}

static const DECLARE_TLV_DB_SCALE(db_scale_gain1, -12750, 50, 1);
static const DECLARE_TLV_DB_SCALE(db_scale_gain2, -10350, 50, 1);

static int se200pci_add_controls(struct snd_ice1712 *ice)
{}


/****************************************************************************/
/*  ONKYO WAVIO SE-90PCI                                                    */
/****************************************************************************/
/*
 *  system configuration ICE_EEP2_SYSCONF=0x4b
 *  AC-Link configuration ICE_EEP2_ACLINK=0x80
 *  I2S converters feature ICE_EEP2_I2S=0x78
 *  S/PDIF configuration ICE_EEP2_SPDIF=0xc3
 *
 *  ** connected chip **
 *
 *   WM8716
 *      A 2ch-DAC of main outputs.
 *      It setuped as I2S mode by wire, so no way to setup from software.
 *         ML/I2S (28pin) -- +5V
 *         MC/DM1 (27pin) -- GND
 *         MC/DM0 (26pin) -- GND
 *         MUTEB  (25pin) -- open (internal pull-up)
 *         MODE   (24pin) -- GND
 *         CSBIWO (23pin) -- +5V
 *
 */

 /* Nothing to do for this chip. */


/****************************************************************************/
/*  probe/initialize/setup                                                  */
/****************************************************************************/

static int se_init(struct snd_ice1712 *ice)
{}

static int se_add_controls(struct snd_ice1712 *ice)
{}


/****************************************************************************/
/*  entry point                                                             */
/****************************************************************************/

static const unsigned char se200pci_eeprom[] =;

static const unsigned char se90pci_eeprom[] =;

struct snd_ice1712_card_info snd_vt1724_se_cards[] =;