Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
quartet.c File Reference
#include <asm/io.h>
#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 <sound/info.h>
#include "ice1712.h"
#include "envy24ht.h"
#include <sound/ak4113.h>
#include "quartet.h"

Go to the source code of this file.

Data Structures

struct  qtet_spec
 
struct  qtet_kcontrol_private
 

Macros

#define AK4113_ADDR   0x26 /* S/PDIF receiver */
 
#define AK4620_ADDR   0x02 /* ADC/DAC */
 
#define GPIO_D0   (1<<0)
 
#define GPIO_D1_JACKDTC0   (1<<1)
 
#define GPIO_D2_JACKDTC1   (1<<2)
 
#define GPIO_D3   (1<<3)
 
#define GPIO_D4_SPI_CDTO   (1<<4)
 
#define GPIO_D5_SPI_CCLK   (1<<5)
 
#define GPIO_D6_CD   (1<<6)
 
#define GPIO_D7_DD   (1<<7)
 
#define GPIO_CPLD_CSN   (1<<8)
 
#define GPIO_CPLD_RW   (1<<9)
 
#define GPIO_SPI_CSN0   (1<<10)
 
#define GPIO_SPI_CSN1   (1<<11)
 
#define GPIO_EX_GPIOE   (1<<12)
 
#define GPIO_SCR   (1<<13)
 
#define GPIO_MCR   (1<<14)
 
#define GPIO_SPI_ALL
 
#define GPIO_DATA_MASK
 
#define SCR_RELAY   GPIO_D0
 
#define SCR_PHP_V   GPIO_D1_JACKDTC0
 
#define SCR_MUTE   GPIO_D2_JACKDTC1
 
#define SCR_PHP   GPIO_D3
 
#define SCR_AIN12_SEL0   GPIO_D4_SPI_CDTO
 
#define SCR_AIN12_SEL1   GPIO_D5_SPI_CCLK
 
#define SCR_AIN34_SEL   GPIO_D6_CD
 
#define SCR_CODEC_PDN   GPIO_D7_DD
 
#define SCR_AIN12_LINE   (0)
 
#define SCR_AIN12_MIC   (SCR_AIN12_SEL0)
 
#define SCR_AIN12_LOWCUT   (SCR_AIN12_SEL1 | SCR_AIN12_SEL0)
 
#define MCR_IN12_MON12   GPIO_D0
 
#define MCR_IN12_MON34   GPIO_D1_JACKDTC0
 
#define MCR_IN34_MON12   GPIO_D2_JACKDTC1
 
#define MCR_IN34_MON34   GPIO_D3
 
#define MCR_OUT34_MON12   GPIO_D4_SPI_CDTO
 
#define MCR_OUT12_MON34   GPIO_D5_SPI_CCLK
 
#define CPLD_CKS0   GPIO_D0
 
#define CPLD_CKS1   GPIO_D1_JACKDTC0
 
#define CPLD_CKS2   GPIO_D2_JACKDTC1
 
#define CPLD_SYNC_SEL   GPIO_D3
 
#define CPLD_WORD_SEL   GPIO_D4_SPI_CDTO
 
#define CPLD_COAX_OUT   GPIO_D5_SPI_CCLK
 
#define CPLD_IN12_SEL   GPIO_D6_CD
 
#define CPLD_IN34_SEL   GPIO_D7_DD
 
#define CPLD_CKS_44100HZ   (0)
 
#define CPLD_CKS_48000HZ   (CPLD_CKS0)
 
#define CPLD_CKS_88200HZ   (CPLD_CKS1)
 
#define CPLD_CKS_96000HZ   (CPLD_CKS1 | CPLD_CKS0)
 
#define CPLD_CKS_176400HZ   (CPLD_CKS2)
 
#define CPLD_CKS_192000HZ   (CPLD_CKS2 | CPLD_CKS0)
 
#define CPLD_CKS_MASK   (CPLD_CKS0 | CPLD_CKS1 | CPLD_CKS2)
 
#define CPLD_EXT_SPDIF   (0 | CPLD_SYNC_SEL)
 
#define CPLD_EXT_WORDCLOCK_1FS   (CPLD_CKS1 | CPLD_SYNC_SEL)
 
#define CPLD_EXT_WORDCLOCK_256FS
 
#define EXT_SPDIF_TYPE   0
 
#define EXT_WORDCLOCK_1FS_TYPE   1
 
#define EXT_WORDCLOCK_256FS_TYPE   2
 
#define AK4620_DFS0   (1<<0)
 
#define AK4620_DFS1   (1<<1)
 
#define AK4620_CKS0   (1<<2)
 
#define AK4620_CKS1   (1<<3)
 
#define AK4620_DFS_REG   0x02
 
#define AK4620_DEEMVOL_REG   0x03
 
#define AK4620_SMUTE   (1<<7)
 
#define AK_CONTROL(xname, xch)   { .name = xname, .num_channels = xch }
 
#define PCM_12_PLAYBACK_VOLUME   "PCM 1/2 Playback Volume"
 
