summaryrefslogtreecommitdiffstats
path: root/src/modules/module-alsa-sink.c
Commit message (Collapse)AuthorAgeFilesLines
* use pa_source_set_latency_range()/pa_sink_set_latency_range() in the ALSA ↵Lennart Poettering2008-05-171-5/+6
| | | | | | drivers; fix sleep time calculation git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2459 fefdeb5f-60dc-0310-8127-8f9354f1896f
* merge glitch-free branch back into trunkLennart Poettering2008-05-151-279/+800
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Rework ALSA mixer channel detection code. This time we actually care about ↵Lennart Poettering2007-11-131-22/+30
| | | | | | the channel names the ALSA mixer exports for us git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2055 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Completely rework ALSA device selection code: choose the device to open ↵Lennart Poettering2007-11-131-47/+38
| | | | | | depending on the requested number of channels and channel map. In most cases it will now suffice to set default-channels=6 to enable 5.1 sound for all devices that support it git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2050 fefdeb5f-60dc-0310-8127-8f9354f1896f
* tag modules that may only be loaded once at most especially, and enforce ↵Lennart Poettering2007-11-091-4/+5
| | | | | | that in the module loader git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2043 fefdeb5f-60dc-0310-8127-8f9354f1896f
* make rtprio and nice level actually configurableLennart Poettering2007-11-011-2/+2
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2014 fefdeb5f-60dc-0310-8127-8f9354f1896f
* merge 'lennart' branch back into trunk.Lennart Poettering2007-10-281-277/+677
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Handle suspended alsa devices. Based on patch by ranma. (closes #26)Pierre Ossman2007-03-021-0/+38
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1433 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Handle when ALSA tweaks our sample spec so much that the frame size changes.Pierre Ossman2007-03-011-1/+8
| | | | | | | (closes #57). git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1431 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Add copyright notices to all relevant files. (based on svn log)Pierre Ossman2007-02-131-0/+3
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Huge trailing whitespace cleanup. Let's keep the tree pure from here on,Pierre Ossman2007-01-041-27/+27
| | | | | | | mmmkay? git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Revert r1404 and keep it on a development branch until it is fully tested.Pierre Ossman2006-11-061-12/+2
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1409 fefdeb5f-60dc-0310-8127-8f9354f1896f
* rework memory block management to be thread-safe and mostly lock-free.Lennart Poettering2006-09-261-2/+12
| | | | | | | | | | | | | | | | | | | | | pa_memblock is now an opaque structure. Access to its fields is now done through various accessor functions in a thread-safe manner. pa_memblock_acquire() and pa_memblock_release() are now used to access the attached audio data. Why? To allow safe manipulation of the memory pointer maintained by the memory block. Internally _acquire() and _release() maintain a reference counter. Please do not confuse this reference counter whith the one maintained by pa_memblock_ref()/_unref()! As a side effect this patch removes all direct usages of AO_t and replaces it with pa_atomic_xxx based code. This stuff needs some serious testing love. Especially if threads are actively used. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1404 fefdeb5f-60dc-0310-8127-8f9354f1896f
* remove all occurences of Lennart Poettering2006-08-181-19/+19
| | | | | | | | | | | | pa_logXXX(__FILE__": and replace them by pa_logXXX(" git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1272 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Rework memory management to allow shared memory data transfer. The central ideaLennart Poettering2006-08-181-1/+1
| | | | | | | | | | | | | | | is to allocate all audio memory blocks from a per-process memory pool which is available as read-only SHM segment to other local processes. Then, instead of writing the actual audio data to the socket just write references to this shared memory pool. To work optimally all memory blocks should now be of type PA_MEMBLOCK_POOL or PA_MEMBLOCK_POOL_EXTERNAL. The function pa_memblock_new() now generates memory blocks of this type by default. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1266 fefdeb5f-60dc-0310-8127-8f9354f1896f
* make use of pa_sink_used_by()/pa_source_used_by() wherever applicableLennart Poettering2006-08-121-3/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1227 fefdeb5f-60dc-0310-8127-8f9354f1896f
* generate default sink/source names from the device files they belong toLennart Poettering2006-08-121-2/+14
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1223 fefdeb5f-60dc-0310-8127-8f9354f1896f
* don't set the sink/source descriptions manually, use the new functions ↵Lennart Poettering2006-08-111-2/+4
| | | | | | pa_{sink,source}_set_description() instead git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1205 fefdeb5f-60dc-0310-8127-8f9354f1896f
* shorten sink/source device descriptions a littleLennart Poettering2006-08-111-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1201 fefdeb5f-60dc-0310-8127-8f9354f1896f
* ALSA: handle write()/read() errors properly by unloading the driver module. ↵Lennart Poettering2006-08-111-26/+52
| | | | | | This should fix problems when removing USB audio device while pulseaudio is running. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1194 fefdeb5f-60dc-0310-8127-8f9354f1896f
* try to reduce volume updates in the ALSA sinks/sources: only touch the ↵Lennart Poettering2006-08-071-13/+19
| | | | | | shadowed hw volme if necessary git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1189 fefdeb5f-60dc-0310-8127-8f9354f1896f
* set is_hardware flag for a few hw pluginsLennart Poettering2006-07-161-0/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1092 fefdeb5f-60dc-0310-8127-8f9354f1896f
* fix segfault when module-alsa-source fails to loadLennart Poettering2006-06-201-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1049 fefdeb5f-60dc-0310-8127-8f9354f1896f
* big s/polyp/pulse/gLennart Poettering2006-06-191-13/+13
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1033 fefdeb5f-60dc-0310-8127-8f9354f1896f
* * alsa-sink: if "PCM" is not found as mixer track name, fallback to "Master"Lennart Poettering2006-05-301-1/+1
| | | | | | | * alsa-source: if "Capture" is not found as mixer track name, fallback to "Mic" git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@993 fefdeb5f-60dc-0310-8127-8f9354f1896f
* * if an ALSA device doesn't support the channel count requested, use what ↵Lennart Poettering2006-05-301-3/+10
| | | | | | | | | | ALSA suggests instead * if an ALSA device doesn't support the sampling freq requested, use what ALSA suggests and resample if this deviates more than 10% from what we requested * fix segfault freeing an unitialized mixer_fdl field git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@992 fefdeb5f-60dc-0310-8127-8f9354f1896f
* split polypcore/util.[ch] into polypcore/core-util.[ch] and polyp/util.[ch]Lennart Poettering2006-05-171-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@917 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Move xmalloc to the public side (libpolyp).Pierre Ossman2006-05-171-1/+2
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@908 fefdeb5f-60dc-0310-8127-8f9354f1896f
* * modify pa_channel_map_init_auto() to take an extra argument specifying the ↵Lennart Poettering2006-05-161-13/+2
| | | | | | | | | standard to use (ALSA, AIFF, ...) * add some more validity checks to pa_source_new(),pa_sink_new(),pa_sink_input_new(),pa_source_output_new() git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@888 fefdeb5f-60dc-0310-8127-8f9354f1896f
* remove superfluous log lineLennart Poettering2006-05-141-2/+0
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@864 fefdeb5f-60dc-0310-8127-8f9354f1896f
* * set default fragment metrics depending on the sample specs of the device ↵Lennart Poettering2006-05-131-3/+7
| | | | | | | | | in OSS and ALSA * fix fragment size calculation in module-alsa-sink git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@855 fefdeb5f-60dc-0310-8127-8f9354f1896f
* use default alsa channel map for alsa devicesLennart Poettering2006-05-131-1/+13
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@851 fefdeb5f-60dc-0310-8127-8f9354f1896f
* When a control is removed, all bits are set so we need to test for that first.Pierre Ossman2006-04-281-0/+3
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@819 fefdeb5f-60dc-0310-8127-8f9354f1896f
* support new channel_map argument in sink/source modulesLennart Poettering2006-04-261-3/+13
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@803 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Fall back to software volume if hardware mixer cannot control all channels.Pierre Ossman2006-04-251-37/+27
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@796 fefdeb5f-60dc-0310-8127-8f9354f1896f
* clip volume at PA_VOLUME_NORM for alsa devicesLennart Poettering2006-04-081-2/+13
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@666 fefdeb5f-60dc-0310-8127-8f9354f1896f
* minor cleanupsLennart Poettering2006-04-071-4/+6
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@659 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Fix some warnings caused by size_t having varying size.Pierre Ossman2006-03-311-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@641 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Fetch sound card name into sink/source description.Pierre Ossman2006-03-051-1/+11
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@631 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Tried to get the volume information even upon init failure.Pierre Ossman2006-03-051-4/+4
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@626 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Get notifications about mixer changes from ALSA.Pierre Ossman2006-02-261-6/+38
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@607 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Handle ALSA file descriptors more correctly. This means a bit more overhead,Pierre Ossman2006-02-261-8/+9
| | | | | | | but following their API properly should avoid problems in the future. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@606 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Hardware volume support in ALSA modules.Pierre Ossman2006-02-261-0/+140
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@604 fefdeb5f-60dc-0310-8127-8f9354f1896f
* change pa_log() and friends to not require a trailing \n on all logged stringsLennart Poettering2006-02-231-11/+11
| | | | git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@574 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Cleaned up the includes after the restructuring. Indicate which headers arePierre Ossman2006-02-171-1/+1
| | | | | | | public and which are internal through <> vs "". git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@500 fefdeb5f-60dc-0310-8127-8f9354f1896f
* move alsa-util.[ch], oss-util.[ch] and howl-wrap.[ch] to the modules ↵Lennart Poettering2006-02-161-1/+1
| | | | | | directory since they are just helper source used exclusively by the modules git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@489 fefdeb5f-60dc-0310-8127-8f9354f1896f
* Reorganised the source tree. We now have src/ with a couple of subdirs:Pierre Ossman2006-02-161-0/+292
* daemon/ - Contains the files specific to the polypaudio daemon. * modules/ - All loadable modules. * polyp/ - Files that are part of the public, application interface or are only used in libpolyp. * polypcore/ - All other shared files. * tests/ - Test programs. * utils/ - Utility programs. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@487 fefdeb5f-60dc-0310-8127-8f9354f1896f