Lines Matching defs:pcm
2 * i2sbus driver -- pcm routines
850 static void i2sbus_private_free(struct snd_pcm *pcm)
852 struct i2sbus_dev *i2sdev = snd_pcm_chip(pcm);
855 i2sdev->sound.pcm = NULL;
878 printk(KERN_ERR "i2sbus: pcm name and id must be set!\n");
952 if (!dev->pcm) {
954 &dev->pcm);
956 printk(KERN_DEBUG "i2sbus: failed to create pcm\n");
959 dev->pcm->dev = &dev->ofdev.dev;
967 if (dev->pcm->card != card) {
974 err = snd_pcm_new_stream(dev->pcm, SNDRV_PCM_STREAM_PLAYBACK, 1);
977 snd_pcm_set_ops(dev->pcm, SNDRV_PCM_STREAM_PLAYBACK,
983 if (dev->pcm->card != card) {
989 err = snd_pcm_new_stream(dev->pcm, SNDRV_PCM_STREAM_CAPTURE, 1);
992 snd_pcm_set_ops(dev->pcm, SNDRV_PCM_STREAM_CAPTURE,
997 /* so we have to register the pcm after adding any substream
1001 * register the pcm now instead of just after creating it.
1003 err = snd_device_register(card, dev->pcm);
1005 printk(KERN_ERR "i2sbus: error registering new pcm\n");
1011 dev->pcm->private_data = i2sdev;
1012 dev->pcm->private_free = i2sbus_private_free;
1016 dev->pcm, SNDRV_DMA_TYPE_DEV,
1047 /* no more codecs, but still a pcm? */
1048 if (list_empty(&dev->codec_list) && dev->pcm) {
1050 snd_device_free(dev->pcm->card, dev->pcm);