OSDN Git Service
Takashi Iwai [Tue, 11 Sep 2012 10:48:46 +0000 (12:48 +0200)]
PCM: Add snd_pcm_chmap_long_name()
Just return a more verbose name than snd_pcm_chmap_name(), but
including white spaces.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 11 Sep 2012 09:33:31 +0000 (11:33 +0200)]
PCM: Add SND_CHMAP_API_VERSION definition
Just to make it easier for apps to support chmap conditionally via
simple ifdefs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 10 Sep 2012 16:07:36 +0000 (18:07 +0200)]
PCM: Add string conversion helper functions for chmap
Added a few helper functions between chmap and string.
snd_pcm_chmap_type_name() -- a string of the given chmap type
snd_pcm_chmap_name() -- a string of the given channel position
snd_pcm_chmap_print() -- print channel map on the given buffer
snd_pcm_chmap_from_string() -- get a channel position from string
snd_pcm_parse_string() -- parse the whole channel map from string
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 10 Sep 2012 14:59:36 +0000 (16:59 +0200)]
PCM: Fix prefix for snd_pcm_chmap_type enum members
Add _TYPE prefix to distinguish from the channel position.
Also add SND_CHMAP_TYPE_LAST entry pointing the last one like other
enums.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 7 Sep 2012 12:31:39 +0000 (14:31 +0200)]
Fix duplicated channel entry in test/chmap.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 7 Sep 2012 12:15:04 +0000 (14:15 +0200)]
PCM: Implement snd_pcm_query_chmaps_from_hw()
This is a function similar like snd_pcm_query_chmaps() but performs
the query without a PCM handle. The card, device and substream
numbers are passed as well as stream direction.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 4 Sep 2012 15:26:43 +0000 (17:26 +0200)]
PCM: Introduce snd_pcm_chmap_t and snd_pcm_chmap_query_t
Instead of passing ambiguous integer array, define snd_pcm_chmap_t and
snd_pcm_chmap_query_t so that user can understand more easily which
element is for what.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 31 Aug 2012 20:53:22 +0000 (13:53 -0700)]
Add SND_CHMAP_NA and bit flag definitions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 21 Aug 2012 13:07:44 +0000 (15:07 +0200)]
Follow channel position definitions to mixer channel in mixer.h
mixer.h already contains some channel position definitions.
To be more consistent over all systems, better to follow the same
order for the new channel map, too. But since UNKNOWN channel must be
zero but the definition in mixer.h contains -1 as UNKNOWN, simply
shift the value with 1.
If the conversion is required between SND_CHMAP and SND_MIXER_SCHN,
just increment/decrement 1. Eventually I'll provide helper functions
for that...
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 21 Aug 2012 10:16:39 +0000 (12:16 +0200)]
Define channel map position enum in pcm.h
The original definition is in sound/asound.h, but we need to export to
alsa-lib users, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jul 2012 16:21:43 +0000 (18:21 +0200)]
Cache the chmap operation errors
... not to retry the same error again.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 30 Jul 2012 13:50:44 +0000 (15:50 +0200)]
Add test/chmap program
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 25 Jul 2012 13:54:45 +0000 (15:54 +0200)]
Implement get_chmap/set_chmap for PCM extplug/ioplug plugins
Added the new ops for both external plugins, so the protocol numbers
are incremented.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 25 Jul 2012 13:36:16 +0000 (15:36 +0200)]
Implement get_chmap/set_chmap for PCM plug, route and multi plugins
Still incomplete implementations. The query and set ops are missing
for route and multi plugins.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 25 Jul 2012 13:05:15 +0000 (15:05 +0200)]
Implement the channel mapping API
Added new channel-mapping API functions.
Not all plugins are covered, especially the route, multi and external
plugins don't work yet.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Thu, 6 Sep 2012 08:55:14 +0000 (10:55 +0200)]
Release v1.0.26
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Thu, 6 Sep 2012 08:53:14 +0000 (10:53 +0200)]
doc: Use 'rm -rf' for the html doxygen tree (it contains search/ dir now)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Reilly Grant [Tue, 6 Dec 2011 02:05:42 +0000 (18:05 -0800)]
PCM: plug: Move fast_ops copy after slave configuration.
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
The plug plugin copies the fast_ops structure and fast_op_arg from its
slave PCM on initialization and after inserting a new plugin. This works
unless the slave PCM is also an instance of the plug plugin because plug
can change its fast_ops structure during _snd_pcm_hw_params.
Instead of copying fast_ops in snd_pcm_plug_insert_plugins wait until
the end of snd_pcm_plug_hw_params when the slave has been fully
initialized.
This fixes a crash when two instances of plug are instantiated back to
back and the format conversion plugin inserted by the second is skipped
by the first because the fast_ops pointer is not properly updated.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 15 Aug 2012 15:05:37 +0000 (17:05 +0200)]
PCM: Allow to run older version of extplug plugin
Also show the incompatible plugin version number in error messages.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 10 Aug 2012 12:24:59 +0000 (14:24 +0200)]
Ignore .* files in general
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 10 Aug 2012 12:19:17 +0000 (14:19 +0200)]
ucm: Add const to execute_cset() argument
Now with the previous rewrite of execute_cset(), the cset string is no
longer modified, thus we can pass const safely.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 10 Aug 2012 12:14:28 +0000 (14:14 +0200)]
ucm: Improve cset command parsing
The cset command parsing in ucm/main.c assumes implicitly that the
argument contains no space, thus an example below wouldn't work:
cset "name='Input Select' Digital Mic"
This patch introduces a new internal API function
__snd_ctl_ascii_elem_id_parse() to improve the cset parser.
Reported-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mario Domenech Goulart [Wed, 8 Aug 2012 14:03:19 +0000 (11:03 -0300)]
test/latency.c: Fix string argument to getopt_long, so now it handles -E and -B
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tanu Kaskinen [Wed, 1 Aug 2012 13:06:16 +0000 (16:06 +0300)]
ucm: Return NULL from get_list0() and get_list20() in case of empty lists.
alloc_str_list() sets the result to NULL too, so this patch
makes the behavior more consistent. This also fixes a crash
in PulseAudio, because PulseAudio assumes that
snd_use_case_get_list() always initializes the result, and
since snd_use_case_get_list() uses get_list20(), this
assumption didn't hold.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Arun Raghavan [Tue, 17 Jul 2012 10:00:17 +0000 (15:30 +0530)]
build: Disable another compile chack with --disable-alsatest
Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Arun Raghavan [Tue, 17 Jul 2012 10:00:16 +0000 (15:30 +0530)]
ucm: Add missing pthread.h include
Needed for the use of pthread_mutex_t
Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Arun Raghavan [Tue, 17 Jul 2012 10:00:15 +0000 (15:30 +0530)]
build: Fallback to alphasort() if versionsort() isn't available
versionsort() is a GNU-ism and can't be relied on for non-GNU systems.
[modified to define SORTFUNC instead of copying lines by tiwai]
Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Arun Raghavan [Tue, 17 Jul 2012 10:00:14 +0000 (15:30 +0530)]
control: Use strcpy() instead of stpcpy()
This allows us to build in environments that don't provide stpcpy().
This makes it necessary to traverse the string twice, but should not be
noticeable in clients since this function is very unlikely to be part of
a performance-critical path.
[coding style fixed by tiwai]
Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Martin Sandsmark [Thu, 5 Jul 2012 07:40:07 +0000 (09:40 +0200)]
hctl: Remove a useless assert
The case where the element is unavailable (for example gone away since
the event was created) is handled beneath.
See also bug 5471.
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5471
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 25 Jun 2012 21:16:14 +0000 (23:16 +0200)]
Fix the binary compatibility of ext-ctl plugin with protocol 1.0.0
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Arun Raghavan [Wed, 23 May 2012 12:46:33 +0000 (18:16 +0530)]
ucm: Handle repeat device and modifier enables/disables
Currently, enabling a device twice can cause it to be added to
snd_use_case_mgr_t->active_devices twice, causing the list to become a
loop and subsequent uses to result in an infinite loop.
This patch makes sure we don't enable/disable a device twice, and avoid
doing the same for modifiers.
Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
David Henningsson [Wed, 23 May 2012 07:59:50 +0000 (09:59 +0200)]
conf: Add more USB devices to S/PDIF blacklist
These devices don't have digital in/out, so prevent them from being
opened.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Benoît Thébaudeau [Tue, 22 May 2012 23:53:01 +0000 (01:53 +0200)]
tlv: improve robustness of raw value ranges
snd_tlv_convert_from_dB() relies on rangemin/max blindly.
Since this function is exported, it is better for robustness and
consistency to parse the range properly, which this patch does.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Antonio Borneo [Mon, 14 May 2012 15:56:34 +0000 (23:56 +0800)]
pcm_dsnoop: comment fall-through in next "case"
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Antonio Borneo [Sat, 12 May 2012 16:06:23 +0000 (00:06 +0800)]
pcm: add missing "break" in "switch"
A missing "break" in procedure snd_pcm_write_mmap() causes
execution of "case SND_PCM_ACCESS_MMAP_NONINTERLEAVED" to
fall through next "default" case of the "switch" statement.
Since "default" handles error cases, the procedure returns
error.
The error fixed by this patch blocks transfer of capture
data from kernel to application. Execution get stuck in
alsa-lib, that discards all received data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
John Spencer [Tue, 24 Apr 2012 10:58:48 +0000 (12:58 +0200)]
Fix invalid long long format specifier
Per POSIX:
L Specifies that a following a, A, e, E, f, F, g, or G conversion
specifier applies to a long double argument.
L is only intended to be used with long doubles, not long long ints.
the proper way is to use "ll" instead.
Signed-off-by: John Spencer <maillist-alsa@barfooze.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
David Henningsson [Mon, 23 Apr 2012 08:39:13 +0000 (10:39 +0200)]
alsa-lib conf: Add two more USB devices to iec958 blacklist
Add "Logitech Wireless Headset" and "Logitech Speaker Lapdesk N700" to
the iec958 blacklist.
Also reorder the list in alphabetic order.
BugLink: https://bugs.launchpad.net/bugs/987163
Reported-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Dylan Reid [Sun, 15 Apr 2012 23:59:55 +0000 (16:59 -0700)]
control_external: Add ability to specify TLV data.
Allow external control plugins to provide TLV data. This allows
user-space pcms to specify dB ranges for controls.
This follows the same model as the ALSA drivers for accessing the
data. The code is based on that implementation. The control can
provide static data or a callback. The data is accessed or modified
in the new snd_ctl_ext_elem_tlv callback.
Rev bump the protocol version to enable checking if an external
control supports TLV.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
David Henningsson [Fri, 13 Apr 2012 23:14:09 +0000 (01:14 +0200)]
alsa-lib conf: block S/PDIF access for Sennheiser USB headset
The Sennheiser USB headset has no S/PDIF input or output, so make
sure we can't open it that way.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Tue, 27 Mar 2012 15:54:47 +0000 (17:54 +0200)]
doc: Fix typo in PCM formats
Of course, 24bit samples are not stored in three bits, but bytes.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Henning Thielemann [Wed, 14 Mar 2012 17:45:02 +0000 (18:45 +0100)]
seqmid - more descriptions on snd_seq_parse_address() behavior
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 13 Mar 2012 13:30:22 +0000 (14:30 +0100)]
mixer: Remove redundant CHECK_ENUM() from snd_mixer_selem_is_enum*()
The functions to check whether the element is an enum don't need the
extra check of the type. It should return simply 0 or 1 without error.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
David Henningsson [Fri, 9 Mar 2012 13:06:04 +0000 (14:06 +0100)]
USB-Audio: Fixup card name for Logitech web camera
Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
David Henningsson [Fri, 9 Mar 2012 10:46:06 +0000 (11:46 +0100)]
USB-Audio: Blacklist iec958 for some USB devices
Some common USB devices are analog only, so prevent the digital
devices from being opened. This simplifies probing the device
in PulseAudio.
I have a "Logitech USB Headset" myself, the "Logitech Web Camera"
was reported by Raymond Yau, and the "Blue Snowball" was reported by
Andy Whitcroft.
Cc: Andy Whitcroft <andy.whitcroft@canonical.com>
Cc: Raymond Yau <superquad.vortex2@gmail.com>
BugLink: https://bugs.launchpad.net/bugs/940145
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Luke Yelavich [Wed, 8 Feb 2012 04:09:55 +0000 (15:09 +1100)]
conf/pcm: Add support for Echo3G devices. Thanks to unimatrix.
BugLink: https://bugs.launchpad.net/bugs/433573
Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Wed, 25 Jan 2012 07:56:56 +0000 (08:56 +0100)]
Release v1.0.25
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 20 Jan 2012 15:14:44 +0000 (16:14 +0100)]
Introduce --with-pkgconfdir, add 64-bit defaults to gitcompile
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Andrew Eikum [Thu, 19 Jan 2012 11:38:58 +0000 (12:38 +0100)]
Document strdup allocation in snd_card_get_name family
This was spotted by Jörg Höhle on the wine-patches ML.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Andrew Eikum [Thu, 19 Jan 2012 11:36:58 +0000 (12:36 +0100)]
Improve snd_device_name_hint documentation
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Andrew Eikum [Thu, 19 Jan 2012 11:36:39 +0000 (12:36 +0100)]
Improve hw_params documentation
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Andrew Eikum [Thu, 19 Jan 2012 11:36:09 +0000 (12:36 +0100)]
Search-and-replace improve documentation language
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Andrew Eikum [Thu, 19 Jan 2012 11:35:20 +0000 (12:35 +0100)]
Remove docs for snd_names_list and snd_names_list_free
No need to have misleading docs for functions that do nothing.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 14 Nov 2011 16:02:40 +0000 (17:02 +0100)]
pcm:mmap_emul: Fix sw_params and others in bypass mode
When the slave doesn't need any mmap-emulation, the plugin shouldn't do
anything special in sw_params and other callbacks but just pass to the
generic helpers and update hwptr and applptr.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Fri, 7 Oct 2011 20:46:51 +0000 (22:46 +0200)]
control: add snd_ctl_elem_add_enumerated()
Handling of user control elements was implemented for all types except
BYTES and ENUMERATED. Enumerated user controls will be needed for the
device-specific mixers of upcoming FireWire drivers.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Clemens Ladisch [Wed, 5 Oct 2011 08:40:48 +0000 (10:40 +0200)]
asound.h: cosmetic changes for consistency with kernel asound.h
Change some whitespace and comments to remove spurious differences
between the alsa-lib and kernel versions of asound.h.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Clemens Ladisch [Wed, 5 Oct 2011 08:14:56 +0000 (10:14 +0200)]
asound.h: update for latest kernel
Refresh asound.h to be up to date with its kernel source.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Julia Lawall [Thu, 22 Sep 2011 11:59:31 +0000 (13:59 +0200)]
src/pcm/pcm_mmap.c: add missing free
The mmap_channels and running_areas fields are allocated using calloc, but
are not freed on an error path.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Suman Saha <sumsaha@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Julia Lawall [Sun, 18 Sep 2011 20:04:37 +0000 (22:04 +0200)]
src/pcm/pcm_multi.c: add missing free
Something that is allocated using calloc is not freed on an error path.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Suman Saha <sumsaha@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Julia Lawall [Sun, 18 Sep 2011 20:04:36 +0000 (22:04 +0200)]
src/pcm/pcm_ladspa.c: add missing free
Something that is allocated using calloc is not freed on some
error paths.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Suman Saha <sumsaha@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Julia Lawall [Sun, 18 Sep 2011 20:04:34 +0000 (22:04 +0200)]
src/pcm/pcm_rate.c: add missing free
Something that is allocated using calloc is not freed on one
or more error paths.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Suman Saha <sumsaha@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Wed, 21 Sep 2011 06:30:20 +0000 (08:30 +0200)]
pcm: recalculate all rules after changing hw_params flags
The rules engine avoids recalculating rules that do not depend on
any changed parameter, but there is no mechanism to record changed
flags. So when we change a flag, we have to ensure that all rules
depending on that flag are recalculated; the only method to do this
is to force recalculation of all rules.
So far, there have been no kernel drivers with rules depending
on flags, but rules to disable hardware SRCs by setting
SND_PCM_HW_PARAMS_NORESAMPLE are being introduced now.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Colin Guthrie [Fri, 16 Sep 2011 09:04:26 +0000 (10:04 +0100)]
conf: Allow for a directory to be given as a config file.
When this is done, *.conf files can be placed in that directory and they
will be processed by as if they were included directly.
A directory (typically /usr/share/alsa/alsa.conf.d/) has been
added into the distribution.
v2: Used existing conf syntax rather than processing via autotools
v3: Split file loading into separate function and made error handling
more consistent.
Signed-off-by: Colin Guthrie <colin@mageia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Lu Guanqun [Mon, 22 Aug 2011 05:35:32 +0000 (13:35 +0800)]
ucm: add another sequence 'msleep'
Thus, we have two sleep statements:
msleep <milliseconds>
usleep <microseconds>
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Lu Guanqun [Fri, 19 Aug 2011 08:05:30 +0000 (16:05 +0800)]
ucm: tivial code style fix
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Lu Guanqun [Fri, 19 Aug 2011 08:05:25 +0000 (16:05 +0800)]
ucm: fix seg fault in execute_cset()
When there's no space in 'cset', 'pos' gets NULL, dereferencing 'pos' gets a
seg fault. We need to be more robust.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 29 Jul 2011 13:56:39 +0000 (15:56 +0200)]
Merge branch 'fallback'
Adrian Knoth [Thu, 28 Jul 2011 21:24:25 +0000 (23:24 +0200)]
Add RME RPM to HDSP_IO_Type.
The hdsp.c driver supports the RME RPM devices, but we also need this
information in alsa-lib for tools like hdsploader and hdspmixer.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 26 Jul 2011 11:10:24 +0000 (13:10 +0200)]
Add snd_{ctl|pcm}_open_fallback() functions
This patch adds new API functions, snd_ctl_open_fallback() and
snd_pcm_open_fallback(). These are just like snd_*_open_lconf() but
used to open a fallback PCM/control. The difference is that it replaces
the name string with the given original name, so that hctl and other
upper-layers will recognize it as an alias.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 26 Jul 2011 11:05:53 +0000 (13:05 +0200)]
Define "sysdefault" PCM and control
When "default" PCM and control definitions are overwritten by others
like PulseAudio setup, the original system-default defition is lost.
This is a problem when PA is temporarily (or intentionally) disabled
and user wants to use the default dmix.
This patch adds a new standard definition for the system-default,
"sysdefault". This can be used for fallbacks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stephen Warren [Mon, 6 Jun 2011 20:16:57 +0000 (14:16 -0600)]
UCM: get: Implement 'exact' value retrieval
[=]<NAME>[/[<modifier>|</device>][/<verb>]]
- value identifier <NAME>
- Search starts at given modifier or device if any,
else at a verb
- Search starts at given verb if any,
else current verb
- Searches modifier/device, then verb, then defaults
- Specify a leading "=" to search only the exact
device/modifier/verb specified, and not search
through each object in turn.
- Examples:
"PlaybackPCM/Play Music"
"CapturePCM/SPDIF"
From ValueDefaults only:
"=Variable"
From current active verb:
"=Variable//"
From verb "Verb":
"=Variable//Verb"
From "Modifier" in current active verb:
"=Variable/Modifier/"
From "Modifier" in "Verb":
"=Variable/Modifier/Verb"
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stephen Warren [Fri, 3 Jun 2011 20:56:34 +0000 (14:56 -0600)]
UCM: snd_use_case_get: Don't segfault when no current verb
get_value, called by snd_use_case_get, uses uc_mgr->active_verb without
checking there is one, and hence can segfault. Fix this.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stephen Warren [Fri, 3 Jun 2011 20:56:33 +0000 (14:56 -0600)]
UCM: Allow querying of {Supported,Conflicting}Devices
At any time, one can query:
_supporteddevs/<modifier>|<device>/<verb>
_conflictingdevs/<modifier>|<device>/<verb>
If a verb is current, one can query:
_supporteddevs/<modifier>|<device>
_conflictingdevs/<modifier>|<device>
Note that at most one of the supported/conflicting devs lists has
any entries, and when neither is present, all devices are supported.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stephen Warren [Fri, 3 Jun 2011 20:56:32 +0000 (14:56 -0600)]
UCM: Disallow gets of undefined system properties
In UCM, there are various system-defined properties whose names start
with "_". Explicitly prevent any gets from falling back to properties
defined in a config file if the property name starts with "_", in order
to reserve the entire "_" namespace for system-defined properties.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stephen Warren [Fri, 3 Jun 2011 20:56:31 +0000 (14:56 -0600)]
UCM: Implement ConflictingDevices, add device list to devices
Wherever SupportedDevice can appear, also allow ConflictingDevice. Only
one or the other (or neither) may be specified. When neither is
specified, allow anything. Sometimes, listing ConflictingDevices may
result in a shorter list than explicitly listing all SupportedDevices.
Add support for SupportedDevice and ConflictingDevice to SectionDevice.
This allows representing devices which are mutually exclusive, e.g. due
to a mux that switches between capturing from two different microphones,
without the possibility of mixing.
Enhance is_modifier_supported to allow ignoring SupportedDevice and
ConflictingDevice. This is useful when querying values from a
SectionModifier; there's no reason we shouldn't be able to query values
just because the current configuration would prevent enabling that
device. The new is_device_supported is implemented similarly.
Enhance switch_device to remove the old device from the current device
list before querying for the new device, and add it back immediately
afterwards. This allows the query for the new device to ignore any
conflicts caused solely by the old device.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stephen Warren [Fri, 3 Jun 2011 20:56:30 +0000 (14:56 -0600)]
UCM: Deprecate index on Section{Device,Modifier}
The previous supported "legacy" syntax was:
SectionDevice."Speaker".0 {
SectionModifier."Capture Voice".0 {
This change supports new syntax:
SectionDevice."Speaker" {
SectionModifier."Capture Voice" {
... but also allows the old syntax, iff the index is exactly "0". If an
index is present, but not exactly "0", parsing will appear to succeed,
but produce an empty device or modifier.
When naming devices and modifiers, even if the legacy format is used,
any index is not included in the name; i.e. both sets of syntax above
name the device just "Speaker".
The SupportedDevice list syntax still also accepts either "x" or "x.0",
but internally strips ".0" from the tail of any device name. Any other
name including "." is disallowed.
Finally, when comparing device or modifier names, a simple exact string
compare is now used, since no index data is ever present in device or
modifier names.
The one functional change introduced here is that a SupportedDevice
entry of just "x" will now only ever match a single device. It previously
acted as a wildcard for any device named "x.foo".
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 3 Jun 2011 15:27:27 +0000 (17:27 +0200)]
Fix missing error code in snd_ctl_hw_open()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stephen Warren [Thu, 2 Jun 2011 22:44:39 +0000 (16:44 -0600)]
UCM: Fix deadlock following failed get _verb
When querying the current verb without a verb set, snd_use_case_get bails
out early without unlocking uc_mgr->mutex. This causes subsequent API calls
to hang. Instead, s/return/goto __end/.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Stephen Warren [Thu, 2 Jun 2011 22:44:38 +0000 (16:44 -0600)]
UCM: Fix typo in error message
parse_name_is_safe disallows dots in the name, so not is the correct
word to use
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Alexander Stein [Thu, 19 May 2011 13:16:36 +0000 (15:16 +0200)]
ctlparse: Respect softfloat configure option
If we want softlfoat we can't use ceil which uses libm.
Signed-off-by: Alexander Stein <a.stein@systec-electronic.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Raymond Yau [Fri, 13 May 2011 02:40:28 +0000 (10:40 +0800)]
emu10k1.conf - Fix no sound problem when using SB Live! Platinum
Add asym to front, rear and center_lfe to prevent route change after
removed the lock.
After removed the lock, when application using "hw", "front", "rear",
"surround40" and "surround51", the route of the front channel is
changed (lost right channel or both channels) when other application
using "front", "rear" or "center_lfe" to record
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 9 May 2011 12:11:22 +0000 (14:11 +0200)]
Specficy subdevice 0 for front/surround* of HDA-Intel.conf
The subdevice 0 is used for multi-channel outputs.
This fixes the detection of multi-channel devices of VIA codecs
by PulseAudio.
Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Baek Chang [Tue, 3 May 2011 17:52:34 +0000 (10:52 -0700)]
UCM: fix memory leak when executing cset commands
fix memory leak when executing cset commands.
snd_ctl_elem's are allocated, but never free'ed
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 4 May 2011 07:20:23 +0000 (09:20 +0200)]
Add test/lsb/config to .gitignore
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 4 May 2011 07:19:09 +0000 (09:19 +0200)]
Fix printf for size_t
Need to use z prefix for size_t type.
midiloop.c: In function ‘main’:
midiloop.c:172:2: warning: format ‘%i’ expects type ‘int’, but argument 2 has type ‘size_t’
....
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 4 May 2011 07:14:29 +0000 (09:14 +0200)]
Fix compile warnings
strstr() returns a char pointer
simple_none.c: In function ‘base_len’:
simple_none.c:940:33: warning: ordered comparison of pointer with integer zero
simple_none.c:941:29: warning: ordered comparison of pointer with integer zero
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Sudarshan Bisht [Tue, 12 Apr 2011 10:09:45 +0000 (13:09 +0300)]
alsa-lib: fixed coverity reported issues under "FORWARD_NULL" checker.
Coverity Static Analysis helps developers find hard-to-spot,
yet potentially crash-causing defects early in the development phase,
reducing the cost,time, and risk of software errors.
This patch has fix for situations where variable can be NULL
but not been checked beforehand
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Raymond Yau [Sun, 24 Apr 2011 03:56:44 +0000 (11:56 +0800)]
HDA-Intel.conf - Fix low mic volume due to pulseaudio using "front" device for playback and capture
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 20 Apr 2011 12:32:06 +0000 (14:32 +0200)]
EMU10K1.conf: Don't lock hook controls
Locking the controls in hooks causes a BUSY error when multiple
streams are opened, typically in PulseAudio. Better not to touch
the locking in hooks in such a case.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Raymond Yau [Wed, 20 Apr 2011 08:18:50 +0000 (16:18 +0800)]
test/latency: print error message when 2 periods per buffer not supported
Print error message when playback/capture does not support 2 periods
per buffer.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
David Henningsson [Tue, 19 Apr 2011 06:05:08 +0000 (08:05 +0200)]
Fix typo in comment in surround71.conf
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591318
Reported-by: Ariel <asdebian@dsgml.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Takashi Iwai [Wed, 6 Apr 2011 06:34:56 +0000 (08:34 +0200)]
Mark Heaphone {Center|LFE} control of emu10k1 conf as optional
The controls referred in center_lfe definition in EMU10K1.conf should be
marked as optional since some boards don't have these.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Wed, 30 Mar 2011 15:30:09 +0000 (17:30 +0200)]
configure: Fail when the user attempts to compile shared and static libs
There are some issues with libtool breaking the possibility to build both
types of libraries in one shot. Compile libraries separately.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Mon, 28 Mar 2011 09:04:19 +0000 (11:04 +0200)]
UCM: Fix LGPL licence ("how to receive" part referred GPL instead LGPL)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
David Henningsson [Mon, 28 Mar 2011 08:19:16 +0000 (10:19 +0200)]
Conf: Fix channels of ICE1712 to 10/12
The ICE1712 kernel driver accepts 10 playback channels and
12 recording channels only. Therefore fix this channel count
in alsa-lib.
BugLink: http://bugs.launchpad.net/bugs/178442
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Sat, 19 Mar 2011 00:09:41 +0000 (01:09 +0100)]
UCM: Fix empty get_list - initialize returned pointer to NULL
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 18 Mar 2011 23:54:43 +0000 (00:54 +0100)]
UCM: comment fixes and fix myvalue initialization fix in add_values()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Margarita Olaya [Fri, 18 Mar 2011 17:26:22 +0000 (11:26 -0600)]
alsa-lib: ucm: allow values to be read from devices
This allows devices value to be read using the get_value().
Also fix a little formatting.
Signed-off-by: Margarita Olaya Cabrera <magi@slimlogic.co.uk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Tue, 15 Mar 2011 07:02:59 +0000 (08:02 +0100)]
alsa-lib: add LaCie Firewire Speakers/Griffin FireWave Surround driver
Add configuration files for the "default"/"front"/"surround51" devices
of the FireWire driver.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Raymond Yau [Sat, 26 Feb 2011 01:24:43 +0000 (09:24 +0800)]
Fix alsa-lib to regard 3D control - Depth as Playback Controls
This allow those mixer or recording application to find those controls which
are really used for capturing.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Mon, 31 Jan 2011 14:18:50 +0000 (15:18 +0100)]
Release v1.0.24.1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>