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

Lines Matching defs:au1000

32  *				  au1000.c OSS driver.
46 #include <asm/mach-au1x00/au1000.h>
104 au1000_set_ac97_xmit_slots(struct snd_au1000 *au1000, long xmit_slots)
108 spin_lock(&au1000->ac97_lock);
109 ac97_config = au1000->ac97_ioport->config;
112 au1000->ac97_ioport->config = ac97_config;
113 spin_unlock(&au1000->ac97_lock);
117 au1000_set_ac97_recv_slots(struct snd_au1000 *au1000, long recv_slots)
121 spin_lock(&au1000->ac97_lock);
122 ac97_config = au1000->ac97_ioport->config;
125 au1000->ac97_ioport->config = ac97_config;
126 spin_unlock(&au1000->ac97_lock);
288 struct snd_au1000 *au1000 = substream->pcm->private_data;
290 au1000->stream[PLAYBACK]->substream = substream;
291 au1000->stream[PLAYBACK]->buffer = NULL;
292 substream->private_data = au1000->stream[PLAYBACK];
301 struct snd_au1000 *au1000 = substream->pcm->private_data;
303 au1000->stream[CAPTURE]->substream = substream;
304 au1000->stream[CAPTURE]->buffer = NULL;
305 substream->private_data = au1000->stream[CAPTURE];
314 struct snd_au1000 *au1000 = substream->pcm->private_data;
316 au1000->stream[PLAYBACK]->substream = NULL;
323 struct snd_au1000 *au1000 = substream->pcm->private_data;
325 au1000->stream[CAPTURE]->substream = NULL;
356 struct snd_au1000 *au1000 = substream->pcm->private_data;
360 au1000_set_ac97_xmit_slots(au1000, AC97_SLOT_4);
362 au1000_set_ac97_xmit_slots(au1000, AC97_SLOT_3 | AC97_SLOT_4);
363 snd_ac97_set_rate(au1000->ac97, AC97_PCM_FRONT_DAC_RATE, runtime->rate);
370 struct snd_au1000 *au1000 = substream->pcm->private_data;
374 au1000_set_ac97_recv_slots(au1000, AC97_SLOT_4);
376 au1000_set_ac97_recv_slots(au1000, AC97_SLOT_3 | AC97_SLOT_4);
377 snd_ac97_set_rate(au1000->ac97, AC97_PCM_LR_ADC_RATE, runtime->rate);
442 snd_au1000_pcm_new(struct snd_au1000 *au1000)
448 if ((err = snd_pcm_new(au1000->card, "AU1000 AC97 PCM", 0, 1, 1, &pcm)) < 0)
459 pcm->private_data = au1000;
463 spin_lock_init(&au1000->stream[PLAYBACK]->dma_lock);
464 spin_lock_init(&au1000->stream[CAPTURE]->dma_lock);
467 if ((au1000->stream[PLAYBACK]->dma = request_au1000_dma(DMA_ID_AC97C_TX,
469 au1000->stream[PLAYBACK])) < 0) {
473 if ((au1000->stream[CAPTURE]->dma = request_au1000_dma(DMA_ID_AC97C_RX,
475 au1000->stream[CAPTURE])) < 0){
480 set_dma_mode(au1000->stream[PLAYBACK]->dma,
481 get_dma_mode(au1000->stream[PLAYBACK]->dma) & ~DMA_NC);
482 set_dma_mode(au1000->stream[CAPTURE]->dma,
483 get_dma_mode(au1000->stream[CAPTURE]->dma) & ~DMA_NC);
485 au1000->pcm = pcm;
495 struct snd_au1000 *au1000 = ac97->private_data;
500 spin_lock(&au1000->ac97_lock);
504 if (!(au1000->ac97_ioport->status & AC97C_CP))
507 printk(KERN_ERR "au1000 AC97: AC97 command read timeout\n");
511 au1000->ac97_ioport->cmd = cmd;
515 if (!(au1000->ac97_ioport->status & AC97C_CP))
518 printk(KERN_ERR "au1000 AC97: AC97 command read timeout\n");
519 spin_unlock(&au1000->ac97_lock);
523 data = au1000->ac97_ioport->cmd & 0xffff;
524 spin_unlock(&au1000->ac97_lock);
534 struct snd_au1000 *au1000 = ac97->private_data;
538 spin_lock(&au1000->ac97_lock);
542 if (!(au1000->ac97_ioport->status & AC97C_CP))
545 printk(KERN_ERR "au1000 AC97: AC97 command write timeout\n");
550 au1000->ac97_ioport->cmd = cmd;
551 spin_unlock(&au1000->ac97_lock);
555 snd_au1000_ac97_new(struct snd_au1000 *au1000)
565 if ((au1000->ac97_res_port = request_mem_region(CPHYSADDR(AC97C_CONFIG),
570 au1000->ac97_ioport = (struct au1000_ac97_reg *)
571 KSEG1ADDR(au1000->ac97_res_port->start);
573 spin_lock_init(&au1000->ac97_lock);
580 au1000->ac97_ioport->cntrl = AC97C_RS | AC97C_CE;
582 au1000->ac97_ioport->cntrl = AC97C_CE;
586 au1000->ac97_ioport->config = AC97C_RESET;
588 au1000->ac97_ioport->config = 0x0;
592 if ((err = snd_ac97_bus(au1000->card, 0, &ops, au1000, &pbus)) < 0)
596 ac97.private_data = au1000;
597 if ((err = snd_ac97_mixer(pbus, &ac97, &au1000->ac97)) < 0)
608 struct snd_au1000 *au1000 = card->private_data;
610 if (au1000->ac97_res_port) {
612 au1000->ac97_ioport->cntrl = AC97C_RS;
613 au1000->ac97_ioport = NULL;
614 release_and_free_resource(au1000->ac97_res_port);
617 if (au1000->stream[PLAYBACK]) {
618 if (au1000->stream[PLAYBACK]->dma >= 0)
619 free_au1000_dma(au1000->stream[PLAYBACK]->dma);
620 kfree(au1000->stream[PLAYBACK]);
623 if (au1000->stream[CAPTURE]) {
624 if (au1000->stream[CAPTURE]->dma >= 0)
625 free_au1000_dma(au1000->stream[CAPTURE]->dma);
626 kfree(au1000->stream[CAPTURE]);
638 struct snd_au1000 *au1000;
646 au1000 = card->private_data;
647 au1000->card = card;
649 au1000->stream[PLAYBACK] = kmalloc(sizeof(struct audio_stream), GFP_KERNEL);
650 au1000->stream[CAPTURE ] = kmalloc(sizeof(struct audio_stream), GFP_KERNEL);
652 au1000->ac97_res_port = NULL;
653 if (au1000->stream[PLAYBACK])
654 au1000->stream[PLAYBACK]->dma = -1;
655 if (au1000->stream[CAPTURE ])
656 au1000->stream[CAPTURE ]->dma = -1;
658 if (au1000->stream[PLAYBACK] == NULL ||
659 au1000->stream[CAPTURE ] == NULL) {
664 if ((err = snd_au1000_ac97_new(au1000)) < 0 ) {
669 if ((err = snd_au1000_pcm_new(au1000)) < 0) {