Dear Takashi
Thank you for your comment
My rough guess is that your pointer callback returns a wrong value. The pointer callback is supposed to give the currently played position offset in a ring buffer, and ranged from 0 to buffer_size-1. When the first snd_pcm_period_elapsed() is called, it should be (ideally) pointing at period_size, at the succeeding calls, period_size*2, period_size*3, then 0 again.
The criminal is my wrong understanding... OK.
But I still have trouble now.
follows the log ------------ trigger called hw_prt_base = 0, hw_prt = 127, appl_prt = 8192 hw_prt_base = 0, hw_prt = 255, appl_prt = 8319 (snip) hw_prt_base = 0, hw_prt = 3845, appl_prt = 11888 hw_prt_base = 0, hw_prt = 3995, appl_prt = 12037 call elapsed // 2nd call hw_prt_base = 0, hw_prt = 4123, appl_prt = 12037 hw_prt_base = 0, hw_prt = 4272, appl_prt = 12187 call elapsed // 3rd call hw_prt_base = 0, hw_prt = 6202, appl_prt = 12288 call elapsed // 4th call hw_prt_base = 8192, hw_prt = 8192, appl_prt = 12288 <<< driver stopped here... >> ------------
when 1st buffer was send, driver stop. 2nd trigger function isn't called.
Best regards -- Kuninori Morimoto