Lines Matching defs:pcm

1434 	struct snd_pcm *pcm;
1438 err = snd_pcm_new(emu->card, "emu10k1", device, 32, 1, &pcm);
1442 pcm->private_data = emu;
1444 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_playback_ops);
1445 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_ops);
1447 pcm->info_flags = 0;
1448 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
1449 strcpy(pcm->name, "ADC Capture/Standard PCM Playback");
1450 emu->pcm = pcm;
1453 for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next)
1458 for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; substream; substream = substream->next)
1467 struct snd_pcm *pcm;
1471 err = snd_pcm_new(emu->card, "emu10k1", device, 1, 0, &pcm);
1475 pcm->private_data = emu;
1477 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_efx_playback_ops);
1479 pcm->info_flags = 0;
1480 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
1481 strcpy(pcm->name, "Multichannel Playback");
1482 emu->pcm_multi = pcm;
1484 for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next)
1503 struct snd_pcm *pcm;
1506 err = snd_pcm_new(emu->card, "emu10k1 mic", device, 0, 1, &pcm);
1510 pcm->private_data = emu;
1512 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_mic_ops);
1514 pcm->info_flags = 0;
1515 strcpy(pcm->name, "Mic Capture");
1516 emu->pcm_mic = pcm;
1518 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &emu->pci->dev,
1629 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1630 unsigned int tram_size = pcm->buffer_size;
1633 unsigned int tram_pos = pcm->tram_pos;
1634 unsigned int tram_shift = pcm->tram_shift;
1650 pcm->tram_pos = tram_pos;
1651 pcm->tram_shift = tram_shift;
1657 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1659 return snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec,
1666 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1669 for (i = 0; i < pcm->channels; i++)
1670 snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, 0);
1678 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1687 memset(&pcm->pcm_rec, 0, sizeof(pcm->pcm_rec));
1688 pcm->pcm_rec.hw_buffer_size = pcm->buffer_size * 2; /* byte size */
1689 pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream);
1690 pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size);
1691 pcm->tram_shift = 0;
1693 emu->gpr_base + pcm->gpr_running, 0, /* reset */
1694 emu->gpr_base + pcm->gpr_trigger, 0, /* reset */
1695 emu->gpr_base + pcm->gpr_size, runtime->buffer_size,
1696 emu->gpr_base + pcm->gpr_ptr, 0, /* reset ptr number */
1697 emu->gpr_base + pcm->gpr_count, runtime->period_size,
1698 emu->gpr_base + pcm->gpr_tmpcount, runtime->period_size,
1700 for (i = 0; i < pcm->channels; i++)
1701 snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pcm->channels));
1708 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1729 result = snd_emu10k1_fx8010_register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq);
1733 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 1);
1738 snd_emu10k1_fx8010_unregister_irq_handler(emu, &pcm->irq);
1739 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0);
1740 pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size);
1741 pcm->tram_shift = 0;
1755 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1758 if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0))
1760 ptr = snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_ptr, 0) << 2;
1761 return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr);
1788 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1791 runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels;
1792 runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2;
1794 if (pcm->valid == 0) {
1798 pcm->opened = 1;
1806 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1809 pcm->opened = 0;
1826 struct snd_pcm *pcm;
1830 err = snd_pcm_new(emu->card, "emu10k1 efx", device, emu->audigy ? 0 : 8, 1, &pcm);
1834 pcm->private_data = emu;
1837 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_fx8010_playback_ops);
1838 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_efx_ops);
1840 pcm->info_flags = 0;
1842 strcpy(pcm->name, "Multichannel Capture");
1844 strcpy(pcm->name, "Multichannel Capture/PT Playback");
1845 emu->pcm_efx = pcm;
1871 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &emu->pci->dev,