summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release v1.0.29v1.0.29baserock/v1.0.29Jaroslav Kysela2015-02-261-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: fix some variable constness issuesTanu Kaskinen2015-02-172-16/+18
| | | | | | | | | | | | | I submitted earlier a patch that made the value parameter of snd_use_case_get() non-const, but as that changed the public API, the patch couldn't be accepted. This is the same patch, modifying the internal code so that there are fewer issues with constness, but the public API is left alone (a comment was added to the function documentation, though, so that hopefully nobody else will try to fix the same unfixable problem). Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: fix the logic of choosing the default cdevTanu Kaskinen2015-02-171-11/+23
| | | | | | | | | | | | | If the cdev has not been configured explicitly, use the PlaybackCTL or CaptureCTL value if one of them is set. If neither are set, or if both are set to different values, then there's no sensible default, so executing the sequence should fail. The previous code probably tried to implement this logic, but it was buggy. Also use more descriptive variable names than "cdev1" and "cdev2". Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: fix incorrect error code signTanu Kaskinen2015-02-171-2/+2
| | | | | | Reported-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* .gitignore: add test-driverTanu Kaskinen2015-02-161-0/+1
| | | | | Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: fix variable mixupTanu Kaskinen2015-02-111-1/+1
| | | | | | | | I assume the intention was to use cdev1 for PlaybackCTL and cdev2 for CaptureCTL, but cdev1 was being used for both and cdev2 was not used for anything. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* control: complement comment for subscribe APITakashi Sakamoto2015-02-091-1/+1
| | | | | | | | | | When minus value is given as a parameter, the API returns whether the caller has already subscribed or not. This commit adds a comment about this so as better documentation. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* conf: add support for USB AudioSport Quattro (tm)Alexander E. Patrakov2015-02-011-0/+1
| | | | | | | | | | | | This patch resulted from discussion with redlion_ on #alsa IRC channel on Freenode. 4-channel playback now works. 4-channel capture works too, but not simultaneously with playback (hardware limitation). Alsa-info before the fix: http://www.alsa-project.org/db/?f=a3673622074b88a1abf4ccc6e7f37d0b5b72f34a Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Remove unused hostname resolution in shm plugins and aserverTakashi Iwai2015-01-285-175/+6
| | | | | | | | | | | | | PCM and control shm plugins and aserver have some codes to resolve the host address and check whether it's a local host although the given address is never used. In addition, the code contains gethostbyname() that is known to be obsoleted. So, let's get rid of all these unused codes. The host configuration item is still accepted (but just ignored) for keeping the compatibility. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: add binary configure file parseLu, Han2015-01-233-3/+73
| | | | | | | | | | | | | | | | with cset command, UCM set kcontrol parameters directly: cset "name='<KCONTROL_NAME>' 1<,2,3,...>" This patch enables UCM to set kcontrol with parameters from configure file: cset-bin-file "name='<KCONTROL_NAME>' <path/to/file>" where "cset-bin-file" is a newly added keyword alongside of "cset", to indicate cset with binary data in file. The binary data in file is parameter for audio DSPs, and it's just passed by UCM/ALSA as raw data. The data type of parameter elements must be byte, and the count must matches driver definition. Signed-off-by: Lu, Han <han.lu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* conf/ucm: GoogleNyan: Add configurationTomeu Vizoso2015-01-195-1/+88
| | | | | | | | | Taken from the ChromeOS sources, this configuration should apply to all Nyan boards from Google, so far HP Chromebook 14 (nyan-blaze) and Acer Chromebook 13 (nyan-big). Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* autotools: fix ucm partial buildMatthieu Crapet2015-01-141-2/+6
| | | | | | | | When --disable-ucm configure option is specified, don't install related include file. Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* control: enable octal and hexadecimal parseLu, Han2015-01-141-2/+2
| | | | | | | | Use zero-base for strtol(), so get_integer() and get_integer64() can parse decimal, octal and hexadecimal data from input string. Signed-off-by: Lu, Han <han.lu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: fix buffer overflow in snd_pcm_chmap_print()Anssi Hannula2014-12-311-1/+1
| | | | | | | | | | | The size argument is wrong for one of the snprintf() calls in snd_pcm_chmap_print(), allowing an overflow to happen (the user-provided buffer may be written data up to 2x its actual size). Seen in an user report here: http://trac.kodi.tv/ticket/15641 Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* hwdep: add OXFW driver supportTakashi Sakamoto2014-12-102-2/+4
| | | | | | | | | Linux 3.19 newly support this driver. By hardware dependent interface, userspace applications can get hardware information, lock/unlock kernel streaming and receive lock status event. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: Fix assorted tstamp_type bugs/omissions.Tim Cussins2014-11-251-2/+3
| | | | | | | | | | Just a couple of quick fixes related to tstamp_type. - snd_pcm_sw_params(): copy tstamp_type field - snd_pcm_tstamp_type_name(): fix argument type - snd_pcm_dump_sw_setup(): fix dumping of tstamp_type field Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: Fix uninitialized err in snd_use_case_set()Takashi Iwai2014-11-211-2/+2
| | | | | | | | | | | The compiler warns like: main.c:1664:9: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized] and actually there are slight code paths that slip. This patch adds the proper initializations to 0 to return the success code in these code paths. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: Fix unused parameter warningsTakashi Iwai2014-11-211-3/+3
| | | | | | | | | | | | | | mixer_simple.h:35:64: warning: unused parameter 'mixer' [-Wunused-parameter] static inline int snd_mixer_simple_basic_register(snd_mixer_t *mixer, ^ mixer_simple.h:36:40: warning: unused parameter 'options' [-Wunused-parameter] struct snd_mixer_selem_regopt *options, ^ mixer_simple.h:37:29: warning: unused parameter 'classp' [-Wunused-parameter] snd_mixer_class_t **classp) ^ Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: Fix inclusion of config.hTakashi Iwai2014-11-212-1/+2
| | | | | | config.h wasn't read or read too late in some files in src/mixer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: Fix DSD sample format endianess and add big-endian formatJussi Laako2014-11-214-5/+26
| | | | | | | | This patch adds big-endian DSD sample format and fixes return value of DSD formats for snd_pcm_format_little_endian(). Signed-off-by: Jussi Laako <jussi@sonarnerd.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* USB-audio: Add five more cards to IEC958 blacklistDavid Henningsson2014-11-171-0/+5
| | | | | | | | These devices do not have any IEC958 outputs, so prevent them from being opened. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* dlmisc: Remove unused labelTakashi Iwai2014-11-161-1/+0
| | | | | | | Fix a compile warning dlmisc.c:329:2: warning: label 'unlock' defined but not used [-Wunused-label] Signed-off-by: Takashi Iwai <tiwai@suse.de>
* snd_dlsym: only do versioning checks if built --with-versioningJohn Spencer2014-11-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | a combination of some of the following garbage collecting LD/CFLAGS -Os -g0 -fdata-sections -ffunction-sections -s -Wl,--gc-sections -fno-unwind-tables -fno-asynchronous-unwind-tables causes the symbol versioning marker symbols to be removed from BSS since they're otherwise unreferenced. this causes dlsym failing to find them which results in runtime breakage: $ alsamixer ALSA lib dlmisc.c:142:(snd_dlsym_verify) unable to verify version for symbol snd_config_hook_load ALSA lib conf.c:3328:(snd_config_hooks_call) symbol snd_config_hook_load is not defined inside (null) ALSA lib conf.c:3788:(snd_config_update_r) hooks failed, removing configuration cannot open mixer: No such device or address correct DSO: $ objdump -T libasound.so.2.strip | grep _snd_config_hook_load_dlsym_config_hook_001 001196bc g DO .bss 00000001 _snd_config_hook_load_dlsym_config_hook_001 incorrect DSO: $ objdump -T libs/libasound.so.2 | grep _snd_config_hook_load_dlsym_config_hook_001 00000000 g DO *ABS* 00000001 _snd_config_hook_load_dlsym_config_hook_001 since alsa was built with --without-versioning, doing those versioning checks at all is unnecessary and harmful and thus now disabled in this case. Signed-off-by: John Spencer <maillist-alsa@barfooze.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: dmix: Don't ignore SND_TIMER_EVENT_MSTOPTakashi Iwai2014-11-061-0/+1
| | | | | | | | | When a slave PCM gets an error like XRUN, it stops and notifies with SND_TIMER_EVENT_MSTOP event. But the current code filters out this type and eventually hang due to the empty timer queue. The fix is to just add this event type to the filter bit mask. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* snd_user_file: fix memory leakAndreas Schwab2014-11-031-2/+3
| | | | | | | Call wordfree if and only if wordfree returns zero or WRDE_NOSPACE Signed-off-by: Andreas Schwab <schwab@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* USB-Audio: Add Scarlett 2i4 USB to S/PDIF blacklistPanu Matilainen2014-11-031-0/+1
| | | | | | | Like Scarlett 2i2, the 2i4 does not have any S/PDIF connections. Signed-off-by: Panu Matilainen <pmatilai@laiskiainen.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* conf/ucm: PAZ00: add Toshiba AC100/Dynabook AZ new configzombah2014-10-076-1/+155
| | | | | | | | | | | Recent mainline kernels threat Toshiba AC100 audio hardware as hw:PAZ00 vs old hw:tegraalc5632. This patch adds config files for new hw name and include them to makefiles. Signed-off-by: zombah <zombah@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: Fix missing hctl handle free in snd_mixer_attach_hctl()Takashi Iwai2014-09-231-1/+5
| | | | | | | | | Yet another missing piece. Also, update the function document to warn about the behavior at error. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: return negative value in case of errorRenu Tyagi2014-09-231-0/+1
| | | | | Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* control: return negative value in case of errorRenu Tyagi2014-09-231-0/+1
| | | | | Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* conf: return negative value in case of errorRenu Tyagi2014-09-231-0/+1
| | | | | Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm_hooks: null check for hRenu Tyagi2014-09-231-1/+2
| | | | | Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* socket: missing socket closeRenu Tyagi2014-09-231-2/+7
| | | | | Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* simple_abst: null check for libRenu Tyagi2014-09-231-0/+2
| | | | | Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm_share: fixing missing mutex unlockRenu Tyagi2014-09-231-0/+2
| | | | | Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* rawmidi: close handle hRenu Tyagi2014-09-231-1/+4
| | | | | Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sbase: fixed missing freeRenu Tyagi2014-09-231-0/+1
| | | | | Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm_file: fixed missing freeRenu Tyagi2014-09-231-0/+2
| | | | | Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: fixed double freeRenu Tyagi2014-09-231-3/+1
| | | | | Signed-off-by: renu tyagi <renu.tyagi@samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* hwdep: add missing declaration for snd_hwdep_poll_descriptors_count()Takashi Sakamoto2014-09-171-0/+1
| | | | | | | | | | | The alsa-lib has 'snd_hwdep_poll_descriptors_count()' but hwdep.h has no declaration for the function. No applications can call the function just by including the header. This commit adds a line to the file for this function. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm, rate: hw_avail must not be negative before starting the streamAlexander E. Patrakov2014-09-161-1/+4
| | | | | | | | If it is, then it means most likely the driver problem, so we should return error immediately instead. Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm route: Fix the bad condition (always false)Jaroslav Kysela2014-09-161-1/+1
|
* Revert "pcm: rewindable, forwardable: don't return stale data"Jaroslav Kysela2014-09-146-32/+0
| | | | This reverts commit 6db0fe495ef1db1fd8f0ed791996f834665a926b.
* pcm, file: don't recurse in the rewindable and forwardable callbacksAlexander E. Patrakov2014-09-131-2/+2
| | | | | Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm: rewindable, forwardable: don't return stale dataAlexander E. Patrakov2014-09-136-0/+32
| | | | | | | | | | The current behavior of snd_pcm_rewindable and snd_pcm_forwardable means that the returned value is only accurate to one period. Or maybe even meaningless if period interrupts are off. Fetch the up-to-date position of the hardware pointer, as that's what is wanted by callers. Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* dsnoop: rewindable and forwardable logic was swappedAlexander E. Patrakov2014-09-131-4/+2
| | | | | Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* rate: handle negative values from snd_pcm_mmap_playback_hw_availAlexander E. Patrakov2014-09-131-2/+2
| | | | | | | | | | | Such negative returns are possible during an underrun if xrun detection is disabled. So, don't store the result in an unsigned variable (where it will overflow), and postpone the trigger in such case, too. Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm, null: use the snd_pcm_mmap_avail functionAlexander E. Patrakov2014-09-131-4/+1
| | | | | | | instead of the open-coded equivalent Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm, rate: use the snd_pcm_mmap_hw_avail functionAlexander E. Patrakov2014-09-131-4/+1
| | | | | | | instead of the open-coded equivalent Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm: handle negative values from snd_pcm_mmap_hw_availAlexander E. Patrakov2014-09-136-7/+23
| | | | | | | | | | | | | | Such negative values can happen when an underrun happens and xrun detection is disabled. Another situation is if the device updated the pointer before alsa-lib has a chance to detect the xrun. The problem is that these negative values could propagate to the snd_pcm_rewindable return value, where it is specified that negative returns must be interpreted as error codes and not as negative amount of samples. Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>