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