Lines Matching refs:ad1843
172 static int ad1843_read_bits(struct snd_ad1843 *ad1843, in ad1843_read_bits() argument
177 w = ad1843->read(ad1843->chip, field->reg); in ad1843_read_bits()
185 static int ad1843_write_bits(struct snd_ad1843 *ad1843, in ad1843_write_bits() argument
191 w = ad1843->read(ad1843->chip, field->reg); in ad1843_write_bits()
196 ad1843->write(ad1843->chip, field->reg, w); in ad1843_write_bits()
214 static void ad1843_read_multi(struct snd_ad1843 *ad1843, int argcount, ...) in ad1843_read_multi() argument
226 w = ad1843->read(ad1843->chip, reg); in ad1843_read_multi()
246 static void ad1843_write_multi(struct snd_ad1843 *ad1843, int argcount, ...) in ad1843_write_multi() argument
273 w = ad1843->read(ad1843->chip, reg); in ad1843_write_multi()
277 ad1843->write(ad1843->chip, reg, w); in ad1843_write_multi()
280 int ad1843_get_gain_max(struct snd_ad1843 *ad1843, int id) in ad1843_get_gain_max() argument
296 int ad1843_get_gain(struct snd_ad1843 *ad1843, int id) in ad1843_get_gain() argument
302 ad1843_read_multi(ad1843, 2, gp->lfield, &lg, gp->rfield, &rg); in ad1843_get_gain()
308 ad1843_read_multi(ad1843, 2, gp->lmute, &lm, gp->rmute, &rm); in ad1843_get_gain()
323 int ad1843_set_gain(struct snd_ad1843 *ad1843, int id, int newval) in ad1843_set_gain() argument
338 ad1843_write_multi(ad1843, 2, gp->lmute, lm, gp->rmute, rm); in ad1843_set_gain()
339 ad1843_write_multi(ad1843, 2, gp->lfield, lg, gp->rfield, rg); in ad1843_set_gain()
340 return ad1843_get_gain(ad1843, id); in ad1843_set_gain()
345 int ad1843_get_recsrc(struct snd_ad1843 *ad1843) in ad1843_get_recsrc() argument
347 int val = ad1843_read_bits(ad1843, &ad1843_LSS); in ad1843_get_recsrc()
351 ad1843_write_multi(ad1843, 2, in ad1843_get_recsrc()
363 int ad1843_set_recsrc(struct snd_ad1843 *ad1843, int newsrc) in ad1843_set_recsrc() argument
368 ad1843_write_multi(ad1843, 2, &ad1843_LSS, newsrc, &ad1843_RSS, newsrc); in ad1843_set_recsrc()
374 void ad1843_setup_dac(struct snd_ad1843 *ad1843, in ad1843_setup_dac() argument
414 ad1843_write_bits(ad1843, &ad1843_C2C, framerate); in ad1843_setup_dac()
415 ad1843_write_multi(ad1843, 2, in ad1843_setup_dac()
419 ad1843_write_bits(ad1843, &ad1843_C1C, framerate); in ad1843_setup_dac()
420 ad1843_write_multi(ad1843, 2, in ad1843_setup_dac()
426 void ad1843_shutdown_dac(struct snd_ad1843 *ad1843, unsigned int id) in ad1843_shutdown_dac() argument
429 ad1843_write_bits(ad1843, &ad1843_DA2F, 1); in ad1843_shutdown_dac()
431 ad1843_write_bits(ad1843, &ad1843_DA1F, 1); in ad1843_shutdown_dac()
434 void ad1843_setup_adc(struct snd_ad1843 *ad1843, in ad1843_setup_adc() argument
450 ad1843_write_bits(ad1843, &ad1843_C3C, framerate); in ad1843_setup_adc()
451 ad1843_write_multi(ad1843, 2, in ad1843_setup_adc()
455 void ad1843_shutdown_adc(struct snd_ad1843 *ad1843) in ad1843_shutdown_adc() argument
468 int ad1843_init(struct snd_ad1843 *ad1843) in ad1843_init() argument
472 if (ad1843_read_bits(ad1843, &ad1843_INIT) != 0) { in ad1843_init()
477 ad1843_write_bits(ad1843, &ad1843_SCF, 1); in ad1843_init()
480 ad1843_write_bits(ad1843, &ad1843_PDNI, 0); in ad1843_init()
483 while (ad1843_read_bits(ad1843, &ad1843_PDNO)) { in ad1843_init()
493 ad1843_write_multi(ad1843, 3, in ad1843_init()
501 ad1843_write_multi(ad1843, 4, in ad1843_init()
508 ad1843_write_bits(ad1843, &ad1843_ADTLK, 1); in ad1843_init()
509 ad1843_write_multi(ad1843, 7, in ad1843_init()
521 ad1843_set_gain(ad1843, AD1843_GAIN_RECLEV, 0); in ad1843_init()
522 ad1843_set_gain(ad1843, AD1843_GAIN_LINE, 0); in ad1843_init()
523 ad1843_set_gain(ad1843, AD1843_GAIN_LINE_2, 0); in ad1843_init()
524 ad1843_set_gain(ad1843, AD1843_GAIN_MIC, 0); in ad1843_init()
525 ad1843_set_gain(ad1843, AD1843_GAIN_PCM_0, 0); in ad1843_init()
526 ad1843_set_gain(ad1843, AD1843_GAIN_PCM_1, 0); in ad1843_init()
530 ad1843_write_multi(ad1843, 2, &ad1843_LDA1GM, 0, &ad1843_RDA1GM, 0); in ad1843_init()
532 ad1843_write_multi(ad1843, 2, &ad1843_LDA2GM, 0, &ad1843_RDA2GM, 0); in ad1843_init()
537 ad1843_set_recsrc(ad1843, 2); in ad1843_init()
538 ad1843_write_multi(ad1843, 2, &ad1843_LMGE, 1, &ad1843_RMGE, 1); in ad1843_init()
541 ad1843_write_multi(ad1843, 3, in ad1843_init()