ALSA打开数据流程
soc_pcm_open => cpu_dai->driver->ops->startup
=> platform->driver->ops->open =>
codec_dai->driver->ops->startup \
=> rtd->dai_link->ops->startup
ALSA的HW_param流程
soc_pcm_hw_params =>
rtd->dai_link->ops->hw_params =>
codec_dai->driver->ops->hw_params =>
cpu_dai->driver->ops->hw_params \
=> platform->driver->ops->hw_params
ALSA的Prepare流程
snd_pcm_prepare => snd_pcm_action_nonatomic =>
snd_pcm_action_group => snd_pcm_do_prepare =>
substream->ops->prepare \
=> soc_pcm_prepare => rtd->dai_link->ops->prepare
=> platform->driver->ops->prepare =>
codec_dai->driver->ops->prepare \
=> cpu_dai->driver->ops->prepare
ALSA的Write流程
snd_pcm_playback_ioctl => snd_pcm_playback_ioctl1 =>
SNDRV_PCM_IOCTL_WRITEN_FRAMES => snd_pcm_lib_writev =>
snd_pcm_lib_write1 \
=> |||| => snd_pcm_lib_writev_transfer => copy_from_user [copy user speace data to dma]
snd_pcm_start => snd_pcm_action => snd_pcm_action_group => snd_pcm_do_start => substream->ops->trigger
ALSA的Trigger流程
substream->ops->trigger => soc_pcm_trigger =>
codec_dai->driver->ops->trigger =>
platform->driver->ops->trigger \
=> cpu_dai->driver->ops->trigger
ALSA的cset流程
snd_ctl_ioctl => SNDRV_CTL_IOCTL_ELEM_WRITE =>
snd_ctl_elem_write_user => snd_ctl_elem_write => kctl->put
=> codec->write
阅读(2704) | 评论(0) | 转发(0) |