#define PCM_34_PLAYBACK_VOLUME   "PCM 3/4 Playback Volume"
 
#define PCM_12_CAPTURE_VOLUME   "PCM 1/2 Capture Volume"
 
#define PCM_34_CAPTURE_VOLUME   "PCM 3/4 Capture Volume"
 
#define PRIV_SW(xid, xbit, xreg)
 
#define PRIV_ENUM2(xid, xbit, xreg, xtext1, xtext2)
 
#define qtet_sw_info   snd_ctl_boolean_mono_info
 
#define QTET_CONTROL(xname, xtype, xpriv)
 

Enumerations

enum  {
  IN12_SEL = 0, IN34_SEL, AIN34_SEL, COAX_OUT,
  IN12_MON12, IN12_MON34, IN34_MON12, IN34_MON34,
  OUT12_MON34, OUT34_MON12
}
 

Macro Definition Documentation

#define AK4113_ADDR   0x26 /* S/PDIF receiver */

Definition at line 70 of file quartet.c.

#define AK4620_ADDR   0x02 /* ADC/DAC */

Definition at line 73 of file quartet.c.

#define AK4620_CKS0   (1<<2)

Definition at line 198 of file quartet.c.

#define AK4620_CKS1   (1<<3)

Definition at line 199 of file quartet.c.

#define AK4620_DEEMVOL_REG   0x03

Definition at line 204 of file quartet.c.

#define AK4620_DFS0   (1<<0)

Definition at line 196 of file quartet.c.

#define AK4620_DFS1   (1<<1)

Definition at line 197 of file quartet.c.

#define AK4620_DFS_REG   0x02

Definition at line 201 of file quartet.c.

#define AK4620_SMUTE   (1<<7)

Definition at line 205 of file quartet.c.

#define AK_CONTROL (   xname,
  xch 
)    { .name = xname, .num_channels = xch }

Definition at line 373 of file quartet.c.

#define CPLD_CKS0   GPIO_D0

Definition at line 159 of file quartet.c.

#define CPLD_CKS1   GPIO_D1_JACKDTC0

Definition at line 160 of file quartet.c.

#define CPLD_CKS2   GPIO_D2_JACKDTC1

Definition at line 161 of file quartet.c.

#define CPLD_CKS_176400HZ   (CPLD_CKS2)

Definition at line 178 of file quartet.c.

#define CPLD_CKS_192000HZ   (CPLD_CKS2 | CPLD_CKS0)

Definition at line 179 of file quartet.c.

#define CPLD_CKS_44100HZ   (0)

Definition at line 174 of file quartet.c.

#define CPLD_CKS_48000HZ   (CPLD_CKS0)

Definition at line 175 of file quartet.c.

#define CPLD_CKS_88200HZ   (CPLD_CKS1)

Definition at line 176 of file quartet.c.

#define CPLD_CKS_96000HZ   (CPLD_CKS1 | CPLD_CKS0)

Definition at line 177 of file quartet.c.

#define CPLD_CKS_MASK   (CPLD_CKS0 | CPLD_CKS1 | CPLD_CKS2)

Definition at line 181 of file quartet.c.

#define CPLD_COAX_OUT   GPIO_D5_SPI_CCLK

Definition at line 167 of file quartet.c.

#define CPLD_EXT_SPDIF   (0 | CPLD_SYNC_SEL)

Definition at line 185 of file quartet.c.

#define CPLD_EXT_WORDCLOCK_1FS   (CPLD_CKS1 | CPLD_SYNC_SEL)

Definition at line 187 of file quartet.c.

#define CPLD_EXT_WORDCLOCK_256FS
Value:
CPLD_SYNC_SEL)

Definition at line 189 of file quartet.c.

#define CPLD_IN12_SEL   GPIO_D6_CD

Definition at line 169 of file quartet.c.

#define CPLD_IN34_SEL   GPIO_D7_DD

Definition at line 171 of file quartet.c.

#define CPLD_SYNC_SEL   GPIO_D3

Definition at line 163 of file quartet.c.

#define CPLD_WORD_SEL   GPIO_D4_SPI_CDTO

Definition at line 165 of file quartet.c.

#define EXT_SPDIF_TYPE   0

Definition at line 192 of file quartet.c.

#define EXT_WORDCLOCK_1FS_TYPE   1

Definition at line 193 of file quartet.c.

#define EXT_WORDCLOCK_256FS_TYPE   2

Definition at line 194 of file quartet.c.

#define GPIO_CPLD_CSN   (1<<8)

Definition at line 97 of file quartet.c.

#define GPIO_CPLD_RW   (1<<9)

Definition at line 99 of file quartet.c.

#define GPIO_D0   (1<<0)

Definition at line 81 of file quartet.c.

#define GPIO_D1_JACKDTC0   (1<<1)

Definition at line 83 of file quartet.c.

#define GPIO_D2_JACKDTC1   (1<<2)

Definition at line 85 of file quartet.c.

#define GPIO_D3   (1<<3)

Definition at line 87 of file quartet.c.

