53 Commits

Author SHA1 Message Date
Chris Robinson
243939f94f Allow delaying playback start until context creation, and don't use UpdateSize to store the buffer size
This will make it possible to support the context attributes (frequency,
refresh, etc) for some backends
2009-08-13 12:28:46 -07:00
Chris Robinson
5460e85c40 Set the right access mode for non-mmap capture 2009-07-02 20:50:12 -07:00
Chris Robinson
432f0ba34c Specify the right format for ALSA recording 2009-07-02 20:32:19 -07:00
Chris Robinson
5a8ad67660 Lock the context before getting the mmap region to update 2009-05-26 14:54:59 -07:00
Chris Robinson
f1e442408b Set the correct data size 2009-05-26 14:51:57 -07:00
Chris Robinson
a946af4463 Simplify ALSA PCM parameter retrieval 2009-05-26 10:08:27 -07:00
Chris Robinson
e01cd92d56 Set avail_min so snd_pcm_wait will wait for the full update to be ready 2009-05-26 10:03:17 -07:00
Chris Robinson
1f6c4e01db Properly fall back to non-mmap capture if the parameters fail 2009-05-25 16:06:03 -07:00
Chris Robinson
04135723a2 Get rid of the ugly ok() macro 2009-05-25 13:07:49 -07:00
Chris Robinson
c1de15f840 Update in descrete amounts using the update size 2009-05-25 12:01:14 -07:00
Chris Robinson
89ddd7d8e5 Don't modify the device struct until playback succesfully starts 2009-03-13 22:16:01 -07:00
Chris Robinson
f8949ee7a1 Always add the default ALSA device even if no cards are present 2009-03-10 01:46:51 -07:00
Chris Robinson
62aa2d0ba7 Only expose the default ALSA device in standard enumeration 2009-03-10 01:28:01 -07:00
Chris Robinson
ace047d625 Append the card and device indices to the ALSA device strings 2009-03-10 01:21:42 -07:00
Chris Robinson
f6a4dbabdd Add cast for setting a dummy pointer value 2008-12-06 12:17:29 -08:00
Chris Robinson
2d461379ef Handle ALSA capture errors a bit better 2008-11-19 09:01:03 -08:00
Chris Robinson
cb6f040005 Use plughw for capture so ALSA can convert capture data 2008-10-14 09:50:37 -07:00
Chris Robinson
a2568409fc Implement non-mmap ALSA capture 2008-09-29 17:24:50 -07:00
Chris Robinson
9e9ff44b17 Use volatile for member variables that are changed in a different thread 2008-07-10 20:36:28 -07:00
Chris Robinson
6e86146a25 Prepare the ALSA PCM handle before starting capture
Thanks to Jason Daly for pointing it out
2008-05-06 16:05:36 -07:00
Chris Robinson
e15bc6b9ba Fill the correct capture device list 2008-04-05 20:33:19 -07:00
Chris Robinson
b1bdd7c89f Add the first card after making sure there's a useable device on it 2008-02-15 21:48:00 -08:00
Chris Robinson
8c3188bc7d Remove FrameSize struct member 2008-02-14 22:05:56 -08:00
Chris Robinson
d523b440e3 Wait for a PCM handle to be ready for more data instead of polling every 1ms or so 2008-02-13 19:34:47 -08:00
Chris Robinson
c3446a10fa Rename UpdateFreq device field to UpdateSize 2008-02-12 19:38:27 -08:00
Chris Robinson
80fcbc8adc Use all capture devices listed by ALSA, not just the first on each card 2008-02-08 15:22:17 -08:00
Chris Robinson
5f1c0450b3 Remove unnecessary Channels field 2008-01-25 16:38:37 -08:00
Chris Robinson
86b7b3d54b Remove duplication of setting the max source count 2008-01-19 19:28:34 -08:00
Chris Robinson
497ada9c77 Buffer size fixes. Partially reverts the ALSA buffer size "fix" 2008-01-18 00:28:25 -08:00
Chris Robinson
729f076c3b Reduce indentation 2008-01-14 15:38:15 -08:00
Chris Robinson
dfc0118b8b Add an option for disabling ALSA mmap 2008-01-14 15:30:52 -08:00
Chris Robinson
d9ef062caf Avoid busy waiting when waiting for suspend to clear 2008-01-14 13:23:49 -08:00
Chris Robinson
2b8ce3b4cf Let the mmap thread start the pcm stream when it's full
Instead of filling it with silence and starting it before the thread is active
2008-01-14 13:07:41 -08:00
Chris Robinson
a27b855a39 Make sure the stream is playing when it's full 2008-01-14 12:59:44 -08:00
Chris Robinson
1634b69faf Don't restart the stream right after preparing it
It needs to be filled, first
2008-01-14 12:51:36 -08:00
Chris Robinson
59fa1f90d5 Don't attempt to recover the ALSA stream when filling silence
Since it was just prepared, any error would likely mean bigger problems
2008-01-14 12:49:21 -08:00
Chris Robinson
aa453b4e9e Use Sleep instead of usleep 2008-01-11 14:55:35 -08:00
Chris Robinson
f8089d2026 Don't double-close a handle on error 2008-01-11 13:23:37 -08:00
Chris Robinson
40241b4e97 Don't attempt to open ALSA playback/capture if it didn't load 2008-01-11 13:00:30 -08:00
Chris Robinson
8553fb9e30 ALC_REFRESH is the number of updates per second 2008-01-06 01:14:09 -08:00
Chris Robinson
dd60366aec Fix the buffer size so ALSA doesn't multiply by the number of periods 2008-01-06 00:18:06 -08:00
Chris Robinson
017fc93307 Some non-mmap ALSA fixes 2008-01-05 05:33:54 -08:00
Chris Robinson
fcff17c567 Fallback to non-mmap access for ALSA if mmap isn't available 2007-12-30 02:09:39 -08:00
Chris Robinson
2e88a3d03b Check for the correct ALSA driver option name 2007-12-30 01:28:25 -08:00
Chris Robinson
8011ad97b5 Don't check explicitly against formats, but rather their byte/channel count 2007-12-26 23:29:32 -08:00
Chris Robinson
5f4659534a Store a persistant name string with the device struct 2007-12-14 08:51:45 -08:00
Chris Robinson
7ade93e38c Print an error when ALSA fails to open the audio device 2007-12-12 03:41:37 -08:00
Chris Robinson
0f3e13ed7c Use -Wextra instead of -W for extra warnings 2007-12-06 23:57:14 -08:00
Chris Robinson
7d068054e6 Use %zd for size_t types 2007-12-06 22:54:15 -08:00
Chris Robinson
18f05cc1d1 Prevent some ICC warnings 2007-12-06 22:49:23 -08:00