ak4531 53 include/sound/ak4531_codec.h void (*write) (struct snd_ak4531 *ak4531, unsigned short reg, ak4531 56 include/sound/ak4531_codec.h void (*private_free) (struct snd_ak4531 *ak4531); ak4531 66 include/sound/ak4531_codec.h void snd_ak4531_suspend(struct snd_ak4531 *ak4531); ak4531 67 include/sound/ak4531_codec.h void snd_ak4531_resume(struct snd_ak4531 *ak4531); ak4531 23 sound/pci/ak4531_codec.c static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531); ak4531 31 sound/pci/ak4531_codec.c static void snd_ak4531_dump(struct snd_ak4531 *ak4531) ak4531 37 sound/pci/ak4531_codec.c idx, ak4531->regs[idx]); ak4531 73 sound/pci/ak4531_codec.c struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol); ak4531 80 sound/pci/ak4531_codec.c mutex_lock(&ak4531->reg_mutex); ak4531 81 sound/pci/ak4531_codec.c val = (ak4531->regs[reg] >> shift) & mask; ak4531 82 sound/pci/ak4531_codec.c mutex_unlock(&ak4531->reg_mutex); ak4531 92 sound/pci/ak4531_codec.c struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol); ak4531 105 sound/pci/ak4531_codec.c mutex_lock(&ak4531->reg_mutex); ak4531 106 sound/pci/ak4531_codec.c val = (ak4531->regs[reg] & ~(mask << shift)) | val; ak4531 107 sound/pci/ak4531_codec.c change = val != ak4531->regs[reg]; ak4531 108 sound/pci/ak4531_codec.c ak4531->write(ak4531, reg, ak4531->regs[reg] = val); ak4531 109 sound/pci/ak4531_codec.c mutex_unlock(&ak4531->reg_mutex); ak4531 140 sound/pci/ak4531_codec.c struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol); ak4531 149 sound/pci/ak4531_codec.c mutex_lock(&ak4531->reg_mutex); ak4531 150 sound/pci/ak4531_codec.c left = (ak4531->regs[left_reg] >> left_shift) & mask; ak4531 151 sound/pci/ak4531_codec.c right = (ak4531->regs[right_reg] >> right_shift) & mask; ak4531 152 sound/pci/ak4531_codec.c mutex_unlock(&ak4531->reg_mutex); ak4531 164 sound/pci/ak4531_codec.c struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol); ak4531 182 sound/pci/ak4531_codec.c mutex_lock(&ak4531->reg_mutex); ak4531 184 sound/pci/ak4531_codec.c left = (ak4531->regs[left_reg] & ~((mask << left_shift) | (mask << right_shift))) | left | right; ak4531 185 sound/pci/ak4531_codec.c change = left != ak4531->regs[left_reg]; ak4531 186 sound/pci/ak4531_codec.c ak4531->write(ak4531, left_reg, ak4531->regs[left_reg] = left); ak4531 188 sound/pci/ak4531_codec.c left = (ak4531->regs[left_reg] & ~(mask << left_shift)) | left; ak4531 189 sound/pci/ak4531_codec.c right = (ak4531->regs[right_reg] & ~(mask << right_shift)) | right; ak4531 190 sound/pci/ak4531_codec.c change = left != ak4531->regs[left_reg] || right != ak4531->regs[right_reg]; ak4531 191 sound/pci/ak4531_codec.c ak4531->write(ak4531, left_reg, ak4531->regs[left_reg] = left); ak4531 192 sound/pci/ak4531_codec.c ak4531->write(ak4531, right_reg, ak4531->regs[right_reg] = right); ak4531 194 sound/pci/ak4531_codec.c mutex_unlock(&ak4531->reg_mutex); ak4531 215 sound/pci/ak4531_codec.c struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol); ak4531 221 sound/pci/ak4531_codec.c mutex_lock(&ak4531->reg_mutex); ak4531 222 sound/pci/ak4531_codec.c ucontrol->value.integer.value[0] = (ak4531->regs[reg1] >> left_shift) & 1; ak4531 223 sound/pci/ak4531_codec.c ucontrol->value.integer.value[1] = (ak4531->regs[reg2] >> left_shift) & 1; ak4531 224 sound/pci/ak4531_codec.c ucontrol->value.integer.value[2] = (ak4531->regs[reg1] >> right_shift) & 1; ak4531 225 sound/pci/ak4531_codec.c ucontrol->value.integer.value[3] = (ak4531->regs[reg2] >> right_shift) & 1; ak4531 226 sound/pci/ak4531_codec.c mutex_unlock(&ak4531->reg_mutex); ak4531 232 sound/pci/ak4531_codec.c struct snd_ak4531 *ak4531 = snd_kcontrol_chip(kcontrol); ak4531 240 sound/pci/ak4531_codec.c mutex_lock(&ak4531->reg_mutex); ak4531 241 sound/pci/ak4531_codec.c val1 = ak4531->regs[reg1] & ~((1 << left_shift) | (1 << right_shift)); ak4531 242 sound/pci/ak4531_codec.c val2 = ak4531->regs[reg2] & ~((1 << left_shift) | (1 << right_shift)); ak4531 247 sound/pci/ak4531_codec.c change = val1 != ak4531->regs[reg1] || val2 != ak4531->regs[reg2]; ak4531 248 sound/pci/ak4531_codec.c ak4531->write(ak4531, reg1, ak4531->regs[reg1] = val1); ak4531 249 sound/pci/ak4531_codec.c ak4531->write(ak4531, reg2, ak4531->regs[reg2] = val2); ak4531 250 sound/pci/ak4531_codec.c mutex_unlock(&ak4531->reg_mutex); ak4531 322 sound/pci/ak4531_codec.c static int snd_ak4531_free(struct snd_ak4531 *ak4531) ak4531 324 sound/pci/ak4531_codec.c if (ak4531) { ak4531 325 sound/pci/ak4531_codec.c if (ak4531->private_free) ak4531 326 sound/pci/ak4531_codec.c ak4531->private_free(ak4531); ak4531 327 sound/pci/ak4531_codec.c kfree(ak4531); ak4531 334 sound/pci/ak4531_codec.c struct snd_ak4531 *ak4531 = device->device_data; ak4531 335 sound/pci/ak4531_codec.c return snd_ak4531_free(ak4531); ak4531 373 sound/pci/ak4531_codec.c struct snd_ak4531 *ak4531; ak4531 382 sound/pci/ak4531_codec.c ak4531 = kzalloc(sizeof(*ak4531), GFP_KERNEL); ak4531 383 sound/pci/ak4531_codec.c if (ak4531 == NULL) ak4531 385 sound/pci/ak4531_codec.c *ak4531 = *_ak4531; ak4531 386 sound/pci/ak4531_codec.c mutex_init(&ak4531->reg_mutex); ak4531 388 sound/pci/ak4531_codec.c snd_ak4531_free(ak4531); ak4531 392 sound/pci/ak4531_codec.c ak4531->write(ak4531, AK4531_RESET, 0x03); /* no RST, PD */ ak4531 394 sound/pci/ak4531_codec.c ak4531->write(ak4531, AK4531_CLOCK, 0x00); /* CODEC ADC and CODEC DAC use {LR,B}CLK2 and run off LRCLK2 PLL */ ak4531 398 sound/pci/ak4531_codec.c ak4531->write(ak4531, idx, ak4531->regs[idx] = snd_ak4531_initial_map[idx]); /* recording source is mixer */ ak4531 401 sound/pci/ak4531_codec.c if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_ak4531_controls[idx], ak4531))) < 0) { ak4531 402 sound/pci/ak4531_codec.c snd_ak4531_free(ak4531); ak4531 406 sound/pci/ak4531_codec.c snd_ak4531_proc_init(card, ak4531); ak4531 407 sound/pci/ak4531_codec.c if ((err = snd_device_new(card, SNDRV_DEV_CODEC, ak4531, &ops)) < 0) { ak4531 408 sound/pci/ak4531_codec.c snd_ak4531_free(ak4531); ak4531 413 sound/pci/ak4531_codec.c snd_ak4531_dump(ak4531); ak4531 416 sound/pci/ak4531_codec.c *rak4531 = ak4531; ak4531 424 sound/pci/ak4531_codec.c void snd_ak4531_suspend(struct snd_ak4531 *ak4531) ak4531 427 sound/pci/ak4531_codec.c ak4531->write(ak4531, AK4531_LMASTER, 0x9f); ak4531 428 sound/pci/ak4531_codec.c ak4531->write(ak4531, AK4531_RMASTER, 0x9f); ak4531 430 sound/pci/ak4531_codec.c ak4531->write(ak4531, AK4531_RESET, 0x01); ak4531 433 sound/pci/ak4531_codec.c void snd_ak4531_resume(struct snd_ak4531 *ak4531) ak4531 438 sound/pci/ak4531_codec.c ak4531->write(ak4531, AK4531_RESET, 0x03); ak4531 440 sound/pci/ak4531_codec.c ak4531->write(ak4531, AK4531_CLOCK, 0x00); ak4531 445 sound/pci/ak4531_codec.c ak4531->write(ak4531, idx, ak4531->regs[idx]); ak4531 457 sound/pci/ak4531_codec.c struct snd_ak4531 *ak4531 = entry->private_data; ak4531 462 sound/pci/ak4531_codec.c ak4531->regs[AK4531_AD_IN] & 1 ? "external" : "mixer", ak4531 463 sound/pci/ak4531_codec.c ak4531->regs[AK4531_MIC_GAIN] & 1 ? "+30dB" : "+0dB"); ak4531 467 sound/pci/ak4531_codec.c snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531) ak4531 469 sound/pci/ak4531_codec.c snd_card_ro_proc_new(card, "ak4531", ak4531, snd_ak4531_proc_read); ak4531 398 sound/pci/ens1370.c struct snd_ak4531 *ak4531; ak4531 569 sound/pci/ens1370.c static void snd_es1370_codec_write(struct snd_ak4531 *ak4531, ak4531 572 sound/pci/ens1370.c struct ensoniq *ensoniq = ak4531->private_data; ak4531 1728 sound/pci/ens1370.c static void snd_ensoniq_mixer_free_ak4531(struct snd_ak4531 *ak4531) ak4531 1730 sound/pci/ens1370.c struct ensoniq *ensoniq = ak4531->private_data; ak4531 1731 sound/pci/ens1370.c ensoniq->u.es1370.ak4531 = NULL; ak4531 1737 sound/pci/ens1370.c struct snd_ak4531 ak4531; ak4531 1749 sound/pci/ens1370.c memset(&ak4531, 0, sizeof(ak4531)); ak4531 1750 sound/pci/ens1370.c ak4531.write = snd_es1370_codec_write; ak4531 1751 sound/pci/ens1370.c ak4531.private_data = ensoniq; ak4531 1752 sound/pci/ens1370.c ak4531.private_free = snd_ensoniq_mixer_free_ak4531; ak4531 1753 sound/pci/ens1370.c if ((err = snd_ak4531_mixer(card, &ak4531, &ensoniq->u.es1370.ak4531)) < 0) ak4531 2034 sound/pci/ens1370.c snd_ak4531_suspend(ensoniq->u.es1370.ak4531); ak4531 2049 sound/pci/ens1370.c snd_ak4531_resume(ensoniq->u.es1370.ak4531);