Lines Matching defs:pcm
1379 struct snd_pcm *pcm;
1383 if ((err = snd_pcm_new(emu->card, "emu10k1", device, 32, 1, &pcm)) < 0)
1386 pcm->private_data = emu;
1388 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_playback_ops);
1389 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_ops);
1391 pcm->info_flags = 0;
1392 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
1393 strcpy(pcm->name, "ADC Capture/Standard PCM Playback");
1394 emu->pcm = pcm;
1397 for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next)
1402 for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; substream; substream = substream->next)
1411 struct snd_pcm *pcm;
1415 if ((err = snd_pcm_new(emu->card, "emu10k1", device, 1, 0, &pcm)) < 0)
1418 pcm->private_data = emu;
1420 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_efx_playback_ops);
1422 pcm->info_flags = 0;
1423 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
1424 strcpy(pcm->name, "Multichannel Playback");
1425 emu->pcm_multi = pcm;
1427 for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next)
1446 struct snd_pcm *pcm;
1449 if ((err = snd_pcm_new(emu->card, "emu10k1 mic", device, 0, 1, &pcm)) < 0)
1452 pcm->private_data = emu;
1454 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_mic_ops);
1456 pcm->info_flags = 0;
1457 strcpy(pcm->name, "Mic Capture");
1458 emu->pcm_mic = pcm;
1460 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &emu->pci->dev,
1578 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1579 unsigned int tram_size = pcm->buffer_size;
1582 unsigned int tram_pos = pcm->tram_pos;
1583 unsigned int tram_shift = pcm->tram_shift;
1599 pcm->tram_pos = tram_pos;
1600 pcm->tram_shift = tram_shift;
1606 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1608 return snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec,
1615 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1618 for (i = 0; i < pcm->channels; i++)
1619 snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, 0);
1627 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1636 memset(&pcm->pcm_rec, 0, sizeof(pcm->pcm_rec));
1637 pcm->pcm_rec.hw_buffer_size = pcm->buffer_size * 2; /* byte size */
1638 pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream);
1639 pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size);
1640 pcm->tram_shift = 0;
1641 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_running, 0, 0); /* reset */
1642 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0); /* reset */
1643 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_size, 0, runtime->buffer_size);
1644 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_ptr, 0, 0); /* reset ptr number */
1645 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_count, 0, runtime->period_size);
1646 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_tmpcount, 0, runtime->period_size);
1647 for (i = 0; i < pcm->channels; i++)
1648 snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pcm->channels));
1655 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1676 result = snd_emu10k1_fx8010_register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq);
1680 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 1);
1685 snd_emu10k1_fx8010_unregister_irq_handler(emu, &pcm->irq);
1686 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0);
1687 pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size);
1688 pcm->tram_shift = 0;
1702 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1705 if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0))
1707 ptr = snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_ptr, 0) << 2;
1708 return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr);
1735 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1738 runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels;
1739 runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2;
1741 if (pcm->valid == 0) {
1745 pcm->opened = 1;
1753 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1756 pcm->opened = 0;
1773 struct snd_pcm *pcm;
1777 if ((err = snd_pcm_new(emu->card, "emu10k1 efx", device, 8, 1, &pcm)) < 0)
1780 pcm->private_data = emu;
1782 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_fx8010_playback_ops);
1783 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_efx_ops);
1785 pcm->info_flags = 0;
1786 strcpy(pcm->name, "Multichannel Capture/PT Playback");
1787 emu->pcm_efx = pcm;
1822 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &emu->pci->dev,