• Home
  • Raw
  • Download

Lines Matching refs:dmasound

91 	dev->dmasound.dma_blk     = -1;  in saa7134_dma_stop()
92 dev->dmasound.dma_running = 0; in saa7134_dma_stop()
107 dev->dmasound.dma_blk = 0; in saa7134_dma_start()
108 dev->dmasound.dma_running = 1; in saa7134_dma_start()
129 if (UNSET == dev->dmasound.dma_blk) { in saa7134_irq_alsa_done()
137 if (0 == (dev->dmasound.dma_blk & 0x01)) in saa7134_irq_alsa_done()
141 if (1 == (dev->dmasound.dma_blk & 0x01)) in saa7134_irq_alsa_done()
150 if (dev->dmasound.read_count >= dev->dmasound.blksize * (dev->dmasound.blocks-2)) { in saa7134_irq_alsa_done()
152 dev->dmasound.read_count, in saa7134_irq_alsa_done()
153 dev->dmasound.bufsize, dev->dmasound.blocks); in saa7134_irq_alsa_done()
155 snd_pcm_stop_xrun(dev->dmasound.substream); in saa7134_irq_alsa_done()
160 next_blk = (dev->dmasound.dma_blk + 2) % dev->dmasound.blocks; in saa7134_irq_alsa_done()
161 saa_writel(reg,next_blk * dev->dmasound.blksize); in saa7134_irq_alsa_done()
164 next_blk * dev->dmasound.blksize, dev->dmasound.blocks, in saa7134_irq_alsa_done()
165 dev->dmasound.blksize, dev->dmasound.read_count); in saa7134_irq_alsa_done()
168 dev->dmasound.dma_blk = (dev->dmasound.dma_blk + 1) % dev->dmasound.blocks; in saa7134_irq_alsa_done()
169 dev->dmasound.read_count += dev->dmasound.blksize; in saa7134_irq_alsa_done()
171 dev->dmasound.recording_on = reg; in saa7134_irq_alsa_done()
173 if (dev->dmasound.read_count >= snd_pcm_lib_period_bytes(dev->dmasound.substream)) { in saa7134_irq_alsa_done()
175 snd_pcm_period_elapsed(dev->dmasound.substream); in saa7134_irq_alsa_done()
194 struct saa7134_dmasound *dmasound = dev_id; in saa7134_alsa_irq() local
195 struct saa7134_dev *dev = dmasound->priv_data; in saa7134_alsa_irq()
258 struct saa7134_dmasound *dma = &dev->dmasound; in saa7134_alsa_dma_init()
298 struct saa7134_dmasound *dma = &dev->dmasound; in saa7134_alsa_dma_map()
312 struct saa7134_dmasound *dma = &dev->dmasound; in saa7134_alsa_dma_unmap()
346 BUG_ON(!dev->dmasound.bufsize); in dsp_buffer_init()
349 (dev->dmasound.bufsize + PAGE_SIZE) >> PAGE_SHIFT); in dsp_buffer_init()
364 BUG_ON(!dev->dmasound.blksize); in dsp_buffer_free()
366 saa7134_alsa_dma_free(&dev->dmasound); in dsp_buffer_free()
368 dev->dmasound.blocks = 0; in dsp_buffer_free()
369 dev->dmasound.blksize = 0; in dsp_buffer_free()
370 dev->dmasound.bufsize = 0; in dsp_buffer_free()
404 dev->dmasound.input = addr; in snd_saa7134_capsrc_set()
423 rate = (32000 == dev->dmasound.rate) ? in snd_saa7134_capsrc_set()
506 pcm->dev->dmasound.substream = substream; in snd_card_saa7134_capture_prepare()
534 fmt |= (MIXER_ADDR_TVTUNER == dev->dmasound.input) ? 0xc0 : 0x80; in snd_card_saa7134_capture_prepare()
535 saa_writeb(SAA7134_NUM_SAMPLES0, ((dev->dmasound.blksize - 1) & 0x0000ff)); in snd_card_saa7134_capture_prepare()
536 saa_writeb(SAA7134_NUM_SAMPLES1, ((dev->dmasound.blksize - 1) & 0x00ff00) >> 8); in snd_card_saa7134_capture_prepare()
537 saa_writeb(SAA7134_NUM_SAMPLES2, ((dev->dmasound.blksize - 1) & 0xff0000) >> 16); in snd_card_saa7134_capture_prepare()
549 saa_writel(SAA7133_NUM_SAMPLES, dev->dmasound.blksize -1); in snd_card_saa7134_capture_prepare()
560 (dev->dmasound.pt.dma >> 12); in snd_card_saa7134_capture_prepare()
565 saa_writel(SAA7134_RS_BA2(6),dev->dmasound.blksize); in snd_card_saa7134_capture_prepare()
569 dev->dmasound.rate = runtime->rate; in snd_card_saa7134_capture_prepare()
572 snd_saa7134_capsrc_set(saa7134->capture_ctl[dev->dmasound.input], 1, 1, in snd_card_saa7134_capture_prepare()
597 if (dev->dmasound.read_count) { in snd_card_saa7134_capture_pointer()
598 dev->dmasound.read_count -= snd_pcm_lib_period_bytes(substream); in snd_card_saa7134_capture_pointer()
599 dev->dmasound.read_offset += snd_pcm_lib_period_bytes(substream); in snd_card_saa7134_capture_pointer()
600 if (dev->dmasound.read_offset == dev->dmasound.bufsize) in snd_card_saa7134_capture_pointer()
601 dev->dmasound.read_offset = 0; in snd_card_saa7134_capture_pointer()
604 return bytes_to_frames(runtime, dev->dmasound.read_offset); in snd_card_saa7134_capture_pointer()
681 if (dev->dmasound.blocks == periods && in snd_card_saa7134_hw_params()
682 dev->dmasound.blksize == period_size) in snd_card_saa7134_hw_params()
687 saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); in snd_card_saa7134_hw_params()
692 dev->dmasound.blocks = periods; in snd_card_saa7134_hw_params()
693 dev->dmasound.blksize = period_size; in snd_card_saa7134_hw_params()
694 dev->dmasound.bufsize = period_size * periods; in snd_card_saa7134_hw_params()
698 dev->dmasound.blocks = 0; in snd_card_saa7134_hw_params()
699 dev->dmasound.blksize = 0; in snd_card_saa7134_hw_params()
700 dev->dmasound.bufsize = 0; in snd_card_saa7134_hw_params()
709 err = saa7134_pgtable_alloc(dev->pci, &dev->dmasound.pt); in snd_card_saa7134_hw_params()
715 err = saa7134_pgtable_build(dev->pci, &dev->dmasound.pt, in snd_card_saa7134_hw_params()
716 dev->dmasound.sglist, dev->dmasound.sglen, 0); in snd_card_saa7134_hw_params()
718 saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); in snd_card_saa7134_hw_params()
728 substream->runtime->dma_area = dev->dmasound.vaddr; in snd_card_saa7134_hw_params()
729 substream->runtime->dma_bytes = dev->dmasound.bufsize; in snd_card_saa7134_hw_params()
754 saa7134_pgtable_free(dev->pci, &dev->dmasound.pt); in snd_card_saa7134_hw_free()
807 mutex_lock(&dev->dmasound.lock); in snd_card_saa7134_capture_open()
809 dev->dmasound.read_count = 0; in snd_card_saa7134_capture_open()
810 dev->dmasound.read_offset = 0; in snd_card_saa7134_capture_open()
815 dev->dmasound.input = amux - 1; in snd_card_saa7134_capture_open()
817 mutex_unlock(&dev->dmasound.lock); in snd_card_saa7134_capture_open()
1096 if (chip->dev->dmasound.priv_data == NULL) in snd_saa7134_free()
1100 free_irq(chip->irq, &chip->dev->dmasound); in snd_saa7134_free()
1102 chip->dev->dmasound.priv_data = NULL; in snd_saa7134_free()
1152 (void*) &dev->dmasound); in alsa_card_saa7134_create()
1162 mutex_init(&dev->dmasound.lock); in alsa_card_saa7134_create()
1192 dev->dmasound.priv_data = dev; in alsa_device_init()