summaryrefslogtreecommitdiff
path: root/channels/chan_alsa.c
AgeCommit message (Collapse)Author
2007-11-16Start untangling header inclusion in a way that does not affectLuigi Rizzo
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵Jason Parker
didn't make much sense git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19Convert NEW_CLI to AST_CLI.Jason Parker
Closes issue #11039, as suggested by seanbright. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-27Merged revisions 83974 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r83974 | kpfleming | 2007-09-26 16:53:03 -0700 (Wed, 26 Sep 2007) | 2 lines avoid the weird usage of assert() in the ALSA header files that gcc 4.2 wants to complain about ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18(issue #10724)Jason Parker
Reported by: eliel Patches: res_features.c.patch uploaded by eliel (license 64) res_agi.c.patch uploaded by seanbright (license 71) res_musiconhold.c.patch uploaded by seanbright (license 71) pbx.c.patch uploaded by moy (license 222) logger.c.patch uploaded by moy (license 222) frame.c.patch uploaded by moy (license 222) manager.c.patch uploaded by moy (license 222) http.c.patch uploaded by moy (license 222) dnsmgr.c.patch uploaded by moy (license 222) res_realtime.c.patch uploaded by eliel (license 64) res_odbc.c.patch uploaded by seanbright (license 71) res_jabber.c.patch uploaded by eliel (license 64) chan_local.c.patch uploaded by eliel (license 64) chan_agent.c.patch uploaded by eliel (license 64) chan_alsa.c.patch uploaded by eliel (license 64) chan_features.c.patch uploaded by eliel (license 64) chan_sip.c.patch uploaded by eliel (license 64) RollUp.1.patch (includes all of the above patches) uploaded by seanbright (license 71) Convert many CLI commands to the NEW_CLI format. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17convert various places that access the channel lock directly to use the ↵Russell Bryant
channel lock wrappers git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16Don't reload a configuration file if nothing has changed.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08Add support for using epoll instead of poll. This should increase ↵Joshua Colp
scalability and is done in such a way that we should be able to add support for other poll() replacements. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26Do a massive conversion for using the ast_verb() macroRussell Bryant
(closes issue #10277, patches by mvanbaak) Basically, this changes ... if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3, "Something\n"); to ... ast_verb(3, "Something\n"); git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Add a massive set of changes for converting to use the ast_debug() macro.Russell Bryant
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-14Merged revisions 64306 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r64306 | russell | 2007-05-14 14:13:00 -0500 (Mon, 14 May 2007) | 3 lines Properly handle AST_CONTROL_PROGRESS by just ignoring it. An unknown indication will trigger an error and cause sounds to stop, which in this case, is ringing. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-10Merged revisions 60989 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r60989 | murf | 2007-04-09 12:32:07 -0600 (Mon, 09 Apr 2007) | 1 line This is a big improvement over the current CDR fixes. It may still need refinement, but this won't have as many folks bothered. This also adds the mods from 1.4/r.61136; ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-26Merged revisions 56888 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r56888 | russell | 2007-02-26 14:42:21 -0600 (Mon, 26 Feb 2007) | 4 lines Restore the behavior of Asterisk 1.2 where if a device was not specified in alsa.conf, then we just use the system default, instead of creating our own default of hw:0,0. (issue #9139) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-23Merged revisions 51788 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r51788 | file | 2007-01-23 17:46:31 -0500 (Tue, 23 Jan 2007) | 2 lines Update channel drivers to use module referencing so that unloading them while in use will not result in crashes. (issue #8897 reported by junky) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-19Merged revisions 51311 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r51311 | russell | 2007-01-19 11:49:38 -0600 (Fri, 19 Jan 2007) | 23 lines Merge the changes from the /team/group/vldtmf_fixup branch. The main bug being addressed here is a problem introduced when two SIP channels using SIP INFO dtmf have their media directly bridged. So, when a DTMF END frame comes into Asterisk from an incoming INFO message, Asterisk would try to emulate a digit of some length by first sending a DTMF BEGIN frame and sending a DTMF END later timed off of incoming audio. However, since there was no audio coming in, the DTMF_END was never generated. This caused DTMF based features to no longer work. To fix this, the core now knows when a channel doesn't care about DTMF BEGIN frames (such as a SIP channel sending INFO dtmf). If this is the case, then Asterisk will not emulate a digit of some length, and will instead just pass through the single DTMF END event. Channel drivers also now get passed the length of the digit to their digit_end callback. This improves SIP INFO support even further by enabling us to put the real digit duration in the INFO message instead of a hard coded 250ms. Also, for an incoming INFO message, the duration is read from the frame and passed into the core instead of just getting ignored. (issue #8597, maybe others...) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06Constify a bunch of usage strings for CLI commands.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07A fair number of changes for the sake of bug 7506Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-03remove useless usecnt stuffLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25Merged revisions 46200 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46200 | kpfleming | 2006-10-25 09:32:08 -0500 (Wed, 25 Oct 2006) | 2 lines apparently developers are still not aware that they should be use ast_copy_string instead of strncpy... fix up many more users, and fix some bugs in the process ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04Merged revisions 44378 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r44378 | kpfleming | 2006-10-04 14:47:22 -0500 (Wed, 04 Oct 2006) | 4 lines update thread creation code a bit reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03bug #8076 check option_debug before printing to debug channel.Matt O'Gorman
patch provided in bugnote, with minor changes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21Clean up chan_alsa load module function (issue #8000 reported by Mithraen)Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21Lots more removal of deprecated thingsTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18merge qwell's CLI verbification workKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08Formatting fixes for chan_alsa (issue #7807 reported by Mithraen with more ↵Joshua Colp
mods done by myself) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla ↵Joshua Colp
Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21merge new_loader_completion branch, including (at least):Kevin P. Fleming
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16move the calls to ast_jb_configure() to before the PBX thread is started on theRussell Bryant
channel to remove the theoretical race condition that the channel could get bridged before the channel's jitterbuffer gets configured. This was pointed out by PCadach on IRC. Thanks! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19merge Russell's 'hold_handling' branch, finally implementing music-on-hold ↵Kevin P. Fleming
handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23revert my changes that converted the jb on the channel to be dynamicallyRussell Bryant
allocated. These changes caused crashes when using a channel type that did not support the jitterbuffer. Instead of fixing why it's crashing, I'm going to implement this in a better way next week. The way I did it caused a jitterbuffer to be allocated on every channel where the channel type supported jitterbuffers, even if they were disabled. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22- dynamically allocate the ast_jb structure that is on the channel structureRussell Bryant
so that channels not using a jitterbuffer don't waste as much memory - ensure that the channel drivers that use jitterbuffers can handle a failure from configuring a jitterbuffer on a new channel because of a memory allocation error - On passing through these channel drivers, configure the jitterbuffer before starting the PBX thread instead of afterwards. If the pbx fails to start for whatever reason, this would have caused a crash. - Also on passing, move the increase of the usecount to after all of the possible failure conditions in the function - fix a place where ast_update_use_count() was not called - ensure that the owner channel pointer of the channel pvt strcutures is set to NULL in failure conditions git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵Kevin P. Fleming
again :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31move the includes of abstract_jb.h to be with the rest of the asterisk includes.Russell Bryant
These used to be wrapped in a #ifdef git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31Add support for using a jitterbuffer for RTP on bridged calls. This includesRussell Bryant
a new implementation of a fixed size jitterbuffer, as well as support for the existing adaptive jitterbuffer implementation. (issue #3854, Slav Klenov) Thank you very much to Slav Klenov of Securax and all of the people involved in the testing of this feature for all of your hard work! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10ensure that control frames with payload can be sent to channel drivers via ↵Kevin P. Fleming
->indicate() update iax2_indicate to pass control frame payload to the connected channel add an API call for sending an indication with payload, and use it for control frames with payload git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have ↵Kevin P. Fleming
autoconf and menuselect tools for Asterisk! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17more module loader related fixesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08since the module API is changing, it's a good time to const-ify the ↵Kevin P. Fleming
description() and key() return values git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01use string fields for some stuff in ast_channelKevin P. Fleming
const-ify some more APIs remove 'type' field from ast_channel, in favor of the one in the channel's tech structure allow string field module users to specify the 'chunk size' for pool allocations update chan_alsa to be compatible with recent const-ification patches git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20Change chan_alsa to default open the first sound card deviceMatthew Fredrickson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11convert some channels to use the memory allocation wrappers.Russell Bryant
(This is being added to the janitor projects list.) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30update doxygen docs to specify authorsRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21Merged revisions 7582 via svnmerge fromTilghman Lesher
/branches/1.2 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29remove extraneous svn:executable propertiesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-15issue #5672Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-06issue #5605Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-27Remove unnecessary checks before calls to ast_strlen_zero. Also, changeRussell Bryant
some places where strlen is used instead of ast_strlen_zero git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-24Doxygen documentation update from oej (issue #5505)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-16Make alsa/oss ignore VIDUPDATE control framesMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-14update MANY more files with proper copyright/license info (thanks Ian!)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6596 65c4cc65-6c06-0410-ace0-fbb531ad65f3