audio playback open/close和参数设置流程

be cpu dai
 snd_soc_dai_driver.snd_soc_dai_ops.startup
machine
 snd_soc_dai_link.snd_soc_ops.startup
be cpu dai
 snd_soc_dai_driver.snd_soc_dai_ops.set_fmt (由machine driver 的snd_soc_dai_link.snd_soc_ops. startup调用)
fe cpu dai
 snd_soc_dai_driver.snd_soc_dai_ops.startup
fe platform
  snd_soc_platform_driver.snd_pcm_ops.open
machine
 snd_soc_dai_link.be_hw_params_fixup (hw_params re-writing for BE and FE sync)
 snd_soc_dai_link.snd_soc_ops.hw_params
codec dai
 snd_soc_dai_driver.snd_soc_dai_ops.set_sysclk (由machine driver 的snd_soc_dai_link.snd_soc_ops.hw_params调用)
 snd_soc_dai_driver.snd_soc_dai_ops.hw_params
be cpu dai
 snd_soc_dai_driver.snd_soc_dai_ops.hw_params
be platform
 snd_soc_platform_driver.snd_pcm_ops.hw_params
fe platform
 snd_soc_platform_driver.snd_pcm_ops.hw_params
codec bias
 snd_soc_codec_driver.set_bias_level (STANDBY)
  snd_soc_codec_driver.set_bias_level (PREPARE)
 snd_soc_codec_driver.set_bias_level (ON)
be platform
 snd_soc_platform_driver.snd_pcm_ops.prepare
be cpu dai
  snd_soc_dai_driver.snd_soc_dai_ops.prepare
codec dai
  snd_soc_dai_driver.snd_soc_dai_ops.prepare
fe platform
 snd_soc_platform_driver.snd_pcm_ops.prepare
codec dai
  snd_soc_dai_driver.snd_soc_dai_ops.digital_mute // 取消静音

audio playback close流程:
be cpu dai
 snd_soc_dai_driver.snd_soc_dai_ops.hw_free
codec dai
 snd_soc_dai_driver.snd_soc_dai_ops.digital_mute // 静音
codec
 snd_soc_codec_driver.set_bias_level(PREPARE)
 snd_soc_codec_driver.set_bias_level(STANDBY)
 snd_soc_codec_driver.set_bias_level(OFF)
be cpu dai
 snd_soc_dai_ops.shutdown
machine
 snd_soc_dai_link.snd_soc_ops.shutdown
be platform
 snd_soc_platform_driver.ops.close

posted @ 2022-05-29 16:03  bobfly1984  阅读(168)  评论(0编辑  收藏  举报