Commit Graph

64 Commits

Author SHA1 Message Date
Alexandre Ratchov 436f0dbfff Fix builds with no DEBUG defined. 2019-07-28 11:26:51 +02:00
Alexandre Ratchov cbdd29c403 alsa: use (blksz - round) as start threshold.
The threshold making poll() return POLLOUT is one block (according to
alsa library sources). If a poll-based program writes blksz - 1
samples, playback never starts but poll won't return POLLOUT either.
In turn the program deadlocks. The problem could be observed in the
sio_alsa_xrun() routine.
2019-07-01 17:12:00 +02:00
Tobias Kortkamp 31cfb9b6dc Support rsnd/default for opening the default device 2018-03-02 07:21:41 +01:00
Alexandre Ratchov 99cfc04004 fit code in 80 columns, remove traing spaces 2016-01-08 21:51:12 +01:00
Alexandre Ratchov 7530bbf6d2 Pass full device name to audio/midi backends. 2015-12-09 11:13:11 +01:00
Alexandre Ratchov 5d431d3616 Replace hard-coded strings with macros, replace PATH_MAX with actual
string length, validate audio and midi device numbers
2015-10-02 14:28:17 +02:00
Alexandre Ratchov 9ff8e621d0 typos in comments and strings 2015-08-26 10:27:22 +02:00
Alexandre Ratchov d27e0e138f don't force poll to sleep at block boundaries 2015-01-19 18:22:42 +01:00
Alexandre Ratchov 7834cb2a56 drop support for ":" in device names 2014-11-18 10:31:18 +01:00
Alexandre Ratchov 0e0511c762 for alsa, POLL{IN,OUT} events mean that a block can be read or
written (not a byte as unix files expect). Use "tickets" counters that
are reset to hdl->par.round on each POLL{IN,OUT} event. Limit read()
and write() to one block to ensure poll is always called at block
boundaries.
2014-05-05 19:25:15 +02:00
Alexandre Ratchov 4709dcb282 simplify switch/case 2014-03-10 11:20:45 +01:00
Alexandre Ratchov 3fe3b27ace return actual rchan, rather requested one 2014-02-14 20:59:38 +01:00
Alexandre Ratchov 7fbbfab94a remove unused 2014-02-13 16:36:56 +01:00
Alexandre Ratchov 05c5ae3c6a handle xrun if xfers are not frame-aligned 2014-02-13 15:11:33 +01:00
Alexandre Ratchov 262541f176 remove unused 2014-02-13 13:05:37 +01:00
Alexandre Ratchov 7a9ad77510 use relative read/write positions for debug printfs 2014-02-13 13:04:02 +01:00
Alexandre Ratchov dd2c5a2816 set rec params before play params 2013-12-11 13:35:28 +01:00
Alexandre Ratchov b22be8340a log only errors if SNDIO_DEBUG=1 2013-12-10 20:14:48 +01:00
Alexandre Ratchov e8221ec396 handle partial samples in alsa 2013-12-10 08:43:45 +01:00
Alexandre Ratchov 90db576827 implement getcaps for alsa 2013-11-28 18:47:07 +01:00
Alexandre Ratchov c0b2a1da07 drop comment 2013-11-22 12:09:43 +01:00
Alexandre Ratchov b1c417ab04 add prototypes 2013-11-18 17:50:04 +01:00
Alexandre Ratchov def3c30515 forgotten s/sndio_debug/_sndio_debug, from Christian Neukirchen,
thanks!
2013-11-15 08:35:11 +01:00
Alexandre Ratchov 686dd7065e cleanup namespace 2013-11-12 09:49:28 +01:00
Alexandre Ratchov 6c33ab75ef fix play vs rec parameters confision 2013-06-03 16:15:56 +02:00
Alexandre Ratchov 6be37c42ee style 2013-06-03 15:48:01 +02:00
Alexandre Ratchov 9ba5076846 drop forgotten debug printf 2013-06-03 13:53:37 +02:00
Alexandre Ratchov bd681ab72d handle poll revents before state changes may occur 2013-06-03 12:55:22 +02:00
Alexandre Ratchov aea7519d93 tabify 2013-04-15 10:42:51 +02:00
Alexandre Ratchov 8748c853c2 move wsil/rdrop code in sio.c 2013-04-12 16:14:53 +02:00
Alexandre Ratchov 53f43d4df8 typo in comment 2013-04-04 16:01:44 +02:00
Alexandre Ratchov 8e377687b9 fix premature onmove() call-backs 2013-03-19 19:43:49 +01:00
Alexandre Ratchov 2d63cee93c factor hw parameters setup 2012-11-13 15:08:28 +01:00
Alexandre Ratchov e77cefa34a pick a know format, if the requested one is not supported 2012-11-12 19:41:46 +01:00
Alexandre Ratchov 589cf9599a dont put xrun counters under #ifdef DEBUG 2012-11-08 20:07:51 +01:00
Alexandre Ratchov 2d4a336e1d rework xrun recovery code 2012-11-08 16:58:46 +01:00
Alexandre Ratchov 718a891d31 fix clock ticks arithmetics 2012-10-30 08:19:25 +01:00
Alexandre Ratchov 1c240e397d snd_pcm_poll_descriptors_count is not reliable use SIO_MAXNFDS 2012-10-26 18:50:09 +02:00
Alexandre Ratchov e750088847 fix bufsz arithmetic 2012-10-26 15:29:12 +02:00
Alexandre Ratchov 532c615895 use snd_pcm_poll_descriptors_count at initialisation 2012-10-26 15:01:04 +02:00
Alexandre Ratchov 3a6bc9af60 rearrange debug traces 2012-10-24 10:31:19 +02:00
Alexandre Ratchov 8ca941be6f handle both EPIPE and ESTRPIPE 2012-10-17 22:43:01 +02:00
Alexandre Ratchov 8a85df2977 tweak debug traces 2012-10-05 20:42:52 +02:00
Alexandre Ratchov c52770bd18 make debug level 1 less verbose 2012-10-05 19:37:47 +02:00
Alexandre Ratchov 37c1d89c64 use max(idelta, odelta) as clock reference 2012-10-05 19:35:31 +02:00
Alexandre Ratchov c257a68d18 ensure there are at least two periods 2012-10-05 18:15:58 +02:00
Alexandre Ratchov 9c73c409dc poll only bits set by sio_pollfd 2012-10-05 18:03:13 +02:00
Alexandre Ratchov 2630880acc handle rec xruns as well 2012-10-04 19:22:15 +02:00
Alexandre Ratchov a3a786b16e handle xruns 2012-10-04 15:24:08 +02:00
Alexandre Ratchov 8c5a080731 dont dump stream state if debugging isn't enabled 2012-09-27 10:40:11 +02:00