static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area) { struct snd_pcm_runtime *runtime; long size; if (!(area->vm_flags & VM_READ)) return -EINVAL; runtime = substream->runtime; size = area->vm_end - area->vm...
runtime = substream->runtime; size = area->vm_end - area->vm_start; if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control))) return -EINVAL; area->vm_ops = &snd_pcm_vm_ops_control; //当对( area->vm_start,area->vm_end)之间空间操作,发生 area->vm_private_data = subst...
==> snd_pcm_mmap_control static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area) { struct snd_pcm_runtime *runtime; long size; if (!(area->vm_flags & VM_READ)) return -EINVAL; runtime = substream->runtime; size =...
-->soc_post_component_init// 为pcm runtime实例创建device对象-->soc_new_pcm// 创建PCM 逻辑设备,分FE和BE-->snd_soc_dapm_link_dai_widgets// dai widget 和 stream widget 建立连接-->snd_soc_dapm_connect_dai_link_widgets// BE dai widget和 codec dai widget建立连接,codec dai widget和codec ...
machine driver的probe函数会调用此api向Alsa注册声卡 1 int snd_soc_register_card(struct snd_soc_card *card) 2 { 3 int i, ret; 4 struct snd_soc_pcm_runtime *rtd; 5 6
alsa声卡/dev/snd/pcmC0D0p的open打开流程原文地址:/space.php?uid=20564848&do=blog&cuid=2116725aplay.c= main= snd_pcm_open(&handle, pcm_name, stream, open_mode); / 打开一路pcm,刷新config配置如果是default,同时type等于SND_CONFIG_TYPE_COMPOUND那么这里对应emptystatic const char *const build_in...
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: subs->ops.retire = retire_capture_urb; return 0; } return -EINVAL; } int snd_usb_substream_prepare(struct snd_usb_substream *subs, struct snd_pcm_runtime *runtime) {3 changes: 0 additions & 3 deletions 3 sound/usb/endpoint.h Original fil...
struct snd_pcm_runtime *runtime = substream->runtime; unsigned int silent_page, tmp; unsigned int silent_page; int voice; unsigned char send_amount[8]; unsigned char send_routing[8]; unsigned long flags; unsigned int pitch_target;
(struct snd_soc_pcm_runtime *rtd, int num) { if (platform-driver-ops) { soc_pcm_ops.mmap = platform-driver-ops-mmap; soc_pcm_ops.pointer = platform-driver-ops-pointer; soc_pcm_ops.ioctl = platform-driver-ops-ioctl; soc_pcm_ops.copy = platform-driver-ops-copy; soc_pcm_ops....
staticintsoc_new_pcm(structsnd_soc_pcm_runtime*rtd,intnum) { ... if(platform->driver->ops){ soc_pcm_ops.mmap=platform->driver->ops->mmap; soc_pcm_ops.pointer=platform->driver->ops->pointer; soc_pcm_ops.ioctl=platform->driver->ops->ioctl; soc_pcm...