Lines Matching refs:pcmtst
93 struct pcmtst { struct
451 static int snd_pcmtst_free(struct pcmtst *pcmtst) in snd_pcmtst_free() argument
453 if (!pcmtst) in snd_pcmtst_free()
455 kfree(pcmtst); in snd_pcmtst_free()
537 static int snd_pcmtst_new_pcm(struct pcmtst *pcmtst) in snd_pcmtst_new_pcm() argument
542 err = snd_pcm_new(pcmtst->card, "PCMTest", 0, PLAYBACK_SUBSTREAM_CNT, in snd_pcmtst_new_pcm()
546 pcm->private_data = pcmtst; in snd_pcmtst_new_pcm()
548 pcmtst->pcm = pcm; in snd_pcmtst_new_pcm()
552 err = snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &pcmtst->pdev->dev, in snd_pcmtst_new_pcm()
558 struct pcmtst **r_pcmtst) in snd_pcmtst_create()
560 struct pcmtst *pcmtst; in snd_pcmtst_create() local
566 pcmtst = kzalloc(sizeof(*pcmtst), GFP_KERNEL); in snd_pcmtst_create()
567 if (!pcmtst) in snd_pcmtst_create()
569 pcmtst->card = card; in snd_pcmtst_create()
570 pcmtst->pdev = pdev; in snd_pcmtst_create()
572 err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, pcmtst, &ops); in snd_pcmtst_create()
576 err = snd_pcmtst_new_pcm(pcmtst); in snd_pcmtst_create()
580 *r_pcmtst = pcmtst; in snd_pcmtst_create()
584 snd_pcmtst_free(pcmtst); in snd_pcmtst_create()
591 struct pcmtst *pcmtst; in pcmtst_probe() local
601 err = snd_pcmtst_create(card, pdev, &pcmtst); in pcmtst_probe()
613 platform_set_drvdata(pdev, pcmtst); in pcmtst_probe()
620 struct pcmtst *pcmtst = platform_get_drvdata(pdev); in pdev_remove() local
622 snd_pcmtst_free(pcmtst); in pdev_remove()