#define GPIO_D4_SPI_CDTO   (1<<4)

Definition at line 89 of file quartet.c.

#define GPIO_D5_SPI_CCLK   (1<<5)

Definition at line 91 of file quartet.c.

#define GPIO_D6_CD   (1<<6)

Definition at line 93 of file quartet.c.

#define GPIO_D7_DD   (1<<7)

Definition at line 95 of file quartet.c.

#define GPIO_DATA_MASK
Value:
GPIO_D2_JACKDTC1 | GPIO_D3 | \
GPIO_D4_SPI_CDTO | GPIO_D5_SPI_CCLK | \
GPIO_D6_CD | GPIO_D7_DD)

Definition at line 117 of file quartet.c.

#define GPIO_EX_GPIOE   (1<<12)

Definition at line 106 of file quartet.c.

#define GPIO_MCR   (1<<14)

Definition at line 112 of file quartet.c.

#define GPIO_SCR   (1<<13)

Definition at line 109 of file quartet.c.

#define GPIO_SPI_ALL
Value:

Definition at line 114 of file quartet.c.

#define GPIO_SPI_CSN0   (1<<10)

Definition at line 101 of file quartet.c.

#define GPIO_SPI_CSN1   (1<<11)

Definition at line 103 of file quartet.c.

#define MCR_IN12_MON12   GPIO_D0

Definition at line 145 of file quartet.c.

#define MCR_IN12_MON34   GPIO_D1_JACKDTC0

Definition at line 147 of file quartet.c.

#define MCR_IN34_MON12   GPIO_D2_JACKDTC1

Definition at line 149 of file quartet.c.

#define MCR_IN34_MON34   GPIO_D3

Definition at line 151 of file quartet.c.

#define MCR_OUT12_MON34   GPIO_D5_SPI_CCLK

Definition at line 155 of file quartet.c.

#define MCR_OUT34_MON12   GPIO_D4_SPI_CDTO

Definition at line 153 of file quartet.c.

#define PCM_12_CAPTURE_VOLUME   "PCM 1/2 Capture Volume"

Definition at line 377 of file quartet.c.

#define PCM_12_PLAYBACK_VOLUME   "PCM 1/2 Playback Volume"

Definition at line 375 of file quartet.c.

#define PCM_34_CAPTURE_VOLUME   "PCM 3/4 Capture Volume"

Definition at line 378 of file quartet.c.

#define PCM_34_PLAYBACK_VOLUME   "PCM 3/4 Playback Volume"

Definition at line 376 of file quartet.c.

#define PRIV_ENUM2 (   xid,
  xbit,
  xreg,
  xtext1,
  xtext2 
)
Value:
[xid] = {.bit = xbit,\
.set_register = set_##xreg,\
.get_register = get_##xreg,\
.texts = {xtext1, xtext2} }

Definition at line 684 of file quartet.c.

#define PRIV_SW (   xid,
  xbit,
  xreg 
)
Value:
[xid] = {.bit = xbit,\
.set_register = set_##xreg,\
.get_register = get_##xreg, }

Definition at line 679 of file quartet.c.

#define QTET_CONTROL (   xname,
  xtype,
  xpriv 
)
Value:
.name = xname,\
.info = qtet_##xtype##_info,\
.get = qtet_sw_get,\
.put = qtet_sw_put,\
.private_value = xpriv }

Definition at line 753 of file quartet.c.

#define qtet_sw_info   snd_ctl_boolean_mono_info

Definition at line 751 of file quartet.c.

#define SCR_AIN12_LINE   (0)

Definition at line 139 of file quartet.c.

#define SCR_AIN12_LOWCUT   (SCR_AIN12_SEL1 | SCR_AIN12_SEL0)

Definition at line 141 of file quartet.c.

#define SCR_AIN12_MIC   (SCR_AIN12_SEL0)

Definition at line 140 of file quartet.c.

#define SCR_AIN12_SEL0   GPIO_D4_SPI_CDTO

Definition at line 132 of file quartet.c.

#define SCR_AIN12_SEL1   GPIO_D5_SPI_CCLK

Definition at line 133 of file quartet.c.

#define SCR_AIN34_SEL   GPIO_D6_CD

Definition at line 135 of file quartet.c.

#define SCR_CODEC_PDN   GPIO_D7_DD

Definition at line 137 of file quartet.c.

#define SCR_MUTE   GPIO_D2_JACKDTC1

Definition at line 128 of file quartet.c.

#define SCR_PHP   GPIO_D3

Definition at line 130 of file quartet.c.

#define SCR_PHP_V   GPIO_D1_JACKDTC0

Definition at line 126 of file quartet.c.

#define SCR_RELAY   GPIO_D0

Definition at line 124 of file quartet.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
IN12_SEL 
IN34_SEL 
AIN34_SEL 
COAX_OUT 
IN12_MON12 
IN12_MON34 
IN34_MON12 
IN34_MON34 
OUT12_MON34 
OUT34_MON12 

Definition at line 53 of file quartet.c.