Commit graph

2877 commits

Author SHA1 Message Date
Takashi Iwai
34f6545520 Cache the chmap operation errors
... not to retry the same error again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-11 11:34:50 +02:00
Takashi Iwai
3fc13d6f5b Add test/chmap program
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-11 11:34:50 +02:00
Takashi Iwai
662f79d4ec 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>
2012-09-11 11:34:50 +02:00
Takashi Iwai
3fb013065f 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>
2012-09-11 11:34:50 +02:00
Takashi Iwai
3c4a22ea49 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>
2012-09-11 11:34:50 +02:00
Jaroslav Kysela
1ef1c5cdb4 Release v1.0.26
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-09-06 10:55:14 +02:00
Jaroslav Kysela
a074588889 doc: Use 'rm -rf' for the html doxygen tree (it contains search/ dir now)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-09-06 10:53:14 +02:00
Reilly Grant
f285572102 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>
2012-08-31 18:34:02 +02:00
Takashi Iwai
59de61e5b5 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>
2012-08-15 17:05:37 +02:00
Takashi Iwai
d0ca075621 Ignore .* files in general
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-10 14:24:59 +02:00
Takashi Iwai
7c5c3ff3de 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>
2012-08-10 14:19:17 +02:00
Takashi Iwai
58d10c09e1 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>
2012-08-10 14:14:28 +02:00
Mario Domenech Goulart
c34f74c818 test/latency.c: Fix string argument to getopt_long, so now it handles -E and -B
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-08 16:29:03 +02:00
Tanu Kaskinen
e16a9a04b1 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>
2012-08-01 15:47:27 +02:00
Arun Raghavan
480d3204fe 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>
2012-07-17 14:57:10 +02:00
Arun Raghavan
9e795252c6 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>
2012-07-17 14:57:10 +02:00
Arun Raghavan
55abbc9fde 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>
2012-07-17 14:56:14 +02:00
Arun Raghavan
df924cd9c5 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>
2012-07-17 14:55:55 +02:00
Martin Sandsmark
86e27cdbf1 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>
2012-07-05 10:09:06 +02:00
Takashi Iwai
52160de21e Fix the binary compatibility of ext-ctl plugin with protocol 1.0.0
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-25 23:16:14 +02:00
Arun Raghavan
e8923f2e75 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>
2012-05-29 11:59:26 +02:00
David Henningsson
e4d9c34830 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>
2012-05-23 11:03:24 +02:00
Benoît Thébaudeau
70b958f460 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>
2012-05-23 01:53:28 +02:00
Antonio Borneo
afaffe80d9 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>
2012-05-14 17:58:28 +02:00
Antonio Borneo
b7334b1a81 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>
2012-05-14 16:55:39 +02:00
John Spencer
1d3f7975f9 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>
2012-04-24 15:38:45 +02:00
David Henningsson
bb5c49fa41 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>
2012-04-23 10:53:40 +02:00
Dylan Reid
a6c50d64d9 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>
2012-04-16 10:16:17 +02:00
David Henningsson
ed0e48583f 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>
2012-04-14 21:20:18 +02:00
Adrian Knoth
e5c4c248a1 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>
2012-03-28 17:41:36 +02:00
Henning Thielemann
1937247439 seqmid - more descriptions on snd_seq_parse_address() behavior
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-14 18:45:02 +01:00
Takashi Iwai
2ab86d96c9 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>
2012-03-13 14:30:22 +01:00
David Henningsson
947d208076 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>
2012-03-09 14:12:25 +01:00
David Henningsson
1a9627dfe7 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>
2012-03-09 12:36:44 +01:00
Luke Yelavich
65298d98f3 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>
2012-02-08 09:01:39 +01:00
Jaroslav Kysela
c3ed2c9850 Release v1.0.25
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-01-25 08:56:56 +01:00
Jaroslav Kysela
98d4ed8810 Introduce --with-pkgconfdir, add 64-bit defaults to gitcompile
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-01-20 16:14:44 +01:00
Andrew Eikum
226a34ac09 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>
2012-01-19 12:38:58 +01:00
Andrew Eikum
ad2a0b3a56 Improve snd_device_name_hint documentation
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-19 12:36:58 +01:00
Andrew Eikum
43956de710 Improve hw_params documentation
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-19 12:36:39 +01:00
Andrew Eikum
235aec0a75 Search-and-replace improve documentation language
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-19 12:36:09 +01:00
Andrew Eikum
6eafe5db3d 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>
2012-01-19 12:35:20 +01:00
Takashi Iwai
f562b032be 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>
2011-11-15 07:58:35 +01:00
Clemens Ladisch
15c6f83296 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>
2011-10-07 23:38:55 +02:00
Clemens Ladisch
567cc19a88 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>
2011-10-05 11:01:38 +02:00
Clemens Ladisch
9736511b36 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>
2011-10-05 11:01:33 +02:00
Julia Lawall
fef6e6fd58 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>
2011-09-22 14:11:10 +02:00
Julia Lawall
c36f8c87ff 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>
2011-09-22 12:50:31 +02:00
Julia Lawall
03aa1a57c9 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>
2011-09-22 12:49:54 +02:00
Julia Lawall
2a7f653b7f 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>
2011-09-22 12:47:44 +02:00