Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/pci/ice1712/ice1724.c
int snd_ice1724_put_route_val(struct snd_ice1712 *ice, unsigned int val, int shift) { unsigned int old_val, nval; int change; static const unsigned char xroute[8] = { 0, 2, /* PSDIN0 Left */ 3, /* PSDIN0 Right */ 6, /* SPDIN Left */ 7, /* SPDIN Right ...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/ice1724.c
static int snd_vt1724_pro_route_spdif_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); ucontrol->value.enumerated.item[0] = snd_i...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/ice1724.c
static int snd_vt1724_pro_route_spdif_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); return snd_ice1724_put_route_val(ice, ucontrol->...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/ice1724.c
static int snd_vt1724_pro_peak_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 22; /* FIXME: for compatibility with ice1712... */ uinfo->value.integer.min = 0; uinfo->value.integer.max = 255; r...
[ 0, 1 ]
Linux Kernel
sound/pci/ice1712/ice1724.c
void snd_vt1724_write_i2c(struct snd_ice1712 *ice, unsigned char dev, unsigned char addr, unsigned char data) { mutex_lock(&ice->i2c_mutex); wait_i2c_busy(ice); outb(addr, ICEREG1724(ice, I2C_BYTE_ADDR)); outb(data, ICEREG1724(ice, I2C_DATA)); outb(dev | VT1724_I2C_WRITE, ICEREG1724...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/ice1724.c
static int snd_vt1724_chip_init(struct snd_ice1712 *ice) { outb(ice->eeprom.data[ICE_EEP2_SYSCONF], ICEREG1724(ice, SYS_CFG)); outb(ice->eeprom.data[ICE_EEP2_ACLINK], ICEREG1724(ice, AC97_CFG)); outb(ice->eeprom.data[ICE_EEP2_I2S], ICEREG1724(ice, I2S_FEATURES)); outb(ice->eeprom.data[ICE_EEP2_SPDIF], ICEREG172...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/ice1724.c
static int snd_vt1724_spdif_build_controls(struct snd_ice1712 *ice) { int err; struct snd_kcontrol *kctl; if (snd_BUG_ON(!ice->pcm)) return -EIO; if (!ice->own_routing) { err = snd_ctl_add(ice->card, snd_ctl_new1(&snd_vt1724_mixer_pro_spdif_route, ice)); if (err < 0) re...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/juli.c
static int get_gpio_val(int rate) { int i; for (i = 0; i < ARRAY_SIZE(juli_rates); i++) if (juli_rates[i] == rate) return gpio_vals[i]; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/juli.c
static void juli_spdif_in_open(struct snd_ice1712 *ice, struct snd_pcm_substream *substream) { struct juli_spec *spec = ice->spec; struct snd_pcm_runtime *runtime = substream->runtime; int rate; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK || !ice->is_spdif_master(ice...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/juli.c
static void juli_akm_write(struct snd_akm4xxx *ak, int chip, unsigned char addr, unsigned char data) { struct snd_ice1712 *ice = ak->private_data[0]; if (snd_BUG_ON(chip)) return; snd_vt1724_write_i2c(ice, AK4358_ADDR, addr, data); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/juli.c
static int juli_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned int old_gpio, new_gpio; old_gpio = ice->gpio.get_data(ice); if (ucontrol->value.integer.value[0]) { if (kcontrol->private_v...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/juli.c
static int juli_resume(struct snd_ice1712 *ice) { struct snd_akm4xxx *ak = ice->akm; struct juli_spec *spec = ice->spec; snd_akm4xxx_reset(ak, 0); /* reinit ak4114 */ snd_ak4114_resume(spec->ak4114); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/juli.c
static int juli_suspend(struct snd_ice1712 *ice) { struct snd_akm4xxx *ak = ice->akm; struct juli_spec *spec = ice->spec; snd_akm4xxx_reset(ak, 1); snd_ak4114_suspend(spec->ak4114); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/juli.c
static void juli_set_rate(struct snd_ice1712 *ice, unsigned int rate) { unsigned int old, new; unsigned char val; old = ice->gpio.get_data(ice); new = (old & ~GPIO_RATE_MASK) | get_gpio_val(rate); ice->gpio.set_data(ice, new); /* switching to external clock - supplied by external circuits */ val = inb(I...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/juli.c
static inline unsigned char juli_set_mclk(struct snd_ice1712 *ice, unsigned int rate) { return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/maya44.c
static int maya_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { unsigned int idx = kcontrol->private_value; const struct maya_vol_info *vol = &vol_info[idx]; uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.integer.min = 0; uinfo...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/maya44.c
static int maya_set_gpio_bits(struct snd_ice1712 *ice, unsigned int mask, unsigned int bits) { unsigned int data; data = snd_ice1712_gpio_read(ice); if ((data & mask) == bits) return 0; snd_ice1712_gpio_write(ice, (data & ~mask) | bits); return 1; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/maya44.c
static int maya_pb_route_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static const char *const texts[] = {"PCM Out", "Input 1", "Input 2", "Input 3", "Input 4"}; return snd_ctl_enum_info(uinfo, 1, ARRAY_SIZE(texts), texts...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/maya44.c
static int maya44_init(struct snd_ice1712 *ice) { int i; struct snd_maya44 *chip; chip = kzalloc(sizeof(*chip), GFP_KERNEL); if (!chip) return -ENOMEM; mutex_init(&chip->mutex); chip->ice = ice; ice->spec = chip; ice->num_total_dacs = 4; ice->num_total_adcs = 4; ice->akm_codecs = 0; for (i ...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/phase.c
static int phase22_init(struct snd_ice1712 *ice) { struct snd_akm4xxx *ak; int err; switch (ice->eeprom.subvendor) { case VT1724_SUBDEVICE_PHASE22: case VT1724_SUBDEVICE_TS22: ice->num_total_dacs = 2; ice->num_total_adcs = 2; ice->vt1720 = 1; /* Envy24HT-S have 16 bit wide GPIO */ break; de...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/phase.c
static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, unsigned short vol, unsigned short master) { unsigned char nvol; if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) nvol = 0; else nvol = 127 - wm_vol[(((vol & ~WM_VOL_MUTE) * (master & ~WM_VOL_MUTE)) / 127...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/phase.c
static int wm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); struct phase28_spec *spec = ice->spec; int voices, ofs, i; voices = kcontrol->private_value >> 8; ofs = kcontrol->private_value & 0xFF; ...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/phase.c
static int wm_master_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); struct phase28_spec *spec = ice->spec; int change = 0, i; snd_ice1712_save_gpio_status(ice); for (i = 0; i < 2; i++) { i...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/phase.c
static int phase28_oversampling_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { int temp, temp2; struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); temp = wm_get(ice, WM_MASTER); temp2 = temp; if (ucontrol->value.enumerated.item[0]) temp...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/phase.c
static int phase28_add_controls(struct snd_ice1712 *ice) { unsigned int i, counts; int err; counts = ARRAY_SIZE(phase28_dac_controls); for (i = 0; i < counts; i++) { err = snd_ctl_add(ice->card, snd_ctl_new1(&phase28_dac_controls[i], ice)); if (err < 0) return err; } for (i = 0; i < ARRAY_S...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/pontis.c
static int wm_dac_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned short val; int i; mutex_lock(&ice->gpio_mutex); for (i = 0; i < 2; i++) { val = wm_get(ice, WM_DAC_ATTEN_L + i) & 0xff...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/pontis.c
static int wm_chswap_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned short val, oval; int change = 0; mutex_lock(&ice->gpio_mutex); oval = wm_get(ice, WM_DAC_CTRL1); val = oval & 0x0f; if (...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/pontis.c
static void set_gpio_bit(struct snd_ice1712 *ice, unsigned int bit, int val) { unsigned int tmp = snd_ice1712_gpio_read(ice); if (val) tmp |= bit; else tmp &= ~bit; snd_ice1712_gpio_write(ice, tmp); }
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/pontis.c
static unsigned int spi_read(struct snd_ice1712 *ice, unsigned int dev, unsigned int reg) { unsigned int val; snd_ice1712_gpio_set_dir(ice, PONTIS_CS_CS | PONTIS_CS_WDATA | PONTIS_CS_CLK); snd_ice1712_gpio_set_mask(ice, ~(PONTIS_CS_CS | PONTIS_CS_WDATA | PO...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/pontis.c
static int cs_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned char val; int change = 0; mutex_lock(&ice->gpio_mutex); if (ucontrol->value.enumerated.item[0] != ice->gpio.saved[0]) { ...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/pontis.c
static int pontis_gpio_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; uinfo->value.integer.min = 0; uinfo->value.integer.max = 0xffff; return 0; }
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/pontis.c
static int pontis_gpio_mask_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned int val; int changed; mutex_lock(&ice->gpio_mutex); val = (~ucontrol->value.integer.value[0] & 0xffff) | 0x00f0...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/pontis.c
static int pontis_gpio_dir_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); mutex_lock(&ice->gpio_mutex); ucontrol->value.integer.value[0] = ice->gpio.direction & 0xff0f; mutex_unlock(&ice->gpio_mutex...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/pontis.c
static int pontis_gpio_dir_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned int val; int changed; mutex_lock(&ice->gpio_mutex); val = ucontrol->value.integer.value[0] & 0xff0f; changed = ...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/pontis.c
static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ice1712 *ice = entry->private_data; int reg, val; mutex_lock(&ice->gpio_mutex); for (reg = 0; reg <= 0x26; reg++) { val = spi_read(ice, CS_DEV, reg); snd_iprintf(buffe...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/pontis.c
static void cs_proc_init(struct snd_ice1712 *ice) { snd_card_ro_proc_new(ice->card, "cs_codec", ice, cs_proc_regs_read); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static inline unsigned char stac9460_get(struct snd_ice1712 *ice, int reg) { return snd_vt1724_read_i2c(ice, PRODIGY192_STAC9460_ADDR, reg); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static int stac9460_dac_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 1; uinfo->value.integer.min = 0; uinfo->value.integer.max = 0x7f; /* 0dB */ return 0; }
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static int stac9460_dac_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); int idx; unsigned char vol; if (kcontrol->private_value) idx = STAC946X_MASTER_VOLUME; else idx = snd_ctl_get_i...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static int stac9460_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned char val; int i; for (i = 0; i < 2; ++i) { val = stac9460_get(ice, STAC946X_MIC_L_VOLUME + i); ucontro...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static int stac9460_adc_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); int i, reg; unsigned char vol; for (i = 0; i < 2; ++i) { reg = STAC946X_MIC_L_VOLUME + i; vol = stac9460_get(ice,...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static int stac9460_adc_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); int i, reg; unsigned char ovol, nvol; int change; for (i = 0; i < 2; ++i) { reg = STAC946X_MIC_L_VOLUME + i; nv...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static int stac9460_mic_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned char val; val = stac9460_get(ice, STAC946X_GENERAL_PURPOSE); ucontrol->value.enumerated.item[0] = (val >> 7) & 0x...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static void stac9460_set_rate_val(struct snd_ice1712 *ice, unsigned int rate) { unsigned char old, new; int idx; unsigned char changed[7]; struct prodigy192_spec *spec = ice->spec; if (rate == 0) return; else if (rate <= 48000) new = 0x08; /* 256x, base rate mode */ else if (rate <= 96000) ne...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static unsigned int prodigy192_4wire_start(struct snd_ice1712 *ice) { unsigned int tmp; snd_ice1712_save_gpio_status(ice); tmp = snd_ice1712_gpio_read(ice); tmp |= VT1724_PRODIGY192_CCLK; tmp &= ~VT1724_PRODIGY192_CS; /* drop chip select */ snd_ice1712_gpio_write(ice, tmp); udelay(1); return tmp; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static int prodigy192_ak4114_init(struct snd_ice1712 *ice) { static const unsigned char ak4114_init_vals[] = { AK4114_RST | AK4114_PWN | AK4114_OCKS0 | AK4114_OCKS1, AK4114_DIF_I24I2S | AK4114_DEM0, AK4114_TX1E, AK4114_EFH_1024 | AK4114_DIT, /* default input RX0 */ 0, 0}; static...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static void stac9460_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ice1712 *ice = entry->private_data; int reg, val; for (reg = 0; reg <= 0x15; reg++) { val = stac9460_get(ice, reg); snd_iprintf(buffer, "0x%02x = 0x%02x\n", r...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static void stac9460_proc_init(struct snd_ice1712 *ice) { snd_card_ro_proc_new(ice->card, "stac9460_codec", ice, stac9460_proc_regs_read); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy192.c
static int prodigy192_miodio_exists(struct snd_ice1712 *ice) { unsigned char orig_value; const unsigned char test_data = 0xd1; unsigned char addr = AK4114_REG_INT0_MASK; /* random SAFE address */ int exists = 0; orig_value = prodigy192_ak4114_read(ice, addr); prodigy192_ak4114_write(ice, addr, test_data);...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static unsigned short wm_get(struct snd_ice1712 *ice, int reg) { reg <<= 1; return ((unsigned short)ice->akm[0].images[reg] << 8) | ice->akm[0].images[reg + 1]; }
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val) { unsigned short cval; cval = (reg << 9) | val; snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val) { wm_put_nocache(ice, reg, val); reg <<= 1; ice->akm[0].images[reg] = val >> 8; ice->akm[0].images[reg + 1] = val; }
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static void ak4396_send_word(struct snd_ice1712 *ice, unsigned int data) { int i; for (i = 0; i < 16; i++) { set_gpio_bit(ice, AK4396_CCLK, 0); udelay(1); set_gpio_bit(ice, AK4396_CDTI, data & 0x8000); udelay(1); set_gpio_bit(ice, AK4396_CCLK, 1); udelay(1); data <<= 1; } }
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static int ak4396_dac_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.integer.min = 0; uinfo->value.integer.max = 0xFF; /* linear */ return 0; }
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static int wm_dac_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.integer.min = 0; uinfo->value.integer.max = DAC_RES; /* 0dB, 0.5dB step */ return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static int wm_master_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.integer.min = 0; uinfo->value.integer.max = DAC_RES; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static int wm_adc_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; uinfo->value.integer.min = 0; uinfo->value.integer.max = ADC_RES; /* 0dB, 0.5dB step */ return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static int wm_adc_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned short val; int i; mutex_lock(&ice->gpio_mutex); for (i = 0; i < 2; i++) { val = wm_get(ice, WM_ADC_ATTEN_L + i) & 0xff...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static int wm_adc_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); int bit = kcontrol->private_value; mutex_lock(&ice->gpio_mutex); ucontrol->value.integer.value[0] = (wm_get(ice, WM_ADC_MUX) & ...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static int wm_chswap_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); mutex_lock(&ice->gpio_mutex); ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL1) & 0xf0) != 0x90; mutex_unlock(&ice->gpio_mu...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static int wm_chswap_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned short val, oval; int change = 0; mutex_lock(&ice->gpio_mutex); oval = wm_get(ice, WM_DAC_CTRL1); val = oval & 0x0f; if (...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static void wm_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ice1712 *ice = entry->private_data; int reg, val; mutex_lock(&ice->gpio_mutex); for (reg = 0; reg <= 0x17; reg++) { val = wm_get(ice, reg); snd_iprintf(buffer, "%02x =...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static int prodigy_hifi_add_controls(struct snd_ice1712 *ice) { unsigned int i; int err; for (i = 0; i < ARRAY_SIZE(prodigy_hifi_controls); i++) { err = snd_ctl_add(ice->card, snd_ctl_new1(&prodigy_hifi_controls[i], ice)); if (err < 0) return err; } wm_proc_init(ice); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static void ak4396_init(struct snd_ice1712 *ice) { static const unsigned short ak4396_inits[] = { AK4396_CTRL1, 0x87, AK4396_CTRL2, 0x02, AK4396_CTRL3, 0x00, AK4396_LCH_ATT, 0x00, AK4396_RCH_ATT, 0x00, }; unsigned int i; /* initialize ak4396 codec */ /* reset ...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/prodigy_hifi.c
static int prodigy_hd2_init(struct snd_ice1712 *ice) { struct prodigy_hifi_spec *spec; ice->vt1720 = 0; ice->vt1724 = 1; ice->num_total_dacs = 1; ice->num_total_adcs = 1; /* HACK - use this as the SPDIF source. * don't call snd_ice1712_gpio_get/put(), otherwise it's overwritten */ ice->gpio.saved...
[ 0, 1 ]
Linux Kernel
sound/pci/ice1712/psc724.c
static void psc724_update_hp_jack_state(struct work_struct *work) { struct psc724_spec *spec = container_of(work, struct psc724_spec, hp_work.work); struct snd_ice1712 *ice = spec->ice; bool hp_connected = snd_ice1712_gpio_read(ice) & GPIO_HP_JACK; schedule_delayed_work(&spec->hp_work, msecs_to_jiffies(...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/psc724.c
static int psc724_resume(struct snd_ice1712 *ice) { struct psc724_spec *spec = ice->spec; snd_wm8776_resume(&spec->wm8776); snd_wm8766_resume(&spec->wm8766); return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/psc724.c
static int psc724_init(struct snd_ice1712 *ice) { struct psc724_spec *spec; spec = kzalloc(sizeof(*spec), GFP_KERNEL); if (!spec) return -ENOMEM; ice->spec = spec; spec->ice = ice; ice->num_total_dacs = 6; ice->num_total_adcs = 2; spec->wm8776.ops.write = psc724_wm8776_write; spec->wm8776.card =...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/quartet.c
static void qtet_ak4113_write(void *private_data, unsigned char reg, unsigned char val) { snd_vt1724_write_i2c((struct snd_ice1712 *)private_data, AK4113_ADDR, reg, val); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/quartet.c
static unsigned char qtet_ak4113_read(void *private_data, unsigned char reg) { return snd_vt1724_read_i2c((struct snd_ice1712 *)private_data, AK4113_ADDR, reg); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/quartet.c
static void qtet_akm_set_regs(struct snd_akm4xxx *ak, unsigned char addr, unsigned char mask, unsigned char value) { unsigned char tmp; int chip; for (chip = 0; chip < ak->num_chips; chip++) { tmp = snd_akm4xxx_get(ak, chip, addr); tmp &= ~mask; /* set the new bits */ ...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/quartet.c
static void qtet_akm_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) { unsigned char ak4620_dfs; if (rate == 0) return; /* adjust DFS on codecs - see datasheet */ if (rate > 108000) ak4620_dfs = AK4620_DFS1 | AK4620_CKS1; else if (rate > 54000) ak4620_dfs = AK4620_DFS0 | AK4620_CKS0; e...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/quartet.c
static void proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct snd_ice1712 *ice = entry->private_data; char bin_buffer[36]; snd_iprintf(buffer, "SCR: %s\n", get_binary(bin_buffer, get_scr(ice))); snd_iprintf(buffer, "MCR: %s\n", get_binary(bin_buff...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/quartet.c
static int qtet_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned int old, new, smute; old = get_scr(ice) & SCR_MUTE; if (ucontrol->value.integer.value[0]) { new = 0; /* un-smuting DAC ...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/quartet.c
static int qtet_ain12_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned int val, result; val = get_scr(ice) & (SCR_AIN12_SEL1 | SCR_AIN12_SEL0); switch (val) { case SCR_AIN12_LINE: resul...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/quartet.c
static void add_followers(struct snd_card *card, struct snd_kcontrol *master, const char *const *list) { for (; *list; list++) { struct snd_kcontrol *follower = ctl_find(card, *list); if (follower) snd_ctl_add_follower(master, follower); } }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/revo.c
static void revo_i2c_start(struct snd_i2c_bus *bus) { struct snd_ice1712 *ice = bus->private_data; snd_ice1712_save_gpio_status(ice); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/revo.c
static void revo_i2c_stop(struct snd_i2c_bus *bus) { struct snd_ice1712 *ice = bus->private_data; snd_ice1712_restore_gpio_status(ice); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/revo.c
static int revo_i2c_getdata(struct snd_i2c_bus *bus, int ack) { struct snd_ice1712 *ice = bus->private_data; int bit; if (ack) udelay(5); bit = snd_ice1712_gpio_read_bits(ice, VT1724_REVO_I2C_DATA) ? 1 : 0; return bit; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/revo.c
static unsigned int ap192_4wire_start(struct snd_ice1712 *ice) { unsigned int tmp; snd_ice1712_save_gpio_status(ice); tmp = snd_ice1712_gpio_read(ice); tmp |= VT1724_REVO_CCLK; tmp |= VT1724_REVO_CS0; tmp &= ~VT1724_REVO_CS3; snd_ice1712_gpio_write(ice, tmp); udelay(1); return tmp; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/revo.c
static int ap192_ak4114_init(struct snd_ice1712 *ice) { static const unsigned char ak4114_init_vals[] = { AK4114_RST | AK4114_PWN | AK4114_OCKS0, AK4114_DIF_I24I2S, AK4114_TX1E, AK4114_EFH_1024 | AK4114_DIT | AK4114_IPS(0), 0, 0}; static const unsigned char ak4114_init_txcsb[] = ...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/se.c
static void se200pci_WM8740_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate) {}
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/se.c
static void se200pci_WM8766_init(struct snd_ice1712 *ice) { se200pci_WM8766_write(ice, 0x1f, 0x000); udelay(10); se200pci_WM8766_set_volume(ice, 0, 0, 0); /* volume L=0 R=0 */ se200pci_WM8766_set_volume(ice, 1, 0, 0); /* volume L=0 R=0 */ se200pci_WM8766_set_volume(ice, 2, 0, 0); /* volume L=0 R=0 */ se20...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/se.c
static void se200pci_WM8766_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate) { if (rate > 96000) se200pci_WM8766_write(ice, 0x0a, 0x000); else se200pci_WM8766_write(ice, 0x0a, 0x080); /* MCLK=256fs */ }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/se.c
static void se200pci_WM8776_write(struct snd_ice1712 *ice, unsigned int addr, unsigned int data) { unsigned int val; val = (addr << 9) | data; snd_vt1724_write_i2c(ice, 0x34, val >> 8, val & 0xff); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/se.c
static void se200pci_WM8776_set_input_volume(struct snd_ice1712 *ice, unsigned int vol1, unsigned int vol2) { se200pci_WM8776_write(ice, 0x0e, vol1); se200pci_WM8776_write(ice, 0x0f, vol2 | 0x100); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/se.c
static void se200pci_WM8776_set_afl(struct snd_ice1712 *ice, unsigned int afl) { if (afl) se200pci_WM8776_write(ice, 0x16, 0x005); else se200pci_WM8776_write(ice, 0x16, 0x001); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/se.c
static int se200pci_get_enum_count(int n) { const char *const *member; int c; member = se200pci_cont[n].member; if (!member) return 0; for (c = 0; member[c]; c++) ; return c; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/se.c
static int se200pci_cont_enum_info(struct snd_kcontrol *kc, struct snd_ctl_elem_info *uinfo) { int n, c; n = kc->private_value; c = se200pci_get_enum_count(n); if (!c) return -EINVAL; return snd_ctl_enum_info(uinfo, 1, c, se200pci_cont[n].member); }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/se.c
static int se200pci_cont_enum_get(struct snd_kcontrol *kc, struct snd_ctl_elem_value *uc) { struct snd_ice1712 *ice = snd_kcontrol_chip(kc); struct se_spec *spec = ice->spec; int n = kc->private_value; uc->value.enumerated.item[0] = spec->vol[n].ch1; return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/se.c
static void se200pci_cont_update(struct snd_ice1712 *ice, int n) { struct se_spec *spec = ice->spec; switch (se200pci_cont[n].target) { case WM8766: se200pci_WM8766_set_volume(ice, se200pci_cont[n].ch, spec->vol[n].ch1, spec->vol[n].ch2); break; case WM8776in: se200p...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/wm8766.c
void snd_wm8766_init(struct snd_wm8766 *wm) { int i; static const u16 default_values[] = { 0x000, 0x100, 0x120, 0x000, 0x000, 0x100, 0x000, 0x100, 0x000, 0x000, 0x080, }; memcpy(wm->ctl, snd_wm8766_default_ctl, sizeof(wm->ctl)); snd_wm8766_write(wm, WM8766_REG_RESET, 0x00); udelay(10); /* lo...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/wm8766.c
int snd_wm8766_build_controls(struct snd_wm8766 *wm) { int err, i; for (i = 0; i < WM8766_CTL_COUNT; i++) if (wm->ctl[i].name) { err = snd_wm8766_add_control(wm, i); if (err < 0) return err; } return 0; }
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/wm8776.c
static int snd_wm8776_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_wm8776 *wm = snd_kcontrol_chip(kcontrol); int n = kcontrol->private_value; u16 val1, val2; if (wm->ctl[n].get) wm->ctl[n].get(wm, &val1, &val2); else { val1 = ...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/wtm.c
static void stac9460_dac_mute_all(struct snd_ice1712 *ice, unsigned char mute, unsigned short int *change_mask) { unsigned char new, old; int id, idx, change; for (id = 0; id < 7; id++) { if (*change_mask & (0x01 << id)) { if (id == 0) idx = STAC946X_MASTER_VOL...
[ 0, 0 ]
Linux Kernel
sound/pci/ice1712/wtm.c
static int stac9460_dac_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); struct wtm_spec *spec = ice->spec; unsigned char val; int idx, id; mutex_lock(&spec->mute_mutex); if (kcontrol->pr...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/wtm.c
static int stac9460_dac_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned char new, old; int id, idx; int change; if (kcontrol->private_value) { idx = STAC946X_MASTER_VOLUME; ...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/wtm.c
static int stac9460_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); int idx, id; unsigned char tmp, ovol, nvol; int change; if (kcontrol->private_value) { idx = STAC946X_MASTER_VOLUME;...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/wtm.c
static int stac9460_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); unsigned char val; int i, id; id = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); if (id == 0) { for (i = 0; i < 2...
[ 1, 0 ]
Linux Kernel
sound/pci/ice1712/wtm.c
static int stac9460_adc_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); int i, reg, id; unsigned char vol; id = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); if (id == 0) { for (i = 0; i ...
[ 1, 0 ]