[alsa-devel] Beaglebone black : Audio cap & Linux version 4.1.3-ti-r6.2
Micka
mickamusset at gmail.com
Mon Aug 3 09:02:34 CEST 2015
Hi,
Thx to this site :
http://www.programdevelop.com/4763397/
I understand better the flow of ALSA :)
but i don't understand what is going on really with SNDRV_PCM_IOCTL_SYNC_PTR
???
this is my new log :
[ 84.688930] snd_soc_dai_digital_mute 0 0
[ 84.689000] snd_pcm_playback_ioctl
[ 84.689032] snd_pcm_playback_ioctl1 3229892899
[ 84.689057] call snd_pcm_common_ioctl1
[ 84.689084] snd_pcm_common_ioctl1 3229892899
[ 84.689109] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.689624] snd_pcm_playback_ioctl
[ 84.689664] snd_pcm_playback_ioctl1 3228057875
[ 84.689689] call snd_pcm_common_ioctl1
[ 84.689715] snd_pcm_common_ioctl1 3228057875
[ 84.695219] snd_pcm_playback_ioctl
[ 84.695269] snd_pcm_playback_ioctl1 3229892899
[ 84.695296] call snd_pcm_common_ioctl1
[ 84.695322] snd_pcm_common_ioctl1 3229892899
[ 84.695347] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.695400] snd_pcm_playback_ioctl
[ 84.695427] snd_pcm_playback_ioctl1 3229892899
[ 84.695451] call snd_pcm_common_ioctl1
[ 84.695476] snd_pcm_common_ioctl1 3229892899
[ 84.695499] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.696332] snd_pcm_playback_ioctl
[ 84.696364] snd_pcm_playback_ioctl1 3229892899
[ 84.696389] call snd_pcm_common_ioctl1
[ 84.696414] snd_pcm_common_ioctl1 3229892899
[ 84.696438] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.696474] snd_pcm_playback_ioctl
[ 84.696501] snd_pcm_playback_ioctl1 3229892899
[ 84.696524] call snd_pcm_common_ioctl1
[ 84.696548] snd_pcm_common_ioctl1 3229892899
[ 84.696572] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.729249] snd_pcm_playback_ioctl
[ 84.729289] snd_pcm_playback_ioctl1 3229892899
[ 84.729303] call snd_pcm_common_ioctl1
[ 84.729317] snd_pcm_common_ioctl1 3229892899
[ 84.729329] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.729355] snd_pcm_playback_ioctl
[ 84.729368] snd_pcm_playback_ioctl1 3229892899
[ 84.729378] call snd_pcm_common_ioctl1
[ 84.729390] snd_pcm_common_ioctl1 3229892899
[ 84.729401] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.729787] snd_pcm_playback_ioctl
[ 84.729801] snd_pcm_playback_ioctl1 3229892899
[ 84.729812] call snd_pcm_common_ioctl1
[ 84.729824] snd_pcm_common_ioctl1 3229892899
[ 84.729835] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.729852] snd_pcm_playback_ioctl
[ 84.729865] snd_pcm_playback_ioctl1 3229892899
[ 84.729875] call snd_pcm_common_ioctl1
[ 84.729887] snd_pcm_common_ioctl1 3229892899
[ 84.729898] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.731902] snd_pcm_playback_ioctl
[ 84.731914] snd_pcm_playback_ioctl1 3229892899
[ 84.731925] call snd_pcm_common_ioctl1
[ 84.731937] snd_pcm_common_ioctl1 3229892899
[ 84.731947] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.731962] snd_pcm_playback_ioctl
[ 84.731974] snd_pcm_playback_ioctl1 3229892899
[ 84.731984] call snd_pcm_common_ioctl1
[ 84.731996] snd_pcm_common_ioctl1 3229892899
[ 84.732007] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.732314] snd_pcm_playback_ioctl
[ 84.732328] snd_pcm_playback_ioctl1 3229892899
[ 84.732338] call snd_pcm_common_ioctl1
[ 84.732350] snd_pcm_common_ioctl1 3229892899
[ 84.732361] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.732375] snd_pcm_playback_ioctl
[ 84.732387] snd_pcm_playback_ioctl1 3229892899
[ 84.732398] call snd_pcm_common_ioctl1
[ 84.732410] snd_pcm_common_ioctl1 3229892899
[ 84.732421] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.734421] snd_pcm_playback_ioctl
[ 84.734434] snd_pcm_playback_ioctl1 3229892899
[ 84.734444] call snd_pcm_common_ioctl1
[ 84.734456] snd_pcm_common_ioctl1 3229892899
[ 84.734467] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.734481] snd_pcm_playback_ioctl
[ 84.734493] snd_pcm_playback_ioctl1 3229892899
[ 84.734503] call snd_pcm_common_ioctl1
[ 84.734515] snd_pcm_common_ioctl1 3229892899
[ 84.734526] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.734826] snd_pcm_playback_ioctl
[ 84.734839] snd_pcm_playback_ioctl1 3229892899
[ 84.734850] call snd_pcm_common_ioctl1
[ 84.734862] snd_pcm_common_ioctl1 3229892899
[ 84.734872] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.734887] snd_pcm_playback_ioctl
[ 84.734899] snd_pcm_playback_ioctl1 3229892899
[ 84.734909] call snd_pcm_common_ioctl1
[ 84.734921] snd_pcm_common_ioctl1 3229892899
[ 84.734932] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.734974] snd_pcm_playback_ioctl
[ 84.734987] snd_pcm_playback_ioctl1 3229892899
[ 84.734998] call snd_pcm_common_ioctl1
[ 84.735010] snd_pcm_common_ioctl1 3229892899
[ 84.735020] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.735034] snd_pcm_playback_ioctl
[ 84.735046] snd_pcm_playback_ioctl1 16706
[ 84.735057] call snd_pcm_common_ioctl1
[ 84.735068] snd_pcm_common_ioctl1 16706
[ 84.735080] --SNDRV_PCM_IOCTL_START:
[ 84.735096] snd_pcm_do_start
[ 84.735108] soc_pcm_trigger
[ 84.737206] snd_pcm_playback_ioctl
[ 84.737221] snd_pcm_playback_ioctl1 3229892899
[ 84.737232] call snd_pcm_common_ioctl1
[ 84.737244] snd_pcm_common_ioctl1 3229892899
[ 84.737254] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.737280] snd_pcm_playback_ioctl
[ 84.737293] snd_pcm_playback_ioctl1 3229892899
[ 84.737303] call snd_pcm_common_ioctl1
[ 84.737315] snd_pcm_common_ioctl1 3229892899
[ 84.737326] SNDRV_PCM_IOCTL_SYNC_PTR:
[ 84.747620] snd_pcm_playback_ioctl
[ 84.747647] snd_pcm_playback_ioctl1 3229892899
[ 84.747660] call snd_pcm_common_ioctl1
[ 84.747673] snd_pcm_common_ioctl1 3229892899
[ 84.747685] SNDRV_PCM_IOCTL_SYNC_PTR:
Le jeu. 30 juil. 2015 à 18:40, Micka <mickamusset at gmail.com> a écrit :
> HI everyone, I'm trying to test the sound output with the
> driver tlv320aic3104.
>
> I'm stuck somewhere and I can't figure it out !
>
> I Put a lot of printk and I don't know where to put other printk.
>
>
> Do you know who call the function soc_pcm_prepare ?
>
> 693 <http://lxr.free-electrons.com/source/sound/soc/soc-pcm.c#L693> */**694 <http://lxr.free-electrons.com/source/sound/soc/soc-pcm.c#L694> * * Called by ALSA when the PCM substream is prepared, can set format, sample*695 <http://lxr.free-electrons.com/source/sound/soc/soc-pcm.c#L695> * * rate, etc. This function is non atomic and can be called multiple times,*696 <http://lxr.free-electrons.com/source/sound/soc/soc-pcm.c#L696> * * it can refer to the runtime info.*697 <http://lxr.free-electrons.com/source/sound/soc/soc-pcm.c#L697> * */*698 <http://lxr.free-electrons.com/source/sound/soc/soc-pcm.c#L698> static int soc_pcm_prepare <http://lxr.free-electrons.com/ident?i=soc_pcm_prepare>(struct snd_pcm_substream <http://lxr.free-electrons.com/ident?i=snd_pcm_substream> *substream)
>
> Looks like that it's ALSA, but I can't find where ?
>
> I tried to find a line in the kernel calling the function:
> rtd->ops <http://lxr.free-electrons.com/ident?i=ops>.prepare(.... )
>
> can't find it ....
>
>
> my trace :
> [ 550.269286] ASoC: tlv320aic3x-hifi <-> 48038000.mcasp info:
> [ 550.269363] ASoC: rate mask 0x7fe
> [ 550.269398] ASoC: min ch 2 max ch 2
> [ 550.269431] ASoC: min rate 8000 max rate 96000
> [ 550.275809] tlv aic3x_hw_params
> [ 550.275862] snd_soc_read: snd soc component read: ret 0 reg 9 val 64
> [ 550.275934] snd_soc_component_write reg 9 val 64
> [ 550.275987] snd_soc_component_write reg 101 val 0
> [ 550.276030] snd_soc_component_write reg 7 val 10
> [ 550.276063] snd_soc_component_write reg 2 val 0
> [ 550.289260] snd_soc_component_write reg 11 val 1
> [ 550.289339] snd_soc_component_write reg 4 val 32
> [ 550.289375] snd_soc_component_write reg 5 val 30
> [ 550.289407] snd_soc_component_write reg 6 val 0
> [ 550.289952] soc_pcm_prepare
> [ 550.290003] snd_soc_component_write reg 10 val 0
> [ 550.290043] soc_dapm_stream_event 1
> [ 550.290107] soc_dapm_stream_event: dapm_power_widgets:start
> dapm_power_widgets 1
> [ 550.290150] trace_snd_soc_dapm_start
> [ 550.290176] dapm reset
> [ 550.290226] trace_snd_soc_dapm_widget_power
> [ 550.290257] trace_snd_soc_dapm_widget_power
> [ 550.290284] trace_snd_soc_dapm_widget_power
> [ 550.290311] trace_snd_soc_dapm_widget_power
> [ 550.290339] trace_snd_soc_dapm_widget_power
> [ 550.290370] trace_snd_soc_dapm_widget_power
> [ 550.290395] trace_snd_soc_dapm_widget_power
> [ 550.290423] trace_snd_soc_dapm_widget_power
> [ 550.290448] trace_snd_soc_dapm_widget_power
> [ 550.290477] trace_snd_soc_dapm_widget_power
> [ 550.290503] trace_snd_soc_dapm_widget_power
> [ 550.290531] trace_snd_soc_dapm_widget_power
> [ 550.290557] trace_snd_soc_dapm_widget_power
> [ 550.290582] trace_snd_soc_dapm_widget_power
> [ 550.290608] trace_snd_soc_dapm_widget_power
> [ 550.290634] trace_snd_soc_dapm_widget_power
> [ 550.290659] trace_snd_soc_dapm_widget_power
> [ 550.290686] trace_snd_soc_dapm_widget_power
> [ 550.290712] trace_snd_soc_dapm_widget_power
> [ 550.290738] trace_snd_soc_dapm_widget_power
> [ 550.290765] trace_snd_soc_dapm_widget_power
> [ 550.290791] trace_snd_soc_dapm_widget_power
> [ 550.290817] trace_snd_soc_dapm_widget_power
> [ 550.290842] trace_snd_soc_dapm_widget_power
> [ 550.290879] dap set bias to off
> [ 550.290910] dapm_pre_sequence_async off
> [ 550.290937] snd soc dapm set bias level 1
> [ 550.290962] trace_snd_soc_bias_level_start 1
> [ 550.290988] trace_snd_soc_bias_level_done 1
> [ 550.291011] dapm_pre_sequence_async onsnd soc dapm set bias level 2
> [ 550.291047] trace_snd_soc_bias_level_start 2
> [ 550.291073] trace_snd_soc_bias_level_done 2
> [ 550.291318] dapm_pre_sequence_async off
> [ 550.291354] snd soc dapm set bias level 1
> [ 550.291381] trace_snd_soc_bias_level_start 1
> [ 550.291405] soc set bias level
> [ 550.291432] tlv set bias level 1
> [ 550.291456] tlv standby
> [ 550.291480] tlv set power
> [ 550.300504] snd_soc_read: snd soc component read: ret 0 reg 5 val 30
> [ 550.300583] snd_soc_read: snd soc component read: ret 0 reg 6 val 0
> [ 550.300631] snd_soc_component_write reg 5 val 30
> [ 550.301103] snd_soc_component_write reg 6 val 0
> [ 550.301577] trace_snd_soc_bias_level_done 1
> [ 550.301611] dapm_pre_sequence_async onsnd soc dapm set bias level 2
> [ 550.301650] trace_snd_soc_bias_level_start 2
> [ 550.301675] soc set bias level
> [ 550.301701] tlv set bias level 2
> [ 550.301724] tlv prepare
> [ 550.301757] trace_snd_soc_bias_level_done 2
> [ 550.301864] dapm event WILL_PMU
> [ 550.301897] dapm event WILL_PMU
> [ 550.301923] dapm event WILL_PMU
> [ 550.301948] dapm event WILL_PMU
> [ 550.301972] dapm event WILL_PMU
> [ 550.301997] dapm event WILL_PMU
> [ 550.302021] dapm event WILL_PMU
> [ 550.302045] dapm event WILL_PMU
> [ 550.302069] dapm event WILL_PMU
> [ 550.302094] dapm event WILL_PMU
> [ 550.302119] dapm event WILL_PMU
> [ 550.302143] dapm event WILL_PMU
> [ 550.302168] dapm event WILL_PMU
> [ 550.302192] dapm event WILL_PMU
> [ 550.302216] dapm event WILL_PMU
> [ 550.302240] dapm event WILL_PMU
> [ 550.302265] dapm event WILL_PMU
> [ 550.302289] dapm event WILL_PMU
> [ 550.302313] dapm event WILL_PMU
> [ 550.302337] dapm event WILL_PMU
> [ 550.302362] dapm event WILL_PMU
> [ 550.302386] dapm event WILL_PMU
> [ 550.302410] dapm event WILL_PMU
> [ 550.302435] dapm event WILL_PMU
> [ 550.302460] dapm sq run 1
> [ 550.302489] dapm sq run 1
> [ 550.302523] dapm event PRE_PMU
> [ 550.302550] dapm event PRE_PMD
> [ 550.302575] dapm event PRE_PMU
> [ 550.302599] dapm event PRE_PMD
> [ 550.302623] dapm event PRE_PMU
> [ 550.302647] dapm event PRE_PMD
> [ 550.302671] dapm event PRE_PMU
> [ 550.302696] dapm event PRE_PMD
> [ 550.302720] dapm event PRE_PMU
> [ 550.302744] dapm event PRE_PMD
> [ 550.302769] dapm event PRE_PMU
> [ 550.302793] dapm event PRE_PMD
> [ 550.302817] dapm event POST_PMU
> [ 550.302842] dapm event POST_PMD
> [ 550.302867] dapm event POST_PMU
> [ 550.302891] dapm event POST_PMD
> [ 550.302915] dapm event POST_PMU
> [ 550.302939] dapm event POST_PMD
> [ 550.302964] dapm event POST_PMU
> [ 550.302988] dapm event POST_PMD
> [ 550.303012] dapm event POST_PMU
> [ 550.303036] dapm event POST_PMD
> [ 550.303060] dapm event POST_PMU
> [ 550.303084] dapm event POST_PMD
> [ 550.303110] dapm event PRE_PMU
> [ 550.303134] dapm event PRE_PMD
> [ 550.303159] dapm event POST_PMU
> [ 550.303183] dapm event POST_PMD
> [ 550.303209] dapm event PRE_PMU
> [ 550.303234] dapm event PRE_PMD
> [ 550.303258] dapm event PRE_PMU
> [ 550.303282] dapm event PRE_PMD
> [ 550.303306] dapm event PRE_PMU
> [ 550.303331] dapm event PRE_PMD
> [ 550.303355] dapm event PRE_PMU
> [ 550.303379] dapm event PRE_PMD
> [ 550.303403] dapm event POST_PMU
> [ 550.303427] dapm event POST_PMD
> [ 550.303451] dapm event POST_PMU
> [ 550.303475] dapm event POST_PMD
> [ 550.303499] dapm event POST_PMU
> [ 550.303524] dapm event POST_PMD
> [ 550.303548] dapm event POST_PMU
> [ 550.303572] dapm event POST_PMD
> [ 550.303598] dapm event PRE_PMU
> [ 550.303622] dapm event PRE_PMD
> [ 550.303647] dapm event PRE_PMU
> [ 550.303671] dapm event PRE_PMD
> [ 550.304162] dapm event POST_PMU
> [ 550.304199] dapm event POST_PMD
> [ 550.304226] dapm event POST_PMU
> [ 550.304250] dapm event POST_PMD
> [ 550.304278] dapm event PRE_PMU
> [ 550.304303] dapm event PRE_PMD
> [ 550.304328] dapm event PRE_PMU
> [ 550.304352] dapm event PRE_PMD
> [ 550.304377] dapm event PRE_PMU
> [ 550.304401] dapm event PRE_PMD
> [ 550.304426] dapm event PRE_PMU
> [ 550.304450] dapm event PRE_PMD
> [ 550.304474] dapm event POST_PMU
> [ 550.304499] dapm event POST_PMD
> [ 550.304523] dapm event POST_PMU
> [ 550.304547] dapm event POST_PMD
> [ 550.304572] dapm event POST_PMU
> [ 550.304596] dapm event POST_PMD
> [ 550.304620] dapm event POST_PMU
> [ 550.304644] dapm event POST_PMD
> [ 550.304670] dapm event PRE_PMU
> [ 550.304695] dapm event PRE_PMD
> [ 550.305156] dapm event POST_PMU
> [ 550.305191] dapm event POST_PMD
> [ 550.305219] dapm event PRE_PMU
> [ 550.305245] dapm event PRE_PMD
> [ 550.305696] dapm event POST_PMU
> [ 550.305730] dapm event POST_PMD
> [ 550.305757] dapm event PRE_PMU
> [ 550.305782] dapm event PRE_PMD
> [ 550.306275] dapm event POST_PMU
> [ 550.306312] dapm event POST_PMD
> [ 550.306341] dapm event PRE_PMU
> [ 550.306366] dapm event PRE_PMD
> [ 550.306849] dapm event POST_PMU
> [ 550.306885] dapm event POST_PMD
> [ 550.306914] dapm event PRE_PMU
> [ 550.306939] dapm event PRE_PMD
> [ 550.317926] dapm event POST_PMU
> [ 550.317958] dapm event POST_PMD
> [ 550.317977] dapm event PRE_PMU
> [ 550.317991] dapm event PRE_PMD
> [ 550.318401] dapm event POST_PMU
> [ 550.318422] dapm event POST_PMD
> [ 550.318439] dapm event PRE_PMU
> [ 550.318454] dapm event PRE_PMD
> [ 550.318467] dapm event POST_PMU
> [ 550.318480] dapm event POST_PMD
> [ 550.318496] dapm_power_widgets run all the bias changes in parrallel
> [ 550.321470] dapm_post_sequence_async prepare 1
> [ 550.321498] snd soc dapm set bias level 3
> [ 550.321513] trace_snd_soc_bias_level_start 3
> [ 550.321527] soc set bias level
> [ 550.321543] tlv set bias level 3
> [ 550.321555] tlv bias on
> [ 550.321570] trace_snd_soc_bias_level_done 3
> [ 550.321649] dapm_power_widgets dapm_power_widgets
> [ 550.321666] DAPM sequencing finished
> [ 550.321680] trace_snd_soc_dapm_done
> [ 550.321695] pcm prepare call snd_soc_dai_digital_mute
> [ 550.321711] snd_soc_dai_digital_mute 0 0
> [ 550.321725] tlv aic3x_mute
> [ 550.321739] snd_soc_read: snd soc component read: ret 0 reg 43 val 168
> [ 550.321772] snd_soc_read: snd soc component read: ret 0 reg 44 val 168
> [ 550.321798] snd_soc_component_write reg 43 val 40
> [ 550.322224] snd_soc_component_write reg 44 val 40
> [ 550.322630] pcm prepare call snd_soc_dai_digital_mute for cpu_dai
> [ 550.322651] snd_soc_dai_digital_mute 0 0
>
>>
>>
More information about the Alsa-devel
mailing list