Lines Matching full:pcm
9 * Routines for control of EMU10K1 chips / PCM routines
1413 struct snd_pcm *pcm; in snd_emu10k1_pcm() local
1417 err = snd_pcm_new(emu->card, "emu10k1", device, 32, 1, &pcm); in snd_emu10k1_pcm()
1421 pcm->private_data = emu; in snd_emu10k1_pcm()
1423 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_playback_ops); in snd_emu10k1_pcm()
1424 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_ops); in snd_emu10k1_pcm()
1426 pcm->info_flags = 0; in snd_emu10k1_pcm()
1427 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; in snd_emu10k1_pcm()
1428 strcpy(pcm->name, "ADC Capture/Standard PCM Playback"); in snd_emu10k1_pcm()
1429 emu->pcm = pcm; in snd_emu10k1_pcm()
1432 …for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substre… in snd_emu10k1_pcm()
1437 …for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; substream; substream = substrea… in snd_emu10k1_pcm()
1446 struct snd_pcm *pcm; in snd_emu10k1_pcm_multi() local
1450 err = snd_pcm_new(emu->card, "emu10k1", device, 1, 0, &pcm); in snd_emu10k1_pcm_multi()
1454 pcm->private_data = emu; in snd_emu10k1_pcm_multi()
1456 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_efx_playback_ops); in snd_emu10k1_pcm_multi()
1458 pcm->info_flags = 0; in snd_emu10k1_pcm_multi()
1459 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; in snd_emu10k1_pcm_multi()
1460 strcpy(pcm->name, "Multichannel Playback"); in snd_emu10k1_pcm_multi()
1461 emu->pcm_multi = pcm; in snd_emu10k1_pcm_multi()
1463 …for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substre… in snd_emu10k1_pcm_multi()
1482 struct snd_pcm *pcm; in snd_emu10k1_pcm_mic() local
1485 err = snd_pcm_new(emu->card, "emu10k1 mic", device, 0, 1, &pcm); in snd_emu10k1_pcm_mic()
1489 pcm->private_data = emu; in snd_emu10k1_pcm_mic()
1491 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_mic_ops); in snd_emu10k1_pcm_mic()
1493 pcm->info_flags = 0; in snd_emu10k1_pcm_mic()
1494 strcpy(pcm->name, "Mic Capture"); in snd_emu10k1_pcm_mic()
1495 emu->pcm_mic = pcm; in snd_emu10k1_pcm_mic()
1497 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &emu->pci->dev, in snd_emu10k1_pcm_mic()
1608 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in fx8010_pb_trans_copy() local
1609 unsigned int tram_size = pcm->buffer_size; in fx8010_pb_trans_copy()
1612 unsigned int tram_pos = pcm->tram_pos; in fx8010_pb_trans_copy()
1613 unsigned int tram_shift = pcm->tram_shift; in fx8010_pb_trans_copy()
1629 pcm->tram_pos = tram_pos; in fx8010_pb_trans_copy()
1630 pcm->tram_shift = tram_shift; in fx8010_pb_trans_copy()
1636 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_transfer() local
1638 return snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec, in snd_emu10k1_fx8010_playback_transfer()
1645 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_hw_free() local
1648 for (i = 0; i < pcm->channels; i++) in snd_emu10k1_fx8010_playback_hw_free()
1649 snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, 0); in snd_emu10k1_fx8010_playback_hw_free()
1657 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_prepare() local
1666 memset(&pcm->pcm_rec, 0, sizeof(pcm->pcm_rec)); in snd_emu10k1_fx8010_playback_prepare()
1667 pcm->pcm_rec.hw_buffer_size = pcm->buffer_size * 2; /* byte size */ in snd_emu10k1_fx8010_playback_prepare()
1668 pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); in snd_emu10k1_fx8010_playback_prepare()
1669 pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size); in snd_emu10k1_fx8010_playback_prepare()
1670 pcm->tram_shift = 0; in snd_emu10k1_fx8010_playback_prepare()
1672 emu->gpr_base + pcm->gpr_running, 0, /* reset */ in snd_emu10k1_fx8010_playback_prepare()
1673 emu->gpr_base + pcm->gpr_trigger, 0, /* reset */ in snd_emu10k1_fx8010_playback_prepare()
1674 emu->gpr_base + pcm->gpr_size, runtime->buffer_size, in snd_emu10k1_fx8010_playback_prepare()
1675 emu->gpr_base + pcm->gpr_ptr, 0, /* reset ptr number */ in snd_emu10k1_fx8010_playback_prepare()
1676 emu->gpr_base + pcm->gpr_count, runtime->period_size, in snd_emu10k1_fx8010_playback_prepare()
1677 emu->gpr_base + pcm->gpr_tmpcount, runtime->period_size, in snd_emu10k1_fx8010_playback_prepare()
1679 for (i = 0; i < pcm->channels; i++) in snd_emu10k1_fx8010_playback_prepare()
1680 … TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (r… in snd_emu10k1_fx8010_playback_prepare()
1687 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_trigger() local
1708 …_register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq… in snd_emu10k1_fx8010_playback_trigger()
1712 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 1); in snd_emu10k1_fx8010_playback_trigger()
1717 snd_emu10k1_fx8010_unregister_irq_handler(emu, &pcm->irq); in snd_emu10k1_fx8010_playback_trigger()
1718 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0); in snd_emu10k1_fx8010_playback_trigger()
1719 pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size); in snd_emu10k1_fx8010_playback_trigger()
1720 pcm->tram_shift = 0; in snd_emu10k1_fx8010_playback_trigger()
1734 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_pointer() local
1737 if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0)) in snd_emu10k1_fx8010_playback_pointer()
1739 ptr = snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_ptr, 0) << 2; in snd_emu10k1_fx8010_playback_pointer()
1740 return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr); in snd_emu10k1_fx8010_playback_pointer()
1767 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_open() local
1770 runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; in snd_emu10k1_fx8010_playback_open()
1771 runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2; in snd_emu10k1_fx8010_playback_open()
1773 if (pcm->valid == 0) { in snd_emu10k1_fx8010_playback_open()
1777 pcm->opened = 1; in snd_emu10k1_fx8010_playback_open()
1785 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_close() local
1788 pcm->opened = 0; in snd_emu10k1_fx8010_playback_close()
1805 struct snd_pcm *pcm; in snd_emu10k1_pcm_efx() local
1809 err = snd_pcm_new(emu->card, "emu10k1 efx", device, emu->audigy ? 0 : 8, 1, &pcm); in snd_emu10k1_pcm_efx()
1813 pcm->private_data = emu; in snd_emu10k1_pcm_efx()
1816 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_fx8010_playback_ops); in snd_emu10k1_pcm_efx()
1817 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_efx_ops); in snd_emu10k1_pcm_efx()
1819 pcm->info_flags = 0; in snd_emu10k1_pcm_efx()
1821 strcpy(pcm->name, "Multichannel Capture"); in snd_emu10k1_pcm_efx()
1823 strcpy(pcm->name, "Multichannel Capture/PT Playback"); in snd_emu10k1_pcm_efx()
1824 emu->pcm_efx = pcm; in snd_emu10k1_pcm_efx()
1850 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &emu->pci->dev, in snd_emu10k1_pcm_efx()