Searched refs:ad1843 (Results 1 - 4 of 4) sorted by relevance

/linux-4.1.27/include/sound/
H A Dad1843.h27 int ad1843_get_gain_max(struct snd_ad1843 *ad1843, int id);
28 int ad1843_get_gain(struct snd_ad1843 *ad1843, int id);
29 int ad1843_set_gain(struct snd_ad1843 *ad1843, int id, int newval);
30 int ad1843_get_recsrc(struct snd_ad1843 *ad1843);
31 int ad1843_set_recsrc(struct snd_ad1843 *ad1843, int newsrc);
32 void ad1843_setup_dac(struct snd_ad1843 *ad1843,
37 void ad1843_shutdown_dac(struct snd_ad1843 *ad1843,
39 void ad1843_setup_adc(struct snd_ad1843 *ad1843,
43 void ad1843_shutdown_adc(struct snd_ad1843 *ad1843);
44 int ad1843_init(struct snd_ad1843 *ad1843);
/linux-4.1.27/sound/mips/
H A Dad1843.c31 #include <sound/ad1843.h>
186 static int ad1843_read_bits(struct snd_ad1843 *ad1843, ad1843_read_bits() argument
191 w = ad1843->read(ad1843->chip, field->reg); ad1843_read_bits()
199 static int ad1843_write_bits(struct snd_ad1843 *ad1843, ad1843_write_bits() argument
205 w = ad1843->read(ad1843->chip, field->reg); ad1843_write_bits()
210 ad1843->write(ad1843->chip, field->reg, w); ad1843_write_bits()
218 * ad1843 requires 256 bit times at 12.288 MHz, or nearly 20
223 * ad1843_read_multi(ad1843, nfields,
228 static void ad1843_read_multi(struct snd_ad1843 *ad1843, int argcount, ...) ad1843_read_multi() argument
240 w = ad1843->read(ad1843->chip, reg); ad1843_read_multi()
255 * ad1843_write_multi(ad1843, nfields,
260 static void ad1843_write_multi(struct snd_ad1843 *ad1843, int argcount, ...) ad1843_write_multi() argument
287 w = ad1843->read(ad1843->chip, reg); ad1843_write_multi()
291 ad1843->write(ad1843->chip, reg, w); ad1843_write_multi()
294 int ad1843_get_gain_max(struct snd_ad1843 *ad1843, int id) ad1843_get_gain_max() argument
310 int ad1843_get_gain(struct snd_ad1843 *ad1843, int id) ad1843_get_gain() argument
316 ad1843_read_multi(ad1843, 2, gp->lfield, &lg, gp->rfield, &rg); ad1843_get_gain()
322 ad1843_read_multi(ad1843, 2, gp->lmute, &lm, gp->rmute, &rm); ad1843_get_gain()
337 int ad1843_set_gain(struct snd_ad1843 *ad1843, int id, int newval) ad1843_set_gain() argument
352 ad1843_write_multi(ad1843, 2, gp->lmute, lm, gp->rmute, rm); ad1843_set_gain()
353 ad1843_write_multi(ad1843, 2, gp->lfield, lg, gp->rfield, rg); ad1843_set_gain()
354 return ad1843_get_gain(ad1843, id); ad1843_set_gain()
359 int ad1843_get_recsrc(struct snd_ad1843 *ad1843) ad1843_get_recsrc() argument
361 int val = ad1843_read_bits(ad1843, &ad1843_LSS); ad1843_get_recsrc()
365 ad1843_write_multi(ad1843, 2, ad1843_get_recsrc()
377 int ad1843_set_recsrc(struct snd_ad1843 *ad1843, int newsrc) ad1843_set_recsrc() argument
382 ad1843_write_multi(ad1843, 2, &ad1843_LSS, newsrc, &ad1843_RSS, newsrc); ad1843_set_recsrc()
386 /* Setup ad1843 for D/A conversion. */
388 void ad1843_setup_dac(struct snd_ad1843 *ad1843, ad1843_setup_dac() argument
428 ad1843_write_bits(ad1843, &ad1843_C2C, framerate); ad1843_setup_dac()
429 ad1843_write_multi(ad1843, 2, ad1843_setup_dac()
433 ad1843_write_bits(ad1843, &ad1843_C1C, framerate); ad1843_setup_dac()
434 ad1843_write_multi(ad1843, 2, ad1843_setup_dac()
440 void ad1843_shutdown_dac(struct snd_ad1843 *ad1843, unsigned int id) ad1843_shutdown_dac() argument
443 ad1843_write_bits(ad1843, &ad1843_DA2F, 1); ad1843_shutdown_dac()
445 ad1843_write_bits(ad1843, &ad1843_DA1F, 1); ad1843_shutdown_dac()
448 void ad1843_setup_adc(struct snd_ad1843 *ad1843, ad1843_setup_adc() argument
464 ad1843_write_bits(ad1843, &ad1843_C3C, framerate); ad1843_setup_adc()
465 ad1843_write_multi(ad1843, 2, ad1843_setup_adc()
469 void ad1843_shutdown_adc(struct snd_ad1843 *ad1843) ad1843_shutdown_adc() argument
475 * Fully initialize the ad1843. As described in the AD1843 data
482 int ad1843_init(struct snd_ad1843 *ad1843) ad1843_init() argument
486 if (ad1843_read_bits(ad1843, &ad1843_INIT) != 0) { ad1843_init()
487 printk(KERN_ERR "ad1843: AD1843 won't initialize\n"); ad1843_init()
491 ad1843_write_bits(ad1843, &ad1843_SCF, 1); ad1843_init()
494 ad1843_write_bits(ad1843, &ad1843_PDNI, 0); ad1843_init()
497 while (ad1843_read_bits(ad1843, &ad1843_PDNO)) { ad1843_init()
500 "ad1843: AD1843 won't power up\n"); ad1843_init()
507 ad1843_write_multi(ad1843, 3, ad1843_init()
515 ad1843_write_multi(ad1843, 4, ad1843_init()
522 ad1843_write_bits(ad1843, &ad1843_ADTLK, 1); ad1843_init()
523 ad1843_write_multi(ad1843, 7, ad1843_init()
535 ad1843_set_gain(ad1843, AD1843_GAIN_RECLEV, 0); ad1843_init()
536 ad1843_set_gain(ad1843, AD1843_GAIN_LINE, 0); ad1843_init()
537 ad1843_set_gain(ad1843, AD1843_GAIN_LINE_2, 0); ad1843_init()
538 ad1843_set_gain(ad1843, AD1843_GAIN_MIC, 0); ad1843_init()
539 ad1843_set_gain(ad1843, AD1843_GAIN_PCM_0, 0); ad1843_init()
540 ad1843_set_gain(ad1843, AD1843_GAIN_PCM_1, 0); ad1843_init()
544 ad1843_write_multi(ad1843, 2, &ad1843_LDA1GM, 0, &ad1843_RDA1GM, 0); ad1843_init()
546 ad1843_write_multi(ad1843, 2, &ad1843_LDA2GM, 0, &ad1843_RDA2GM, 0); ad1843_init()
551 ad1843_set_recsrc(ad1843, 2); ad1843_init()
552 ad1843_write_multi(ad1843, 2, &ad1843_LMGE, 1, &ad1843_RMGE, 1); ad1843_init()
555 ad1843_write_multi(ad1843, 3, ad1843_init()
H A DMakefile6 snd-sgi-o2-objs := sgio2audio.o ad1843.o
H A Dsgio2audio.c43 #include <sound/ad1843.h>
98 struct snd_ad1843 ad1843; member in struct:snd_sgio2audio
166 uinfo->value.integer.max = ad1843_get_gain_max(&chip->ad1843, sgio2audio_gain_info()
177 vol = ad1843_get_gain(&chip->ad1843, (int)kcontrol->private_value); sgio2audio_gain_get()
191 oldvol = ad1843_get_gain(&chip->ad1843, kcontrol->private_value); sgio2audio_gain_put()
195 newvol = ad1843_set_gain(&chip->ad1843, kcontrol->private_value, sgio2audio_gain_put()
215 ucontrol->value.enumerated.item[0] = ad1843_get_recsrc(&chip->ad1843); sgio2audio_source_get()
225 oldsrc = ad1843_get_recsrc(&chip->ad1843); sgio2audio_source_put()
226 newsrc = ad1843_set_recsrc(&chip->ad1843, sgio2audio_source_put()
629 ad1843_setup_dac(&chip->ad1843, snd_sgio2audio_pcm_prepare()
636 ad1843_setup_adc(&chip->ad1843, snd_sgio2audio_pcm_prepare()
890 chip->ad1843.read = read_ad1843_reg; snd_sgio2audio_create()
891 chip->ad1843.write = write_ad1843_reg; snd_sgio2audio_create()
892 chip->ad1843.chip = chip; snd_sgio2audio_create()
895 err = ad1843_init(&chip->ad1843); snd_sgio2audio_create()

Completed in 62 milliseconds