Lines Matching refs:chip
24 static int snd_es1688_dsp_command(struct snd_es1688 *chip, unsigned char val) in snd_es1688_dsp_command() argument
29 if ((inb(ES1688P(chip, STATUS)) & 0x80) == 0) { in snd_es1688_dsp_command()
30 outb(val, ES1688P(chip, COMMAND)); in snd_es1688_dsp_command()
39 static int snd_es1688_dsp_get_byte(struct snd_es1688 *chip) in snd_es1688_dsp_get_byte() argument
44 if (inb(ES1688P(chip, DATA_AVAIL)) & 0x80) in snd_es1688_dsp_get_byte()
45 return inb(ES1688P(chip, READ)); in snd_es1688_dsp_get_byte()
46 …rintd("es1688 get byte failed: 0x%lx = 0x%x!!!\n", ES1688P(chip, DATA_AVAIL), inb(ES1688P(chip, DA… in snd_es1688_dsp_get_byte()
50 static int snd_es1688_write(struct snd_es1688 *chip, in snd_es1688_write() argument
53 if (!snd_es1688_dsp_command(chip, reg)) in snd_es1688_write()
55 return snd_es1688_dsp_command(chip, data); in snd_es1688_write()
58 static int snd_es1688_read(struct snd_es1688 *chip, unsigned char reg) in snd_es1688_read() argument
61 if (!snd_es1688_dsp_command(chip, 0xc0)) in snd_es1688_read()
63 if (!snd_es1688_dsp_command(chip, reg)) in snd_es1688_read()
65 return snd_es1688_dsp_get_byte(chip); in snd_es1688_read()
68 void snd_es1688_mixer_write(struct snd_es1688 *chip, in snd_es1688_mixer_write() argument
71 outb(reg, ES1688P(chip, MIXER_ADDR)); in snd_es1688_mixer_write()
73 outb(data, ES1688P(chip, MIXER_DATA)); in snd_es1688_mixer_write()
77 static unsigned char snd_es1688_mixer_read(struct snd_es1688 *chip, unsigned char reg) in snd_es1688_mixer_read() argument
81 outb(reg, ES1688P(chip, MIXER_ADDR)); in snd_es1688_mixer_read()
83 result = inb(ES1688P(chip, MIXER_DATA)); in snd_es1688_mixer_read()
88 int snd_es1688_reset(struct snd_es1688 *chip) in snd_es1688_reset() argument
92 outb(3, ES1688P(chip, RESET)); /* valid only for ESS chips, SB -> 1 */ in snd_es1688_reset()
94 outb(0, ES1688P(chip, RESET)); in snd_es1688_reset()
96 for (i = 0; i < 1000 && !(inb(ES1688P(chip, DATA_AVAIL)) & 0x80); i++); in snd_es1688_reset()
97 if (inb(ES1688P(chip, READ)) != 0xaa) { in snd_es1688_reset()
98 snd_printd("ess_reset at 0x%lx: failed!!!\n", chip->port); in snd_es1688_reset()
101 snd_es1688_dsp_command(chip, 0xc6); /* enable extended mode */ in snd_es1688_reset()
106 static int snd_es1688_probe(struct snd_es1688 *chip) in snd_es1688_probe() argument
116 spin_lock_irqsave(&chip->reg_lock, flags); /* Some ESS1688 cards need this */ in snd_es1688_probe()
117 inb(ES1688P(chip, ENABLE1)); /* ENABLE1 */ in snd_es1688_probe()
118 inb(ES1688P(chip, ENABLE1)); /* ENABLE1 */ in snd_es1688_probe()
119 inb(ES1688P(chip, ENABLE1)); /* ENABLE1 */ in snd_es1688_probe()
120 inb(ES1688P(chip, ENABLE2)); /* ENABLE2 */ in snd_es1688_probe()
121 inb(ES1688P(chip, ENABLE1)); /* ENABLE1 */ in snd_es1688_probe()
122 inb(ES1688P(chip, ENABLE2)); /* ENABLE2 */ in snd_es1688_probe()
123 inb(ES1688P(chip, ENABLE1)); /* ENABLE1 */ in snd_es1688_probe()
124 inb(ES1688P(chip, ENABLE1)); /* ENABLE1 */ in snd_es1688_probe()
125 inb(ES1688P(chip, ENABLE2)); /* ENABLE2 */ in snd_es1688_probe()
126 inb(ES1688P(chip, ENABLE1)); /* ENABLE1 */ in snd_es1688_probe()
127 inb(ES1688P(chip, ENABLE0)); /* ENABLE0 */ in snd_es1688_probe()
129 if (snd_es1688_reset(chip) < 0) { in snd_es1688_probe()
130 snd_printdd("ESS: [0x%lx] reset failed... 0x%x\n", chip->port, inb(ES1688P(chip, READ))); in snd_es1688_probe()
131 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_probe()
134 snd_es1688_dsp_command(chip, 0xe7); /* return identification */ in snd_es1688_probe()
137 if (inb(ES1688P(chip, DATA_AVAIL)) & 0x80) { in snd_es1688_probe()
139 major = inb(ES1688P(chip, READ)); in snd_es1688_probe()
141 minor = inb(ES1688P(chip, READ)); in snd_es1688_probe()
146 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_probe()
148 snd_printdd("ESS: [0x%lx] found.. major = 0x%x, minor = 0x%x\n", chip->port, major, minor); in snd_es1688_probe()
150 chip->version = (major << 8) | minor; in snd_es1688_probe()
151 if (!chip->version) in snd_es1688_probe()
154 switch (chip->version & 0xfff0) { in snd_es1688_probe()
157 "but driver is in another place\n", chip->port); in snd_es1688_probe()
164 chip->port, chip->version); in snd_es1688_probe()
168 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_probe()
169 snd_es1688_write(chip, 0xb1, 0x10); /* disable IRQ */ in snd_es1688_probe()
170 snd_es1688_write(chip, 0xb2, 0x00); /* disable DMA */ in snd_es1688_probe()
171 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_probe()
174 spin_lock_irqsave(&chip->mixer_lock, flags); in snd_es1688_probe()
175 snd_es1688_mixer_write(chip, 0x40, 0x01); in snd_es1688_probe()
176 spin_unlock_irqrestore(&chip->mixer_lock, flags); in snd_es1688_probe()
181 static int snd_es1688_init(struct snd_es1688 * chip, int enable) in snd_es1688_init() argument
189 if (enable && chip->mpu_port >= 0x300 && chip->mpu_irq > 0 && chip->hardware != ES1688_HW_688) { in snd_es1688_init()
190 tmp = (chip->mpu_port & 0x0f0) >> 4; in snd_es1688_init()
192 switch (chip->mpu_irq) { in snd_es1688_init()
216 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_init()
217 snd_es1688_mixer_write(chip, 0x40, cfg); in snd_es1688_init()
218 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_init()
220 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_init()
221 snd_es1688_read(chip, 0xb1); in snd_es1688_init()
222 snd_es1688_read(chip, 0xb2); in snd_es1688_init()
223 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_init()
226 irq_bits = irqs[chip->irq & 0x0f]; in snd_es1688_init()
230 chip->port, chip->irq); in snd_es1688_init()
237 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_init()
238 snd_es1688_write(chip, 0xb1, cfg | (irq_bits << 2)); in snd_es1688_init()
239 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_init()
241 dma = chip->dma8; in snd_es1688_init()
244 "for ES1688 chip!!\n", chip->port, dma); in snd_es1688_init()
255 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_init()
256 snd_es1688_write(chip, 0xb2, cfg | (dma_bits << 2)); in snd_es1688_init()
257 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_init()
259 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_init()
260 snd_es1688_write(chip, 0xb1, 0x10); /* disable IRQ */ in snd_es1688_init()
261 snd_es1688_write(chip, 0xb2, 0x00); /* disable DMA */ in snd_es1688_init()
262 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_init()
264 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_init()
265 snd_es1688_read(chip, 0xb1); in snd_es1688_init()
266 snd_es1688_read(chip, 0xb2); in snd_es1688_init()
267 snd_es1688_reset(chip); in snd_es1688_init()
268 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_init()
296 static void snd_es1688_set_rate(struct snd_es1688 *chip, struct snd_pcm_substream *substream) in snd_es1688_set_rate() argument
308 snd_es1688_write(chip, 0xa1, bits); in snd_es1688_set_rate()
309 snd_es1688_write(chip, 0xa2, divider); in snd_es1688_set_rate()
312 static int snd_es1688_trigger(struct snd_es1688 *chip, int cmd, unsigned char value) in snd_es1688_trigger() argument
321 spin_lock(&chip->reg_lock); in snd_es1688_trigger()
322 chip->trigger_value = value; in snd_es1688_trigger()
323 val = snd_es1688_read(chip, 0xb8); in snd_es1688_trigger()
325 spin_unlock(&chip->reg_lock); in snd_es1688_trigger()
331 snd_dma_pointer(chip->dma8, chip->dma_size)); in snd_es1688_trigger()
333 snd_es1688_write(chip, 0xb8, (val & 0xf0) | value); in snd_es1688_trigger()
334 spin_unlock(&chip->reg_lock); in snd_es1688_trigger()
341 struct snd_es1688 *chip = snd_pcm_substream_chip(substream); in snd_es1688_playback_prepare() local
346 chip->dma_size = size; in snd_es1688_playback_prepare()
347 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_playback_prepare()
348 snd_es1688_reset(chip); in snd_es1688_playback_prepare()
349 snd_es1688_set_rate(chip, substream); in snd_es1688_playback_prepare()
350 snd_es1688_write(chip, 0xb8, 4); /* auto init DMA mode */ in snd_es1688_playback_prepare()
351 snd_es1688_write(chip, 0xa8, (snd_es1688_read(chip, 0xa8) & ~0x03) | (3 - runtime->channels)); in snd_es1688_playback_prepare()
352 snd_es1688_write(chip, 0xb9, 2); /* demand mode (4 bytes/request) */ in snd_es1688_playback_prepare()
356 snd_es1688_write(chip, 0xb6, 0x80); in snd_es1688_playback_prepare()
357 snd_es1688_write(chip, 0xb7, 0x51); in snd_es1688_playback_prepare()
358 snd_es1688_write(chip, 0xb7, 0xd0); in snd_es1688_playback_prepare()
361 snd_es1688_write(chip, 0xb6, 0x00); in snd_es1688_playback_prepare()
362 snd_es1688_write(chip, 0xb7, 0x71); in snd_es1688_playback_prepare()
363 snd_es1688_write(chip, 0xb7, 0xf4); in snd_es1688_playback_prepare()
368 snd_es1688_write(chip, 0xb6, 0x80); in snd_es1688_playback_prepare()
369 snd_es1688_write(chip, 0xb7, 0x51); in snd_es1688_playback_prepare()
370 snd_es1688_write(chip, 0xb7, 0x98); in snd_es1688_playback_prepare()
373 snd_es1688_write(chip, 0xb6, 0x00); in snd_es1688_playback_prepare()
374 snd_es1688_write(chip, 0xb7, 0x71); in snd_es1688_playback_prepare()
375 snd_es1688_write(chip, 0xb7, 0xbc); in snd_es1688_playback_prepare()
378 snd_es1688_write(chip, 0xb1, (snd_es1688_read(chip, 0xb1) & 0x0f) | 0x50); in snd_es1688_playback_prepare()
379 snd_es1688_write(chip, 0xb2, (snd_es1688_read(chip, 0xb2) & 0x0f) | 0x50); in snd_es1688_playback_prepare()
380 snd_es1688_dsp_command(chip, ES1688_DSP_CMD_SPKON); in snd_es1688_playback_prepare()
381 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_playback_prepare()
384 snd_dma_program(chip->dma8, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT); in snd_es1688_playback_prepare()
385 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_playback_prepare()
386 snd_es1688_write(chip, 0xa4, (unsigned char) count); in snd_es1688_playback_prepare()
387 snd_es1688_write(chip, 0xa5, (unsigned char) (count >> 8)); in snd_es1688_playback_prepare()
388 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_playback_prepare()
395 struct snd_es1688 *chip = snd_pcm_substream_chip(substream); in snd_es1688_playback_trigger() local
396 return snd_es1688_trigger(chip, cmd, 0x05); in snd_es1688_playback_trigger()
402 struct snd_es1688 *chip = snd_pcm_substream_chip(substream); in snd_es1688_capture_prepare() local
407 chip->dma_size = size; in snd_es1688_capture_prepare()
408 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_capture_prepare()
409 snd_es1688_reset(chip); in snd_es1688_capture_prepare()
410 snd_es1688_set_rate(chip, substream); in snd_es1688_capture_prepare()
411 snd_es1688_dsp_command(chip, ES1688_DSP_CMD_SPKOFF); in snd_es1688_capture_prepare()
412 snd_es1688_write(chip, 0xb8, 0x0e); /* auto init DMA mode */ in snd_es1688_capture_prepare()
413 snd_es1688_write(chip, 0xa8, (snd_es1688_read(chip, 0xa8) & ~0x03) | (3 - runtime->channels)); in snd_es1688_capture_prepare()
414 snd_es1688_write(chip, 0xb9, 2); /* demand mode (4 bytes/request) */ in snd_es1688_capture_prepare()
418 snd_es1688_write(chip, 0xb7, 0x51); in snd_es1688_capture_prepare()
419 snd_es1688_write(chip, 0xb7, 0xd0); in snd_es1688_capture_prepare()
422 snd_es1688_write(chip, 0xb7, 0x71); in snd_es1688_capture_prepare()
423 snd_es1688_write(chip, 0xb7, 0xf4); in snd_es1688_capture_prepare()
428 snd_es1688_write(chip, 0xb7, 0x51); in snd_es1688_capture_prepare()
429 snd_es1688_write(chip, 0xb7, 0x98); in snd_es1688_capture_prepare()
432 snd_es1688_write(chip, 0xb7, 0x71); in snd_es1688_capture_prepare()
433 snd_es1688_write(chip, 0xb7, 0xbc); in snd_es1688_capture_prepare()
436 snd_es1688_write(chip, 0xb1, (snd_es1688_read(chip, 0xb1) & 0x0f) | 0x50); in snd_es1688_capture_prepare()
437 snd_es1688_write(chip, 0xb2, (snd_es1688_read(chip, 0xb2) & 0x0f) | 0x50); in snd_es1688_capture_prepare()
438 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_capture_prepare()
441 snd_dma_program(chip->dma8, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT); in snd_es1688_capture_prepare()
442 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_capture_prepare()
443 snd_es1688_write(chip, 0xa4, (unsigned char) count); in snd_es1688_capture_prepare()
444 snd_es1688_write(chip, 0xa5, (unsigned char) (count >> 8)); in snd_es1688_capture_prepare()
445 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_capture_prepare()
452 struct snd_es1688 *chip = snd_pcm_substream_chip(substream); in snd_es1688_capture_trigger() local
453 return snd_es1688_trigger(chip, cmd, 0x0f); in snd_es1688_capture_trigger()
458 struct snd_es1688 *chip = dev_id; in snd_es1688_interrupt() local
460 if (chip->trigger_value == 0x05) /* ok.. playback is active */ in snd_es1688_interrupt()
461 snd_pcm_period_elapsed(chip->playback_substream); in snd_es1688_interrupt()
462 if (chip->trigger_value == 0x0f) /* ok.. capture is active */ in snd_es1688_interrupt()
463 snd_pcm_period_elapsed(chip->capture_substream); in snd_es1688_interrupt()
465 inb(ES1688P(chip, DATA_AVAIL)); /* ack interrupt */ in snd_es1688_interrupt()
471 struct snd_es1688 *chip = snd_pcm_substream_chip(substream); in snd_es1688_playback_pointer() local
474 if (chip->trigger_value != 0x05) in snd_es1688_playback_pointer()
476 ptr = snd_dma_pointer(chip->dma8, chip->dma_size); in snd_es1688_playback_pointer()
482 struct snd_es1688 *chip = snd_pcm_substream_chip(substream); in snd_es1688_capture_pointer() local
485 if (chip->trigger_value != 0x0f) in snd_es1688_capture_pointer()
487 ptr = snd_dma_pointer(chip->dma8, chip->dma_size); in snd_es1688_capture_pointer()
537 struct snd_es1688 *chip = snd_pcm_substream_chip(substream); in snd_es1688_playback_open() local
540 if (chip->capture_substream != NULL) in snd_es1688_playback_open()
542 chip->playback_substream = substream; in snd_es1688_playback_open()
551 struct snd_es1688 *chip = snd_pcm_substream_chip(substream); in snd_es1688_capture_open() local
554 if (chip->playback_substream != NULL) in snd_es1688_capture_open()
556 chip->capture_substream = substream; in snd_es1688_capture_open()
565 struct snd_es1688 *chip = snd_pcm_substream_chip(substream); in snd_es1688_playback_close() local
567 chip->playback_substream = NULL; in snd_es1688_playback_close()
573 struct snd_es1688 *chip = snd_pcm_substream_chip(substream); in snd_es1688_capture_close() local
575 chip->capture_substream = NULL; in snd_es1688_capture_close()
579 static int snd_es1688_free(struct snd_es1688 *chip) in snd_es1688_free() argument
581 if (chip->hardware != ES1688_HW_UNDEF) in snd_es1688_free()
582 snd_es1688_init(chip, 0); in snd_es1688_free()
583 release_and_free_resource(chip->res_port); in snd_es1688_free()
584 if (chip->irq >= 0) in snd_es1688_free()
585 free_irq(chip->irq, (void *) chip); in snd_es1688_free()
586 if (chip->dma8 >= 0) { in snd_es1688_free()
587 disable_dma(chip->dma8); in snd_es1688_free()
588 free_dma(chip->dma8); in snd_es1688_free()
595 struct snd_es1688 *chip = device->device_data; in snd_es1688_dev_free() local
596 return snd_es1688_free(chip); in snd_es1688_dev_free()
599 static const char *snd_es1688_chip_id(struct snd_es1688 *chip) in snd_es1688_chip_id() argument
602 sprintf(tmp, "ES%s688 rev %i", chip->hardware == ES1688_HW_688 ? "" : "1", chip->version & 0x0f); in snd_es1688_chip_id()
607 struct snd_es1688 *chip, in snd_es1688_create() argument
621 if (chip == NULL) in snd_es1688_create()
623 chip->irq = -1; in snd_es1688_create()
624 chip->dma8 = -1; in snd_es1688_create()
625 chip->hardware = ES1688_HW_UNDEF; in snd_es1688_create()
627 chip->res_port = request_region(port + 4, 12, "ES1688"); in snd_es1688_create()
628 if (chip->res_port == NULL) { in snd_es1688_create()
634 err = request_irq(irq, snd_es1688_interrupt, 0, "ES1688", (void *) chip); in snd_es1688_create()
640 chip->irq = irq; in snd_es1688_create()
641 card->sync_irq = chip->irq; in snd_es1688_create()
648 chip->dma8 = dma8; in snd_es1688_create()
650 spin_lock_init(&chip->reg_lock); in snd_es1688_create()
651 spin_lock_init(&chip->mixer_lock); in snd_es1688_create()
652 chip->port = port; in snd_es1688_create()
656 chip->mpu_port = mpu_port; in snd_es1688_create()
657 chip->mpu_irq = mpu_irq; in snd_es1688_create()
658 chip->hardware = hardware; in snd_es1688_create()
660 err = snd_es1688_probe(chip); in snd_es1688_create()
664 err = snd_es1688_init(chip, 1); in snd_es1688_create()
669 err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); in snd_es1688_create()
672 snd_es1688_free(chip); in snd_es1688_create()
692 int snd_es1688_pcm(struct snd_card *card, struct snd_es1688 *chip, int device) in snd_es1688_pcm() argument
704 pcm->private_data = chip; in snd_es1688_pcm()
706 strcpy(pcm->name, snd_es1688_chip_id(chip)); in snd_es1688_pcm()
707 chip->pcm = pcm; in snd_es1688_pcm()
730 struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); in snd_es1688_get_mux() local
731 ucontrol->value.enumerated.item[0] = snd_es1688_mixer_read(chip, ES1688_REC_DEV) & 7; in snd_es1688_get_mux()
737 struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); in snd_es1688_put_mux() local
744 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_put_mux()
745 oval = snd_es1688_mixer_read(chip, ES1688_REC_DEV); in snd_es1688_put_mux()
749 snd_es1688_mixer_write(chip, ES1688_REC_DEV, nval); in snd_es1688_put_mux()
750 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_put_mux()
773 struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); in snd_es1688_get_single() local
780 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_get_single()
781 ucontrol->value.integer.value[0] = (snd_es1688_mixer_read(chip, reg) >> shift) & mask; in snd_es1688_get_single()
782 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_get_single()
790 struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); in snd_es1688_put_single() local
803 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_put_single()
804 oval = snd_es1688_mixer_read(chip, reg); in snd_es1688_put_single()
808 snd_es1688_mixer_write(chip, reg, nval); in snd_es1688_put_single()
809 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_put_single()
832 struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); in snd_es1688_get_double() local
842 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_get_double()
844 left = snd_es1688_mixer_read(chip, left_reg); in snd_es1688_get_double()
846 left = snd_es1688_read(chip, left_reg); in snd_es1688_get_double()
849 right = snd_es1688_mixer_read(chip, right_reg); in snd_es1688_get_double()
851 right = snd_es1688_read(chip, right_reg); in snd_es1688_get_double()
854 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_get_double()
866 struct snd_es1688 *chip = snd_kcontrol_chip(kcontrol); in snd_es1688_put_double() local
885 spin_lock_irqsave(&chip->reg_lock, flags); in snd_es1688_put_double()
888 oval1 = snd_es1688_mixer_read(chip, left_reg); in snd_es1688_put_double()
890 oval1 = snd_es1688_read(chip, left_reg); in snd_es1688_put_double()
892 oval2 = snd_es1688_mixer_read(chip, right_reg); in snd_es1688_put_double()
894 oval2 = snd_es1688_read(chip, right_reg); in snd_es1688_put_double()
900 snd_es1688_mixer_write(chip, left_reg, val1); in snd_es1688_put_double()
902 snd_es1688_write(chip, left_reg, val1); in snd_es1688_put_double()
904 snd_es1688_mixer_write(chip, right_reg, val1); in snd_es1688_put_double()
906 snd_es1688_write(chip, right_reg, val1); in snd_es1688_put_double()
910 oval1 = snd_es1688_mixer_read(chip, left_reg); in snd_es1688_put_double()
912 oval1 = snd_es1688_read(chip, left_reg); in snd_es1688_put_double()
917 snd_es1688_mixer_write(chip, left_reg, val1); in snd_es1688_put_double()
919 snd_es1688_write(chip, left_reg, val1); in snd_es1688_put_double()
923 spin_unlock_irqrestore(&chip->reg_lock, flags); in snd_es1688_put_double()
962 int snd_es1688_mixer(struct snd_card *card, struct snd_es1688 *chip) in snd_es1688_mixer() argument
968 if (snd_BUG_ON(!chip || !card)) in snd_es1688_mixer()
971 strcpy(card->mixername, snd_es1688_chip_id(chip)); in snd_es1688_mixer()
974 err = snd_ctl_add(card, snd_ctl_new1(&snd_es1688_controls[idx], chip)); in snd_es1688_mixer()
982 snd_es1688_mixer_write(chip, reg, val); in snd_es1688_mixer()
984 snd_es1688_write(chip, reg, val); in snd_es1688_mixer()