If it is, then it means most likely the driver problem, so we should
return error immediately instead.
Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
gettimestamp(&rate->trigger_tstamp, pcm->tstamp_type);
avail = snd_pcm_mmap_playback_hw_avail(rate->gen.slave);
- if (avail <= 0) {
+ if (avail < 0) /* can't happen on healthy drivers */
+ return -EBADFD;
+
+ if (avail == 0) {
/* postpone the trigger since we have no data committed yet */
rate->start_pending = 1;
return 0;