<p><br>
> >> ><br>
> >> > >><br>
> >> > >><br>
> >> > >> ><br>
> >> > >> > below is what the terminate shows when running pcm_avail.c<br>
> >> > >> ><br>
> >> > >> > uid=0 gid=1007@nutshell:/ # alsactl_test<br>
> >> > >> > min_period_size: 8 frames, dir: 0<br>
> >> > >> > Playback hwparams: FIFO size is 8<br>
> >> > >> > Hardware PCM card 0 'rsnd-dai.0-dirana3.0' device 0 subdevice 0<br>
> >> > >> > Its setup is:<br>
> >> > >> > stream : PLAYBACK<br>
> >> > >> > access : RW_INTERLEAVED<br>
> >> > >> > format : S16_LE<br>
> >> > >> > subformat : STD<br>
> >> > >> > channels : 2<br>
> >> > >> > rate : 48000<br>
> >> > >> > exact rate : 48000 (48000/1)<br>
> >> > >> > msbits : 16<br>
> >> > >> > buffer_size : 4096<br>
> >> > >> > period_size : 1024<br>
> >> > >> > period_time : 21333<br>
> >> > >> > tstamp_mode : NONE<br>
> >> > >> > period_step : 1<br>
> >> > >> > avail_min : 1024<br>
> >> > >> > period_event : 0<br>
> >> > >> > start_threshold : 1024<br>
> >> > >> > stop_threshold : 4096<br>
> >> > >> > silence_threshold: 0<br>
> >> > >> > silence_size : 0<br>
> >> > >> > boundary : 1073741824<br>
> >> > >> > appl_ptr : 0<br>
> >> > >> > hw_ptr : 0<br>
> >> > >> > Playing silence<br>
> >> > >> > Available: 0, loop iteration: 0<br>
> >> > >> > Available: 1024, loop iteration: 1469<br>
> >> > >> > Available: 2048, loop iteration: 5609<br>
> >> > >> > Available: 3072, loop iteration: 9667<br>
> >> > >> ><br>
> >> > >> > All I got is just the 4 lines.<br>
> >> > >><br>
> >> > >> If your sound card only increment hw_ptr only at interrupt occur, you<br>
> >> > >> need to increase default_rewind_safeguard from 256 bytes to your<br>
> >> > >> selected period size<br>
> >> > ><br>
> >> > ><br>
> >> > > No. PulseAudio, in timer-scheduling mode, does not use periods at all.<br>
> >> > > You need to change the driver so that it reports SNDRV_PCM_INFO_BATCH, so<br>
> >> > > that PulseAudio does not try to use this mode.<br>
> >> > ><br>
> >> > ><br>
> >> > >><br>
> >> > >> This mean that your sound card won't work with timer scheduling or<br>
> >> > >> dynamic latency, you can only archieve low latency by decrease period<br>
> >> > >> size<br>
> >> > >> Why do pulseaudio enable timer scheduling when most sound card use<br>
> >> > >> IRQ ?<br>
> >> > ><br>
> >> > ><br>
> >> > > Because most broken sound cards driver authors forget to report<br>
> >> > > SNDRV_PCM_INFO_BATCH?<br>
> >> ><br>
> >> > Why pulseaudio rely on the flag if your program can find out the<br>
> >> > granulatity ?<br>
> >><br>
> >> AFAIK, there isn't a way to figure out granularity. Having this would be<br>
> >> nice as we could be more intelligent about our tsched behaviour.<br>
> >><br>
> ><br>
> > But in this case, alecandra `s program already indicate hw_ptr only<br>
> > increment by period size which is not suitable to enable timer base<br>
> > scheduling<br>
><br>
> There are two cases: the first is that pointer updates happen at<br>
> period size, which should imply the BATCH flag, and we just disable<br>
> timer-based scheduling.</p>
<p>Is this asoc sound card ?</p>
<p><a href="https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/soc/soc-generic-dmaengine-pcm.c?id=acde50a7bf1fd6ae0baa4402f0a02c4b1bd4c990">https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/soc/soc-generic-dmaengine-pcm.c?id=acde50a7bf1fd6ae0baa4402f0a02c4b1bd4c990</a></p>