• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/sound/i2c/other/

Lines Matching defs:ak4117

28 #include <sound/ak4117.h>
39 static void reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char val)
41 ak4117->write(ak4117->private_data, reg, val);
42 if (reg < sizeof(ak4117->regmap))
43 ak4117->regmap[reg] = val;
46 static inline unsigned char reg_read(struct ak4117 *ak4117, unsigned char reg)
48 return ak4117->read(ak4117->private_data, reg);
52 static void snd_ak4117_free(struct ak4117 *chip)
60 struct ak4117 *chip = device->device_data;
66 const unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117)
68 struct ak4117 *chip;
107 void snd_ak4117_reg_write(struct ak4117 *chip, unsigned char reg, unsigned char mask, unsigned char val)
114 void snd_ak4117_reinit(struct ak4117 *chip)
162 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
178 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
200 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
209 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
235 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
251 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
285 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
307 struct ak4117 *chip = snd_kcontrol_chip(kcontrol);
323 .private_value = offsetof(struct ak4117, parity_errors),
331 .private_value = offsetof(struct ak4117, v_bit_errors),
339 .private_value = offsetof(struct ak4117, ccrc_errors),
347 .private_value = offsetof(struct ak4117, qcrc_errors),
418 int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *cap_substream)
426 ak4117->substream = cap_substream;
428 kctl = snd_ctl_new1(&snd_ak4117_iec958_controls[idx], ak4117);
433 err = snd_ctl_add(ak4117->card, kctl);
436 ak4117->kctls[idx] = kctl;
441 int snd_ak4117_external_rate(struct ak4117 *ak4117)
445 rcs1 = reg_read(ak4117, AK4117_REG_RCS1);
449 int snd_ak4117_check_rate_and_errors(struct ak4117 *ak4117, unsigned int flags)
451 struct snd_pcm_runtime *runtime = ak4117->substream ? ak4117->substream->runtime : NULL;
457 rcs1 = reg_read(ak4117, AK4117_REG_RCS1);
460 rcs0 = reg_read(ak4117, AK4117_REG_RCS0);
461 rcs2 = reg_read(ak4117, AK4117_REG_RCS2);
463 spin_lock_irqsave(&ak4117->lock, _flags);
465 ak4117->parity_errors++;
467 ak4117->v_bit_errors++;
469 ak4117->ccrc_errors++;
471 ak4117->qcrc_errors++;
472 c0 = (ak4117->rcs0 & (AK4117_QINT | AK4117_CINT | AK4117_STC | AK4117_AUDION | AK4117_AUTO | AK4117_UNLCK)) ^
474 c1 = (ak4117->rcs1 & (AK4117_DTSCD | AK4117_NPCM | AK4117_PEM | 0x0f)) ^
476 ak4117->rcs0 = rcs0 & ~(AK4117_QINT | AK4117_CINT | AK4117_STC);
477 ak4117->rcs1 = rcs1;
478 ak4117->rcs2 = rcs2;
479 spin_unlock_irqrestore(&ak4117->lock, _flags);
482 snd_ctl_notify(ak4117->card, SNDRV_CTL_EVENT_MASK_VALUE, &ak4117->kctls[0]->id);
484 snd_ctl_notify(ak4117->card, SNDRV_CTL_EVENT_MASK_VALUE, &ak4117->kctls[1]->id);
486 snd_ctl_notify(ak4117->card, SNDRV_CTL_EVENT_MASK_VALUE, &ak4117->kctls[2]->id);
488 snd_ctl_notify(ak4117->card, SNDRV_CTL_EVENT_MASK_VALUE, &ak4117->kctls[3]->id);
492 snd_ctl_notify(ak4117->card, SNDRV_CTL_EVENT_MASK_VALUE, &ak4117->kctls[4]->id);
495 snd_ctl_notify(ak4117->card, SNDRV_CTL_EVENT_MASK_VALUE, &ak4117->kctls[6]->id);
497 snd_ctl_notify(ak4117->card, SNDRV_CTL_EVENT_MASK_VALUE, &ak4117->kctls[8]->id);
500 snd_ctl_notify(ak4117->card, SNDRV_CTL_EVENT_MASK_VALUE, &ak4117->kctls[9]->id);
502 snd_ctl_notify(ak4117->card, SNDRV_CTL_EVENT_MASK_VALUE, &ak4117->kctls[10]->id);
504 snd_ctl_notify(ak4117->card, SNDRV_CTL_EVENT_MASK_VALUE, &ak4117->kctls[11]->id);
506 if (ak4117->change_callback && (c0 | c1) != 0)
507 ak4117->change_callback(ak4117, c0, c1);
513 snd_pcm_stream_lock_irqsave(ak4117->substream, _flags);
514 if (snd_pcm_running(ak4117->substream)) {
516 snd_pcm_stop(ak4117->substream, SNDRV_PCM_STATE_DRAINING);
520 snd_pcm_stream_unlock_irqrestore(ak4117->substream, _flags);
527 struct ak4117 *chip = (struct ak4117 *)data;