summaryrefslogtreecommitdiffstats
path: root/src/plugins/alsa/qalsaaudiooutput.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-251-20/+20
| | | | | | | | | | | This reverts commit 80d46e3a5f64ff2456c40bdba63b6d5c69a32cdd. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I5c64ffa120f916711e5cf01c828774f8456dec06 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Update commercial license headersTarja Sundqvist2021-01-271-20/+20
| | | | | | | | | | | | | | | | Updated header.COMM to files in tqtc-qtmultimedia. Examples, tests or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reaso for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4171 Change-Id: I86ebf7c3653b55983cefff246c0cb019cbcda8c4 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* QAlsaAudioOutput: leave IdleState as soon as there is data in the sourceCheng Sun2020-03-061-1/+1
| | | | | | | | | | | | | | | | | This fixes two bugs: - Once IdleState is entered (due to underflow), one would have to bring the state to ActiveState manually before the backend would start sending new data to ALSA. This behavior is unlike that of QPulseAudioOutput, for example, which will automatically transition out of IdleState once there is data present in the source device. - Whilst in IdleState the audio output would would mark bytes as being consumed from the source device, even though they were not actually being sent to ALSA. Change-Id: If5b4835df0f58b7b15f1800d3a0a1041f1ab845a Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* ALSA: Calculate buffer size based on min period timeVaL Doroshchuk2019-11-041-19/+15
| | | | | | | | | | | | | | | When defualt buffer size (100000us) and period time (20000us) are out of range, currently buffer size is computed with respect of either 2 or 4 chunks of maximum buffer time. Which is not enough. Fixing computing of buffer time based on minimum period time: How many minimum periods could fit in maximum suggested buffer time. Fixes: QTBUG-43256 Task-number: QTBUG-79526 Change-Id: I722e5145e3b6d323e306da420ec764db3575225f Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* ALSA: Don't check the device name in open()VaL Doroshchuk2017-12-051-3/+0
| | | | | | | | | | Each time when open() is called device name was checked for availability. Which could impact to performance especially for embedded devices. Also the check of device name is done while calling snd_pcm_open(). Task-number: QTBUG-63007 Change-Id: Ib0afe7326552968870f4ca95a7807ae8f704fd3f Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Alsa: Use QVarLengthArrayv5.8.0-beta1Friedemann Kleint2016-10-211-3/+4
| | | | | | | | | | | | | | Fix g++ / Clang warnings: alsaaudioinput.cpp: In member function 'qint64 QAlsaAudioInput::read(char*, qint64)': qalsaaudioinput.cpp:530:36: warning: variable length array 'buffer' is used [-Wvla] qalsaaudiooutput.cpp: In member function 'qint64 QAlsaAudioOutput::write(const char*, qint64)': qalsaaudiooutput.cpp:570:23: warning: variable length array 'out' is used [-Wvla] (variable length arrays being C99 features). Change-Id: Id5024af7a42dffb56fbbeda59e1fadb41c660e41 Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-301-27/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blacklisted a few functions in tst_QAudioInput. Conflicts: .qmake.conf src/plugins/avfoundation/camera/avfcameracontrol.mm src/plugins/avfoundation/camera/avfcameraservice.h src/plugins/avfoundation/camera/avfcameraservice.mm src/plugins/avfoundation/camera/avfcamerasession.h src/plugins/avfoundation/camera/avfcamerasession.mm src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.h src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm src/plugins/avfoundation/camera/avfimagecapturecontrol.mm src/plugins/avfoundation/camera/avfimageencodercontrol.mm src/plugins/avfoundation/camera/avfmediarecordercontrol.h src/plugins/avfoundation/camera/avfmediarecordercontrol.mm tests/auto/integration/qaudioinput/BLACKLIST Task-number: QTBUG-54459 Task-number: QTBUG-49736 Change-Id: I3a1fe8cef50b44d5c2785aaf4cf69fe3f16728e6
| * Fix use of -ESTRPIPE where it's not available in errnoRalf Nolden2016-06-291-1/+7
| | | | | | | | | | | | | | | | | | NetBSD does not have -ESTRPIPE, so use it only when defined. http://netbsd.gw.com/cgi-bin/man-cgi?errno+2+NetBSD-6.0 and https://mail-index.netbsd.org/pkgsrc-wip-discuss/2013/10/27/msg002529.html Change-Id: I92921a16fcae95f58a870aea98ca66f5a5d30a12 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * ALSA: improve handling of default device.Yoann Lopes2016-06-031-26/+8
| | | | | | | | | | | | | | | | | | | | - "default" is a valid argument for snd_pcm_open(), let ALSA handle that case rather than using the first device in the list. - Don't add "default" in the list of available devices if there is already one. Change-Id: Icd41aa6677923a79faf6c90d0627eedd8700b91b Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-101-0/+1
|\| | | | | | | | | | | | | Conflicts: src/plugins/winrt/qwinrtcameracontrol.cpp Change-Id: I45d3042adf19577a72794610fa1c310cb22e26c4
| * ALSA: Call snd_pcm_drain() on suspendStephen Hurd2016-04-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The ALSA plugin previously didn't suspend the ALSA device when the ::suspend() method is called. This results in underrun errors when it's resumed. In ALSA, stopping a pcm doesn't close it, so the ALSA stop/start functions map to the QAudioInput suspend/resume functions. Change-Id: I2507065a1b7472af29eef70c531b9f6e8e5b3072 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-211-2/+2
|\| | | | | | | Change-Id: Ieb1a3081907093e31e8c8b7f95993bb3b2173672
| * ALSA: simplify checking the available version.Lisandro Damián Nicanor Pérez Meyer2016-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | Make use of SND_LIB_VERSION instead of SND_LIB_[MAJOR MINOR SUBMINOR] in order to simplify the tests. Task-number: QTBUG-51681 Change-Id: Ib9f28ff15ddc643cc426ded3a5779fb4ff651139 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-1/+1
|\| | | | | | | Change-Id: I2e4e9cca01d63ed0d1e7f71c7a58322390696036
| * Alsa: fix QAudioOutput state after resume().Yoann Lopes2016-01-191-1/+1
| | | | | | | | | | | | | | | | | | In push mode, the state must be IdleState after resume(), and only change to ActiveState once it receives some data. Task-number: QTBUG-50390 Change-Id: Idd08d8826f00d943b3bf750524f811874e010149 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-191-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I324f65c61171f36641472964d095d72e452afb3a Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* alsa: Relax ALSA version checks for 1.1.x to be detected.Raphael Kubo da Costa2015-11-271-2/+2
| | | | | | | | | Relax the check for SND_LIB_MINOR and SND_LIB_SUBMINOR so that ALSA 1.1.x is not considered older than 1.0.10. QtMultimedia builds fine with ALSA 1.1. Change-Id: If697c34cc7d9bbe2f2a3413d0c25ac4de4e93b34 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Update copyright headersAntti Kokko2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I1c6faa4f59f8eca54f01ef20941fa60161dd7872 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Fix: static linking on Linux with both PulseAudio and Alsa pluginsGabriel Hege2014-12-221-5/+5
| | | | | | | | | | | Fixed multiply defined symbols when linking statically with both PulseAudio and Alsa plugins enabled: The private classes In/OutputPrivate had identical names and have been renamed. Change-Id: I9415beeeed9fb0e14ead3f0ab906f343b3934341 Task-number: QTBUG-43514 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Sergio Ahumada2014-09-261-1/+1
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Iad73368a22c6d4662188e6f357a265d0c26756d0
| * Fix integer overflow in several audio plugins.Yoann Lopes2014-09-091-1/+1
| | | | | | | | | | | | Task-number: QTBUG-40804 Change-Id: If006cb7db319bb6fda4ce7eb4f907e897b5d9efa Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-241-19/+11
|/ | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Ied06887225df341064c12bcc14c259ae74116f2e Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* QAlsaAudioOutput remove async callback.Dyami Caliri2014-07-041-29/+1
| | | | | | | | | | The async callback mechanism in ALSA is prone to deadlock. There was already a timer fallback mechanism that appears to be sufficient. Task-number: QTBUG-39677 Change-Id: I44b59e6b16eea1c9c4eeb6967335ce4f468cf3c4 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Move win32 and Alsa audio backends into plugins.Christian Strømme2014-01-301-0/+860
Change-Id: I9835cf5ee97900569f26421a19543b485e933051 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>