Searched refs:pcm (Results 1 - 200 of 745) sorted by relevance

1234

/linux-4.1.27/sound/soc/intel/baytrail/
H A DMakefile1 snd-soc-sst-baytrail-pcm-objs := \
2 sst-baytrail-ipc.o sst-baytrail-pcm.o sst-baytrail-dsp.o
4 obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += snd-soc-sst-baytrail-pcm.o
H A Dsst-baytrail-pcm.c19 #include <sound/pcm.h>
61 struct sst_byt_pcm_data pcm[BYT_PCM_COUNT]; member in struct:sst_byt_priv_data
74 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; sst_byt_pcm_hw_params()
146 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; sst_byt_pcm_restore_stream_context()
179 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; sst_byt_pcm_trigger()
243 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; sst_byt_pcm_pointer()
255 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; sst_byt_pcm_open()
283 struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream]; sst_byt_pcm_close()
325 struct snd_pcm *pcm = rtd->pcm; sst_byt_pcm_new() local
331 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream || sst_byt_pcm_new()
332 pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { sst_byt_pcm_new()
334 ret = snd_pcm_lib_preallocate_pages_for_all(pcm, sst_byt_pcm_new()
384 mutex_init(&priv_data->pcm[i].mutex); sst_byt_pcm_probe()
385 INIT_WORK(&priv_data->pcm[i].work, sst_byt_pcm_work); sst_byt_pcm_probe()
493 .name = "baytrail-pcm-audio",
505 MODULE_ALIAS("platform:baytrail-pcm-audio");
/linux-4.1.27/sound/soc/intel/haswell/
H A DMakefile1 snd-soc-sst-haswell-pcm-objs := \
2 sst-haswell-ipc.o sst-haswell-pcm.o sst-haswell-dsp.o
4 obj-$(CONFIG_SND_SOC_INTEL_HASWELL) += snd-soc-sst-haswell-pcm.o
H A Dsst-haswell-pcm.c25 #include <sound/pcm.h>
146 struct hsw_pcm_data pcm[HSW_PCM_COUNT][2]; member in struct:hsw_priv_data
196 pcm_data = &pdata->pcm[dai][stream]; hsw_stream_volume_put()
245 pcm_data = &pdata->pcm[dai][stream]; hsw_stream_volume_get()
441 unsigned char *dma_area, size_t size, int pcm) create_adsp_page_table()
458 pg_table = (u32 *)(pdata->dmab[pcm][stream].area + idx); create_adsp_page_table()
489 pcm_data = &pdata->pcm[dai][substream->stream]; hsw_pcm_hw_params()
687 pcm_data = &pdata->pcm[dai][substream->stream]; hsw_pcm_trigger()
796 pcm_data = &pdata->pcm[dai][substream->stream]; hsw_pcm_pointer()
817 pcm_data = &pdata->pcm[dai][substream->stream]; hsw_pcm_open()
851 pcm_data = &pdata->pcm[dai][substream->stream]; hsw_pcm_close()
893 pcm_data = &pdata->pcm[mod_map[i].dai_id][mod_map[i].stream]; hsw_pcm_create_modules()
916 pcm_data = &pdata->pcm[mod_map[i].dai_id][mod_map[i].stream]; hsw_pcm_create_modules()
930 pcm_data = &pdata->pcm[mod_map[i].dai_id][mod_map[i].stream]; hsw_pcm_free_modules()
940 struct snd_pcm *pcm = rtd->pcm; hsw_pcm_new() local
947 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream || hsw_pcm_new()
948 pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { hsw_pcm_new()
949 ret = snd_pcm_lib_preallocate_pages_for_all(pcm, hsw_pcm_new()
960 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) hsw_pcm_new()
961 priv_data->pcm[rtd->cpu_dai->id][SNDRV_PCM_STREAM_PLAYBACK].hsw_pcm = pcm; hsw_pcm_new()
962 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) hsw_pcm_new()
963 priv_data->pcm[rtd->cpu_dai->id][SNDRV_PCM_STREAM_CAPTURE].hsw_pcm = pcm; hsw_pcm_new()
1074 mutex_init(&priv_data->pcm[i][SNDRV_PCM_STREAM_PLAYBACK].mutex); hsw_pcm_probe()
1083 mutex_init(&priv_data->pcm[i][SNDRV_PCM_STREAM_CAPTURE].mutex); hsw_pcm_probe()
1305 pcm_data = &pdata->pcm[mod_map[i].dai_id][mod_map[i].stream]; hsw_pcm_complete()
1340 pcm_data = &pdata->pcm[mod_map[i].dai_id][mod_map[i].stream]; hsw_pcm_prepare()
1344 dev_dbg(dev, "suspending pcm %d\n", i); hsw_pcm_prepare()
1353 pcm_data = &pdata->pcm[mod_map[i].dai_id][mod_map[i].stream]; hsw_pcm_prepare()
1358 dev_dbg(dev, "saving context pcm %d\n", i); hsw_pcm_prepare()
1393 .name = "haswell-pcm-audio",
1405 MODULE_ALIAS("platform:haswell-pcm-audio");
439 create_adsp_page_table(struct snd_pcm_substream *substream, struct hsw_priv_data *pdata, struct snd_soc_pcm_runtime *rtd, unsigned char *dma_area, size_t size, int pcm) create_adsp_page_table() argument
/linux-4.1.27/sound/core/oss/
H A DMakefile8 snd-pcm-oss-y := pcm_oss.o
9 snd-pcm-oss-$(CONFIG_SND_PCM_OSS_PLUGINS) += pcm_plugin.o \
13 obj-$(CONFIG_SND_PCM_OSS) += snd-pcm-oss.o
H A Dpcm_oss.c38 #include <sound/pcm.h>
206 static int snd_pcm_hw_param_mask(struct snd_pcm_substream *pcm, snd_pcm_hw_param_mask() argument
215 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_mask()
255 * @pcm: PCM instance
265 static int snd_pcm_hw_param_min(struct snd_pcm_substream *pcm, snd_pcm_hw_param_min() argument
274 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_min()
316 * @pcm: PCM instance
326 static int snd_pcm_hw_param_max(struct snd_pcm_substream *pcm, snd_pcm_hw_param_max() argument
335 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_max()
388 * @pcm: PCM instance
400 static int snd_pcm_hw_param_near(struct snd_pcm_substream *pcm, snd_pcm_hw_param_near() argument
430 min = snd_pcm_hw_param_min(pcm, params, var, min, &mindir); snd_pcm_hw_param_near()
443 max = snd_pcm_hw_param_max(pcm, params1, var, max, &maxdir); snd_pcm_hw_param_near()
455 max = snd_pcm_hw_param_max(pcm, params, var, max, &maxdir); snd_pcm_hw_param_near()
465 v = snd_pcm_hw_param_last(pcm, params, var, dir); snd_pcm_hw_param_near()
467 v = snd_pcm_hw_param_first(pcm, params, var, dir); snd_pcm_hw_param_near()
522 * @pcm: PCM instance
532 static int snd_pcm_hw_param_set(struct snd_pcm_substream *pcm, snd_pcm_hw_param_set() argument
541 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_set()
883 pcm_dbg(substream->pcm, "No usable accesses\n"); snd_pcm_oss_change_params()
908 pcm_dbg(substream->pcm, "Cannot find a format!!!\n"); snd_pcm_oss_change_params()
948 pcm_dbg(substream->pcm, snd_pcm_oss_change_params()
956 pcm_dbg(substream->pcm, snd_pcm_oss_change_params()
991 pcm_dbg(substream->pcm, "HW_PARAMS failed: %i\n", err); snd_pcm_oss_change_params()
1024 pcm_dbg(substream->pcm, "SW_PARAMS failed: %i\n", err); snd_pcm_oss_change_params()
1118 pcm_dbg(substream->pcm, snd_pcm_oss_prepare()
1184 pcm_dbg(substream->pcm, snd_pcm_oss_write3()
1220 pcm_dbg(substream->pcm, snd_pcm_oss_read3()
1266 pcm_dbg(substream->pcm, snd_pcm_oss_writev3()
1302 pcm_dbg(substream->pcm, snd_pcm_oss_readv3()
1562 pcm_dbg(substream->pcm, "sync1: size = %li\n", size); snd_pcm_oss_sync1()
1588 pcm_err(substream->pcm, snd_pcm_oss_sync1()
1620 pcm_dbg(substream->pcm, "sync: buffer_used\n"); snd_pcm_oss_sync()
1633 pcm_dbg(substream->pcm, "sync: period_ptr\n"); snd_pcm_oss_sync()
1985 pcm_dbg(substream->pcm, "pcm_oss: trigger = 0x%x\n", trigger); snd_pcm_oss_set_trigger()
2205 pcm_dbg(substream->pcm, snd_pcm_oss_get_space()
2231 static void snd_pcm_oss_look_for_setup(struct snd_pcm *pcm, int stream, snd_pcm_oss_look_for_setup() argument
2237 mutex_lock(&pcm->streams[stream].oss.setup_mutex); snd_pcm_oss_look_for_setup()
2239 for (setup = pcm->streams[stream].oss.setup_list; setup; snd_pcm_oss_look_for_setup()
2248 mutex_unlock(&pcm->streams[stream].oss.setup_mutex); snd_pcm_oss_look_for_setup()
2312 struct snd_pcm *pcm, snd_pcm_oss_open_file()
2330 (pcm->info_flags & SNDRV_PCM_INFO_HALF_DUPLEX)) snd_pcm_oss_open_file()
2337 if (! pcm->streams[idx].substream_count) snd_pcm_oss_open_file()
2346 err = snd_pcm_open_substream(pcm, idx, file, &substream); snd_pcm_oss_open_file()
2385 struct snd_pcm *pcm; snd_pcm_oss_open() local
2395 pcm = snd_lookup_oss_minor_data(iminor(inode), snd_pcm_oss_open()
2397 if (pcm == NULL) { snd_pcm_oss_open()
2401 err = snd_card_file_add(pcm->card, file); snd_pcm_oss_open()
2404 if (!try_module_get(pcm->card->module)) { snd_pcm_oss_open()
2414 snd_pcm_oss_look_for_setup(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_pcm_oss_open()
2417 snd_pcm_oss_look_for_setup(pcm, SNDRV_PCM_STREAM_CAPTURE, snd_pcm_oss_open()
2425 add_wait_queue(&pcm->open_wait, &wait); snd_pcm_oss_open()
2426 mutex_lock(&pcm->open_mutex); snd_pcm_oss_open()
2428 err = snd_pcm_oss_open_file(file, pcm, &pcm_oss_file, snd_pcm_oss_open()
2440 mutex_unlock(&pcm->open_mutex); snd_pcm_oss_open()
2442 mutex_lock(&pcm->open_mutex); snd_pcm_oss_open()
2443 if (pcm->card->shutdown) { snd_pcm_oss_open()
2452 remove_wait_queue(&pcm->open_wait, &wait); snd_pcm_oss_open()
2453 mutex_unlock(&pcm->open_mutex); snd_pcm_oss_open()
2456 snd_card_unref(pcm->card); snd_pcm_oss_open()
2460 module_put(pcm->card->module); snd_pcm_oss_open()
2462 snd_card_file_remove(pcm->card, file); snd_pcm_oss_open()
2464 if (pcm) snd_pcm_oss_open()
2465 snd_card_unref(pcm->card); snd_pcm_oss_open()
2471 struct snd_pcm *pcm; snd_pcm_oss_release() local
2481 pcm = substream->pcm; snd_pcm_oss_release()
2482 if (!pcm->card->shutdown) snd_pcm_oss_release()
2484 mutex_lock(&pcm->open_mutex); snd_pcm_oss_release()
2486 mutex_unlock(&pcm->open_mutex); snd_pcm_oss_release()
2487 wake_up(&pcm->open_wait); snd_pcm_oss_release()
2488 module_put(pcm->card->module); snd_pcm_oss_release()
2489 snd_card_file_remove(pcm->card, file); snd_pcm_oss_release()
2515 return snd_mixer_oss_ioctl_card(substream->pcm->card, cmd, arg); snd_pcm_oss_ioctl()
2675 pcm_dbg(substream->pcm, snd_pcm_oss_read()
2696 pcm_dbg(substream->pcm, "pcm_oss: write %li bytes (wrote %li bytes)\n", snd_pcm_oss_write()
2957 static void snd_pcm_oss_proc_init(struct snd_pcm *pcm) snd_pcm_oss_proc_init() argument
2962 struct snd_pcm_str *pstr = &pcm->streams[stream]; snd_pcm_oss_proc_init()
2965 if ((entry = snd_info_create_card_entry(pcm->card, "oss", pstr->proc_root)) != NULL) { snd_pcm_oss_proc_init()
2980 static void snd_pcm_oss_proc_done(struct snd_pcm *pcm) snd_pcm_oss_proc_done() argument
2984 struct snd_pcm_str *pstr = &pcm->streams[stream]; snd_pcm_oss_proc_done()
2991 #define snd_pcm_oss_proc_init(pcm)
2992 #define snd_pcm_oss_proc_done(pcm)
3013 static void register_oss_dsp(struct snd_pcm *pcm, int index) register_oss_dsp() argument
3016 pcm->card, index, &snd_pcm_oss_f_reg, register_oss_dsp()
3017 pcm) < 0) { register_oss_dsp()
3018 pcm_err(pcm, "unable to register OSS PCM device %i:%i\n", register_oss_dsp()
3019 pcm->card->number, pcm->device); register_oss_dsp()
3023 static int snd_pcm_oss_register_minor(struct snd_pcm *pcm) snd_pcm_oss_register_minor() argument
3025 pcm->oss.reg = 0; snd_pcm_oss_register_minor()
3026 if (dsp_map[pcm->card->number] == (int)pcm->device) { snd_pcm_oss_register_minor()
3029 register_oss_dsp(pcm, 0); snd_pcm_oss_register_minor()
3030 duplex = (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream_count > 0 && snd_pcm_oss_register_minor()
3031 pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream_count && snd_pcm_oss_register_minor()
3032 !(pcm->info_flags & SNDRV_PCM_INFO_HALF_DUPLEX)); snd_pcm_oss_register_minor()
3033 sprintf(name, "%s%s", pcm->name, duplex ? " (DUPLEX)" : ""); snd_pcm_oss_register_minor()
3036 pcm->card->number, snd_pcm_oss_register_minor()
3039 pcm->oss.reg++; snd_pcm_oss_register_minor()
3040 pcm->oss.reg_mask |= 1; snd_pcm_oss_register_minor()
3042 if (adsp_map[pcm->card->number] == (int)pcm->device) { snd_pcm_oss_register_minor()
3043 register_oss_dsp(pcm, 1); snd_pcm_oss_register_minor()
3044 pcm->oss.reg++; snd_pcm_oss_register_minor()
3045 pcm->oss.reg_mask |= 2; snd_pcm_oss_register_minor()
3048 if (pcm->oss.reg) snd_pcm_oss_register_minor()
3049 snd_pcm_oss_proc_init(pcm); snd_pcm_oss_register_minor()
3054 static int snd_pcm_oss_disconnect_minor(struct snd_pcm *pcm) snd_pcm_oss_disconnect_minor() argument
3056 if (pcm->oss.reg) { snd_pcm_oss_disconnect_minor()
3057 if (pcm->oss.reg_mask & 1) { snd_pcm_oss_disconnect_minor()
3058 pcm->oss.reg_mask &= ~1; snd_pcm_oss_disconnect_minor()
3060 pcm->card, 0); snd_pcm_oss_disconnect_minor()
3062 if (pcm->oss.reg_mask & 2) { snd_pcm_oss_disconnect_minor()
3063 pcm->oss.reg_mask &= ~2; snd_pcm_oss_disconnect_minor()
3065 pcm->card, 1); snd_pcm_oss_disconnect_minor()
3067 if (dsp_map[pcm->card->number] == (int)pcm->device) { snd_pcm_oss_disconnect_minor()
3069 snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_AUDIO, pcm->card->number); snd_pcm_oss_disconnect_minor()
3072 pcm->oss.reg = 0; snd_pcm_oss_disconnect_minor()
3077 static int snd_pcm_oss_unregister_minor(struct snd_pcm *pcm) snd_pcm_oss_unregister_minor() argument
3079 snd_pcm_oss_disconnect_minor(pcm); snd_pcm_oss_unregister_minor()
3080 snd_pcm_oss_proc_done(pcm); snd_pcm_oss_unregister_minor()
2311 snd_pcm_oss_open_file(struct file *file, struct snd_pcm *pcm, struct snd_pcm_oss_file **rpcm_oss_file, int minor, struct snd_pcm_oss_setup *setup) snd_pcm_oss_open_file() argument
/linux-4.1.27/sound/aoa/soundbus/i2sbus/
H A DMakefile2 snd-aoa-i2sbus-objs := core.o pcm.o control.o
H A Dpcm.c2 * i2sbus driver -- pcm routines
862 static void i2sbus_private_free(struct snd_pcm *pcm) i2sbus_private_free() argument
864 struct i2sbus_dev *i2sdev = snd_pcm_chip(pcm); i2sbus_private_free()
867 i2sdev->sound.pcm = NULL; i2sbus_private_free()
890 printk(KERN_ERR "i2sbus: pcm name and id must be set!\n"); i2sbus_attach_codec()
964 if (!dev->pcm) { i2sbus_attach_codec()
966 &dev->pcm); i2sbus_attach_codec()
968 printk(KERN_DEBUG "i2sbus: failed to create pcm\n"); i2sbus_attach_codec()
978 if (dev->pcm->card != card) { i2sbus_attach_codec()
985 err = snd_pcm_new_stream(dev->pcm, SNDRV_PCM_STREAM_PLAYBACK, 1); i2sbus_attach_codec()
988 snd_pcm_set_ops(dev->pcm, SNDRV_PCM_STREAM_PLAYBACK, i2sbus_attach_codec()
990 dev->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].dev.parent = i2sbus_attach_codec()
996 if (dev->pcm->card != card) { i2sbus_attach_codec()
1002 err = snd_pcm_new_stream(dev->pcm, SNDRV_PCM_STREAM_CAPTURE, 1); i2sbus_attach_codec()
1005 snd_pcm_set_ops(dev->pcm, SNDRV_PCM_STREAM_CAPTURE, i2sbus_attach_codec()
1007 dev->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].dev.parent = i2sbus_attach_codec()
1012 /* so we have to register the pcm after adding any substream i2sbus_attach_codec()
1016 * register the pcm now instead of just after creating it. i2sbus_attach_codec()
1018 err = snd_device_register(card, dev->pcm); i2sbus_attach_codec()
1020 printk(KERN_ERR "i2sbus: error registering new pcm\n"); i2sbus_attach_codec()
1026 dev->pcm->private_data = i2sdev; i2sbus_attach_codec()
1027 dev->pcm->private_free = i2sbus_private_free; i2sbus_attach_codec()
1031 dev->pcm, SNDRV_DMA_TYPE_DEV, i2sbus_attach_codec()
1062 /* no more codecs, but still a pcm? */ i2sbus_detach_codec()
1063 if (list_empty(&dev->codec_list) && dev->pcm) { i2sbus_detach_codec()
1065 snd_device_free(dev->pcm->card, dev->pcm); i2sbus_detach_codec()
H A Di2sbus.h15 #include <sound/pcm.h>
96 /* pcm specific functions */
/linux-4.1.27/sound/arm/
H A DMakefile8 obj-$(CONFIG_SND_PXA2XX_PCM) += snd-pxa2xx-pcm.o
9 snd-pxa2xx-pcm-objs := pxa2xx-pcm.o
12 snd-pxa2xx-lib-y := pxa2xx-pcm-lib.o
H A Dpxa2xx-pcm.c2 * linux/sound/arm/pxa2xx-pcm.c -- ALSA PCM interface for the Intel PXA2xx chip
23 #include "pxa2xx-pcm.h"
92 struct snd_pcm *pcm; pxa2xx_pcm_new() local
97 ret = snd_pcm_new(card, "PXA2xx-PCM", 0, play, capt, &pcm); pxa2xx_pcm_new()
101 pcm->private_data = client; pxa2xx_pcm_new()
102 pcm->private_free = pxa2xx_pcm_free_dma_buffers; pxa2xx_pcm_new()
110 snd_pcm_set_ops(pcm, stream, &pxa2xx_pcm_ops); pxa2xx_pcm_new()
111 ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, stream); pxa2xx_pcm_new()
117 snd_pcm_set_ops(pcm, stream, &pxa2xx_pcm_ops); pxa2xx_pcm_new()
118 ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, stream); pxa2xx_pcm_new()
124 *rpcm = pcm; pxa2xx_pcm_new()
H A Dpxa2xx-pcm-lib.c13 #include <sound/pcm.h>
20 #include "pxa2xx-pcm.h"
241 dma_alloc_writecombine(substream->pcm->card->dev, PAGE_SIZE, __pxa2xx_pcm_open()
262 dma_free_writecombine(substream->pcm->card->dev, PAGE_SIZE, __pxa2xx_pcm_close()
273 return dma_mmap_writecombine(substream->pcm->card->dev, vma, pxa2xx_pcm_mmap()
280 int pxa2xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) pxa2xx_pcm_preallocate_dma_buffer() argument
282 struct snd_pcm_substream *substream = pcm->streams[stream].substream; pxa2xx_pcm_preallocate_dma_buffer()
286 buf->dev.dev = pcm->card->dev; pxa2xx_pcm_preallocate_dma_buffer()
288 buf->area = dma_alloc_writecombine(pcm->card->dev, size, pxa2xx_pcm_preallocate_dma_buffer()
297 void pxa2xx_pcm_free_dma_buffers(struct snd_pcm *pcm) pxa2xx_pcm_free_dma_buffers() argument
304 substream = pcm->streams[stream].substream; pxa2xx_pcm_free_dma_buffers()
310 dma_free_writecombine(pcm->card->dev, buf->bytes, pxa2xx_pcm_free_dma_buffers()
H A Dpxa2xx-pcm.h2 * linux/sound/arm/pxa2xx-pcm.h -- ALSA PCM interface for the Intel PXA2xx chip
H A Daaci.c26 #include <sound/pcm.h>
418 runtime->hw.rates = aacirun->pcm->rates; aaci_pcm_open()
432 if (aacirun->pcm->r[1].slots) aaci_pcm_open()
486 snd_ac97_pcm_close(aacirun->pcm); aaci_pcm_hw_free()
515 snd_ac97_pcm_close(aacirun->pcm); aaci_pcm_hw_params()
528 err = snd_ac97_pcm_open(aacirun->pcm, rate, channels, aaci_pcm_hw_params()
529 aacirun->pcm->r[dbl].slots); aaci_pcm_hw_params()
760 snd_pcm_suspend_all(aaci->pcm); aaci_do_suspend()
882 aaci->playback.pcm = &ac97_bus->pcms[0]; aaci_probe_ac97()
883 aaci->capture.pcm = &ac97_bus->pcms[1]; aaci_probe_ac97()
931 struct snd_pcm *pcm; aaci_init_pcm() local
934 ret = snd_pcm_new(aaci->card, "AACI AC'97", 0, 1, 1, &pcm); aaci_init_pcm()
936 aaci->pcm = pcm; aaci_init_pcm()
937 pcm->private_data = aaci; aaci_init_pcm()
938 pcm->info_flags = 0; aaci_init_pcm()
940 strlcpy(pcm->name, DRIVER_NAME, sizeof(pcm->name)); aaci_init_pcm()
942 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops); aaci_init_pcm()
943 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops); aaci_init_pcm()
944 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, aaci_init_pcm()
H A Dpxa2xx-ac97.c20 #include <sound/pcm.h>
29 #include "pxa2xx-pcm.h"
79 platform_ops = substream->pcm->card->dev->platform_data; pxa2xx_ac97_pcm_startup()
90 platform_ops = substream->pcm->card->dev->platform_data; pxa2xx_ac97_pcm_shutdown()
/linux-4.1.27/sound/usb/hiface/
H A DMakefile1 snd-usb-hiface-objs := chip.o pcm.o
H A Dpcm.c18 #include <sound/pcm.h>
20 #include "pcm.h"
45 enum { /* pcm streaming states */
46 STREAM_DISABLED, /* no pcm streaming */
47 STREAM_STARTING, /* pcm streaming requested, waiting to become ready */
48 STREAM_RUNNING, /* pcm streaming running */
57 bool panic; /* if set driver won't do anymore pcm on device */
184 dev_err(device, "Error getting pcm substream slot.\n"); hiface_pcm_get_substream()
311 struct pcm_runtime *rt = out_urb->chip->pcm; hiface_pcm_out_urb_handler()
549 struct pcm_runtime *rt = chip->pcm; hiface_pcm_abort()
562 struct pcm_runtime *rt = chip->pcm; hiface_pcm_destroy()
568 kfree(chip->pcm); hiface_pcm_destroy()
569 chip->pcm = NULL; hiface_pcm_destroy()
572 static void hiface_pcm_free(struct snd_pcm *pcm) hiface_pcm_free() argument
574 struct pcm_runtime *rt = pcm->private_data; hiface_pcm_free()
584 struct snd_pcm *pcm; hiface_pcm_init() local
604 ret = snd_pcm_new(chip->card, "USB-SPDIF Audio", 0, 1, 0, &pcm); hiface_pcm_init()
607 dev_err(&chip->dev->dev, "Cannot create pcm instance\n"); hiface_pcm_init()
611 pcm->private_data = rt; hiface_pcm_init()
612 pcm->private_free = hiface_pcm_free; hiface_pcm_init()
614 strlcpy(pcm->name, "USB-SPDIF Audio", sizeof(pcm->name)); hiface_pcm_init()
615 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &pcm_ops); hiface_pcm_init()
617 rt->instance = pcm; hiface_pcm_init()
619 chip->pcm = rt; hiface_pcm_init()
H A Dchip.h28 struct pcm_runtime *pcm; member in struct:hiface_chip
/linux-4.1.27/sound/soc/atmel/
H A DMakefile2 snd-soc-atmel-pcm-pdc-objs := atmel-pcm-pdc.o
3 snd-soc-atmel-pcm-dma-objs := atmel-pcm-dma.o
6 obj-$(CONFIG_SND_ATMEL_SOC_PDC) += snd-soc-atmel-pcm-pdc.o
7 obj-$(CONFIG_SND_ATMEL_SOC_DMA) += snd-soc-atmel-pcm-dma.o
H A Datmel-pcm-pdc.c2 * atmel-pcm.c -- ALSA PCM interface for the Atmel atmel SoC.
9 * Based on at91-pcm. by:
13 * Based on pxa2xx-pcm.c by:
43 #include <sound/pcm.h>
47 #include "atmel-pcm.h"
50 static int atmel_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, atmel_pcm_preallocate_dma_buffer() argument
53 struct snd_pcm_substream *substream = pcm->streams[stream].substream; atmel_pcm_preallocate_dma_buffer()
58 buf->dev.dev = pcm->card->dev; atmel_pcm_preallocate_dma_buffer()
60 buf->area = dma_alloc_coherent(pcm->card->dev, size, atmel_pcm_preallocate_dma_buffer()
62 pr_debug("atmel-pcm: alloc dma buffer: area=%p, addr=%p, size=%zu\n", atmel_pcm_preallocate_dma_buffer()
83 struct snd_pcm *pcm = rtd->pcm; atmel_pcm_new() local
90 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { atmel_pcm_new()
91 pr_debug("atmel-pcm: allocating PCM playback DMA buffer\n"); atmel_pcm_new()
92 ret = atmel_pcm_preallocate_dma_buffer(pcm, atmel_pcm_new()
98 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { atmel_pcm_new()
99 pr_debug("atmel-pcm: allocating PCM capture DMA buffer\n"); atmel_pcm_new()
100 ret = atmel_pcm_preallocate_dma_buffer(pcm, atmel_pcm_new()
109 static void atmel_pcm_free(struct snd_pcm *pcm) atmel_pcm_free() argument
116 substream = pcm->streams[stream].substream; atmel_pcm_free()
123 dma_free_coherent(pcm->card->dev, buf->bytes, atmel_pcm_free()
173 pr_warn("atmel-pcm: buffer %s on %s (SSC_SR=%#x, count=%d)\n", atmel_pcm_dma_irq()
232 pr_debug("atmel-pcm: " atmel_pcm_hw_params()
275 pr_debug("atmel-pcm:buffer_size = %ld," atmel_pcm_trigger()
294 pr_debug("atmel-pcm: trigger: " atmel_pcm_trigger()
H A Datmel-pcm-dma.c2 * atmel-pcm-dma.c -- ALSA PCM DMA support for the Atmel SoC.
8 * Based on atmel-pcm by:
37 #include <sound/pcm.h>
42 #include "atmel-pcm.h"
76 pr_warn("atmel-pcm: buffer %s on %s (SSC_SR=%#x)\n", atmel_pcm_dma_irq()
104 pr_err("atmel-pcm: hwparams to dma slave configure failed\n"); atmel_pcm_configure_dma()
H A Datmel-pcm.h2 * at91-pcm.h - ALSA PCM interface for the Atmel AT91 SoC.
9 * Based on at91-pcm. by:
13 * Based on pxa2xx-pcm.c by:
/linux-4.1.27/sound/soc/
H A Dsoc-generic-dmaengine-pcm.c19 #include <sound/pcm.h>
39 static struct device *dmaengine_dma_dev(struct dmaengine_pcm *pcm, dmaengine_dma_dev() argument
42 if (!pcm->chan[substream->stream]) dmaengine_dma_dev()
45 return pcm->chan[substream->stream]->device->dev; dmaengine_dma_dev()
85 struct dmaengine_pcm *pcm = soc_platform_to_pcm(rtd->platform); dmaengine_pcm_hw_params() local
95 if (!pcm->config) dmaengine_pcm_hw_params()
98 prepare_slave_config = pcm->config->prepare_slave_config; dmaengine_pcm_hw_params()
116 struct dmaengine_pcm *pcm = soc_platform_to_pcm(rtd->platform); dmaengine_pcm_set_runtime_hwparams() local
117 struct device *dma_dev = dmaengine_dma_dev(pcm, substream); dmaengine_pcm_set_runtime_hwparams()
118 struct dma_chan *chan = pcm->chan[substream->stream]; dmaengine_pcm_set_runtime_hwparams()
127 if (pcm->config && pcm->config->pcm_hardware) dmaengine_pcm_set_runtime_hwparams()
129 pcm->config->pcm_hardware); dmaengine_pcm_set_runtime_hwparams()
143 if (pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE) dmaengine_pcm_set_runtime_hwparams()
192 struct dmaengine_pcm *pcm = soc_platform_to_pcm(rtd->platform); dmaengine_pcm_open() local
193 struct dma_chan *chan = pcm->chan[substream->stream]; dmaengine_pcm_open()
207 struct dmaengine_pcm *pcm = soc_platform_to_pcm(rtd->platform); dmaengine_pcm_compat_request_channel() local
213 if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) && pcm->chan[0]) dmaengine_pcm_compat_request_channel()
214 return pcm->chan[0]; dmaengine_pcm_compat_request_channel()
216 if (pcm->config && pcm->config->compat_request_channel) dmaengine_pcm_compat_request_channel()
217 return pcm->config->compat_request_channel(rtd, substream); dmaengine_pcm_compat_request_channel()
219 if (pcm->config) dmaengine_pcm_compat_request_channel()
220 fn = pcm->config->compat_filter_fn; dmaengine_pcm_compat_request_channel()
242 struct dmaengine_pcm *pcm = soc_platform_to_pcm(rtd->platform); dmaengine_pcm_new() local
243 const struct snd_dmaengine_pcm_config *config = pcm->config; dmaengine_pcm_new()
262 substream = rtd->pcm->streams[i].substream; dmaengine_pcm_new()
268 if (!pcm->chan[i] && dmaengine_pcm_new()
269 (pcm->flags & SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME)) dmaengine_pcm_new()
270 pcm->chan[i] = dma_request_slave_channel(dev, dmaengine_pcm_new()
273 if (!pcm->chan[i] && (pcm->flags & SND_DMAENGINE_PCM_FLAG_COMPAT)) { dmaengine_pcm_new()
274 pcm->chan[i] = dmaengine_pcm_compat_request_channel(rtd, dmaengine_pcm_new()
278 if (!pcm->chan[i]) { dmaengine_pcm_new()
286 dmaengine_dma_dev(pcm, substream), dmaengine_pcm_new()
299 if (!dmaengine_pcm_can_report_residue(pcm->chan[i])) dmaengine_pcm_new()
300 pcm->flags |= SND_DMAENGINE_PCM_FLAG_NO_RESIDUE; dmaengine_pcm_new()
310 struct dmaengine_pcm *pcm = soc_platform_to_pcm(rtd->platform); dmaengine_pcm_pointer() local
312 if (pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE) dmaengine_pcm_pointer()
341 static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm, dmaengine_pcm_request_chan_of() argument
348 if ((pcm->flags & (SND_DMAENGINE_PCM_FLAG_NO_DT | dmaengine_pcm_request_chan_of()
367 if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) dmaengine_pcm_request_chan_of()
377 pcm->chan[i] = NULL; dmaengine_pcm_request_chan_of()
379 pcm->chan[i] = chan; dmaengine_pcm_request_chan_of()
381 if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) dmaengine_pcm_request_chan_of()
385 if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) dmaengine_pcm_request_chan_of()
386 pcm->chan[1] = pcm->chan[0]; dmaengine_pcm_request_chan_of()
391 static void dmaengine_pcm_release_chan(struct dmaengine_pcm *pcm) dmaengine_pcm_release_chan() argument
397 if (!pcm->chan[i]) dmaengine_pcm_release_chan()
399 dma_release_channel(pcm->chan[i]); dmaengine_pcm_release_chan()
400 if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) dmaengine_pcm_release_chan()
414 struct dmaengine_pcm *pcm; snd_dmaengine_pcm_register() local
417 pcm = kzalloc(sizeof(*pcm), GFP_KERNEL); snd_dmaengine_pcm_register()
418 if (!pcm) snd_dmaengine_pcm_register()
421 pcm->config = config; snd_dmaengine_pcm_register()
422 pcm->flags = flags; snd_dmaengine_pcm_register()
424 ret = dmaengine_pcm_request_chan_of(pcm, dev, config); snd_dmaengine_pcm_register()
428 ret = snd_soc_add_platform(dev, &pcm->platform, snd_dmaengine_pcm_register()
436 dmaengine_pcm_release_chan(pcm); snd_dmaengine_pcm_register()
437 kfree(pcm); snd_dmaengine_pcm_register()
452 struct dmaengine_pcm *pcm; snd_dmaengine_pcm_unregister() local
458 pcm = soc_platform_to_pcm(platform); snd_dmaengine_pcm_unregister()
461 dmaengine_pcm_release_chan(pcm); snd_dmaengine_pcm_unregister()
462 kfree(pcm); snd_dmaengine_pcm_unregister()
H A DMakefile2 snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o soc-devres.o soc-ops.o
5 snd-soc-core-objs += soc-generic-dmaengine-pcm.o
/linux-4.1.27/sound/firewire/dice/
H A DMakefile2 dice-pcm.o dice-hwdep.o dice.o
H A Ddice-pcm.c397 struct snd_pcm *pcm; snd_dice_create_pcm() local
409 err = snd_pcm_new(dice->card, "DICE", 0, playback, capture, &pcm); snd_dice_create_pcm()
412 pcm->private_data = dice; snd_dice_create_pcm()
413 strcpy(pcm->name, dice->card->shortname); snd_dice_create_pcm()
416 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &capture_ops); snd_dice_create_pcm()
419 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &playback_ops); snd_dice_create_pcm()
/linux-4.1.27/sound/soc/mxs/
H A DMakefile3 snd-soc-mxs-pcm-objs := mxs-pcm.o
5 obj-$(CONFIG_SND_MXS_SOC) += snd-soc-mxs.o snd-soc-mxs-pcm.o
H A Dmxs-pcm.c4 * Based on sound/soc/imx/imx-pcm-dma-mx2.c
26 #include <sound/pcm.h>
30 #include "mxs-pcm.h"
/linux-4.1.27/sound/soc/nuc900/
H A DMakefile2 snd-soc-nuc900-pcm-objs := nuc900-pcm.o
5 obj-$(CONFIG_SND_SOC_NUC900) += snd-soc-nuc900-pcm.o
H A Dnuc900-audio.c19 #include <sound/pcm.h>
30 .platform_name = "nuc900-pcm-audio",
H A Dnuc900-pcm.c20 #include <sound/pcm.h>
270 return dma_mmap_writecombine(substream->pcm->card->dev, vma, nuc900_dma_mmap()
291 struct snd_pcm *pcm = rtd->pcm; nuc900_dma_new() local
298 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, nuc900_dma_new()
322 .name = "nuc900-pcm-audio",
/linux-4.1.27/sound/soc/samsung/
H A Dpcm.c1 /* sound/soc/samsung/pcm.c
25 #include "pcm.h"
154 static void s3c_pcm_snd_txctrl(struct s3c_pcm_info *pcm, int on) s3c_pcm_snd_txctrl() argument
156 void __iomem *regs = pcm->regs; s3c_pcm_snd_txctrl()
176 if (!pcm->idleclk) s3c_pcm_snd_txctrl()
185 static void s3c_pcm_snd_rxctrl(struct s3c_pcm_info *pcm, int on) s3c_pcm_snd_rxctrl() argument
187 void __iomem *regs = pcm->regs; s3c_pcm_snd_rxctrl()
207 if (!pcm->idleclk) s3c_pcm_snd_rxctrl()
220 struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(rtd->cpu_dai); s3c_pcm_trigger() local
223 dev_dbg(pcm->dev, "Entered %s\n", __func__); s3c_pcm_trigger()
229 spin_lock_irqsave(&pcm->lock, flags); s3c_pcm_trigger()
232 s3c_pcm_snd_rxctrl(pcm, 1); s3c_pcm_trigger()
234 s3c_pcm_snd_txctrl(pcm, 1); s3c_pcm_trigger()
236 spin_unlock_irqrestore(&pcm->lock, flags); s3c_pcm_trigger()
242 spin_lock_irqsave(&pcm->lock, flags); s3c_pcm_trigger()
245 s3c_pcm_snd_rxctrl(pcm, 0); s3c_pcm_trigger()
247 s3c_pcm_snd_txctrl(pcm, 0); s3c_pcm_trigger()
249 spin_unlock_irqrestore(&pcm->lock, flags); s3c_pcm_trigger()
264 struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(rtd->cpu_dai); s3c_pcm_hw_params() local
265 void __iomem *regs = pcm->regs; s3c_pcm_hw_params()
271 dev_dbg(pcm->dev, "Entered %s\n", __func__); s3c_pcm_hw_params()
281 spin_lock_irqsave(&pcm->lock, flags); s3c_pcm_hw_params()
286 clk = pcm->pclk; s3c_pcm_hw_params()
288 clk = pcm->cclk; s3c_pcm_hw_params()
291 sclk_div = clk_get_rate(clk) / pcm->sclk_per_fs / s3c_pcm_hw_params()
300 sync_div = pcm->sclk_per_fs - 1; s3c_pcm_hw_params()
309 spin_unlock_irqrestore(&pcm->lock, flags); s3c_pcm_hw_params()
311 dev_dbg(pcm->dev, "PCMSOURCE_CLK-%lu SCLK=%ufs SCLK_DIV=%d SYNC_DIV=%d\n", s3c_pcm_hw_params()
312 clk_get_rate(clk), pcm->sclk_per_fs, s3c_pcm_hw_params()
321 struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(cpu_dai); s3c_pcm_set_fmt() local
322 void __iomem *regs = pcm->regs; s3c_pcm_set_fmt()
327 dev_dbg(pcm->dev, "Entered %s\n", __func__); s3c_pcm_set_fmt()
329 spin_lock_irqsave(&pcm->lock, flags); s3c_pcm_set_fmt()
338 dev_err(pcm->dev, "Unsupported clock inversion!\n"); s3c_pcm_set_fmt()
348 dev_err(pcm->dev, "Unsupported master/slave format!\n"); s3c_pcm_set_fmt()
355 pcm->idleclk = 1; s3c_pcm_set_fmt()
358 pcm->idleclk = 0; s3c_pcm_set_fmt()
361 dev_err(pcm->dev, "Invalid Clock gating request!\n"); s3c_pcm_set_fmt()
376 dev_err(pcm->dev, "Unsupported data format!\n"); s3c_pcm_set_fmt()
384 spin_unlock_irqrestore(&pcm->lock, flags); s3c_pcm_set_fmt()
392 struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(cpu_dai); s3c_pcm_set_clkdiv() local
396 pcm->sclk_per_fs = div; s3c_pcm_set_clkdiv()
409 struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(cpu_dai); s3c_pcm_set_sysclk() local
410 void __iomem *regs = pcm->regs; s3c_pcm_set_sysclk()
421 if (clk_get_rate(pcm->cclk) != freq) s3c_pcm_set_sysclk()
422 clk_set_rate(pcm->cclk, freq); s3c_pcm_set_sysclk()
445 struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(dai); s3c_pcm_dai_probe() local
447 snd_soc_dai_init_dma_data(dai, pcm->dma_playback, pcm->dma_capture); s3c_pcm_dai_probe()
473 .name = "samsung-pcm.0",
477 .name = "samsung-pcm.1",
483 .name = "s3c-pcm",
488 struct s3c_pcm_info *pcm; s3c_pcm_dev_probe() local
525 pcm = &s3c_pcm[pdev->id]; s3c_pcm_dev_probe()
526 pcm->dev = &pdev->dev; s3c_pcm_dev_probe()
528 spin_lock_init(&pcm->lock); s3c_pcm_dev_probe()
531 pcm->sclk_per_fs = 128; s3c_pcm_dev_probe()
533 pcm->cclk = devm_clk_get(&pdev->dev, "audio-bus"); s3c_pcm_dev_probe()
534 if (IS_ERR(pcm->cclk)) { s3c_pcm_dev_probe()
536 ret = PTR_ERR(pcm->cclk); s3c_pcm_dev_probe()
539 clk_prepare_enable(pcm->cclk); s3c_pcm_dev_probe()
541 /* record our pcm structure for later use in the callbacks */ s3c_pcm_dev_probe()
542 dev_set_drvdata(&pdev->dev, pcm); s3c_pcm_dev_probe()
545 resource_size(mem_res), "samsung-pcm")) { s3c_pcm_dev_probe()
551 pcm->regs = ioremap(mem_res->start, 0x100); s3c_pcm_dev_probe()
552 if (pcm->regs == NULL) { s3c_pcm_dev_probe()
558 pcm->pclk = devm_clk_get(&pdev->dev, "pcm"); s3c_pcm_dev_probe()
559 if (IS_ERR(pcm->pclk)) { s3c_pcm_dev_probe()
564 clk_prepare_enable(pcm->pclk); s3c_pcm_dev_probe()
574 pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id]; s3c_pcm_dev_probe()
575 pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id]; s3c_pcm_dev_probe()
595 clk_disable_unprepare(pcm->pclk); s3c_pcm_dev_probe()
597 iounmap(pcm->regs); s3c_pcm_dev_probe()
601 clk_disable_unprepare(pcm->cclk); s3c_pcm_dev_probe()
608 struct s3c_pcm_info *pcm = &s3c_pcm[pdev->id]; s3c_pcm_dev_remove() local
613 iounmap(pcm->regs); s3c_pcm_dev_remove()
618 clk_disable_unprepare(pcm->cclk); s3c_pcm_dev_remove()
619 clk_disable_unprepare(pcm->pclk); s3c_pcm_dev_remove()
628 .name = "samsung-pcm",
638 MODULE_ALIAS("platform:samsung-pcm");
H A Dpcm.h1 /* sound/soc/samsung/pcm.h
H A Dsmdk_wm8580pcm.c14 #include <sound/pcm.h>
20 #include "pcm.h"
117 .cpu_dai_name = "samsung-pcm.0",
126 .cpu_dai_name = "samsung-pcm.0",
128 .platform_name = "samsung-pcm.0",
167 .name = "samsung-smdk-pcm",
H A Dsmdk_wm8994pcm.c14 #include <sound/pcm.h>
19 #include "pcm.h"
103 .cpu_dai_name = "samsung-pcm.0",
105 .platform_name = "samsung-pcm.0",
134 .name = "samsung-smdk-pcm",
H A Didma.c19 #include <sound/pcm.h>
341 static void idma_free(struct snd_pcm *pcm) idma_free() argument
346 substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; idma_free()
360 static int preallocate_idma_buffer(struct snd_pcm *pcm, int stream) preallocate_idma_buffer() argument
362 struct snd_pcm_substream *substream = pcm->streams[stream].substream; preallocate_idma_buffer()
365 buf->dev.dev = pcm->card->dev; preallocate_idma_buffer()
380 struct snd_pcm *pcm = rtd->pcm; idma_new() local
387 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { idma_new()
388 ret = preallocate_idma_buffer(pcm, idma_new()
H A DMakefile9 snd-soc-pcm-objs := pcm.o
18 obj-$(CONFIG_SND_SAMSUNG_PCM) += snd-soc-pcm.o
/linux-4.1.27/sound/core/
H A DMakefile13 snd-pcm-y := pcm.o pcm_native.o pcm_lib.o pcm_timer.o pcm_misc.o \
15 snd-pcm-$(CONFIG_SND_DMA_SGBUF) += sgbuf.o
20 snd-pcm-dmaengine-objs := pcm_dmaengine.o
35 obj-$(CONFIG_SND_PCM) += snd-pcm.o
36 obj-$(CONFIG_SND_DMAENGINE_PCM) += snd-pcm-dmaengine.o
H A Dpcm.c30 #include <sound/pcm.h>
42 static int snd_pcm_free(struct snd_pcm *pcm);
49 struct snd_pcm *pcm; snd_pcm_get() local
51 list_for_each_entry(pcm, &snd_pcm_devices, list) { snd_pcm_get()
52 if (pcm->card == card && pcm->device == device) snd_pcm_get()
53 return pcm; snd_pcm_get()
60 struct snd_pcm *pcm; snd_pcm_next() local
62 list_for_each_entry(pcm, &snd_pcm_devices, list) { snd_pcm_next()
63 if (pcm->card == card && pcm->device > device) snd_pcm_next()
64 return pcm->device; snd_pcm_next()
65 else if (pcm->card->number > card->number) snd_pcm_next()
73 struct snd_pcm *pcm; snd_pcm_add() local
78 list_for_each_entry(pcm, &snd_pcm_devices, list) { snd_pcm_add()
79 if (pcm->card == newpcm->card && pcm->device == newpcm->device) snd_pcm_add()
81 if (pcm->card->number > newpcm->card->number || snd_pcm_add()
82 (pcm->card == newpcm->card && snd_pcm_add()
83 pcm->device > newpcm->device)) { snd_pcm_add()
84 list_add(&newpcm->list, pcm->list.prev); snd_pcm_add()
115 struct snd_pcm *pcm; snd_pcm_control_ioctl() local
130 pcm = snd_pcm_get(card, device); snd_pcm_control_ioctl()
131 if (pcm == NULL) { snd_pcm_control_ioctl()
135 pstr = &pcm->streams[stream]; snd_pcm_control_ioctl()
388 mutex_lock(&substream->pcm->open_mutex); snd_pcm_substream_proc_hw_params_read()
416 mutex_unlock(&substream->pcm->open_mutex); snd_pcm_substream_proc_hw_params_read()
425 mutex_lock(&substream->pcm->open_mutex); snd_pcm_substream_proc_sw_params_read()
444 mutex_unlock(&substream->pcm->open_mutex); snd_pcm_substream_proc_sw_params_read()
455 mutex_lock(&substream->pcm->open_mutex); snd_pcm_substream_proc_status_read()
480 mutex_unlock(&substream->pcm->open_mutex); snd_pcm_substream_proc_status_read()
516 struct snd_pcm *pcm = pstr->pcm; snd_pcm_stream_proc_init() local
520 sprintf(name, "pcm%i%c", pcm->device, snd_pcm_stream_proc_init()
522 if ((entry = snd_info_create_card_entry(pcm->card, name, pcm->card->proc_root)) == NULL) snd_pcm_stream_proc_init()
531 if ((entry = snd_info_create_card_entry(pcm->card, "info", pstr->proc_root)) != NULL) { snd_pcm_stream_proc_init()
541 if ((entry = snd_info_create_card_entry(pcm->card, "xrun_debug", snd_pcm_stream_proc_init()
576 card = substream->pcm->card; snd_pcm_substream_proc_init()
676 * @pcm: the pcm instance snd_pcm_substream_proc_done()
680 * Creates a new stream for the pcm. snd_pcm_substream_proc_done()
681 * The corresponding stream on the pcm must have been empty before snd_pcm_substream_proc_done()
687 int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count) snd_pcm_new_stream() argument
690 struct snd_pcm_str *pstr = &pcm->streams[stream]; snd_pcm_new_stream()
697 pstr->pcm = pcm; snd_pcm_new_stream()
702 snd_device_initialize(&pstr->dev, pcm->card); snd_pcm_new_stream()
704 dev_set_name(&pstr->dev, "pcmC%iD%i%c", pcm->card->number, pcm->device, snd_pcm_new_stream()
707 if (!pcm->internal) { snd_pcm_new_stream()
710 pcm_err(pcm, "Error in snd_pcm_stream_proc_init\n"); snd_pcm_new_stream()
719 substream->pcm = pcm; snd_pcm_new_stream()
730 if (!pcm->internal) { snd_pcm_new_stream()
733 pcm_err(pcm, snd_pcm_new_stream()
759 struct snd_pcm *pcm; _snd_pcm_new() local
771 pcm = kzalloc(sizeof(*pcm), GFP_KERNEL); _snd_pcm_new()
772 if (!pcm) _snd_pcm_new()
774 pcm->card = card; _snd_pcm_new()
775 pcm->device = device; _snd_pcm_new()
776 pcm->internal = internal; _snd_pcm_new()
777 mutex_init(&pcm->open_mutex); _snd_pcm_new()
778 init_waitqueue_head(&pcm->open_wait); _snd_pcm_new()
779 INIT_LIST_HEAD(&pcm->list); _snd_pcm_new()
781 strlcpy(pcm->id, id, sizeof(pcm->id)); _snd_pcm_new()
782 if ((err = snd_pcm_new_stream(pcm, SNDRV_PCM_STREAM_PLAYBACK, playback_count)) < 0) { _snd_pcm_new()
783 snd_pcm_free(pcm); _snd_pcm_new()
786 if ((err = snd_pcm_new_stream(pcm, SNDRV_PCM_STREAM_CAPTURE, capture_count)) < 0) { _snd_pcm_new()
787 snd_pcm_free(pcm); _snd_pcm_new()
790 if ((err = snd_device_new(card, SNDRV_DEV_PCM, pcm, &ops)) < 0) { _snd_pcm_new()
791 snd_pcm_free(pcm); _snd_pcm_new()
795 *rpcm = pcm; _snd_pcm_new()
806 * @rpcm: the pointer to store the new pcm instance
810 * The pcm operators have to be set afterwards to the new instance
830 * @rpcm: the pointer to store the new pcm instance
838 * The pcm operators have to be set afterwards to the new instance
878 static int snd_pcm_free(struct snd_pcm *pcm) snd_pcm_free() argument
882 if (!pcm) snd_pcm_free()
884 if (!pcm->internal) { snd_pcm_free()
886 notify->n_unregister(pcm); snd_pcm_free()
888 if (pcm->private_free) snd_pcm_free()
889 pcm->private_free(pcm); snd_pcm_free()
890 snd_pcm_lib_preallocate_free_for_all(pcm); snd_pcm_free()
891 snd_pcm_free_stream(&pcm->streams[SNDRV_PCM_STREAM_PLAYBACK]); snd_pcm_free()
892 snd_pcm_free_stream(&pcm->streams[SNDRV_PCM_STREAM_CAPTURE]); snd_pcm_free()
893 kfree(pcm); snd_pcm_free()
899 struct snd_pcm *pcm = device->device_data; snd_pcm_dev_free() local
900 return snd_pcm_free(pcm); snd_pcm_dev_free()
903 int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, snd_pcm_attach_substream() argument
914 if (snd_BUG_ON(!pcm || !rsubstream)) snd_pcm_attach_substream()
920 pstr = &pcm->streams[stream]; snd_pcm_attach_substream()
924 card = pcm->card; snd_pcm_attach_substream()
927 if (pcm->info_flags & SNDRV_PCM_INFO_HALF_DUPLEX) { snd_pcm_attach_substream()
930 for (substream = pcm->streams[opposite].substream; substream; snd_pcm_attach_substream()
994 substream->private_data = pcm->private_data; snd_pcm_attach_substream()
1031 struct snd_pcm *pcm = pstr->pcm; show_pcm_class() local
1040 if (pcm->dev_class > SNDRV_PCM_CLASS_LAST) show_pcm_class()
1043 str = strs[pcm->dev_class]; show_pcm_class()
1067 struct snd_pcm *pcm; snd_pcm_dev_register() local
1071 pcm = device->device_data; snd_pcm_dev_register()
1072 if (pcm->internal) snd_pcm_dev_register()
1076 err = snd_pcm_add(pcm); snd_pcm_dev_register()
1081 if (pcm->streams[cidx].substream == NULL) snd_pcm_dev_register()
1091 /* register pcm */ snd_pcm_dev_register()
1092 err = snd_register_device(devtype, pcm->card, pcm->device, snd_pcm_dev_register()
1093 &snd_pcm_f_ops[cidx], pcm, snd_pcm_dev_register()
1094 &pcm->streams[cidx].dev); snd_pcm_dev_register()
1096 list_del_init(&pcm->list); snd_pcm_dev_register()
1100 for (substream = pcm->streams[cidx].substream; substream; substream = substream->next) snd_pcm_dev_register()
1105 notify->n_register(pcm); snd_pcm_dev_register()
1114 struct snd_pcm *pcm = device->device_data; snd_pcm_dev_disconnect() local
1120 mutex_lock(&pcm->open_mutex); snd_pcm_dev_disconnect()
1121 wake_up(&pcm->open_wait); snd_pcm_dev_disconnect()
1122 list_del_init(&pcm->list); snd_pcm_dev_disconnect()
1124 for (substream = pcm->streams[cidx].substream; substream; substream = substream->next) { snd_pcm_dev_disconnect()
1134 if (!pcm->internal) { snd_pcm_dev_disconnect()
1136 notify->n_disconnect(pcm); snd_pcm_dev_disconnect()
1139 if (!pcm->internal) snd_pcm_dev_disconnect()
1140 snd_unregister_device(&pcm->streams[cidx].dev); snd_pcm_dev_disconnect()
1141 if (pcm->streams[cidx].chmap_kctl) { snd_pcm_dev_disconnect()
1142 snd_ctl_remove(pcm->card, pcm->streams[cidx].chmap_kctl); snd_pcm_dev_disconnect()
1143 pcm->streams[cidx].chmap_kctl = NULL; snd_pcm_dev_disconnect()
1146 mutex_unlock(&pcm->open_mutex); snd_pcm_dev_disconnect()
1162 struct snd_pcm *pcm; snd_pcm_notify() local
1172 list_for_each_entry(pcm, &snd_pcm_devices, list) snd_pcm_notify()
1173 notify->n_unregister(pcm); snd_pcm_notify()
1176 list_for_each_entry(pcm, &snd_pcm_devices, list) snd_pcm_notify()
1177 notify->n_register(pcm); snd_pcm_notify()
1192 struct snd_pcm *pcm; snd_pcm_proc_read() local
1195 list_for_each_entry(pcm, &snd_pcm_devices, list) { snd_pcm_proc_read()
1197 pcm->card->number, pcm->device, pcm->id, pcm->name); snd_pcm_proc_read()
1198 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) snd_pcm_proc_read()
1200 pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream_count); snd_pcm_proc_read()
1201 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) snd_pcm_proc_read()
1203 pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream_count); snd_pcm_proc_read()
1215 if ((entry = snd_info_create_module_entry(THIS_MODULE, "pcm", NULL)) != NULL) { snd_pcm_proc_init()
H A Dpcm_timer.c25 #include <sound/pcm.h>
56 pcm_err(substream->pcm, snd_pcm_timer_resolution_change()
57 "pcm timer resolution out of range (rate = %u, period_size = %lu)\n", snd_pcm_timer_resolution_change()
118 tid.card = substream->pcm->card->number; snd_pcm_timer_init()
119 tid.device = substream->pcm->device; snd_pcm_timer_init()
121 if (snd_timer_new(substream->pcm->card, "PCM", &tid, &timer) < 0) snd_pcm_timer_init()
140 snd_device_free(substream->pcm->card, substream->timer); snd_pcm_timer_done()
H A Dpcm_trace.h27 __entry->card = (substream)->pcm->card->number;
28 __entry->device = (substream)->pcm->device;
63 __entry->card = (substream)->pcm->card->number;
64 __entry->device = (substream)->pcm->device;
93 __entry->card = (substream)->pcm->card->number;
94 __entry->device = (substream)->pcm->device;
H A Dpcm_memory.c30 #include <sound/pcm.h>
68 substream->pcm->card->number, substream->pcm->device, preallocate_pcm_pages()
70 substream->pcm->name, orig_size); preallocate_pcm_pages()
87 * @substream: the pcm substream instance
106 * snd_pcm_lib_preallocate_free_for_all - release all pre-allocated buffers on the pcm
107 * @pcm: the pcm instance
109 * Releases all the pre-allocated buffers on the given pcm.
113 int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm) snd_pcm_lib_preallocate_free_for_all() argument
119 for (substream = pcm->streams[stream].substream; substream; substream = substream->next) snd_pcm_lib_preallocate_free_for_all()
202 if ((entry = snd_info_create_card_entry(substream->pcm->card, "prealloc", substream->proc_root)) != NULL) { preallocate_info_init()
213 if ((entry = snd_info_create_card_entry(substream->pcm->card, "prealloc_max", substream->proc_root)) != NULL) { preallocate_info_init()
248 * @substream: the pcm substream instance
271 * @pcm: the pcm instance
277 * Do pre-allocation to all substreams of the given pcm for the
282 int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm, snd_pcm_lib_preallocate_pages_for_all() argument
290 for (substream = pcm->streams[stream].substream; substream; substream = substream->next) snd_pcm_lib_preallocate_pages_for_all()
301 * @substream: the pcm substream instance
H A Dpcm_native.c33 #include <sound/pcm.h>
68 static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream);
99 if (substream->pcm->nonatomic) { snd_pcm_stream_lock()
117 if (substream->pcm->nonatomic) { snd_pcm_stream_unlock()
137 if (!substream->pcm->nonatomic) snd_pcm_stream_lock_irq()
152 if (!substream->pcm->nonatomic) snd_pcm_stream_unlock_irq()
160 if (!substream->pcm->nonatomic) _snd_pcm_stream_lock_irqsave()
178 if (!substream->pcm->nonatomic) snd_pcm_stream_unlock_irqrestore()
200 struct snd_pcm *pcm = substream->pcm; snd_pcm_info() local
204 info->card = pcm->card->number; snd_pcm_info()
205 info->device = pcm->device; snd_pcm_info()
208 strlcpy(info->id, pcm->id, sizeof(info->id)); snd_pcm_info()
209 strlcpy(info->name, pcm->name, sizeof(info->name)); snd_pcm_info()
210 info->dev_class = pcm->dev_class; snd_pcm_info()
211 info->dev_subclass = pcm->dev_subclass; snd_pcm_info()
889 if (s->pcm->nonatomic) snd_pcm_group_for_each_entry()
921 if (s1->pcm->nonatomic) snd_pcm_group_for_each_entry()
965 if (substream->pcm->nonatomic) { snd_pcm_action()
1321 * snd_pcm_suspend_all - trigger SUSPEND to all substreams in the given pcm
1322 * @pcm: the PCM instance
1326 * Return: Zero if successful (or @pcm is %NULL), or a negative error code.
1328 int snd_pcm_suspend_all(struct snd_pcm *pcm) snd_pcm_suspend_all() argument
1333 if (! pcm) snd_pcm_suspend_all()
1337 for (substream = pcm->streams[stream].substream; snd_pcm_suspend_all()
1402 struct snd_card *card = substream->pcm->card; snd_pcm_resume()
1428 struct snd_card *card = substream->pcm->card; snd_pcm_xrun()
1557 struct snd_card *card = substream->pcm->card; snd_pcm_prepare()
1661 card = substream->pcm->card; snd_pcm_drain()
1746 dev_dbg(substream->pcm->card->dev,
1835 substream->pcm->nonatomic != substream1->pcm->nonatomic) { snd_pcm_link()
1859 snd_card_unref(substream1->pcm->card); snd_pcm_link()
2257 int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, snd_pcm_open_substream() argument
2264 err = snd_pcm_attach_substream(pcm, stream, file, &substream); snd_pcm_open_substream()
2274 pcm_dbg(pcm, "snd_pcm_hw_constraints_init failed\n"); snd_pcm_open_substream()
2285 pcm_dbg(pcm, "snd_pcm_hw_constraints_complete failed\n"); snd_pcm_open_substream()
2300 struct snd_pcm *pcm, snd_pcm_open_file()
2307 err = snd_pcm_open_substream(pcm, stream, file, &substream); snd_pcm_open_file()
2328 struct snd_pcm *pcm; snd_pcm_playback_open() local
2332 pcm = snd_lookup_minor_data(iminor(inode), snd_pcm_playback_open()
2334 err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK); snd_pcm_playback_open()
2335 if (pcm) snd_pcm_playback_open()
2336 snd_card_unref(pcm->card); snd_pcm_playback_open()
2342 struct snd_pcm *pcm; snd_pcm_capture_open() local
2346 pcm = snd_lookup_minor_data(iminor(inode), snd_pcm_capture_open()
2348 err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE); snd_pcm_capture_open()
2349 if (pcm) snd_pcm_capture_open()
2350 snd_card_unref(pcm->card); snd_pcm_capture_open()
2354 static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) snd_pcm_open() argument
2359 if (pcm == NULL) { snd_pcm_open()
2363 err = snd_card_file_add(pcm->card, file); snd_pcm_open()
2366 if (!try_module_get(pcm->card->module)) { snd_pcm_open()
2371 add_wait_queue(&pcm->open_wait, &wait); snd_pcm_open()
2372 mutex_lock(&pcm->open_mutex); snd_pcm_open()
2374 err = snd_pcm_open_file(file, pcm, stream); snd_pcm_open()
2385 mutex_unlock(&pcm->open_mutex); snd_pcm_open()
2387 mutex_lock(&pcm->open_mutex); snd_pcm_open()
2388 if (pcm->card->shutdown) { snd_pcm_open()
2397 remove_wait_queue(&pcm->open_wait, &wait); snd_pcm_open()
2398 mutex_unlock(&pcm->open_mutex); snd_pcm_open()
2404 module_put(pcm->card->module); snd_pcm_open()
2406 snd_card_file_remove(pcm->card, file); snd_pcm_open()
2413 struct snd_pcm *pcm; snd_pcm_release() local
2421 pcm = substream->pcm; snd_pcm_release()
2422 mutex_lock(&pcm->open_mutex); snd_pcm_release()
2425 mutex_unlock(&pcm->open_mutex); snd_pcm_release()
2426 wake_up(&pcm->open_wait); snd_pcm_release()
2427 module_put(pcm->card->module); snd_pcm_release()
2428 snd_card_file_remove(pcm->card, file); snd_pcm_release()
2817 pcm_dbg(substream->pcm, "unknown ioctl = 0x%x\n", cmd); snd_pcm_common_ioctl1()
2299 snd_pcm_open_file(struct file *file, struct snd_pcm *pcm, int stream) snd_pcm_open_file() argument
H A Dpcm_dmaengine.c6 * imx-pcm-dma-mx2.c, Copyright 2009 Sascha Hauer <s.hauer@pengutronix.de>
7 * mxs-pcm.c, Copyright (C) 2011 Freescale Semiconductor, Inc.
8 * ep93xx-pcm.c, Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
25 #include <sound/pcm.h>
290 * The function should usually be called from the pcm open callback. Note that
292 * is not available to your pcm driver implementation.
329 * data. The function should usually be called from the pcm open callback. Note
331 * it is not available to your pcm driver implementation.
H A Dpcm_lib.c31 #include <sound/pcm.h>
147 substream->pcm->card->number, snd_pcm_debug_name()
148 substream->pcm->device, snd_pcm_debug_name()
183 pcm_warn(substream->pcm, "XRUN: %s\n", name); xrun()
324 pcm_err(substream->pcm, snd_pcm_update_hw_ptr0()
495 * @pcm: the pcm instance
499 * Sets the given PCM operators to the pcm instance.
501 void snd_pcm_set_ops(struct snd_pcm *pcm, int direction, snd_pcm_set_ops() argument
504 struct snd_pcm_str *stream = &pcm->streams[direction]; snd_pcm_set_ops()
515 * @substream: the pcm substream
523 runtime->sync.id32[0] = substream->pcm->card->number; snd_pcm_set_sync()
1129 * @runtime: the pcm runtime instance
1645 * @pcm: PCM instance
1655 int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, snd_pcm_hw_param_first() argument
1663 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_first()
1692 * @pcm: PCM instance
1702 int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, snd_pcm_hw_param_last() argument
1710 int err = snd_pcm_hw_refine(pcm, params); snd_pcm_hw_param_last()
1721 * @pcm: PCM instance
1731 int snd_pcm_hw_params_choose(struct snd_pcm_substream *pcm, snd_pcm_hw_params_choose() argument
1749 err = snd_pcm_hw_param_first(pcm, params, *v, NULL); snd_pcm_hw_params_choose()
1751 err = snd_pcm_hw_param_last(pcm, params, *v, NULL); snd_pcm_hw_params_choose()
1831 * @substream: the pcm substream instance
1859 * snd_pcm_period_elapsed - update the pcm status for the next period
1860 * @substream: the pcm substream instance
1975 pcm_dbg(substream->pcm, wait_for_avail()
2566 info->pcm->streams[info->stream].chmap_kctl = NULL; pcm_chmap_ctl_private_free()
2572 * @pcm: the assigned PCM instance
2582 int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream, snd_pcm_add_chmap_ctls() argument
2603 info->pcm = pcm; snd_pcm_add_chmap_ctls()
2611 knew.device = pcm->device; snd_pcm_add_chmap_ctls()
2612 knew.count = pcm->streams[stream].substream_count; snd_pcm_add_chmap_ctls()
2620 err = snd_ctl_add(pcm->card, info->kctl); snd_pcm_add_chmap_ctls()
2623 pcm->streams[stream].chmap_kctl = info->kctl; snd_pcm_add_chmap_ctls()
/linux-4.1.27/sound/firewire/oxfw/
H A DMakefile1 snd-oxfw-objs := oxfw-command.o oxfw-stream.o oxfw-control.o oxfw-pcm.o \
H A Doxfw-pcm.c31 if (!snd_interval_test(c, formation.pcm)) hw_rule_rate()
63 if (list[count] == formation.pcm) hw_rule_channels()
67 if (list[j] == formation.pcm) hw_rule_channels()
71 list[count] = formation.pcm; hw_rule_channels()
100 hw->channels_min = min(hw->channels_min, formation.pcm); limit_channels_and_rates()
101 hw->channels_max = max(hw->channels_max, formation.pcm); limit_channels_and_rates()
182 substream->runtime->hw.channels_min = formation.pcm; limit_to_current_params()
183 substream->runtime->hw.channels_max = formation.pcm; limit_to_current_params()
333 struct snd_pcm_substream *pcm; pcm_capture_trigger() local
337 pcm = substream; pcm_capture_trigger()
340 pcm = NULL; pcm_capture_trigger()
345 amdtp_stream_pcm_trigger(&oxfw->tx_stream, pcm); pcm_capture_trigger()
351 struct snd_pcm_substream *pcm; pcm_playback_trigger() local
355 pcm = substream; pcm_playback_trigger()
358 pcm = NULL; pcm_playback_trigger()
363 amdtp_stream_pcm_trigger(&oxfw->rx_stream, pcm); pcm_playback_trigger()
406 struct snd_pcm *pcm; snd_oxfw_create_pcm() local
413 err = snd_pcm_new(oxfw->card, oxfw->card->driver, 0, 1, cap, &pcm); snd_oxfw_create_pcm()
417 pcm->private_data = oxfw; snd_oxfw_create_pcm()
418 strcpy(pcm->name, oxfw->card->shortname); snd_oxfw_create_pcm()
419 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &playback_ops); snd_oxfw_create_pcm()
421 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &capture_ops); snd_oxfw_create_pcm()
H A Doxfw-proc.c44 formation.rate, formation.pcm, formation.midi); proc_read_formation()
74 formation.rate, formation.pcm, formation.midi); proc_read_formation()
H A Doxfw-stream.c81 if ((formation.rate == rate) && (formation.pcm == pcm_channels)) set_stream_format()
142 if (pcm_channels == 0 || pcm_channels == formation.pcm) start_stream()
150 pcm_channels = formation.pcm; start_stream()
153 /* The stream should have one pcm channels at least */ start_stream()
290 pcm_channels = formation.pcm; snd_oxfw_stream_start_simplex()
292 if ((formation.rate != rate) || (formation.pcm != pcm_channels)) { snd_oxfw_stream_start_simplex()
442 formation->pcm += channels; snd_oxfw_stream_parse_format()
477 if (formation->pcm > AMDTP_MAX_CHANNELS_FOR_PCM || snd_oxfw_stream_parse_format()
H A Doxfw.h20 #include <sound/pcm.h>
123 unsigned int pcm; member in struct:snd_oxfw_stream_formation
/linux-4.1.27/sound/soc/spear/
H A DMakefile2 snd-soc-spear-pcm-objs := spear_pcm.o
6 obj-$(CONFIG_SND_SPEAR_SOC) += snd-soc-spear-pcm.o
H A Dspear_pcm.c18 #include <sound/pcm.h>
/linux-4.1.27/sound/soc/omap/
H A Domap-pcm.c2 * omap-pcm.c -- ALSA PCM interface for the OMAP SoC
30 #include <sound/pcm.h>
34 #include <sound/omap-pcm.h>
159 return dma_mmap_writecombine(substream->pcm->card->dev, vma, omap_pcm_mmap()
176 static int omap_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, omap_pcm_preallocate_dma_buffer() argument
179 struct snd_pcm_substream *substream = pcm->streams[stream].substream; omap_pcm_preallocate_dma_buffer()
184 buf->dev.dev = pcm->card->dev; omap_pcm_preallocate_dma_buffer()
186 buf->area = dma_alloc_writecombine(pcm->card->dev, size, omap_pcm_preallocate_dma_buffer()
195 static void omap_pcm_free_dma_buffers(struct snd_pcm *pcm) omap_pcm_free_dma_buffers() argument
202 substream = pcm->streams[stream].substream; omap_pcm_free_dma_buffers()
210 dma_free_writecombine(pcm->card->dev, buf->bytes, omap_pcm_free_dma_buffers()
219 struct snd_pcm *pcm = rtd->pcm; omap_pcm_new() local
226 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { omap_pcm_new()
227 ret = omap_pcm_preallocate_dma_buffer(pcm, omap_pcm_new()
233 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { omap_pcm_new()
234 ret = omap_pcm_preallocate_dma_buffer(pcm, omap_pcm_new()
243 omap_pcm_free_dma_buffers(pcm); omap_pcm_new()
/linux-4.1.27/sound/pci/ac97/
H A Dac97_pcm.c33 #include <sound/pcm.h>
159 static unsigned char get_slot_reg(struct ac97_pcm *pcm, unsigned short cidx, get_slot_reg() argument
166 if (pcm->spdif) get_slot_reg()
168 if (pcm->stream == SNDRV_PCM_STREAM_PLAYBACK) get_slot_reg()
169 return rate_reg_tables[dbl][pcm->r[dbl].rate_table[cidx]][slot - 3]; get_slot_reg()
408 static unsigned int get_rates(struct ac97_pcm *pcm, unsigned int cidx, unsigned short slots, int dbl) get_rates() argument
417 reg = get_slot_reg(pcm, cidx, i, dbl); get_rates()
426 rates &= pcm->r[dbl].codec[cidx]->rates[idx]; get_rates()
441 * some slots are available, pcm->xxx.slots and pcm->xxx.rslots[] members
451 const struct ac97_pcm *pcm; snd_ac97_pcm_assign() local
481 pcm = &pcms[i]; snd_ac97_pcm_assign()
484 if (pcm->copy_flag) { snd_ac97_pcm_assign()
485 *rpcm = *pcm; snd_ac97_pcm_assign()
488 rpcm->stream = pcm->stream; snd_ac97_pcm_assign()
489 rpcm->exclusive = pcm->exclusive; snd_ac97_pcm_assign()
490 rpcm->spdif = pcm->spdif; snd_ac97_pcm_assign()
491 rpcm->private_value = pcm->private_value; snd_ac97_pcm_assign()
494 slots = pcm->r[0].slots; snd_ac97_pcm_assign()
499 if (pcm->spdif && pcm->stream == 0) snd_ac97_pcm_assign()
502 tmp = avail_slots[pcm->stream][j]; snd_ac97_pcm_assign()
503 if (pcm->exclusive) { snd_ac97_pcm_assign()
512 tmp &= pcm->r[0].slots; snd_ac97_pcm_assign()
517 rpcm->r[0].rate_table[j] = rate_table[pcm->stream][j]; snd_ac97_pcm_assign()
522 if (pcm->exclusive) snd_ac97_pcm_assign()
523 avail_slots[pcm->stream][j] &= ~tmp; snd_ac97_pcm_assign()
530 if (pcm->stream == SNDRV_PCM_STREAM_PLAYBACK && snd_ac97_pcm_assign()
532 rate_table[pcm->stream][0] == 0) { snd_ac97_pcm_assign()
535 if ((tmp & pcm->r[1].slots) == tmp) { snd_ac97_pcm_assign()
540 if (pcm->exclusive) snd_ac97_pcm_assign()
541 avail_slots[pcm->stream][0] &= ~tmp; snd_ac97_pcm_assign()
560 * snd_ac97_pcm_open - opens the given AC97 pcm
561 * @pcm: the ac97 pcm instance
564 * @slots: a subset of allocated slots (snd_ac97_pcm_assign) for this pcm
570 int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate, snd_ac97_pcm_open() argument
580 bus = pcm->bus; snd_ac97_pcm_open()
589 spin_lock_irq(&pcm->bus->bus_lock); snd_ac97_pcm_open()
595 if (bus->used_slots[pcm->stream][cidx] & (1 << i)) { snd_ac97_pcm_open()
596 spin_unlock_irq(&pcm->bus->bus_lock); snd_ac97_pcm_open()
600 if (pcm->r[r].rslots[cidx] & (1 << i)) { snd_ac97_pcm_open()
601 bus->used_slots[pcm->stream][cidx] |= (1 << i); snd_ac97_pcm_open()
606 spin_unlock_irq(&pcm->bus->bus_lock); snd_ac97_pcm_open()
614 pcm->cur_dbl = r; snd_ac97_pcm_open()
615 spin_unlock_irq(&pcm->bus->bus_lock); snd_ac97_pcm_open()
620 if (pcm->r[r].rslots[cidx] & (1 << i)) { snd_ac97_pcm_open()
621 reg = get_slot_reg(pcm, cidx, i, r); snd_ac97_pcm_open()
632 err = snd_ac97_set_rate(pcm->r[r].codec[cidx], reg, rate); snd_ac97_pcm_open()
642 pcm->aslots = slots; snd_ac97_pcm_open()
646 pcm->aslots = slots; snd_ac97_pcm_open()
647 snd_ac97_pcm_close(pcm); snd_ac97_pcm_open()
654 * snd_ac97_pcm_close - closes the given AC97 pcm
655 * @pcm: the ac97 pcm instance
661 int snd_ac97_pcm_close(struct ac97_pcm *pcm) snd_ac97_pcm_close() argument
664 unsigned short slots = pcm->aslots; snd_ac97_pcm_close()
668 int r = pcm->cur_dbl; snd_ac97_pcm_close()
673 if (pcm->r[r].rslots[cidx] & (1 << i)) { snd_ac97_pcm_close()
674 int reg = get_slot_reg(pcm, cidx, i, r); snd_ac97_pcm_close()
675 snd_ac97_update_power(pcm->r[r].codec[cidx], snd_ac97_pcm_close()
682 bus = pcm->bus; snd_ac97_pcm_close()
683 spin_lock_irq(&pcm->bus->bus_lock); snd_ac97_pcm_close()
688 bus->used_slots[pcm->stream][cidx] &= ~(1 << i); snd_ac97_pcm_close()
690 pcm->aslots = 0; snd_ac97_pcm_close()
691 pcm->cur_dbl = 0; snd_ac97_pcm_close()
692 spin_unlock_irq(&pcm->bus->bus_lock); snd_ac97_pcm_close()
730 * @runtime: the runtime of the ac97 front playback pcm
/linux-4.1.27/sound/usb/
H A Dpcm.h7 void snd_usb_set_pcm_ops(struct snd_pcm *pcm, int stream);
H A DMakefile13 pcm.o \
H A Dmixer_maps.c70 /* 1: IT pcm */
72 /* 3: IT pcm */
82 /* 13: OT pcm capture */
114 /* 1: IT pcm */
120 /* 7: OT pcm capture */
155 /* 1: IT pcm playback */
164 /* 15: OT pcm capture */
224 /* 1: IT pcm */
235 /* 5: IT pcm playback */
242 /* 12: OT pcm capture */
254 /* 1: IT pcm playback */
259 /* 6: OT pcm capture */
H A Dstream.c25 #include <sound/pcm.h>
34 #include "pcm.h"
69 static void snd_usb_audio_pcm_free(struct snd_pcm *pcm) snd_usb_audio_pcm_free() argument
71 struct snd_usb_stream *stream = pcm->private_data; snd_usb_audio_pcm_free()
73 stream->pcm = NULL; snd_usb_audio_pcm_free()
98 snd_usb_set_pcm_ops(as->pcm, stream); snd_usb_init_substream()
202 static int add_chmap(struct snd_pcm *pcm, int stream, add_chmap() argument
217 err = snd_pcm_add_chmap_ctls(pcm, stream, NULL, 0, 0, &chmap); add_chmap()
318 * if not, create a new pcm stream.
326 struct snd_pcm *pcm; snd_usb_add_audio_stream() local
347 err = snd_pcm_new_stream(as->pcm, stream, 1); snd_usb_add_audio_stream()
351 return add_chmap(as->pcm, stream, subs); snd_usb_add_audio_stream()
354 /* create a new pcm */ snd_usb_add_audio_stream()
364 &pcm); snd_usb_add_audio_stream()
369 as->pcm = pcm; snd_usb_add_audio_stream()
370 pcm->private_data = as; snd_usb_add_audio_stream()
371 pcm->private_free = snd_usb_audio_pcm_free; snd_usb_add_audio_stream()
372 pcm->info_flags = 0; snd_usb_add_audio_stream()
374 sprintf(pcm->name, "USB Audio #%d", chip->pcm_devs); snd_usb_add_audio_stream()
376 strcpy(pcm->name, "USB Audio"); snd_usb_add_audio_stream()
385 return add_chmap(pcm, stream, &as->substream[stream]); snd_usb_add_audio_stream()
H A Dproc.c23 #include <sound/pcm.h>
72 * proc interface for list the supported pcm formats
154 snd_iprintf(buffer, "%s : %s\n", stream->chip->card->longname, stream->pcm->name); proc_pcm_format_read()
/linux-4.1.27/sound/soc/intel/atom/
H A DMakefile1 snd-soc-sst-mfld-platform-objs := sst-mfld-platform-pcm.o \
/linux-4.1.27/arch/x86/include/asm/
H A Dpat.h21 enum page_cache_mode pcm);
24 enum page_cache_mode *pcm);
/linux-4.1.27/sound/pci/ctxfi/
H A Dctpcm.c11 * This file contains the definition of the pcm device functions.
21 #include <sound/pcm.h>
118 /* pcm playback operations */ ct_pcm_playback_open()
132 if (IEC958 == substream->pcm->device) { ct_pcm_playback_open()
137 if (FRONT == substream->pcm->device) ct_pcm_playback_open()
171 if (IEC958 == substream->pcm->device) ct_pcm_playback_close()
214 if (IEC958 == substream->pcm->device) ct_pcm_playback_prepare()
221 "Preparing pcm playback failed!!!\n"); ct_pcm_playback_prepare()
269 /* pcm capture operations */ ct_pcm_capture_open()
329 "Preparing pcm capture failed!!!\n"); ct_pcm_capture_prepare()
424 /* Create ALSA pcm device */ ct_alsa_pcm_create()
429 struct snd_pcm *pcm; ct_alsa_pcm_create() local
438 playback_count, capture_count, &pcm); ct_alsa_pcm_create()
445 pcm->private_data = atc; ct_alsa_pcm_create()
446 pcm->info_flags = 0; ct_alsa_pcm_create()
447 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; ct_alsa_pcm_create()
448 strlcpy(pcm->name, device_name, sizeof(pcm->name)); ct_alsa_pcm_create()
450 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &ct_pcm_playback_ops); ct_alsa_pcm_create()
453 snd_pcm_set_ops(pcm, ct_alsa_pcm_create()
456 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, ct_alsa_pcm_create()
478 err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, map, chs, ct_alsa_pcm_create()
484 atc->pcms[device] = pcm; ct_alsa_pcm_create()
H A Dctpcm.h11 * This file contains the definition of the pcm device functions.
H A Dctatc.h57 /* alsa pcm stream descriptor */
136 void **pcm; /* SUMs for collecting all pcm stream */ member in struct:ct_atc
/linux-4.1.27/sound/soc/fsl/
H A Dimx-pcm-fiq.c2 * imx-pcm-fiq.c -- ALSA Soc Audio Layer
27 #include <sound/pcm.h>
36 #include "imx-pcm.h"
220 ret = dma_mmap_writecombine(substream->pcm->card->dev, vma, snd_imx_pcm_mmap()
241 static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) imx_pcm_preallocate_dma_buffer() argument
243 struct snd_pcm_substream *substream = pcm->streams[stream].substream; imx_pcm_preallocate_dma_buffer()
248 buf->dev.dev = pcm->card->dev; imx_pcm_preallocate_dma_buffer()
250 buf->area = dma_alloc_writecombine(pcm->card->dev, size, imx_pcm_preallocate_dma_buffer()
262 struct snd_pcm *pcm = rtd->pcm; imx_pcm_new() local
269 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { imx_pcm_new()
270 ret = imx_pcm_preallocate_dma_buffer(pcm, imx_pcm_new()
276 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { imx_pcm_new()
277 ret = imx_pcm_preallocate_dma_buffer(pcm, imx_pcm_new()
290 struct snd_pcm *pcm = rtd->pcm; imx_pcm_fiq_new() local
298 substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; imx_pcm_fiq_new()
305 substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; imx_pcm_fiq_new()
318 static void imx_pcm_free(struct snd_pcm *pcm) imx_pcm_free() argument
325 substream = pcm->streams[stream].substream; imx_pcm_free()
333 dma_free_writecombine(pcm->card->dev, buf->bytes, imx_pcm_free()
339 static void imx_pcm_fiq_free(struct snd_pcm *pcm) imx_pcm_fiq_free() argument
343 imx_pcm_free(pcm); imx_pcm_fiq_free()
H A Defika-audio-fabric.c23 #include <sound/pcm.h>
40 .platform_name = "mpc5200-pcm-audio",
48 .platform_name = "mpc5200-pcm-audio",
H A Dimx-pcm-dma.c2 * imx-pcm-dma-mx2.c -- ALSA Soc Audio Layer
20 #include <sound/pcm.h>
24 #include "imx-pcm.h"
H A Dmpc5200_dma.c231 dev_err(substream->pcm->card->dev, "invalid buffer size\n"); psc_dma_open()
304 struct snd_pcm *pcm = rtd->pcm; psc_dma_new() local
309 dev_dbg(rtd->platform->dev, "psc_dma_new(card=%p, dai=%p, pcm=%p)\n", psc_dma_new()
310 card, dai, pcm); psc_dma_new()
316 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { psc_dma_new()
317 rc = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, pcm->card->dev, psc_dma_new()
318 size, &pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer); psc_dma_new()
323 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { psc_dma_new()
324 rc = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, pcm->card->dev, psc_dma_new()
325 size, &pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->dma_buffer); psc_dma_new()
333 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) psc_dma_new()
334 snd_dma_free_pages(&pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->dma_buffer); psc_dma_new()
342 static void psc_dma_free(struct snd_pcm *pcm) psc_dma_free() argument
344 struct snd_soc_pcm_runtime *rtd = pcm->private_data; psc_dma_free()
348 dev_dbg(rtd->platform->dev, "psc_dma_free(pcm=%p)\n", pcm); psc_dma_free()
351 substream = pcm->streams[stream].substream; psc_dma_free()
H A Dfsl_asrc_dma.c339 struct snd_pcm *pcm = rtd->pcm; fsl_asrc_dma_pcm_new() local
349 substream = pcm->streams[i].substream; fsl_asrc_dma_pcm_new()
353 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, pcm->card->dev, fsl_asrc_dma_pcm_new()
364 if (--i == 0 && pcm->streams[i].substream) fsl_asrc_dma_pcm_new()
365 snd_dma_free_pages(&pcm->streams[i].substream->dma_buffer); fsl_asrc_dma_pcm_new()
370 static void fsl_asrc_dma_pcm_free(struct snd_pcm *pcm) fsl_asrc_dma_pcm_free() argument
376 substream = pcm->streams[i].substream; fsl_asrc_dma_pcm_free()
H A DMakefile47 obj-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += imx-pcm-fiq.o
48 obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += imx-pcm-dma.o
/linux-4.1.27/sound/soc/pxa/
H A Dpxa2xx-pcm.c2 * linux/sound/arm/pxa2xx-pcm.c -- ALSA PCM interface for the Intel PXA2xx chip
25 #include "../../arm/pxa2xx-pcm.h"
95 struct snd_pcm *pcm = rtd->pcm; pxa2xx_soc_pcm_new() local
102 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { pxa2xx_soc_pcm_new()
103 ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, pxa2xx_soc_pcm_new()
109 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { pxa2xx_soc_pcm_new()
110 ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, pxa2xx_soc_pcm_new()
138 { .compatible = "mrvl,pxa-pcm-audio" },
145 .name = "pxa-pcm-audio",
H A Dmmp-pcm.c2 * linux/sound/soc/pxa/mmp-pcm.c
23 #include <sound/pcm.h>
144 static void mmp_pcm_free_dma_buffers(struct snd_pcm *pcm) mmp_pcm_free_dma_buffers() argument
158 substream = pcm->streams[stream].substream; mmp_pcm_free_dma_buffers()
180 buf->dev.dev = substream->pcm->card->dev; mmp_pcm_preallocate_dma_buffer()
197 struct snd_pcm *pcm = rtd->pcm; mmp_pcm_new() local
201 substream = pcm->streams[stream].substream; mmp_pcm_new()
211 mmp_pcm_free_dma_buffers(pcm); mmp_pcm_new()
246 .name = "mmp-pcm-audio",
H A Dem-x270.c27 #include <sound/pcm.h>
42 .platform_name = "pxa-pcm-audio",
50 .platform_name = "pxa-pcm-audio",
H A De740_wm9705.c17 #include <sound/pcm.h>
97 .platform_name = "pxa-pcm-audio",
105 .platform_name = "pxa-pcm-audio",
H A De750_wm9705.c17 #include <sound/pcm.h>
79 .platform_name = "pxa-pcm-audio",
88 .platform_name = "pxa-pcm-audio",
H A De800_wm9712.c17 #include <sound/pcm.h>
80 .platform_name = "pxa-pcm-audio",
88 .platform_name = "pxa-pcm-audio",
H A Dpalm27x.c22 #include <sound/pcm.h>
100 .platform_name = "pxa-pcm-audio",
109 .platform_name = "pxa-pcm-audio",
H A DMakefile2 snd-soc-pxa2xx-objs := pxa2xx-pcm.o
6 snd-soc-mmp-objs := mmp-pcm.o
H A Dmioa701_wm9713.c51 #include <sound/pcm.h>
150 .platform_name = "pxa-pcm-audio",
159 .platform_name = "pxa-pcm-audio",
H A Draumfeld.c23 #include <sound/pcm.h>
208 .platform_name = "pxa-pcm-audio", \
223 .platform_name = "pxa-pcm-audio", \
H A Dbrownstone.c15 #include <sound/pcm.h>
113 .platform_name = "mmp-pcm-audio",
/linux-4.1.27/sound/pci/au88x0/
H A Dau88x0_pcm.c26 #include <sound/pcm.h>
158 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { snd_vortex_pcm_open()
160 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_A3D) { snd_vortex_pcm_open()
164 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_SPDIF) { snd_vortex_pcm_open()
178 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB snd_vortex_pcm_open()
179 || VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_I2S) snd_vortex_pcm_open()
184 VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) { snd_vortex_pcm_open()
230 dev_err(chip->card->dev, "Vortex: pcm page alloc failed!\n"); snd_vortex_pcm_hw_params()
239 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { snd_vortex_pcm_hw_params()
240 int dma, type = VORTEX_PCM_TYPE(substream->pcm); snd_vortex_pcm_hw_params()
263 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) { snd_vortex_pcm_hw_params()
296 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { snd_vortex_pcm_hw_free()
298 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) { snd_vortex_pcm_hw_free()
337 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { snd_vortex_pcm_prepare()
341 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_SPDIF) snd_vortex_pcm_prepare()
368 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { snd_vortex_pcm_trigger()
383 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) snd_vortex_pcm_trigger()
394 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) snd_vortex_pcm_trigger()
403 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) snd_vortex_pcm_trigger()
427 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) snd_vortex_pcm_pointer()
613 /* create a pcm device */ snd_vortex_new_pcm()
616 struct snd_pcm *pcm; snd_vortex_new_pcm() local
631 nr_capt, &pcm); snd_vortex_new_pcm()
634 snprintf(pcm->name, sizeof(pcm->name), snd_vortex_new_pcm()
636 chip->pcm[idx] = pcm; snd_vortex_new_pcm()
638 VORTEX_PCM_TYPE(pcm) = idx; snd_vortex_new_pcm()
639 pcm->private_data = chip; snd_vortex_new_pcm()
641 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_vortex_new_pcm()
644 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, snd_vortex_new_pcm()
649 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, snd_vortex_new_pcm()
653 switch (VORTEX_PCM_TYPE(pcm)) { snd_vortex_new_pcm()
655 err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_vortex_new_pcm()
661 err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_CAPTURE, snd_vortex_new_pcm()
668 err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_vortex_new_pcm()
676 if (VORTEX_PCM_TYPE(pcm) == VORTEX_PCM_SPDIF) { snd_vortex_new_pcm()
685 if (VORTEX_PCM_TYPE(pcm) == VORTEX_PCM_ADB) { snd_vortex_new_pcm()
/linux-4.1.27/sound/soc/blackfin/
H A Dbf5xx-ac97-pcm.c2 * File: sound/soc/blackfin/bf5xx-ac97-pcm.c
36 #include <sound/pcm.h>
82 struct snd_pcm_substream *pcm = data; bf5xx_dma_irq() local
84 struct snd_pcm_runtime *runtime = pcm->runtime; bf5xx_dma_irq()
86 bf5xx_mmap_copy(pcm, runtime->period_size); bf5xx_dma_irq()
87 if (pcm->stream == SNDRV_PCM_STREAM_PLAYBACK) { bf5xx_dma_irq()
89 snd_pcm_period_elapsed(pcm); bf5xx_dma_irq()
90 bf5xx_mmap_copy(pcm, runtime->period_size); bf5xx_dma_irq()
95 snd_pcm_period_elapsed(pcm); bf5xx_dma_irq()
98 /* The memory size for pure pcm data is 128*1024 = 0x20000 bytes.
99 * The total rx/tx buffer is for ac97 frame to hold all pcm data
316 static int bf5xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) bf5xx_pcm_preallocate_dma_buffer() argument
318 struct snd_soc_pcm_runtime *rtd = pcm->private_data; bf5xx_pcm_preallocate_dma_buffer()
321 struct snd_pcm_substream *substream = pcm->streams[stream].substream; bf5xx_pcm_preallocate_dma_buffer()
327 buf->dev.dev = pcm->card->dev; bf5xx_pcm_preallocate_dma_buffer()
329 buf->area = dma_alloc_coherent(pcm->card->dev, size, bf5xx_pcm_preallocate_dma_buffer()
378 static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm) bf5xx_pcm_free_dma_buffers() argument
384 struct snd_soc_pcm_runtime *rtd = pcm->private_data; bf5xx_pcm_free_dma_buffers()
391 substream = pcm->streams[stream].substream; bf5xx_pcm_free_dma_buffers()
420 struct snd_pcm *pcm = rtd->pcm; bf5xx_pcm_ac97_new() local
428 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { bf5xx_pcm_ac97_new()
429 ret = bf5xx_pcm_preallocate_dma_buffer(pcm, bf5xx_pcm_ac97_new()
435 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { bf5xx_pcm_ac97_new()
436 ret = bf5xx_pcm_preallocate_dma_buffer(pcm, bf5xx_pcm_ac97_new()
464 .name = "bfin-ac97-pcm-audio",
H A Dbf5xx-ad1980.c43 #include <sound/pcm.h>
59 .platform_name = "bfin-ac97-pcm-audio",
67 .platform_name = "bfin-ac97-pcm-audio",
H A Dbfin-eval-adau1701.c14 #include <sound/pcm.h>
62 .platform_name = "bfin-i2s-pcm-audio",
72 .platform_name = "bfin-i2s-pcm-audio",
H A DMakefile2 snd-bf5xx-ac97-objs := bf5xx-ac97-pcm.o
3 snd-bf5xx-i2s-objs := bf5xx-i2s-pcm.o
H A Dbf5xx-i2s-pcm.c2 * File: sound/soc/blackfin/bf5xx-i2s-pcm.c
36 #include <sound/pcm.h>
43 #include "bf5xx-i2s-pcm.h"
47 struct snd_pcm_substream *pcm = data; bf5xx_dma_irq() local
48 snd_pcm_period_elapsed(pcm); bf5xx_dma_irq()
334 return snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, bf5xx_pcm_i2s_new()
356 .name = "bfin-i2s-pcm-audio",
H A Dbf5xx-ad193x.c30 #include <sound/pcm.h>
76 .platform_name = "bfin-i2s-pcm-audio",
86 .platform_name = "bfin-i2s-pcm-audio",
H A Dbf5xx-ssm2602.c34 #include <sound/pcm.h>
69 .platform_name = "bfin-i2s-pcm-audio",
79 .platform_name = "bfin-i2s-pcm-audio",
H A Dbf5xx-ad1836.c21 #include <sound/pcm.h>
61 .platform_name = "bfin-i2s-pcm-audio",
H A Dbfin-eval-adau1x61.c15 #include <sound/pcm.h>
102 .platform_name = "bfin-i2s-pcm-audio",
H A Dbfin-eval-adau1x81.c15 #include <sound/pcm.h>
90 .platform_name = "bfin-i2s-pcm-audio",
H A Dbfin-eval-adav80x.c15 #include <sound/pcm.h>
77 .platform_name = "bfin-i2s-pcm-audio",
H A Dbf5xx-ad73311.c36 #include <sound/pcm.h>
156 .platform_name = "bfin-i2s-pcm-audio",
165 .platform_name = "bfin-i2s-pcm-audio",
H A Dbfin-eval-adau1373.c14 #include <sound/pcm.h>
131 .platform_name = "bfin-i2s-pcm-audio",
/linux-4.1.27/include/linux/
H A DmISDNdsp.h31 int pcm_id; /* unique id to identify the pcm bus (or -1) */
32 int pcm_slots; /* number of slots on the pcm bus */
33 int pcm_banks; /* number of IO banks of pcm bus */
/linux-4.1.27/sound/pci/emu10k1/
H A Demupcm.c1405 struct snd_pcm *pcm; snd_emu10k1_pcm() local
1409 if ((err = snd_pcm_new(emu->card, "emu10k1", device, 32, 1, &pcm)) < 0) snd_emu10k1_pcm()
1412 pcm->private_data = emu; snd_emu10k1_pcm()
1414 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_playback_ops); snd_emu10k1_pcm()
1415 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_ops); snd_emu10k1_pcm()
1417 pcm->info_flags = 0; snd_emu10k1_pcm()
1418 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; snd_emu10k1_pcm()
1419 strcpy(pcm->name, "ADC Capture/Standard PCM Playback"); snd_emu10k1_pcm()
1420 emu->pcm = pcm; snd_emu10k1_pcm()
1422 for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next) snd_emu10k1_pcm()
1426 for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; substream; substream = substream->next) snd_emu10k1_pcm()
1434 struct snd_pcm *pcm; snd_emu10k1_pcm_multi() local
1438 if ((err = snd_pcm_new(emu->card, "emu10k1", device, 1, 0, &pcm)) < 0) snd_emu10k1_pcm_multi()
1441 pcm->private_data = emu; snd_emu10k1_pcm_multi()
1443 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_efx_playback_ops); snd_emu10k1_pcm_multi()
1445 pcm->info_flags = 0; snd_emu10k1_pcm_multi()
1446 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; snd_emu10k1_pcm_multi()
1447 strcpy(pcm->name, "Multichannel Playback"); snd_emu10k1_pcm_multi()
1448 emu->pcm_multi = pcm; snd_emu10k1_pcm_multi()
1450 for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next) snd_emu10k1_pcm_multi()
1471 struct snd_pcm *pcm; snd_emu10k1_pcm_mic() local
1474 if ((err = snd_pcm_new(emu->card, "emu10k1 mic", device, 0, 1, &pcm)) < 0) snd_emu10k1_pcm_mic()
1477 pcm->private_data = emu; snd_emu10k1_pcm_mic()
1479 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_mic_ops); snd_emu10k1_pcm_mic()
1481 pcm->info_flags = 0; snd_emu10k1_pcm_mic()
1482 strcpy(pcm->name, "Mic Capture"); snd_emu10k1_pcm_mic()
1483 emu->pcm_mic = pcm; snd_emu10k1_pcm_mic()
1485 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, 64*1024); snd_emu10k1_pcm_mic()
1605 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; fx8010_pb_trans_copy() local
1606 unsigned int tram_size = pcm->buffer_size; fx8010_pb_trans_copy()
1609 unsigned int tram_pos = pcm->tram_pos; fx8010_pb_trans_copy()
1610 unsigned int tram_shift = pcm->tram_shift; fx8010_pb_trans_copy()
1626 pcm->tram_pos = tram_pos; fx8010_pb_trans_copy()
1627 pcm->tram_shift = tram_shift; fx8010_pb_trans_copy()
1633 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; snd_emu10k1_fx8010_playback_transfer() local
1635 snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec, fx8010_pb_trans_copy); snd_emu10k1_fx8010_playback_transfer()
1648 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; snd_emu10k1_fx8010_playback_hw_free() local
1651 for (i = 0; i < pcm->channels; i++) snd_emu10k1_fx8010_playback_hw_free()
1652 snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, 0); snd_emu10k1_fx8010_playback_hw_free()
1661 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; snd_emu10k1_fx8010_playback_prepare() local
1670 memset(&pcm->pcm_rec, 0, sizeof(pcm->pcm_rec)); snd_emu10k1_fx8010_playback_prepare()
1671 pcm->pcm_rec.hw_buffer_size = pcm->buffer_size * 2; /* byte size */ snd_emu10k1_fx8010_playback_prepare()
1672 pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); snd_emu10k1_fx8010_playback_prepare()
1673 pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size); snd_emu10k1_fx8010_playback_prepare()
1674 pcm->tram_shift = 0; snd_emu10k1_fx8010_playback_prepare()
1675 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_running, 0, 0); /* reset */ snd_emu10k1_fx8010_playback_prepare()
1676 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0); /* reset */ snd_emu10k1_fx8010_playback_prepare()
1677 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_size, 0, runtime->buffer_size); snd_emu10k1_fx8010_playback_prepare()
1678 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_ptr, 0, 0); /* reset ptr number */ snd_emu10k1_fx8010_playback_prepare()
1679 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_count, 0, runtime->period_size); snd_emu10k1_fx8010_playback_prepare()
1680 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_tmpcount, 0, runtime->period_size); snd_emu10k1_fx8010_playback_prepare()
1681 for (i = 0; i < pcm->channels; i++) snd_emu10k1_fx8010_playback_prepare()
1682 snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pcm->channels)); snd_emu10k1_fx8010_playback_prepare()
1689 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; snd_emu10k1_fx8010_playback_trigger() local
1710 result = snd_emu10k1_fx8010_register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq); snd_emu10k1_fx8010_playback_trigger()
1714 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 1); snd_emu10k1_fx8010_playback_trigger()
1719 snd_emu10k1_fx8010_unregister_irq_handler(emu, pcm->irq); pcm->irq = NULL; snd_emu10k1_fx8010_playback_trigger()
1720 snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0); snd_emu10k1_fx8010_playback_trigger()
1721 pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size); snd_emu10k1_fx8010_playback_trigger()
1722 pcm->tram_shift = 0; snd_emu10k1_fx8010_playback_trigger()
1736 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; snd_emu10k1_fx8010_playback_pointer() local
1739 if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0)) snd_emu10k1_fx8010_playback_pointer()
1741 ptr = snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_ptr, 0) << 2; snd_emu10k1_fx8010_playback_pointer()
1742 return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr); snd_emu10k1_fx8010_playback_pointer()
1768 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; snd_emu10k1_fx8010_playback_open() local
1771 runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; snd_emu10k1_fx8010_playback_open()
1772 runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2; snd_emu10k1_fx8010_playback_open()
1774 if (pcm->valid == 0) { snd_emu10k1_fx8010_playback_open()
1778 pcm->opened = 1; snd_emu10k1_fx8010_playback_open()
1786 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; snd_emu10k1_fx8010_playback_close() local
1789 pcm->opened = 0; snd_emu10k1_fx8010_playback_close()
1808 struct snd_pcm *pcm; snd_emu10k1_pcm_efx() local
1812 if ((err = snd_pcm_new(emu->card, "emu10k1 efx", device, 8, 1, &pcm)) < 0) snd_emu10k1_pcm_efx()
1815 pcm->private_data = emu; snd_emu10k1_pcm_efx()
1817 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_fx8010_playback_ops); snd_emu10k1_pcm_efx()
1818 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_efx_ops); snd_emu10k1_pcm_efx()
1820 pcm->info_flags = 0; snd_emu10k1_pcm_efx()
1821 strcpy(pcm->name, "Multichannel Capture/PT Playback"); snd_emu10k1_pcm_efx()
1822 emu->pcm_efx = pcm; snd_emu10k1_pcm_efx()
1855 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, 64*1024); snd_emu10k1_pcm_efx()
H A Dp16v.c99 #include <sound/pcm.h>
191 substream->pcm->device, channel_id); snd_p16v_pcm_open_playback_channel()
214 runtime->sync.id32[0] = substream->pcm->card->number; snd_p16v_pcm_open_playback_channel()
239 substream->pcm->device, channel_id); snd_p16v_pcm_open_capture_channel()
272 emu->p16v_voices[substream->pcm->device - emu->p16v_device_offset].use = 0; snd_p16v_pcm_close_playback()
342 int channel = substream->pcm->device - emu->p16v_device_offset; snd_p16v_pcm_prepare_playback()
404 int channel = substream->pcm->device - emu->p16v_device_offset; snd_p16v_pcm_prepare_capture()
493 channel = substream->pcm->device-emu->p16v_device_offset; snd_pcm_group_for_each_entry()
556 int channel = substream->pcm->device - emu->p16v_device_offset; snd_p16v_pcm_pointer_playback()
642 struct snd_pcm *pcm; snd_p16v_pcm() local
650 if ((err = snd_pcm_new(emu->card, "p16v", device, 1, capture, &pcm)) < 0) snd_p16v_pcm()
653 pcm->private_data = emu; snd_p16v_pcm()
656 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_p16v_playback_front_ops); snd_p16v_pcm()
657 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_p16v_capture_ops); snd_p16v_pcm()
659 pcm->info_flags = 0; snd_p16v_pcm()
660 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; snd_p16v_pcm()
661 strcpy(pcm->name, "p16v"); snd_p16v_pcm()
662 emu->pcm_p16v = pcm; snd_p16v_pcm()
664 for(substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; snd_p16v_pcm()
678 for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; snd_p16v_pcm()
H A Dvoice.c98 voice->pcm = 1; voice_alloc()
138 pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0; snd_emu10k1_voice_alloc()
161 pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = pvoice->efx = 0; snd_emu10k1_voice_free()
/linux-4.1.27/sound/usb/line6/
H A Dcapture.h15 #include <sound/pcm.h>
18 #include "pcm.h"
H A DMakefile6 pcm.o \
H A Dpcm.c16 #include <sound/pcm.h>
233 if (s->pcm->card != substream->pcm->card) snd_pcm_group_for_each_entry()
448 static void line6_cleanup_pcm(struct snd_pcm *pcm) line6_cleanup_pcm() argument
450 struct snd_line6_pcm *line6pcm = snd_pcm_chip(pcm); line6_cleanup_pcm()
460 struct snd_pcm *pcm; snd_line6_new_pcm() local
467 pcm = *pcm_ret; snd_line6_new_pcm()
468 strcpy(pcm->name, line6->properties->name); snd_line6_new_pcm()
471 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_line6_new_pcm()
473 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_line6_capture_ops); snd_line6_new_pcm()
476 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, snd_line6_new_pcm()
504 struct snd_pcm *pcm; line6_init_pcm() local
510 err = snd_line6_new_pcm(line6, &pcm); line6_init_pcm()
519 line6pcm->pcm = pcm; line6_init_pcm()
538 pcm->private_data = line6pcm; line6_init_pcm()
539 pcm->private_free = line6_cleanup_pcm; line6_init_pcm()
561 /* prepare pcm callback */ snd_line6_prepare()
H A Dpcm.h19 #include <sound/pcm.h>
43 (line6pcm->pcm->streams[stream].substream)
147 /* ALSA pcm stream */
148 struct snd_pcm *pcm; member in struct:snd_line6_pcm
H A Dplayback.h15 #include <sound/pcm.h>
H A Dpodhd.c16 #include <sound/pcm.h>
19 #include "pcm.h"
/linux-4.1.27/sound/pci/lola/
H A Dlola_pcm.c27 #include <sound/pcm.h>
37 return &chip->pcm[substream->stream]; lola_get_pcm()
42 struct lola_pcm *pcm = lola_get_pcm(substream); lola_get_stream() local
44 return &pcm->streams[idx]; lola_get_stream()
141 if (s->pcm->card != substream->pcm->card) snd_pcm_group_for_each_entry()
172 if (s->pcm->card != substream->pcm->card) snd_pcm_group_for_each_entry()
226 struct lola_pcm *pcm = lola_get_pcm(substream); lola_pcm_open() local
239 runtime->hw.channels_max = pcm->num_streams - str->index; lola_pcm_open()
259 static void lola_cleanup_slave_streams(struct lola_pcm *pcm, lola_cleanup_slave_streams() argument
263 for (i = str->index + 1; i < pcm->num_streams; i++) { lola_cleanup_slave_streams()
264 struct lola_stream *s = &pcm->streams[i]; lola_cleanup_slave_streams()
305 struct lola_pcm *pcm = lola_get_pcm(substream); lola_pcm_hw_free() local
310 lola_cleanup_slave_streams(pcm, str); lola_pcm_hw_free()
354 static int lola_setup_periods(struct lola *chip, struct lola_pcm *pcm, lola_setup_periods() argument
365 bdl = (u32 *)(pcm->bdl.area + LOLA_BDL_ENTRY_SIZE * str->index); lola_setup_periods()
441 static int lola_setup_controller(struct lola *chip, struct lola_pcm *pcm, lola_setup_controller() argument
450 bdl = pcm->bdl.addr + LOLA_BDL_ENTRY_SIZE * str->index; lola_setup_controller()
468 struct lola_pcm *pcm = lola_get_pcm(substream); lola_pcm_prepare() local
476 lola_cleanup_slave_streams(pcm, str); lola_pcm_prepare()
477 if (str->index + runtime->channels > pcm->num_streams) { lola_pcm_prepare()
495 err = lola_setup_periods(chip, pcm, substream, str); lola_pcm_prepare()
508 err = lola_setup_controller(chip, pcm, str); lola_pcm_prepare()
549 if (s->pcm->card != substream->pcm->card) snd_pcm_group_for_each_entry()
575 void lola_pcm_update(struct lola *chip, struct lola_pcm *pcm, unsigned int bits) lola_pcm_update() argument
579 for (i = 0; bits && i < pcm->num_streams; i++) { lola_pcm_update()
581 struct lola_stream *str = &pcm->streams[i]; lola_pcm_update()
603 struct snd_pcm *pcm; lola_create_pcm() local
609 PAGE_SIZE, &chip->pcm[i].bdl); lola_create_pcm()
615 chip->pcm[SNDRV_PCM_STREAM_PLAYBACK].num_streams, lola_create_pcm()
616 chip->pcm[SNDRV_PCM_STREAM_CAPTURE].num_streams, lola_create_pcm()
617 &pcm); lola_create_pcm()
620 strlcpy(pcm->name, "Digigram Lola", sizeof(pcm->name)); lola_create_pcm()
621 pcm->private_data = chip; lola_create_pcm()
623 if (chip->pcm[i].num_streams) lola_create_pcm()
624 snd_pcm_set_ops(pcm, i, &lola_pcm_ops); lola_create_pcm()
627 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, lola_create_pcm()
635 snd_dma_free_pages(&chip->pcm[0].bdl); lola_free_pcm()
636 snd_dma_free_pages(&chip->pcm[1].bdl); lola_free_pcm()
699 struct lola_pcm *pcm = &chip->pcm[dir]; lola_init_pcm() local
703 for (i = 0; i < pcm->num_streams; i++, nid++) { lola_init_pcm()
704 err = lola_init_stream(chip, &pcm->streams[i], i, nid, dir); lola_init_pcm()
H A Dlola.c31 #include <sound/pcm.h>
250 for (i = 0; in_sts && i < chip->pcm[CAPT].num_streams; i++) { lola_interrupt()
264 for (i = 0; out_sts && i < chip->pcm[PLAY].num_streams; i++) { lola_interrupt()
299 lola_pcm_update(chip, &chip->pcm[CAPT], notify_ins); lola_interrupt()
300 lola_pcm_update(chip, &chip->pcm[PLAY], notify_outs); lola_interrupt()
341 val = (1 << chip->pcm[PLAY].num_streams) - 1; lola_irq_enable()
343 val = (1 << chip->pcm[CAPT].num_streams) - 1; lola_irq_enable()
657 chip->pcm[CAPT].num_streams = (dever >> 0) & 0x3ff; lola_create()
658 chip->pcm[PLAY].num_streams = (dever >> 10) & 0x3ff; lola_create()
661 chip->pcm[CAPT].num_streams, chip->pcm[PLAY].num_streams, lola_create()
665 if (chip->pcm[CAPT].num_streams > MAX_STREAM_IN_COUNT || lola_create()
666 chip->pcm[PLAY].num_streams > MAX_STREAM_OUT_COUNT || lola_create()
667 (!chip->pcm[CAPT].num_streams && lola_create()
668 !chip->pcm[PLAY].num_streams)) { lola_create()
/linux-4.1.27/sound/usb/6fire/
H A Dpcm.h17 #include <sound/pcm.h>
22 enum /* settings for pcm */
56 bool panic; /* if set driver won't do anymore pcm on device */
66 u8 stream_state; /* one of STREAM_XXX (pcm.c) */
H A Dchip.h26 struct pcm_runtime *pcm; member in struct:sfire_chip
H A Dpcm.c16 #include "pcm.h"
36 enum { /* settings for pcm */
40 enum { /* pcm streaming states */
41 STREAM_DISABLED, /* no pcm streaming */
42 STREAM_STARTING, /* pcm streaming requested, waiting to become ready */
43 STREAM_RUNNING, /* pcm streaming running */
130 dev_err(&rt->chip->dev->dev, "error getting pcm substream slot.\n"); usb6fire_pcm_get_substream()
294 struct pcm_runtime *rt = in_urb->chip->pcm; usb6fire_pcm_in_urb_handler()
382 struct pcm_runtime *rt = urb->chip->pcm; usb6fire_pcm_out_urb_handler()
502 "could not start pcm stream.\n"); usb6fire_pcm_prepare()
620 struct snd_pcm *pcm; usb6fire_pcm_init() local
653 ret = snd_pcm_new(chip->card, "DMX6FireUSB", 0, 1, 1, &pcm); usb6fire_pcm_init()
657 dev_err(&chip->dev->dev, "cannot create pcm instance.\n"); usb6fire_pcm_init()
661 pcm->private_data = rt; usb6fire_pcm_init()
662 strcpy(pcm->name, "DMX 6Fire USB"); usb6fire_pcm_init()
663 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &pcm_ops); usb6fire_pcm_init()
664 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &pcm_ops); usb6fire_pcm_init()
670 "error preallocating pcm buffers.\n"); usb6fire_pcm_init()
673 rt->instance = pcm; usb6fire_pcm_init()
675 chip->pcm = rt; usb6fire_pcm_init()
681 struct pcm_runtime *rt = chip->pcm; usb6fire_pcm_abort()
703 struct pcm_runtime *rt = chip->pcm; usb6fire_pcm_destroy()
707 chip->pcm = NULL; usb6fire_pcm_destroy()
H A Dchip.c18 #include "pcm.h"
53 if (chip->pcm) usb6fire_chip_abort()
72 if (chip->pcm) usb6fire_chip_destroy()
/linux-4.1.27/sound/pci/oxygen/
H A Doxygen_pcm.c23 #include <sound/pcm.h>
702 struct snd_pcm *pcm; oxygen_pcm_init() local
711 0, outs, ins, &pcm); oxygen_pcm_init()
715 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, oxygen_pcm_init()
718 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, oxygen_pcm_init()
721 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, oxygen_pcm_init()
723 pcm->private_data = chip; oxygen_pcm_init()
724 strcpy(pcm->name, "Multichannel"); oxygen_pcm_init()
726 snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream, oxygen_pcm_init()
732 snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream, oxygen_pcm_init()
742 err = snd_pcm_new(chip->card, "Digital", 1, outs, ins, &pcm); oxygen_pcm_init()
746 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, oxygen_pcm_init()
749 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, oxygen_pcm_init()
751 pcm->private_data = chip; oxygen_pcm_init()
752 strcpy(pcm->name, "Digital"); oxygen_pcm_init()
753 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, oxygen_pcm_init()
768 2, outs, ins, &pcm); oxygen_pcm_init()
772 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, oxygen_pcm_init()
779 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, oxygen_pcm_init()
781 pcm->private_data = chip; oxygen_pcm_init()
782 strcpy(pcm->name, outs ? "Front Panel" : "Analog 2"); oxygen_pcm_init()
783 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, oxygen_pcm_init()
791 err = snd_pcm_new(chip->card, "Analog3", 3, 0, ins, &pcm); oxygen_pcm_init()
794 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, oxygen_pcm_init()
799 pcm->private_data = chip; oxygen_pcm_init()
800 strcpy(pcm->name, "Analog 3"); oxygen_pcm_init()
801 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, oxygen_pcm_init()
/linux-4.1.27/sound/firewire/bebob/
H A Dbebob_pcm.c26 if (formations[i].pcm == 0) hw_rule_rate()
29 if (!snd_interval_test(c, formations[i].pcm)) hw_rule_rate()
55 if (formations[i].pcm == 0) hw_rule_channels()
61 t.min = min(t.min, formations[i].pcm); hw_rule_channels()
62 t.max = max(t.max, formations[i].pcm); hw_rule_channels()
83 if (formations[i].pcm == 0) limit_channels_and_rates()
86 hw->channels_min = min(hw->channels_min, formations[i].pcm); limit_channels_and_rates()
87 hw->channels_max = max(hw->channels_max, formations[i].pcm); limit_channels_and_rates()
364 struct snd_pcm *pcm; snd_bebob_create_pcm_devices() local
367 err = snd_pcm_new(bebob->card, bebob->card->driver, 0, 1, 1, &pcm); snd_bebob_create_pcm_devices()
371 pcm->private_data = bebob; snd_bebob_create_pcm_devices()
372 snprintf(pcm->name, sizeof(pcm->name), snd_bebob_create_pcm_devices()
374 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &pcm_playback_ops); snd_bebob_create_pcm_devices()
375 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &pcm_capture_ops); snd_bebob_create_pcm_devices()
/linux-4.1.27/sound/soc/au1x/
H A Ddb1200.c14 #include <sound/pcm.h>
54 .platform_name = "au1xpsc-pcm.1",
70 .platform_name = "au1xpsc-pcm.1",
111 .platform_name = "au1xpsc-pcm.1",
130 .platform_name = "au1xpsc-pcm.2",
149 .platform_name = "au1xpsc-pcm.3",
H A Ddb1000.c14 #include <sound/pcm.h>
26 .platform_name = "alchemy-pcm-dma.0",
H A Ddbdma2.c23 #include <sound/pcm.h>
321 struct snd_pcm *pcm = rtd->pcm; au1xpsc_pcm_new() local
323 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, au1xpsc_pcm_new()
359 .name = "au1xpsc-pcm",
H A Ddma.c16 #include <sound/pcm.h>
292 struct snd_pcm *pcm = rtd->pcm; alchemy_pcm_new() local
294 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, alchemy_pcm_new()
327 .name = "alchemy-pcm-dma",
/linux-4.1.27/sound/soc/kirkwood/
H A Dkirkwood-dma.c251 static int kirkwood_dma_preallocate_dma_buffer(struct snd_pcm *pcm, kirkwood_dma_preallocate_dma_buffer() argument
254 struct snd_pcm_substream *substream = pcm->streams[stream].substream; kirkwood_dma_preallocate_dma_buffer()
259 buf->dev.dev = pcm->card->dev; kirkwood_dma_preallocate_dma_buffer()
260 buf->area = dma_alloc_coherent(pcm->card->dev, size, kirkwood_dma_preallocate_dma_buffer()
273 struct snd_pcm *pcm = rtd->pcm; kirkwood_dma_new() local
280 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { kirkwood_dma_new()
281 ret = kirkwood_dma_preallocate_dma_buffer(pcm, kirkwood_dma_new()
287 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { kirkwood_dma_new()
288 ret = kirkwood_dma_preallocate_dma_buffer(pcm, kirkwood_dma_new()
297 static void kirkwood_dma_free_dma_buffers(struct snd_pcm *pcm) kirkwood_dma_free_dma_buffers() argument
304 substream = pcm->streams[stream].substream; kirkwood_dma_free_dma_buffers()
311 dma_free_coherent(pcm->card->dev, buf->bytes, kirkwood_dma_free_dma_buffers()
/linux-4.1.27/arch/x86/mm/
H A Dpat_internal.h17 static inline char *cattr_name(enum page_cache_mode pcm) cattr_name() argument
19 switch (pcm) { cattr_name()
H A Diomap_32.c36 enum page_cache_mode pcm = _PAGE_CACHE_MODE_WC; iomap_create_wc() local
42 ret = io_reserve_memtype(base, base + size, &pcm); iomap_create_wc()
46 *prot = __pgprot(__PAGE_KERNEL | cachemode2protval(pcm)); iomap_create_wc()
H A Dioremap.c32 enum page_cache_mode pcm) ioremap_change_attr()
37 switch (pcm) { ioremap_change_attr()
83 unsigned long size, enum page_cache_mode pcm, void *caller) __ioremap_caller()
142 pcm, &new_pcm); __ioremap_caller()
148 if (pcm != new_pcm) { __ioremap_caller()
149 if (!is_new_memtype_allowed(phys_addr, size, pcm, new_pcm)) { __ioremap_caller()
154 pcm, new_pcm); __ioremap_caller()
157 pcm = new_pcm; __ioremap_caller()
161 switch (pcm) { __ioremap_caller()
188 if (kernel_map_sync_memtype(phys_addr, size, pcm)) __ioremap_caller()
242 enum page_cache_mode pcm = _PAGE_CACHE_MODE_UC_MINUS; ioremap_nocache() local
244 return __ioremap_caller(phys_addr, size, pcm, ioremap_nocache()
31 ioremap_change_attr(unsigned long vaddr, unsigned long size, enum page_cache_mode pcm) ioremap_change_attr() argument
82 __ioremap_caller(resource_size_t phys_addr, unsigned long size, enum page_cache_mode pcm, void *caller) __ioremap_caller() argument
H A Dpat.c645 enum page_cache_mode pcm = _PAGE_CACHE_MODE_WB; phys_mem_access_prot_allowed() local
651 pcm = _PAGE_CACHE_MODE_UC_MINUS; phys_mem_access_prot_allowed()
668 pcm = _PAGE_CACHE_MODE_UC; phys_mem_access_prot_allowed()
673 cachemode2protval(pcm)); phys_mem_access_prot_allowed()
682 enum page_cache_mode pcm) kernel_map_sync_memtype()
700 if (ioremap_change_attr((unsigned long)__va(base), id_sz, pcm) < 0) { kernel_map_sync_memtype()
704 cattr_name(pcm), kernel_map_sync_memtype()
722 enum page_cache_mode pcm = want_pcm; reserve_pfn_range() local
735 pcm = lookup_memtype(paddr); reserve_pfn_range()
736 if (want_pcm != pcm) { reserve_pfn_range()
742 cattr_name(pcm)); reserve_pfn_range()
745 cachemode2protval(pcm)); reserve_pfn_range()
750 ret = reserve_memtype(paddr, paddr + size, want_pcm, &pcm); reserve_pfn_range()
754 if (pcm != want_pcm) { reserve_pfn_range()
756 !is_new_memtype_allowed(paddr, size, want_pcm, pcm)) { reserve_pfn_range()
764 cattr_name(pcm)); reserve_pfn_range()
773 cachemode2protval(pcm)); reserve_pfn_range()
776 if (kernel_map_sync_memtype(paddr, size, pcm) < 0) { reserve_pfn_range()
835 enum page_cache_mode pcm; track_pfn_remap() local
854 pcm = lookup_memtype(paddr); track_pfn_remap()
860 if (pcm != lookup_memtype(paddr)) track_pfn_remap()
865 cachemode2protval(pcm)); track_pfn_remap()
873 enum page_cache_mode pcm; track_pfn_insert() local
879 pcm = lookup_memtype((resource_size_t)pfn << PAGE_SHIFT); track_pfn_insert()
881 cachemode2protval(pcm)); track_pfn_insert()
681 kernel_map_sync_memtype(u64 base, unsigned long size, enum page_cache_mode pcm) kernel_map_sync_memtype() argument
/linux-4.1.27/include/sound/
H A Dpxa2xx-lib.h20 extern int pxa2xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream);
21 extern void pxa2xx_pcm_free_dma_buffers(struct snd_pcm *pcm);
H A Domap-pcm.h2 * omap-pcm.h - OMAP PCM driver
H A Dpcm.h35 #define snd_pcm_chip(pcm) ((pcm)->private_data)
446 struct snd_pcm *pcm; member in struct:snd_pcm_substream
448 void *private_data; /* copied from pcm->private_data */
501 struct snd_pcm *pcm; member in struct:snd_pcm_str
535 void (*private_free) (struct snd_pcm *pcm);
536 bool internal; /* pcm is for internal use only */
544 int (*n_register) (struct snd_pcm * pcm);
545 int (*n_disconnect) (struct snd_pcm * pcm);
546 int (*n_unregister) (struct snd_pcm * pcm);
562 int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count);
581 int snd_pcm_suspend_all(struct snd_pcm *pcm);
584 int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct file *file,
587 int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, struct file *file,
788 * @substream: the pcm substream instance
802 * @substream: the pcm substream instance
816 * @substream: the pcm substream instance
834 * @substream: the pcm substream instance
848 * @substream: the pcm substream instance
862 * @substream: the pcm substream instance
1062 void snd_pcm_set_ops(struct snd_pcm * pcm, int direction,
1149 int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm);
1153 int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm,
1317 * @substream: the pcm substream instance
1340 struct snd_pcm *pcm; /* assigned PCM instance */ member in struct:snd_pcm_chmap
1358 for (s = info->pcm->streams[info->stream].substream; s; s = s->next) snd_pcm_chmap_substream()
1374 int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,
1390 #define pcm_err(pcm, fmt, args...) \
1391 dev_err((pcm)->card->dev, fmt, ##args)
1392 #define pcm_warn(pcm, fmt, args...) \
1393 dev_warn((pcm)->card->dev, fmt, ##args)
1394 #define pcm_dbg(pcm, fmt, args...) \
1395 dev_dbg((pcm)->card->dev, fmt, ##args)
H A Des1688.h26 #include <sound/pcm.h>
48 struct snd_pcm *pcm; member in struct:snd_es1688
/linux-4.1.27/sound/soc/sh/
H A Dsh7760-ac97.c13 #include <sound/pcm.h>
24 .platform_name = "sh7760-pcm-audio",
H A Dsiu_pcm.c30 #include <sound/pcm.h>
121 struct device *dev = substream->pcm->card->dev; siu_pcm_wr_set()
169 struct device *dev = substream->pcm->card->dev; siu_pcm_rd_set()
217 struct device *dev = substream->pcm->card->dev; siu_io_tasklet()
278 struct device *dev = siu_stream->substream->pcm->card->dev; siu_pcm_stmread_stop()
300 struct device *dev = ss->pcm->card->dev; siu_pcm_hw_params()
316 struct device *dev = ss->pcm->card->dev; siu_pcm_hw_free()
348 struct device *dev = ss->pcm->card->dev; siu_pcm_open()
384 struct device *dev = ss->pcm->card->dev; siu_pcm_close()
407 struct device *dev = ss->pcm->card->dev; siu_pcm_prepare()
452 struct device *dev = ss->pcm->card->dev; siu_pcm_trigger()
493 struct device *dev = ss->pcm->card->dev; siu_pcm_pointer_dma()
530 struct snd_pcm *pcm = rtd->pcm; siu_pcm_new() local
555 ret = snd_pcm_lib_preallocate_pages_for_all(pcm, siu_pcm_new()
565 (*port_info)->pcm = pcm; siu_pcm_new()
583 static void siu_pcm_free(struct snd_pcm *pcm) siu_pcm_free() argument
585 struct platform_device *pdev = to_platform_device(pcm->card->dev); siu_pcm_free()
593 dev_dbg(pcm->card->dev, "%s\n", __func__); siu_pcm_free()
H A Dsiu_dai.c65 u32 pcm; member in struct:format_flag
81 .pcm = 0x40000000,
87 .pcm = 0x04000000,
95 .pcm = 0x00400000,
101 .pcm = 0x00040000,
113 dev_dbg(port_info->pcm->card->dev, "%s\n", __func__); siu_dai_start()
356 dev_dbg(port_info->pcm->card->dev, "%s\n", __func__); siu_dai_info_volume()
370 struct device *dev = port_info->pcm->card->dev; siu_dai_get_volume()
401 struct device *dev = port_info->pcm->card->dev; siu_dai_put_volume()
515 dev_dbg(substream->pcm->card->dev, "%s: port=%d@%p\n", __func__, siu_dai_startup()
535 dev_dbg(substream->pcm->card->dev, "%s: port=%d@%p\n", __func__, siu_dai_shutdown()
563 dev_dbg(substream->pcm->card->dev, siu_dai_prepare()
623 ifctl = siu_flags[info->port_id].playback.pcm | siu_dai_set_fmt()
624 siu_flags[info->port_id].capture.pcm; siu_dai_set_fmt()
848 .name = "siu-pcm-audio",
H A Ddma-sh7760.c21 #include <sound/pcm.h>
310 struct snd_pcm *pcm = rtd->pcm; camelot_pcm_new() local
315 snd_pcm_lib_preallocate_pages_for_all(pcm, camelot_pcm_new()
341 .name = "sh7760-pcm-audio",
H A Dsiu.h77 #include <sound/pcm.h>
131 struct snd_pcm *pcm; member in struct:siu_port
143 to_platform_device(substream->pcm->card->dev); siu_port_info()
H A Dmigor.c21 #include <sound/pcm.h>
133 .cpu_dai_name = "siu-pcm-audio",
135 .platform_name = "siu-pcm-audio",
/linux-4.1.27/drivers/media/pci/cx18/
H A DMakefile6 cx18-alsa-objs := cx18-alsa-main.o cx18-alsa-pcm.o
H A Dcx18-alsa-pcm.c33 #include <sound/pcm.h>
40 #include "cx18-alsa-pcm.h"
44 MODULE_PARM_DESC(pcm_debug, "enable debug messages for pcm");
48 printk(KERN_INFO "cx18-alsa-pcm %s: " fmt, \
268 dprintk("freeing pcm capture region\n"); snd_cx18_pcm_hw_free()
/linux-4.1.27/drivers/media/pci/ivtv/
H A DMakefile6 ivtv-alsa-objs := ivtv-alsa-main.o ivtv-alsa-pcm.o
H A Divtv-alsa-pcm.c33 #include <sound/pcm.h>
40 #include "ivtv-alsa-pcm.h"
44 MODULE_PARM_DESC(pcm_debug, "enable debug messages for pcm");
49 pr_info("ivtv-alsa-pcm %s: " fmt, __func__, ##arg); \
275 dprintk("freeing pcm capture region\n"); snd_ivtv_pcm_hw_free()
/linux-4.1.27/sound/soc/cirrus/
H A DMakefile2 snd-soc-ep93xx-objs := ep93xx-pcm.o
H A Dep93xx-pcm.c2 * linux/sound/arm/ep93xx-pcm.c - EP93xx ALSA PCM interface
20 #include <sound/pcm.h>
26 #include "ep93xx-pcm.h"
/linux-4.1.27/sound/soc/davinci/
H A DMakefile2 snd-soc-edma-objs := edma-pcm.o
H A Dedma-pcm.c2 * edma-pcm.c - eDMA PCM driver using dmaengine for AM3xxx, AM4xxx
22 #include <sound/pcm.h>
28 #include "edma-pcm.h"
H A Dedma-pcm.h2 * edma-pcm.h - eDMA PCM driver using dmaengine for AM3xxx, AM4xxx
/linux-4.1.27/sound/pci/mixart/
H A Dmixart.c36 #include <sound/pcm.h>
268 "add_ref_pipe audio chip(%d) pcm(%d)\n", snd_mixart_add_ref_pipe()
291 /* we don't yet know the format, so config 16 bit pcm audio for instance */ snd_mixart_add_ref_pipe()
436 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_TRIGGER_START\n"); snd_mixart_trigger()
453 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_TRIGGER_STOP\n"); snd_mixart_trigger()
460 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_PAUSE_PUSH\n"); snd_mixart_trigger()
465 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_PAUSE_RELEASE\n"); snd_mixart_trigger()
655 "snd_mixart_hw_params(pcm %d) : dma_addr(%x) dma_bytes(%x) subs-number(%d)\n", snd_mixart_hw_params()
676 * TODO CONFIGURATION SPACE for all pcms, mono pcm must update channels_max
726 struct snd_pcm *pcm = subs->pcm; snd_mixart_playback_open() local
734 if ( pcm == chip->pcm ) { snd_mixart_playback_open()
738 snd_BUG_ON(pcm != chip->pcm_dig); snd_mixart_playback_open()
805 struct snd_pcm *pcm = subs->pcm; snd_mixart_capture_open() local
813 if ( pcm == chip->pcm ) { snd_mixart_capture_open()
817 snd_BUG_ON(pcm != chip->pcm_dig); snd_mixart_capture_open()
947 static void preallocate_buffers(struct snd_mixart *chip, struct snd_pcm *pcm) preallocate_buffers() argument
955 for (subs = pcm->streams[stream].substream; subs; subs = subs->next, idx++) preallocate_buffers()
957 subs->dma_device.id = subs->pcm->device << 16 | preallocate_buffers()
962 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, preallocate_buffers()
971 struct snd_pcm *pcm; snd_mixart_pcm_analog() local
977 MIXART_CAPTURE_STREAMS, &pcm)) < 0) { snd_mixart_pcm_analog()
979 "cannot create the analog pcm %d\n", chip->chip_idx); snd_mixart_pcm_analog()
983 pcm->private_data = chip; snd_mixart_pcm_analog()
985 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_mixart_playback_ops); snd_mixart_pcm_analog()
986 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_mixart_capture_ops); snd_mixart_pcm_analog()
988 pcm->info_flags = 0; snd_mixart_pcm_analog()
989 pcm->nonatomic = true; snd_mixart_pcm_analog()
990 strcpy(pcm->name, name); snd_mixart_pcm_analog()
992 preallocate_buffers(chip, pcm); snd_mixart_pcm_analog()
994 chip->pcm = pcm; snd_mixart_pcm_analog()
1004 struct snd_pcm *pcm; snd_mixart_pcm_digital() local
1010 MIXART_CAPTURE_STREAMS, &pcm)) < 0) { snd_mixart_pcm_digital()
1012 "cannot create the digital pcm %d\n", chip->chip_idx); snd_mixart_pcm_digital()
1016 pcm->private_data = chip; snd_mixart_pcm_digital()
1018 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_mixart_playback_ops); snd_mixart_pcm_digital()
1019 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_mixart_capture_ops); snd_mixart_pcm_digital()
1021 pcm->info_flags = 0; snd_mixart_pcm_digital()
1022 pcm->nonatomic = true; snd_mixart_pcm_digital()
1023 strcpy(pcm->name, name); snd_mixart_pcm_digital()
1025 preallocate_buffers(chip, pcm); snd_mixart_pcm_digital()
1027 chip->pcm_dig = pcm; snd_mixart_pcm_digital()
/linux-4.1.27/sound/pcmcia/pdaudiocf/
H A Dpdaudiocf_pcm.c284 * snd_pdacf_pcm_new - create and initialize a pcm
288 struct snd_pcm *pcm; snd_pdacf_pcm_new() local
291 err = snd_pcm_new(chip->card, "PDAudioCF", 0, 0, 1, &pcm); snd_pdacf_pcm_new()
295 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &pdacf_pcm_capture_ops); snd_pdacf_pcm_new()
297 pcm->private_data = chip; snd_pdacf_pcm_new()
298 pcm->info_flags = 0; snd_pdacf_pcm_new()
299 pcm->nonatomic = true; snd_pdacf_pcm_new()
300 strcpy(pcm->name, chip->card->shortname); snd_pdacf_pcm_new()
301 chip->pcm = pcm; snd_pdacf_pcm_new()
303 err = snd_ak4117_build(chip->ak4117, pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream); snd_pdacf_pcm_new()
/linux-4.1.27/drivers/media/pci/solo6x10/
H A Dsolo6x10-g723.c31 #include <sound/pcm.h>
319 struct snd_pcm *pcm; solo_snd_pcm_init() local
325 &pcm); solo_snd_pcm_init()
329 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, solo_snd_pcm_init()
332 snd_pcm_chip(pcm) = solo_dev; solo_snd_pcm_init()
333 pcm->info_flags = 0; solo_snd_pcm_init()
334 strcpy(pcm->name, card->shortname); solo_snd_pcm_init()
336 for (i = 0, ss = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; solo_snd_pcm_init()
340 ret = snd_pcm_lib_preallocate_pages_for_all(pcm, solo_snd_pcm_init()
347 solo_dev->snd_pcm = pcm; solo_snd_pcm_init()
/linux-4.1.27/sound/isa/sb/
H A Demu8000_pcm.c2 * pcm emulation on emu8000 wavetable
25 #include <sound/pcm.h>
28 * define the following if you want to use this pcm with non-interleaved mode
35 * pcm.emu8k {
37 * slave.pcm {
224 * open pcm
680 static void snd_emu8000_pcm_free(struct snd_pcm *pcm) snd_emu8000_pcm_free() argument
682 struct snd_emu8000 *emu = pcm->private_data; snd_emu8000_pcm_free()
683 emu->pcm = NULL; snd_emu8000_pcm_free()
688 struct snd_pcm *pcm; snd_emu8000_pcm_new() local
691 if ((err = snd_pcm_new(card, "Emu8000 PCM", index, 1, 0, &pcm)) < 0) snd_emu8000_pcm_new()
693 pcm->private_data = emu; snd_emu8000_pcm_new()
694 pcm->private_free = snd_emu8000_pcm_free; snd_emu8000_pcm_new()
695 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &emu8k_pcm_ops); snd_emu8000_pcm_new()
696 emu->pcm = pcm; snd_emu8000_pcm_new()
698 snd_device_register(card, pcm); snd_emu8000_pcm_new()
H A Demu8000_synth.c106 if (hw->pcm) snd_emu8000_remove()
107 snd_device_free(dev->card, hw->pcm); snd_emu8000_remove()
H A Dsb8_main.c600 struct snd_pcm *pcm; snd_sb8dsp_pcm() local
604 if ((err = snd_pcm_new(card, "SB8 DSP", device, 1, 1, &pcm)) < 0) snd_sb8dsp_pcm()
606 sprintf(pcm->name, "DSP v%i.%i", chip->version >> 8, chip->version & 0xff); snd_sb8dsp_pcm()
607 pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX; snd_sb8dsp_pcm()
608 pcm->private_data = chip; snd_sb8dsp_pcm()
610 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_sb8_playback_ops); snd_sb8dsp_pcm()
611 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_sb8_capture_ops); snd_sb8dsp_pcm()
615 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_sb8dsp_pcm()
H A Dsb16_main.c866 struct snd_pcm *pcm; snd_sb16dsp_pcm() local
869 if ((err = snd_pcm_new(card, "SB16 DSP", device, 1, 1, &pcm)) < 0) snd_sb16dsp_pcm()
871 sprintf(pcm->name, "DSP v%i.%i", chip->version >> 8, chip->version & 0xff); snd_sb16dsp_pcm()
872 pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX; snd_sb16dsp_pcm()
873 pcm->private_data = chip; snd_sb16dsp_pcm()
874 chip->pcm = pcm; snd_sb16dsp_pcm()
876 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_sb16_playback_ops); snd_sb16dsp_pcm()
877 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_sb16_capture_ops); snd_sb16dsp_pcm()
882 pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX; snd_sb16dsp_pcm()
884 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_sb16dsp_pcm()
/linux-4.1.27/sound/firewire/
H A Damdtp.c15 #include <sound/pcm.h>
259 struct snd_pcm_substream *pcm,
262 struct snd_pcm_substream *pcm,
265 struct snd_pcm_substream *pcm,
398 struct snd_pcm_substream *pcm, amdtp_write_s32()
401 struct snd_pcm_runtime *runtime = pcm->runtime; amdtp_write_s32()
423 struct snd_pcm_substream *pcm, amdtp_write_s16()
426 struct snd_pcm_runtime *runtime = pcm->runtime; amdtp_write_s16()
448 struct snd_pcm_substream *pcm, amdtp_read_s32()
451 struct snd_pcm_runtime *runtime = pcm->runtime; amdtp_read_s32()
560 struct snd_pcm_substream *pcm, update_pcm_pointers()
574 if (ptr >= pcm->runtime->buffer_size) update_pcm_pointers()
575 ptr -= pcm->runtime->buffer_size; update_pcm_pointers()
579 if (s->pcm_period_pointer >= pcm->runtime->period_size) { update_pcm_pointers()
580 s->pcm_period_pointer -= pcm->runtime->period_size; update_pcm_pointers()
589 struct snd_pcm_substream *pcm = ACCESS_ONCE(s->pcm); pcm_period_tasklet() local
591 if (pcm) pcm_period_tasklet()
592 snd_pcm_period_elapsed(pcm); pcm_period_tasklet()
640 struct snd_pcm_substream *pcm; handle_out_packet() local
659 pcm = ACCESS_ONCE(s->pcm); handle_out_packet()
660 if (pcm) handle_out_packet()
661 s->transfer_samples(s, pcm, buffer, data_blocks); handle_out_packet()
676 if (pcm) handle_out_packet()
677 update_pcm_pointers(s, pcm, data_blocks); handle_out_packet()
687 struct snd_pcm_substream *pcm = NULL; handle_in_packet() local
759 pcm = ACCESS_ONCE(s->pcm); handle_in_packet()
760 if (pcm) handle_in_packet()
761 s->transfer_samples(s, pcm, buffer, data_blocks); handle_in_packet()
776 if (pcm) handle_in_packet()
777 update_pcm_pointers(s, pcm, data_blocks); handle_in_packet()
1059 struct snd_pcm_substream *pcm; amdtp_stream_pcm_abort() local
1061 pcm = ACCESS_ONCE(s->pcm); amdtp_stream_pcm_abort()
1062 if (pcm) amdtp_stream_pcm_abort()
1063 snd_pcm_stop_xrun(pcm); amdtp_stream_pcm_abort()
397 amdtp_write_s32(struct amdtp_stream *s, struct snd_pcm_substream *pcm, __be32 *buffer, unsigned int frames) amdtp_write_s32() argument
422 amdtp_write_s16(struct amdtp_stream *s, struct snd_pcm_substream *pcm, __be32 *buffer, unsigned int frames) amdtp_write_s16() argument
447 amdtp_read_s32(struct amdtp_stream *s, struct snd_pcm_substream *pcm, __be32 *buffer, unsigned int frames) amdtp_read_s32() argument
559 update_pcm_pointers(struct amdtp_stream *s, struct snd_pcm_substream *pcm, unsigned int frames) update_pcm_pointers() argument
H A Disight.c20 #include <sound/pcm.h>
54 struct snd_pcm_substream *pcm; member in struct:isight
90 struct snd_pcm_runtime *runtime = isight->pcm->runtime; isight_update_pointers()
104 snd_pcm_period_elapsed(isight->pcm); isight_update_pointers()
117 runtime = isight->pcm->runtime; isight_samples()
135 snd_pcm_stop_xrun(isight->pcm); isight_pcm_abort()
147 runtime = isight->pcm->runtime; isight_dropped_samples()
459 struct snd_pcm *pcm; isight_create_pcm() local
462 err = snd_pcm_new(isight->card, "iSight", 0, 0, 1, &pcm); isight_create_pcm()
465 pcm->private_data = isight; isight_create_pcm()
466 strcpy(pcm->name, "iSight"); isight_create_pcm()
467 isight->pcm = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; isight_create_pcm()
468 isight->pcm->ops = &ops; isight_create_pcm()
H A Damdtp.h124 struct snd_pcm_substream *pcm,
134 struct snd_pcm_substream *pcm; member in struct:amdtp_stream
221 return !!s->pcm; amdtp_stream_pcm_running()
227 * @pcm: the PCM device to be started, or %NULL to stop the current device
234 struct snd_pcm_substream *pcm) amdtp_stream_pcm_trigger()
236 ACCESS_ONCE(s->pcm) = pcm; amdtp_stream_pcm_trigger()
233 amdtp_stream_pcm_trigger(struct amdtp_stream *s, struct snd_pcm_substream *pcm) amdtp_stream_pcm_trigger() argument
/linux-4.1.27/sound/firewire/fireworks/
H A Dfireworks_proc.c81 snd_iprintf(buffer, "amdtp rx pcm channels 1x: 0x%X\n", proc_read_hwinfo()
83 snd_iprintf(buffer, "amdtp tx pcm channels 1x: 0x%X\n", proc_read_hwinfo()
85 snd_iprintf(buffer, "amdtp rx pcm channels 2x: 0x%X\n", proc_read_hwinfo()
87 snd_iprintf(buffer, "amdtp tx pcm channels 2x: 0x%X\n", proc_read_hwinfo()
89 snd_iprintf(buffer, "amdtp rx pcm channels 4x: 0x%X\n", proc_read_hwinfo()
91 snd_iprintf(buffer, "amdtp tx pcm channels 4x: 0x%X\n", proc_read_hwinfo()
H A Dfireworks_pcm.c389 struct snd_pcm *pcm; snd_efw_create_pcm_devices() local
392 err = snd_pcm_new(efw->card, efw->card->driver, 0, 1, 1, &pcm); snd_efw_create_pcm_devices()
396 pcm->private_data = efw; snd_efw_create_pcm_devices()
397 snprintf(pcm->name, sizeof(pcm->name), "%s PCM", efw->card->shortname); snd_efw_create_pcm_devices()
398 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &pcm_playback_ops); snd_efw_create_pcm_devices()
399 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &pcm_capture_ops); snd_efw_create_pcm_devices()
/linux-4.1.27/sound/pci/lx6464es/
H A Dlx6464es.h32 #include <sound/pcm.h>
102 /* pcm */
103 struct snd_pcm *pcm; member in struct:lx6464es
/linux-4.1.27/drivers/media/usb/usbtv/
H A Dusbtv-audio.c84 dev_warn(chip->dev, "pcm audio buffer allocation failure %i\n", snd_usbtv_hw_params()
333 struct snd_pcm *pcm; usbtv_audio_init() local
353 rv = snd_pcm_new(card, "USBTV Audio", 0, 0, 1, &pcm); usbtv_audio_init()
357 strlcpy(pcm->name, "USBTV Audio Input", sizeof(pcm->name)); usbtv_audio_init()
358 pcm->info_flags = 0; usbtv_audio_init()
359 pcm->private_data = usbtv; usbtv_audio_init()
361 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_usbtv_pcm_ops); usbtv_audio_init()
362 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, usbtv_audio_init()
/linux-4.1.27/drivers/staging/comedi/drivers/
H A Ddas08_cs.c30 Devices: [ComputerBoards] PCM-DAS08 (pcm-das08)
36 Options (for pcm-das08):
50 .name = "pcm-das08",
103 .name = "pcm-das08",
/linux-4.1.27/arch/arm/mach-pxa/include/mach/
H A Daudio.h5 #include <sound/pcm.h>
/linux-4.1.27/sound/drivers/
H A DMakefile13 snd-ml403-ac97cr-objs := ml403-ac97cr.o pcm-indirect2.o
H A Daloop.c41 #include <sound/pcm.h>
99 struct snd_pcm *pcm[2]; member in struct:loopback
151 int device = dpcm->substream->pstr->pcm->device; get_setup()
614 if (!substream->pcm->device) get_cable_index()
782 struct snd_pcm *pcm; loopback_pcm_new() local
786 substreams, substreams, &pcm); loopback_pcm_new()
789 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &loopback_playback_ops); loopback_pcm_new()
790 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &loopback_capture_ops); loopback_pcm_new()
792 pcm->private_data = loopback; loopback_pcm_new()
793 pcm->info_flags = 0; loopback_pcm_new()
794 strcpy(pcm->name, "Loopback PCM"); loopback_pcm_new()
796 loopback->pcm[device] = pcm; loopback_pcm_new()
1006 struct snd_pcm *pcm; loopback_mixer_new() local
1013 pcm = loopback->pcm[dev]; loopback_mixer_new()
1015 pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream_count; loopback_mixer_new()
1196 snd_pcm_suspend_all(loopback->pcm[0]); loopback_suspend()
1197 snd_pcm_suspend_all(loopback->pcm[1]); loopback_suspend()
/linux-4.1.27/sound/sh/
H A Daica.c41 #include <sound/pcm.h>
49 MODULE_DESCRIPTION("Dreamcast AICA sound (pcm) driver");
242 dreamcastcard = substream->pcm->private_data; aica_dma_transfer()
314 dreamcastcard = substream->pcm->private_data; aica_period_elapsed()
338 dreamcastcard = substream->pcm->private_data; spu_begin_dma()
359 dreamcastcard = substream->pcm->private_data; snd_aicapcm_pcm_open()
383 struct snd_card_aica *dreamcastcard = substream->pcm->private_data; snd_aicapcm_pcm_close()
412 struct snd_card_aica *dreamcastcard = substream->pcm->private_data; snd_aicapcm_pcm_prepare()
453 /* TO DO: set up to handle more than one pcm instance */ snd_aicapcmchip()
457 struct snd_pcm *pcm; snd_aicapcmchip() local
462 &pcm); snd_aicapcmchip()
465 pcm->private_data = dreamcastcard; snd_aicapcmchip()
466 strcpy(pcm->name, "AICA PCM"); snd_aicapcmchip()
467 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_aicapcmchip()
471 snd_pcm_lib_preallocate_pages_for_all(pcm, snd_aicapcmchip()
H A Dsh_dac_audio.c33 #include <sound/pcm.h>
249 /* pcm ops */
267 struct snd_pcm *pcm; snd_sh_dac_pcm() local
270 err = snd_pcm_new(chip->card, "SH_DAC PCM", device, 1, 0, &pcm); snd_sh_dac_pcm()
274 pcm->private_data = chip; snd_sh_dac_pcm()
275 strcpy(pcm->name, "SH_DAC PCM"); snd_sh_dac_pcm()
276 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_sh_dac_pcm_ops); snd_sh_dac_pcm()
279 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, snd_sh_dac_pcm()
/linux-4.1.27/sound/pci/cs5535audio/
H A Dcs5535audio_pcm.c31 #include <sound/pcm.h>
427 struct snd_pcm *pcm; snd_cs5535audio_pcm() local
430 err = snd_pcm_new(cs5535au->card, "CS5535 Audio", 0, 1, 1, &pcm); snd_cs5535audio_pcm()
438 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_cs5535audio_pcm()
440 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, snd_cs5535audio_pcm()
443 pcm->private_data = cs5535au; snd_cs5535audio_pcm()
444 pcm->info_flags = 0; snd_cs5535audio_pcm()
445 strcpy(pcm->name, "CS5535 Audio"); snd_cs5535audio_pcm()
447 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_cs5535audio_pcm()
450 cs5535au->pcm = pcm; snd_cs5535audio_pcm()
H A Dcs5535audio_pm.c28 #include <sound/pcm.h>
65 snd_pcm_suspend_all(cs5535au->pcm); snd_cs5535audio_suspend()
/linux-4.1.27/sound/soc/tegra/
H A DMakefile2 snd-soc-tegra-pcm-objs := tegra_pcm.o
11 obj-$(CONFIG_SND_SOC_TEGRA) += snd-soc-tegra-pcm.o
/linux-4.1.27/sound/soc/txx9/
H A Dtxx9aclc-generic.c20 #include <sound/pcm.h>
29 .platform_name = "txx9aclc-pcm-audio",
/linux-4.1.27/sound/soc/intel/boards/
H A Dhaswell.c20 #include <sound/pcm.h>
112 .platform_name = "haswell-pcm-audio",
125 .platform_name = "haswell-pcm-audio",
136 .platform_name = "haswell-pcm-audio",
147 .platform_name = "haswell-pcm-audio",
H A Dbroadwell.c20 #include <sound/pcm.h>
158 .platform_name = "haswell-pcm-audio",
171 .platform_name = "haswell-pcm-audio",
182 .platform_name = "haswell-pcm-audio",
193 .platform_name = "haswell-pcm-audio",
H A Dbyt-max98090.c23 #include <sound/pcm.h>
117 .cpu_dai_name = "baytrail-pcm-audio",
120 .platform_name = "baytrail-pcm-audio",
H A Dbyt-rt5640.c22 #include <sound/pcm.h>
187 .cpu_dai_name = "baytrail-pcm-audio",
190 .platform_name = "baytrail-pcm-audio",
/linux-4.1.27/drivers/isdn/hardware/eicon/
H A Dio.c470 struct pc_maint *pcm; DIDpcRoutine() local
475 pcm = (struct pc_maint *)IoAdapter->pcm_data; DIDpcRoutine()
478 a->ram_out(a, &IoAdapter->pcm->rc, 0); DIDpcRoutine()
479 a->ram_out(a, &IoAdapter->pcm->req, pcm->req); DIDpcRoutine()
483 if ((int)(a->ram_in(a, &IoAdapter->pcm->rc))) { DIDpcRoutine()
484 a->ram_in_buffer(a, IoAdapter->pcm, pcm, sizeof(*pcm)); DIDpcRoutine()
507 struct pc_maint *pcm = (struct pc_maint *)&e->Ind; pcm_req() local
517 IoAdapter->pcm_data = (void *)pcm; pcm_req()
559 a->ram_out(a, &IoAdapter->pcm->rc, 0); pcm_req()
560 a->ram_out(a, &IoAdapter->pcm->req, pcm->req); pcm_req()
564 rc = (int)(a->ram_in(a, &IoAdapter->pcm->rc)); pcm_req()
567 a->ram_in_buffer(a, IoAdapter->pcm, pcm, sizeof(*pcm)); pcm_req()
/linux-4.1.27/sound/mips/
H A Dau1x00.c45 #include <sound/pcm.h>
100 struct snd_pcm *pcm; member in struct:snd_au1000
291 struct snd_au1000 *au1000 = substream->pcm->private_data; snd_au1000_playback_open()
304 struct snd_au1000 *au1000 = substream->pcm->private_data; snd_au1000_capture_open()
317 struct snd_au1000 *au1000 = substream->pcm->private_data; snd_au1000_playback_close()
326 struct snd_au1000 *au1000 = substream->pcm->private_data; snd_au1000_capture_close()
359 struct snd_au1000 *au1000 = substream->pcm->private_data; snd_au1000_playback_prepare()
373 struct snd_au1000 *au1000 = substream->pcm->private_data; snd_au1000_capture_prepare()
447 struct snd_pcm *pcm; snd_au1000_pcm_new() local
451 if ((err = snd_pcm_new(au1000->card, "AU1000 AC97 PCM", 0, 1, 1, &pcm)) < 0) snd_au1000_pcm_new()
454 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, snd_au1000_pcm_new()
457 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_au1000_pcm_new()
459 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, snd_au1000_pcm_new()
462 pcm->private_data = au1000; snd_au1000_pcm_new()
463 pcm->info_flags = 0; snd_au1000_pcm_new()
464 strcpy(pcm->name, "Au1000 AC97 PCM"); snd_au1000_pcm_new()
490 au1000->pcm = pcm; snd_au1000_pcm_new()
H A Dsgio2audio.c40 #include <sound/pcm.h>
721 /* create a pcm device */ snd_sgio2audio_new_pcm()
724 struct snd_pcm *pcm; snd_sgio2audio_new_pcm() local
727 /* create first pcm device with one outputs and one input */ snd_sgio2audio_new_pcm()
728 err = snd_pcm_new(chip->card, "SGI O2 Audio", 0, 1, 1, &pcm); snd_sgio2audio_new_pcm()
732 pcm->private_data = chip; snd_sgio2audio_new_pcm()
733 strcpy(pcm->name, "SGI O2 DAC1"); snd_sgio2audio_new_pcm()
736 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_sgio2audio_new_pcm()
738 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, snd_sgio2audio_new_pcm()
741 /* create second pcm device with one outputs and no input */ snd_sgio2audio_new_pcm()
742 err = snd_pcm_new(chip->card, "SGI O2 Audio", 1, 1, 0, &pcm); snd_sgio2audio_new_pcm()
746 pcm->private_data = chip; snd_sgio2audio_new_pcm()
747 strcpy(pcm->name, "SGI O2 DAC2"); snd_sgio2audio_new_pcm()
750 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_sgio2audio_new_pcm()
/linux-4.1.27/sound/drivers/pcsp/
H A Dpcsp_lib.c14 #include <sound/pcm.h>
341 err = snd_pcm_new(chip->card, "pcspeaker", 0, 1, 0, &chip->pcm); snd_pcsp_new_pcm()
345 snd_pcm_set_ops(chip->pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_pcsp_new_pcm()
348 chip->pcm->private_data = chip; snd_pcsp_new_pcm()
349 chip->pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX; snd_pcsp_new_pcm()
350 strcpy(chip->pcm->name, "pcsp"); snd_pcsp_new_pcm()
352 snd_pcm_lib_preallocate_pages_for_all(chip->pcm, snd_pcsp_new_pcm()
/linux-4.1.27/arch/mips/ralink/
H A Drt3883.c28 FUNC("pcm uartf", RT3883_GPIO_MODE_PCM_UARTF, 7, 8),
29 FUNC("pcm i2s", RT3883_GPIO_MODE_PCM_I2S, 7, 8),
31 FUNC("pcm gpio", RT3883_GPIO_MODE_PCM_GPIO, 11, 4),
/linux-4.1.27/sound/atmel/
H A Dabdac.c23 #include <sound/pcm.h>
99 struct snd_pcm *pcm; member in struct:atmel_abdac
317 struct snd_pcm *pcm; atmel_abdac_pcm_new() local
321 dac->pdev->id, 1, 0, &pcm); atmel_abdac_pcm_new()
325 strcpy(pcm->name, dac->card->shortname); atmel_abdac_pcm_new()
326 pcm->private_data = dac; atmel_abdac_pcm_new()
327 pcm->info_flags = 0; atmel_abdac_pcm_new()
328 dac->pcm = pcm; atmel_abdac_pcm_new()
330 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &atmel_abdac_ops); atmel_abdac_pcm_new()
332 retval = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, atmel_abdac_pcm_new()
505 dev_dbg(&pdev->dev, "could not register ABDAC pcm device\n"); atmel_abdac_probe()
/linux-4.1.27/sound/pci/ymfpci/
H A Dymfpci_main.c237 voice->pcm = 1; voice_alloc()
239 voice2->pcm = 1; voice_alloc()
293 pvoice->use = pvoice->pcm = pvoice->synth = pvoice->midi = 0; snd_ymfpci_voice_free()
413 if (substream->pcm == chip->pcm && !ypcm->use_441_slot) { snd_ymfpci_playback_trigger()
690 substream->pcm == chip->pcm); snd_ymfpci_playback_prepare()
692 if (substream->pcm == chip->pcm && !ypcm->use_441_slot) { snd_ymfpci_playback_prepare()
1150 struct snd_pcm *pcm; snd_ymfpci_pcm() local
1153 if ((err = snd_pcm_new(chip->card, "YMFPCI", device, 32, 1, &pcm)) < 0) snd_ymfpci_pcm()
1155 pcm->private_data = chip; snd_ymfpci_pcm()
1157 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ymfpci_playback_ops); snd_ymfpci_pcm()
1158 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_ymfpci_capture_rec_ops); snd_ymfpci_pcm()
1161 pcm->info_flags = 0; snd_ymfpci_pcm()
1162 strcpy(pcm->name, "YMFPCI"); snd_ymfpci_pcm()
1163 chip->pcm = pcm; snd_ymfpci_pcm()
1165 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_ymfpci_pcm()
1168 return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_ymfpci_pcm()
1185 struct snd_pcm *pcm; snd_ymfpci_pcm2() local
1188 if ((err = snd_pcm_new(chip->card, "YMFPCI - PCM2", device, 0, 1, &pcm)) < 0) snd_ymfpci_pcm2()
1190 pcm->private_data = chip; snd_ymfpci_pcm2()
1192 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_ymfpci_capture_ac97_ops); snd_ymfpci_pcm2()
1195 pcm->info_flags = 0; snd_ymfpci_pcm2()
1196 sprintf(pcm->name, "YMFPCI - %s", snd_ymfpci_pcm2()
1198 chip->pcm2 = pcm; snd_ymfpci_pcm2()
1200 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_ymfpci_pcm2()
1219 struct snd_pcm *pcm; snd_ymfpci_pcm_spdif() local
1222 if ((err = snd_pcm_new(chip->card, "YMFPCI - IEC958", device, 1, 0, &pcm)) < 0) snd_ymfpci_pcm_spdif()
1224 pcm->private_data = chip; snd_ymfpci_pcm_spdif()
1226 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ymfpci_playback_spdif_ops); snd_ymfpci_pcm_spdif()
1229 pcm->info_flags = 0; snd_ymfpci_pcm_spdif()
1230 strcpy(pcm->name, "YMFPCI - IEC958"); snd_ymfpci_pcm_spdif()
1231 chip->pcm_spdif = pcm; snd_ymfpci_pcm_spdif()
1233 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_ymfpci_pcm_spdif()
1260 struct snd_pcm *pcm; snd_ymfpci_pcm_4ch() local
1263 if ((err = snd_pcm_new(chip->card, "YMFPCI - Rear", device, 1, 0, &pcm)) < 0) snd_ymfpci_pcm_4ch()
1265 pcm->private_data = chip; snd_ymfpci_pcm_4ch()
1267 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ymfpci_playback_4ch_ops); snd_ymfpci_pcm_4ch()
1270 pcm->info_flags = 0; snd_ymfpci_pcm_4ch()
1271 strcpy(pcm->name, "YMFPCI - Rear PCM"); snd_ymfpci_pcm_4ch()
1272 chip->pcm_4ch = pcm; snd_ymfpci_pcm_4ch()
1274 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_ymfpci_pcm_4ch()
1277 return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_ymfpci_pcm_4ch()
1872 substream = chip->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; snd_ymfpci_mixer()
1877 kctl->id.device = chip->pcm->device; snd_ymfpci_mixer()
2307 snd_pcm_suspend_all(chip->pcm); snd_ymfpci_suspend()
/linux-4.1.27/sound/usb/usx2y/
H A Dusx2yhwdeppcm.c23 The pair uses a hardware dependent alsa-device for mmaped pcm transport.
25 The usb_hc moves pcm data from/into memory via DMA.
27 Jack's usx2y driver is the first/last to read/write pcm data.
32 As a side effect possible unwanted pcm-data coruption resulting of
43 - The jackd could mmap its float-pcm buffers directly from alsa-lib.
48 - rawusb dma pcm buffer transport should go to snd-usb-lib, so also snd-usb-audio
50 Currently rawusb dma pcm buffer transport (this file) is only available to snd-usb-usx2y.
103 * we copy the data directly from the pcm buffer.
712 struct snd_pcm *pcm; usX2Y_hwdep_pcm_new() local
729 err = snd_pcm_new(card, NAME_ALLCAPS" hwdep Audio", 2, 1, 1, &pcm); usX2Y_hwdep_pcm_new()
733 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_usX2Y_usbpcm_ops); usX2Y_hwdep_pcm_new()
734 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_usX2Y_usbpcm_ops); usX2Y_hwdep_pcm_new()
736 pcm->private_data = usX2Y(card)->subs; usX2Y_hwdep_pcm_new()
737 pcm->info_flags = 0; usX2Y_hwdep_pcm_new()
739 sprintf(pcm->name, NAME_ALLCAPS" hwdep Audio"); usX2Y_hwdep_pcm_new()
740 if (0 > (err = snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream, usX2Y_hwdep_pcm_new()
744 0 > (err = snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream, usX2Y_hwdep_pcm_new()
H A Dusbusx2yaudio.c40 #include <sound/pcm.h>
120 * we copy the data directly from the pcm buffer.
521 * return the current pcm pointer. just return the hwptr_done value.
749 struct snd_card *card = substream->pstr->pcm->card; snd_usX2Y_pcm_hw_params()
755 /* all pcm substreams off one usX2Y have to operate at the same snd_usX2Y_pcm_hw_params()
935 static void snd_usX2Y_pcm_private_free(struct snd_pcm *pcm) snd_usX2Y_pcm_private_free() argument
937 struct snd_usX2Y_substream **usX2Y_stream = pcm->private_data; snd_usX2Y_pcm_private_free()
944 struct snd_pcm *pcm; usX2Y_audio_stream_new() local
965 &pcm); usX2Y_audio_stream_new()
972 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_usX2Y_pcm_ops); usX2Y_audio_stream_new()
973 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_usX2Y_pcm_ops); usX2Y_audio_stream_new()
975 pcm->private_data = usX2Y_substream; usX2Y_audio_stream_new()
976 pcm->private_free = snd_usX2Y_pcm_private_free; usX2Y_audio_stream_new()
977 pcm->info_flags = 0; usX2Y_audio_stream_new()
979 sprintf(pcm->name, NAME_ALLCAPS" Audio #%d", usX2Y(card)->pcm_devs); usX2Y_audio_stream_new()
982 0 > (err = snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream, usX2Y_audio_stream_new()
986 0 > (err = snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream, usX2Y_audio_stream_new()
990 snd_usX2Y_pcm_private_free(pcm); usX2Y_audio_stream_new()
/linux-4.1.27/sound/pci/
H A Dals300.c45 #include <sound/pcm.h>
121 struct snd_pcm *pcm; member in struct:snd_als300
210 if (chip->pcm && chip->playback_substream) { snd_als300_interrupt()
218 if (chip->pcm && chip->capture_substream) { snd_als300_interrupt()
243 if (chip->pcm && chip->playback_substream) { snd_als300plus_interrupt()
252 if (chip->pcm && chip->capture_substream) { snd_als300plus_interrupt()
590 struct snd_pcm *pcm; snd_als300_new_pcm() local
593 err = snd_pcm_new(chip->card, "ALS300", 0, 1, 1, &pcm); snd_als300_new_pcm()
596 pcm->private_data = chip; snd_als300_new_pcm()
597 strcpy(pcm->name, "ALS300"); snd_als300_new_pcm()
598 chip->pcm = pcm; snd_als300_new_pcm()
601 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_als300_new_pcm()
603 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, snd_als300_new_pcm()
607 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_als300_new_pcm()
734 snd_pcm_suspend_all(chip->pcm); snd_als300_suspend()
H A Datiixp.c31 #include <sound/pcm.h>
220 enum { ATI_PCM_OUT, ATI_PCM_IN, ATI_PCM_SPDIF, NUM_ATI_PCMS }; /* AC97 pcm slots */
221 enum { ATI_PCMDEV_ANALOG, ATI_PCMDEV_DIGITAL, NUM_ATI_PCMDEVS }; /* pcm devices */
975 struct ac97_pcm *pcm = chip->pcms[dma->ac97_pcm_type]; snd_atiixp_pcm_hw_params() local
980 snd_ac97_pcm_close(pcm); snd_atiixp_pcm_hw_params()
983 err = snd_ac97_pcm_open(pcm, params_rate(hw_params), snd_atiixp_pcm_hw_params()
985 pcm->r[0].slots); snd_atiixp_pcm_hw_params()
999 struct ac97_pcm *pcm = chip->pcms[dma->ac97_pcm_type]; snd_atiixp_pcm_hw_free() local
1000 snd_ac97_pcm_close(pcm); snd_atiixp_pcm_hw_free()
1010 * pcm hardware definition, identical for all DMA types
1252 struct snd_pcm *pcm; snd_atiixp_pcm_new() local
1263 /* assign AC97 pcm */ snd_atiixp_pcm_new()
1284 ATI_PCMDEV_ANALOG, 1, 1, &pcm); snd_atiixp_pcm_new()
1287 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_atiixp_playback_ops); snd_atiixp_pcm_new()
1288 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_atiixp_capture_ops); snd_atiixp_pcm_new()
1289 pcm->private_data = chip; snd_atiixp_pcm_new()
1290 strcpy(pcm->name, "ATI IXP AC97"); snd_atiixp_pcm_new()
1291 chip->pcmdevs[ATI_PCMDEV_ANALOG] = pcm; snd_atiixp_pcm_new()
1293 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_atiixp_pcm_new()
1297 err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_atiixp_pcm_new()
1315 ATI_PCMDEV_DIGITAL, 1, 0, &pcm); snd_atiixp_pcm_new()
1318 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_atiixp_spdif_ops); snd_atiixp_pcm_new()
1319 pcm->private_data = chip; snd_atiixp_pcm_new()
1321 strcpy(pcm->name, "ATI IXP IEC958 (AC97)"); snd_atiixp_pcm_new()
1323 strcpy(pcm->name, "ATI IXP IEC958 (Direct)"); snd_atiixp_pcm_new()
1324 chip->pcmdevs[ATI_PCMDEV_DIGITAL] = pcm; snd_atiixp_pcm_new()
1326 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_atiixp_pcm_new()
H A Dvia82xx.c30 * - use the DSX channels for the first pcm playback.
38 * on VIA8233A, this channel is assigned to the second pcm
58 #include <sound/pcm.h>
313 * pcm stream
1151 * pcm hardware definition, identical for both playback and capture
1314 struct viadev *viadev = &chip->devs[chip->capture_devno + substream->pcm->device]; snd_via82xx_capture_open()
1444 * create pcm instances for VIA8233, 8233C and 8235 (not 8233A)
1448 struct snd_pcm *pcm; snd_via8233_pcm_new() local
1459 err = snd_pcm_new(chip->card, chip->card->shortname, 0, 4, 1, &pcm); snd_via8233_pcm_new()
1462 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_via8233_playback_ops); snd_via8233_pcm_new()
1463 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_via8233_capture_ops); snd_via8233_pcm_new()
1464 pcm->private_data = chip; snd_via8233_pcm_new()
1465 strcpy(pcm->name, chip->card->shortname); snd_via8233_pcm_new()
1466 chip->pcms[0] = pcm; snd_via8233_pcm_new()
1473 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, snd_via8233_pcm_new()
1477 err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_via8233_pcm_new()
1484 err = snd_pcm_new(chip->card, chip->card->shortname, 1, 1, 1, &pcm); snd_via8233_pcm_new()
1487 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_via8233_multi_ops); snd_via8233_pcm_new()
1488 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_via8233_capture_ops); snd_via8233_pcm_new()
1489 pcm->private_data = chip; snd_via8233_pcm_new()
1490 strcpy(pcm->name, chip->card->shortname); snd_via8233_pcm_new()
1491 chip->pcms[1] = pcm; snd_via8233_pcm_new()
1497 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, snd_via8233_pcm_new()
1501 err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_via8233_pcm_new()
1512 * create pcm instances for VIA8233A
1516 struct snd_pcm *pcm; snd_via8233a_pcm_new() local
1527 err = snd_pcm_new(chip->card, chip->card->shortname, 0, 1, 1, &pcm); snd_via8233a_pcm_new()
1530 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_via8233_multi_ops); snd_via8233a_pcm_new()
1531 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_via8233_capture_ops); snd_via8233a_pcm_new()
1532 pcm->private_data = chip; snd_via8233a_pcm_new()
1533 strcpy(pcm->name, chip->card->shortname); snd_via8233a_pcm_new()
1534 chip->pcms[0] = pcm; snd_via8233a_pcm_new()
1540 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, snd_via8233a_pcm_new()
1544 err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_via8233a_pcm_new()
1556 err = snd_pcm_new(chip->card, chip->card->shortname, 1, 1, 0, &pcm); snd_via8233a_pcm_new()
1559 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_via8233_playback_ops); snd_via8233a_pcm_new()
1560 pcm->private_data = chip; snd_via8233a_pcm_new()
1561 strcpy(pcm->name, chip->card->shortname); snd_via8233a_pcm_new()
1562 chip->pcms[1] = pcm; snd_via8233a_pcm_new()
1566 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, snd_via8233a_pcm_new()
1573 * create a pcm instance for via686a/b
1577 struct snd_pcm *pcm; snd_via686_pcm_new() local
1585 err = snd_pcm_new(chip->card, chip->card->shortname, 0, 1, 1, &pcm); snd_via686_pcm_new()
1588 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_via686_playback_ops); snd_via686_pcm_new()
1589 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_via686_capture_ops); snd_via686_pcm_new()
1590 pcm->private_data = chip; snd_via686_pcm_new()
1591 strcpy(pcm->name, chip->card->shortname); snd_via686_pcm_new()
1592 chip->pcms[0] = pcm; snd_via686_pcm_new()
1596 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, snd_via686_pcm_new()
/linux-4.1.27/drivers/media/usb/tm6000/
H A Dtm6000-alsa.c23 #include <sound/pcm.h>
169 * audio pcm capture open callback
423 struct snd_pcm *pcm; tm6000_audio_init() local
461 rc = snd_pcm_new(card, "TM6000 Audio", 0, 0, 1, &pcm); tm6000_audio_init()
465 pcm->info_flags = 0; tm6000_audio_init()
466 pcm->private_data = chip; tm6000_audio_init()
467 strcpy(pcm->name, "Trident TM5600/60x0"); tm6000_audio_init()
469 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_tm6000_pcm_ops); tm6000_audio_init()
/linux-4.1.27/sound/drivers/vx/
H A Dvx_pcm.c52 #include <sound/pcm.h>
58 * read three pending pcm bytes via inb()
162 * @runtime: pcm runtime instance to be referred
537 audio = subs->pcm->device * 2; vx_pcm_playback_open()
929 audio = subs->pcm->device * 2; vx_pcm_capture_open()
1111 * interrupt handler for pcm streams
1159 /* update the capture pcm pointers as frequently as possible */ vx_pcm_update_intr()
1213 * free callback for pcm
1215 static void snd_vx_pcm_free(struct snd_pcm *pcm) snd_vx_pcm_free() argument
1217 struct vx_core *chip = pcm->private_data; snd_vx_pcm_free()
1218 chip->pcm[pcm->device] = NULL; snd_vx_pcm_free()
1226 * snd_vx_pcm_new - create and initialize a pcm
1230 struct snd_pcm *pcm; snd_vx_pcm_new() local
1244 outs, ins, &pcm); snd_vx_pcm_new()
1248 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &vx_pcm_playback_ops); snd_vx_pcm_new()
1250 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &vx_pcm_capture_ops); snd_vx_pcm_new()
1252 pcm->private_data = chip; snd_vx_pcm_new()
1253 pcm->private_free = snd_vx_pcm_free; snd_vx_pcm_new()
1254 pcm->info_flags = 0; snd_vx_pcm_new()
1255 pcm->nonatomic = true; snd_vx_pcm_new()
1256 strcpy(pcm->name, chip->card->shortname); snd_vx_pcm_new()
1257 chip->pcm[i] = pcm; snd_vx_pcm_new()
/linux-4.1.27/drivers/media/pci/saa7134/
H A Dsaa7134-alsa.c26 #include <sound/pcm.h>
257 snd_card_saa7134_pcm_t *pcm = runtime->private_data; snd_card_saa7134_capture_trigger() local
258 struct saa7134_dev *dev=pcm->dev; snd_card_saa7134_capture_trigger()
525 snd_card_saa7134_pcm_t *pcm = runtime->private_data; snd_card_saa7134_capture_prepare() local
527 pcm->dev->dmasound.substream = substream; snd_card_saa7134_capture_prepare()
615 snd_card_saa7134_pcm_t *pcm = runtime->private_data; snd_card_saa7134_capture_pointer() local
616 struct saa7134_dev *dev=pcm->dev; snd_card_saa7134_capture_pointer()
667 snd_card_saa7134_pcm_t *pcm = runtime->private_data; snd_card_saa7134_runtime_free() local
669 kfree(pcm); snd_card_saa7134_runtime_free()
818 snd_card_saa7134_pcm_t *pcm; snd_card_saa7134_capture_open() local
841 pcm = kzalloc(sizeof(*pcm), GFP_KERNEL); snd_card_saa7134_capture_open()
842 if (pcm == NULL) snd_card_saa7134_capture_open()
845 pcm->dev=saa7134->dev; snd_card_saa7134_capture_open()
847 spin_lock_init(&pcm->lock); snd_card_saa7134_capture_open()
849 pcm->substream = substream; snd_card_saa7134_capture_open()
850 runtime->private_data = pcm; snd_card_saa7134_capture_open()
910 struct snd_pcm *pcm; snd_card_saa7134_pcm() local
913 if ((err = snd_pcm_new(saa7134->card, "SAA7134 PCM", device, 0, 1, &pcm)) < 0) snd_card_saa7134_pcm()
915 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_card_saa7134_capture_ops); snd_card_saa7134_pcm()
916 pcm->private_data = saa7134; snd_card_saa7134_pcm()
917 pcm->info_flags = 0; snd_card_saa7134_pcm()
918 strcpy(pcm->name, "SAA7134 PCM"); snd_card_saa7134_pcm()
/linux-4.1.27/sound/pci/hda/
H A Dhda_controller.c175 int key = (substream->pcm->device << 16) | (substream->number << 2) | azx_assign_device()
592 if (s->pcm->card != substream->pcm->card) snd_pcm_group_for_each_entry()
610 if (s->pcm->card != substream->pcm->card) snd_pcm_group_for_each_entry()
630 if (s->pcm->card != substream->pcm->card) snd_pcm_group_for_each_entry()
646 if (s->pcm->card != substream->pcm->card) snd_pcm_group_for_each_entry()
678 if (s->pcm->card != substream->pcm->card) snd_pcm_group_for_each_entry()
919 static void azx_pcm_free(struct snd_pcm *pcm) azx_pcm_free() argument
921 struct azx_pcm *apcm = pcm->private_data; azx_pcm_free()
924 apcm->info->pcm = NULL; azx_pcm_free()
935 struct snd_pcm *pcm; azx_attach_pcm_stream() local
942 if (apcm->pcm->device == pcm_dev) { azx_attach_pcm_stream()
951 &pcm); azx_attach_pcm_stream()
954 strlcpy(pcm->name, cpcm->name, sizeof(pcm->name)); azx_attach_pcm_stream()
959 apcm->pcm = pcm; azx_attach_pcm_stream()
962 pcm->private_data = apcm; azx_attach_pcm_stream()
963 pcm->private_free = azx_pcm_free; azx_attach_pcm_stream()
965 pcm->dev_class = SNDRV_PCM_CLASS_MODEM; azx_attach_pcm_stream()
967 cpcm->pcm = pcm; azx_attach_pcm_stream()
970 snd_pcm_set_ops(pcm, s, &azx_pcm_ops); azx_attach_pcm_stream()
976 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, azx_attach_pcm_stream()
H A Dhda_proc.c111 if (cpcm->stream[type].nid != nid || cpcm->pcm == NULL) print_nid_pcms()
117 cpcm->pcm->device); print_nid_pcms()
190 static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm) print_pcm_rates() argument
198 pcm &= AC_SUPPCM_RATES; print_pcm_rates()
199 snd_iprintf(buffer, " rates [0x%x]:", pcm); print_pcm_rates()
201 if (pcm & (1 << i)) print_pcm_rates()
206 static void print_pcm_bits(struct snd_info_buffer *buffer, unsigned int pcm) print_pcm_bits() argument
210 snd_iprintf(buffer, " bits [0x%x]:", (pcm >> 16) & 0xff); print_pcm_bits()
211 snd_print_pcm_bits(pcm, buf, sizeof(buf)); print_pcm_bits()
231 unsigned int pcm = param_read(codec, nid, AC_PAR_PCM); print_pcm_caps() local
233 if (pcm == -1 || stream == -1) { print_pcm_caps()
237 print_pcm_rates(buffer, pcm); print_pcm_caps()
238 print_pcm_bits(buffer, pcm); print_pcm_caps()
/linux-4.1.27/sound/soc/qcom/
H A Dlpass-platform.c26 #include <sound/pcm.h>
334 return dma_mmap_coherent(substream->pcm->card->dev, vma, lpass_platform_pcmops_mmap()
448 struct snd_pcm *pcm = soc_runtime->pcm; lpass_platform_pcm_new() local
450 pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; lpass_platform_pcm_new()
494 static void lpass_platform_pcm_free(struct snd_pcm *pcm) lpass_platform_pcm_free() argument
497 pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; lpass_platform_pcm_free()
/linux-4.1.27/drivers/media/usb/go7007/
H A Dsnd-go7007.c28 #include <sound/pcm.h>
46 struct snd_pcm *pcm; member in struct:go7007_snd
256 ret = snd_pcm_new(gosnd->card, "go7007", 0, 0, 1, &gosnd->pcm); go7007_snd_init()
267 gosnd->pcm->private_data = go; go7007_snd_init()
268 snd_pcm_set_ops(gosnd->pcm, SNDRV_PCM_STREAM_CAPTURE, go7007_snd_init()
/linux-4.1.27/sound/aoa/soundbus/
H A Dsoundbus.h12 #include <sound/pcm.h>
88 * opens the pcm device to determine what the
104 /* called when pcm stream is opened, probably not implemented
109 /* called when the pcm stream is closed, at this point
157 struct snd_pcm *pcm; member in struct:soundbus_dev
/linux-4.1.27/sound/isa/gus/
H A Dgus_pcm.c697 (long) pcm->playback.buffer, (long) gus->gf1.pcm_buffer); snd_gf1_pcm_playback_open()
717 snd_printk(KERN_ERR "gf1 pcm - serious DMA problem\n"); snd_gf1_pcm_playback_close()
792 if (!pvoice->pcm) snd_gf1_pcm_volume_put()
856 struct snd_pcm *pcm; snd_gf1_pcm_new() local
867 &pcm); snd_gf1_pcm_new()
870 pcm->private_data = gus; snd_gf1_pcm_new()
872 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_gf1_pcm_playback_ops); snd_gf1_pcm_new()
874 for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next) snd_gf1_pcm_new()
879 pcm->info_flags = 0; snd_gf1_pcm_new()
880 pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; snd_gf1_pcm_new()
882 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_gf1_pcm_capture_ops); snd_gf1_pcm_new()
884 pcm->info_flags |= SNDRV_PCM_INFO_HALF_DUPLEX; snd_gf1_pcm_new()
885 snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream, snd_gf1_pcm_new()
889 strcpy(pcm->name, pcm->id); snd_gf1_pcm_new()
891 sprintf(pcm->name + strlen(pcm->name), " rev %c", gus->revision + 'A'); snd_gf1_pcm_new()
893 strcat(pcm->name, " (synth)"); snd_gf1_pcm_new()
894 gus->pcm = pcm; snd_gf1_pcm_new()
/linux-4.1.27/sound/pci/echoaudio/
H A Dechoaudio.c252 sample rate only if there is only one pcm device open. */ hw_rule_sample_rate()
828 /* pcm *_ops structures */
883 static int snd_echo_preallocate_pages(struct snd_pcm *pcm, struct device *dev) snd_echo_preallocate_pages() argument
889 for (ss = pcm->streams[stream].substream; ss; ss = ss->next) { snd_echo_preallocate_pages()
905 struct snd_pcm *pcm; snd_echo_new_pcm() local
917 num_analog_busses_in(chip), &pcm)) < 0) snd_echo_new_pcm()
919 pcm->private_data = chip; snd_echo_new_pcm()
920 chip->analog_pcm = pcm; snd_echo_new_pcm()
921 strcpy(pcm->name, chip->card->shortname); snd_echo_new_pcm()
922 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &analog_playback_ops); snd_echo_new_pcm()
923 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &analog_capture_ops); snd_echo_new_pcm()
924 if ((err = snd_echo_preallocate_pages(pcm, snd_dma_pci_data(chip->pci))) < 0) snd_echo_new_pcm()
930 num_digital_busses_in(chip), &pcm)) < 0) snd_echo_new_pcm()
932 pcm->private_data = chip; snd_echo_new_pcm()
933 chip->digital_pcm = pcm; snd_echo_new_pcm()
934 strcpy(pcm->name, chip->card->shortname); snd_echo_new_pcm()
935 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &digital_capture_ops); snd_echo_new_pcm()
936 if ((err = snd_echo_preallocate_pages(pcm, snd_dma_pci_data(chip->pci))) < 0) snd_echo_new_pcm()
950 num_analog_busses_in(chip), &pcm)) < 0) snd_echo_new_pcm()
952 pcm->private_data = chip; snd_echo_new_pcm()
953 chip->analog_pcm = pcm; snd_echo_new_pcm()
954 strcpy(pcm->name, chip->card->shortname); snd_echo_new_pcm()
955 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &analog_playback_ops); snd_echo_new_pcm()
956 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &analog_capture_ops); snd_echo_new_pcm()
957 if ((err = snd_echo_preallocate_pages(pcm, snd_dma_pci_data(chip->pci))) < 0) snd_echo_new_pcm()
964 num_digital_busses_in(chip), &pcm)) < 0) snd_echo_new_pcm()
966 pcm->private_data = chip; snd_echo_new_pcm()
967 chip->digital_pcm = pcm; snd_echo_new_pcm()
968 strcpy(pcm->name, chip->card->shortname); snd_echo_new_pcm()
969 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &digital_playback_ops); snd_echo_new_pcm()
970 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &digital_capture_ops); snd_echo_new_pcm()
971 if ((err = snd_echo_preallocate_pages(pcm, snd_dma_pci_data(chip->pci))) < 0) snd_echo_new_pcm()
1457 /* Do not allow the user to change the digital mode when a pcm snd_echo_digital_mode_put()
2040 dev_err(chip->card->dev, "new pcm error %d\n", err); snd_echo_probe()
/linux-4.1.27/sound/pci/ice1712/
H A Dice1724.c1140 struct snd_pcm *pcm; snd_vt1724_pcm_profi() local
1148 err = snd_pcm_new(ice->card, "ICE1724", device, 1, capt, &pcm); snd_vt1724_pcm_profi()
1152 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_vt1724_playback_pro_ops); snd_vt1724_pcm_profi()
1154 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, snd_vt1724_pcm_profi()
1157 pcm->private_data = ice; snd_vt1724_pcm_profi()
1158 pcm->info_flags = 0; snd_vt1724_pcm_profi()
1159 strcpy(pcm->name, "ICE1724"); snd_vt1724_pcm_profi()
1161 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_vt1724_pcm_profi()
1165 ice->pcm_pro = pcm; snd_vt1724_pcm_profi()
1321 struct snd_pcm *pcm; snd_vt1724_pcm_spdif() local
1344 err = snd_pcm_new(ice->card, name, device, play, capt, &pcm); snd_vt1724_pcm_spdif()
1349 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_vt1724_pcm_spdif()
1352 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, snd_vt1724_pcm_spdif()
1355 pcm->private_data = ice; snd_vt1724_pcm_spdif()
1356 pcm->info_flags = 0; snd_vt1724_pcm_spdif()
1357 strcpy(pcm->name, name); snd_vt1724_pcm_spdif()
1359 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_vt1724_pcm_spdif()
1363 ice->pcm = pcm; snd_vt1724_pcm_spdif()
1454 struct snd_pcm *pcm; snd_vt1724_pcm_indep() local
1462 err = snd_pcm_new(ice->card, "ICE1724 Surrounds", device, play, 0, &pcm); snd_vt1724_pcm_indep()
1466 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_vt1724_pcm_indep()
1469 pcm->private_data = ice; snd_vt1724_pcm_indep()
1470 pcm->info_flags = 0; snd_vt1724_pcm_indep()
1471 strcpy(pcm->name, "ICE1724 Surround PCM"); snd_vt1724_pcm_indep()
1473 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_vt1724_pcm_indep()
1477 ice->pcm_ds = pcm; snd_vt1724_pcm_indep()
2435 if (snd_BUG_ON(!ice->pcm)) snd_vt1724_spdif_build_controls()
2452 kctl->id.device = ice->pcm->device; snd_vt1724_spdif_build_controls()
2456 kctl->id.device = ice->pcm->device; snd_vt1724_spdif_build_controls()
2460 kctl->id.device = ice->pcm->device; snd_vt1724_spdif_build_controls()
2465 kctl->id.device = ice->pcm->device; snd_vt1724_spdif_build_controls()
2730 if (ice->pcm && ice->has_spdif) { /* has SPDIF I/O */ snd_vt1724_probe()
2809 snd_pcm_suspend_all(ice->pcm); snd_vt1724_suspend()
/linux-4.1.27/drivers/net/fddi/skfp/
H A Dqueue.c105 pcm(smc,class - EVENT_PCMA,(int)ev->event) ; ev_dispatcher()
157 else if (!strcmp(flag,"pcm")) do_smt_flag()
167 printf("pcm %d\n",deb->d_pcm) ; do_smt_flag()
/linux-4.1.27/sound/ppc/
H A Dpmac.h26 #include <sound/pcm.h>
122 unsigned int formats_ok; /* pcm hwinfo */
142 struct snd_pcm *pcm; member in struct:snd_pmac
H A Dsnd_ps3.c34 #include <sound/pcm.h>
531 pcm_index = substream->pcm->device; snd_ps3_pcm_open()
1005 /* NOTE:this driver works assuming pcm:substream = 1:1 */ snd_ps3_driver_probe()
1008 0, /* instance index, will be stored pcm.device*/ snd_ps3_driver_probe()
1011 &(the_card.pcm)); snd_ps3_driver_probe()
1015 the_card.pcm->private_data = &the_card; snd_ps3_driver_probe()
1016 strcpy(the_card.pcm->name, "SPDIF"); snd_ps3_driver_probe()
1018 /* set pcm ops */ snd_ps3_driver_probe()
1019 snd_pcm_set_ops(the_card.pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_ps3_driver_probe()
1022 the_card.pcm->info_flags = SNDRV_PCM_INFO_NONINTERLEAVED; snd_ps3_driver_probe()
1024 ret = snd_pcm_lib_preallocate_pages_for_all(the_card.pcm, snd_ps3_driver_probe()
1082 * there is no destructor function to pcm. snd_ps3_driver_probe()
/linux-4.1.27/drivers/pcmcia/
H A Dsa1111_badge4.c53 * setup argument: pcmv=<pcm vcc>,<pcm vpp>,<cf vcc>. The units are
/linux-4.1.27/arch/arm/mach-s3c64xx/
H A Ddev-audio.c154 .name = "samsung-pcm",
175 .name = "samsung-pcm",
/linux-4.1.27/sound/isa/ad1816a/
H A Dad1816a_lib.c520 snd_pcm_suspend_all(chip->pcm); snd_ad1816a_suspend()
681 struct snd_pcm *pcm; snd_ad1816a_pcm() local
683 if ((error = snd_pcm_new(chip->card, "AD1816A", device, 1, 1, &pcm))) snd_ad1816a_pcm()
686 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_ad1816a_playback_ops); snd_ad1816a_pcm()
687 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_ad1816a_capture_ops); snd_ad1816a_pcm()
689 pcm->private_data = chip; snd_ad1816a_pcm()
690 pcm->info_flags = (chip->dma1 == chip->dma2 ) ? SNDRV_PCM_INFO_JOINT_DUPLEX : 0; snd_ad1816a_pcm()
692 strcpy(pcm->name, snd_ad1816a_chip_id(chip)); snd_ad1816a_pcm()
695 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_ad1816a_pcm()
699 chip->pcm = pcm; snd_ad1816a_pcm()
/linux-4.1.27/sound/isa/
H A Dcmi8330.c173 struct snd_pcm *pcm; member in struct:snd_cmi8330
442 struct snd_pcm *pcm; snd_cmi8330_pcm() local
450 if ((err = snd_pcm_new(card, (chip->type == CMI8329) ? "CMI8329" : "CMI8330", 0, 1, 1, &pcm)) < 0) snd_cmi8330_pcm()
452 strcpy(pcm->name, (chip->type == CMI8329) ? "CMI8329" : "CMI8330"); snd_cmi8330_pcm()
453 pcm->private_data = chip; snd_cmi8330_pcm()
469 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &chip->streams[SNDRV_PCM_STREAM_PLAYBACK].ops); snd_cmi8330_pcm()
470 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &chip->streams[SNDRV_PCM_STREAM_CAPTURE].ops); snd_cmi8330_pcm()
472 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_cmi8330_pcm()
475 chip->pcm = pcm; snd_cmi8330_pcm()
487 snd_pcm_suspend_all(acard->pcm); snd_cmi8330_suspend()
/linux-4.1.27/sound/parisc/
H A Dharmony.c50 #include <sound/pcm.h>
624 struct snd_pcm *pcm; snd_harmony_pcm_init() local
632 err = snd_pcm_new(h->card, "harmony", 0, 1, 1, &pcm); snd_harmony_pcm_init()
636 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, snd_harmony_pcm_init()
638 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, snd_harmony_pcm_init()
641 pcm->private_data = h; snd_harmony_pcm_init()
642 pcm->info_flags = 0; snd_harmony_pcm_init()
643 strcpy(pcm->name, "harmony"); snd_harmony_pcm_init()
644 h->pcm = pcm; snd_harmony_pcm_init()
672 err = snd_pcm_lib_preallocate_pages_for_all(pcm, h->dma.type, snd_harmony_pcm_init()

Completed in 7159 milliseconds

1234