#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <sound/core.h>
#include <sound/tlv.h>
#include "ice1712.h"
#include "envy24ht.h"
#include "juli.h"
struct juli_spec { … };
#define AK4114_ADDR …
#define AK4358_ADDR …
#define GPIO_FREQ_MASK …
#define GPIO_FREQ_32KHZ …
#define GPIO_FREQ_44KHZ …
#define GPIO_FREQ_48KHZ …
#define GPIO_MULTI_MASK …
#define GPIO_MULTI_4X …
#define GPIO_MULTI_2X …
#define GPIO_MULTI_1X …
#define GPIO_MULTI_HALF …
#define GPIO_INTERNAL_CLOCK …
#define GPIO_CLOCK_MASK …
#define GPIO_ANALOG_PRESENT …
#define GPIO_RXMCLK_SEL …
#define GPIO_AK5385A_CKS0 …
#define GPIO_AK5385A_DFS1 …
#define GPIO_AK5385A_DFS0 …
#define GPIO_DIGOUT_MONITOR …
#define GPIO_DIGIN_MONITOR …
#define GPIO_ANAIN_MONITOR …
#define GPIO_AK5385A_CKS1 …
#define GPIO_MUTE_CONTROL …
#define GPIO_RATE_MASK …
#define GPIO_AK5385A_MASK …
#define JULI_PCM_RATE …
#define GPIO_RATE_16000 …
#define GPIO_RATE_22050 …
#define GPIO_RATE_24000 …
#define GPIO_RATE_32000 …
#define GPIO_RATE_44100 …
#define GPIO_RATE_48000 …
#define GPIO_RATE_64000 …
#define GPIO_RATE_88200 …
#define GPIO_RATE_96000 …
#define GPIO_RATE_176400 …
#define GPIO_RATE_192000 …
static const unsigned int juli_rates[] = …;
static const unsigned int gpio_vals[] = …;
static const struct snd_pcm_hw_constraint_list juli_rates_info = …;
static int get_gpio_val(int rate)
{ … }
static void juli_ak4114_write(void *private_data, unsigned char reg,
unsigned char val)
{ … }
static unsigned char juli_ak4114_read(void *private_data, unsigned char reg)
{ … }
static void juli_spdif_in_open(struct snd_ice1712 *ice,
struct snd_pcm_substream *substream)
{ … }
static void juli_akm_lock(struct snd_akm4xxx *ak, int chip)
{ … }
static void juli_akm_unlock(struct snd_akm4xxx *ak, int chip)
{ … }
static void juli_akm_write(struct snd_akm4xxx *ak, int chip,
unsigned char addr, unsigned char data)
{ … }
static void juli_akm_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
{ … }
#define AK_DAC(xname, xch) …
#define PCM_VOLUME …
#define MONITOR_AN_IN_VOLUME …
#define MONITOR_DIG_IN_VOLUME …
#define MONITOR_DIG_OUT_VOLUME …
static const struct snd_akm4xxx_dac_channel juli_dac[] = …;
static const struct snd_akm4xxx akm_juli_dac = …;
#define juli_mute_info …
static int juli_mute_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int juli_mute_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new juli_mute_controls[] = …;
static const char * const follower_vols[] = …;
static
DECLARE_TLV_DB_SCALE(juli_master_db_scale, -6350, 50, 1);
static int juli_add_controls(struct snd_ice1712 *ice)
{ … }
#ifdef CONFIG_PM_SLEEP
static int juli_resume(struct snd_ice1712 *ice)
{ … }
static int juli_suspend(struct snd_ice1712 *ice)
{ … }
#endif
static inline int juli_is_spdif_master(struct snd_ice1712 *ice)
{ … }
static unsigned int juli_get_rate(struct snd_ice1712 *ice)
{ … }
static void juli_set_rate(struct snd_ice1712 *ice, unsigned int rate)
{ … }
static inline unsigned char juli_set_mclk(struct snd_ice1712 *ice,
unsigned int rate)
{ … }
static int juli_set_spdif_clock(struct snd_ice1712 *ice, int type)
{ … }
static void juli_ak4114_change(struct ak4114 *ak4114, unsigned char c0,
unsigned char c1)
{ … }
static int juli_init(struct snd_ice1712 *ice)
{ … }
static const unsigned char juli_eeprom[] = …;
struct snd_ice1712_card_info snd_vt1724_juli_cards[] = …;