OSDN Git Service

android-x86/external-alsa-lib.git
15 years agopcm_hooks: cosmetic removal of unused variables
Paul Fertser [Tue, 30 Jun 2009 11:18:36 +0000 (15:18 +0400)]
pcm_hooks: cosmetic removal of unused variables

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoManage dlobj lifetime in pcm_hooks.c
Takashi Iwai [Tue, 30 Jun 2009 09:11:34 +0000 (11:11 +0200)]
Manage dlobj lifetime in pcm_hooks.c

The shared object may be still needed depending on the implementation
of hook-installation functions.  When any hooks are registered in the
installation function, the dlobj has to be kept opened until closing
the PCM instance.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'master' of git@git.alsa-project.org:alsa-lib
Takashi Iwai [Wed, 24 Jun 2009 10:25:47 +0000 (12:25 +0200)]
Merge branch 'master' of git@git.alsa-project.org:alsa-lib

15 years agoseq_midi_event: fix decoding of (N)RPN events
Clemens Ladisch [Mon, 22 Jun 2009 08:00:46 +0000 (10:00 +0200)]
seq_midi_event: fix decoding of (N)RPN events

When decoding (N)RPN sequencer events into raw MIDI commands, the
extra_decode_xrpn() function had accidentally swapped the MSB and LSB
controller values of both the parameter number and the data value.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agoMIDI event decoder: prevent running status after sysex
Clemens Ladisch [Mon, 22 Jun 2009 08:00:03 +0000 (10:00 +0200)]
MIDI event decoder: prevent running status after sysex

Running status cannot be using in the command immediately following
a system exclusive command, so we have to reset the running status
state in that case.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agopcm dmix plugin: fix MIX_AREAS_24 routine for i386 & x86_64 platforms
Jaroslav Kysela [Tue, 16 Jun 2009 18:10:19 +0000 (20:10 +0200)]
pcm dmix plugin: fix MIX_AREAS_24 routine for i386 & x86_64 platforms

The code was copied from ALSA bug#4577 from CannibalZerg.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoAdd the support of TLV_DB_MINMAX types
Takashi Iwai [Tue, 16 Jun 2009 12:28:57 +0000 (14:28 +0200)]
Add the support of TLV_DB_MINMAX types

Added the support of the new TLV_DB_MINMAX types.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix SB-Xfi.conf
Takashi Iwai [Tue, 9 Jun 2009 02:49:57 +0000 (04:49 +0200)]
Fix SB-Xfi.conf

Added missing hint.device for rear, clfe, etc definitions.
Removed invalid iec958 capture definition.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix breakage of snd_card_load()
Takashi Iwai [Tue, 9 Jun 2009 02:45:18 +0000 (04:45 +0200)]
Fix breakage of snd_card_load()

Fixed the breakage of snd_card_load() for secondary and later cards
due to changes in snd_card_load1().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoAdd IEC958 status bits support to SB-XFi.conf
Takashi Iwai [Tue, 2 Jun 2009 15:21:26 +0000 (17:21 +0200)]
Add IEC958 status bits support to SB-XFi.conf

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoQuery the supported rate ranges from rate plugins
Takashi Iwai [Tue, 2 Jun 2009 14:13:01 +0000 (16:13 +0200)]
Query the supported rate ranges from rate plugins

Extend the PCM-rate plugin protocol to allow the host to query the
supported sample rates.  The protocol version is bumped to 0x010002,
and the version number negotiaion is slightly changed.
Now the plugin is supposed to fill the version it supports in return.

The old versioned plugins are still supported, but they may spew
version-mismatch warning prints.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoAdd config file for SB-XFi driver
Takashi Iwai [Tue, 2 Jun 2009 14:08:57 +0000 (16:08 +0200)]
Add config file for SB-XFi driver

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agosnd_card_get_index() - extend comment for last change
Jaroslav Kysela [Tue, 12 May 2009 06:28:06 +0000 (08:28 +0200)]
snd_card_get_index() - extend comment for last change

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoExtend snd_card_get_index() to accept also control device name like /dev/snd/controlC0
Jaroslav Kysela [Tue, 12 May 2009 06:06:41 +0000 (08:06 +0200)]
Extend snd_card_get_index() to accept also control device name like /dev/snd/controlC0

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoRelease v1.0.20
Jaroslav Kysela [Wed, 6 May 2009 07:07:23 +0000 (09:07 +0200)]
Release v1.0.20

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoMerge branch 'master' of /export/git/alsa/alsa-lib/
Takashi Iwai [Thu, 23 Apr 2009 12:58:59 +0000 (14:58 +0200)]
Merge branch 'master' of /export/git/alsa/alsa-lib/

15 years agopcm: more better documentation for snd_pcm_poll_descriptors
Jaroslav Kysela [Tue, 21 Apr 2009 12:36:29 +0000 (14:36 +0200)]
pcm: more better documentation for snd_pcm_poll_descriptors

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agopcm_hw plugin: show appl_ptr and hw_ptr in dump() callback
Jaroslav Kysela [Thu, 9 Apr 2009 08:49:57 +0000 (10:49 +0200)]
pcm_hw plugin: show appl_ptr and hw_ptr in dump() callback

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agopcm_hw plugin: preserve monotonic flag also after snd_pcm_hw_params() call
Jaroslav Kysela [Wed, 8 Apr 2009 07:29:35 +0000 (09:29 +0200)]
pcm_hw plugin: preserve monotonic flag also after snd_pcm_hw_params() call

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoAdd route_policy copy to HDA-Intel.conf for capture
Takashi Iwai [Mon, 23 Mar 2009 08:06:23 +0000 (09:06 +0100)]
Add route_policy copy to HDA-Intel.conf for capture

Since some digital mics have the phase-inversion problem in one channel,
adding both channels for mono stream results in the noise.
Use route_policy copy to avoid that situation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoChange "%b" to represent bits instead of bytes in PCM file plugin
Pavel Hofman [Tue, 3 Mar 2009 16:07:55 +0000 (17:07 +0100)]
Change "%b" to represent bits instead of bytes in PCM file plugin

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix typos in ALSA Lib documentation
Patricio Paez [Sun, 22 Feb 2009 13:54:10 +0000 (07:54 -0600)]
Fix typos in ALSA Lib documentation

Signed-off-by: Patricio Paez <pp@pp.com.mx>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'master' of git@git.alsa-project.org:alsa-lib
Takashi Iwai [Tue, 17 Feb 2009 16:01:06 +0000 (17:01 +0100)]
Merge branch 'master' of git@git.alsa-project.org:alsa-lib

15 years agoChange numid properly with external ctl plugins
Takashi Iwai [Tue, 17 Feb 2009 15:58:12 +0000 (16:58 +0100)]
Change numid properly with external ctl plugins

So far, external ctl plugins don't change numid.  Some apps expect the
non-zero numids with list, and the plugin doesn't work for them.

This patch adds a fake numid to each control based on the offset
number.  The lookup with non-zero numid is supported but is pretty
inefficient.  Eventually the plugin side may be optimized to look
at the numid, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agooxygen: remove softvol plugin
Clemens Ladisch [Tue, 17 Feb 2009 08:45:57 +0000 (09:45 +0100)]
oxygen: remove softvol plugin

The change that removed the Master controls for Xonar D2(X) cards was
reverted, so we don't need to use the softvol plugin anymore ...

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agoAdd hint.device = 0 to pcm.default of HDA-Intel.conf
Takashi Iwai [Fri, 13 Feb 2009 16:14:51 +0000 (17:14 +0100)]
Add hint.device = 0 to pcm.default of HDA-Intel.conf

The hd-audio driver may have no analog stream but only a digital one
which has usually non-zero device number.  To avoid the bogus namehint,
set hint.device 0 for pcm.default (it wasn't handled properly due to
asym).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agofix pcm_set_params() documentation
Clemens Ladisch [Wed, 11 Feb 2009 08:53:29 +0000 (09:53 +0100)]
fix pcm_set_params() documentation

The documentation for the latency parameter of pcm_set_params() says
that the value 0 uses an optimal value.  This is wrong, as there is no
special handling for 0, and the result will be a buffer of minimal size.
Therefore, remove that incorrect statement.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agoFix misc compile warnings
Takashi Iwai [Mon, 2 Feb 2009 15:11:39 +0000 (16:11 +0100)]
Fix misc compile warnings

Shut up misc compile warnings from gcc:
  pcm_plug.c: In function ‘snd_pcm_plug_change_mmap’:
  pcm_plug.c:608: warning: enumeration value ‘SND_PCM_ACCESS_MMAP_INTERLEAVED’ not handled in switch
  pcm_plug.c:608: warning: enumeration value ‘SND_PCM_ACCESS_MMAP_NONINTERLEAVED’ not handled in switch
  pcm_plug.c:608: warning: enumeration value ‘SND_PCM_ACCESS_MMAP_COMPLEX’ not handled in switch

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix handling of revents in snd_pcm_poll_descriptors_revents()
Takashi Iwai [Mon, 2 Feb 2009 14:43:48 +0000 (15:43 +0100)]
Fix handling of revents in snd_pcm_poll_descriptors_revents()

The revents parameter is ambiguously defined whether it's a pointer
to a single event or an arary.

This patch defines the behavior of revents more strictly (in the
function description): it's a pointer of a single event.

Also fixed snd_pcm_wait_nocheck() to follow that rule.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoPCM parameters in file plugin
Pavel Hofman [Thu, 29 Jan 2009 10:59:27 +0000 (11:59 +0100)]
PCM parameters in file plugin

* added support for including pcm stream params in the output filename
* added support for piping the stream to a shell command if the filename
  string starts with a pipe char

Signed-off-by: Pavel Hofman <pavel.hofman@insite.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix off_t in kernel struct
Takashi Iwai [Wed, 28 Jan 2009 14:00:35 +0000 (15:00 +0100)]
Fix off_t in kernel struct

The off_t in kernel struct (for ioctls) is actually different from the
definition of user-space off_t.  The kernel off_t is equial with long
while user-space off_t depends on the large-file support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoRemove own "default" PCM config from GUS.conf
Takashi Iwai [Wed, 28 Jan 2009 08:07:53 +0000 (09:07 +0100)]
Remove own "default" PCM config from GUS.conf

The system-wide default PCM config works now (by the fix of plug
mmap_emul support), thus no card-specific hackish config is needed
for GUS.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix plug conversion with mmap emulation
Takashi Iwai [Tue, 27 Jan 2009 16:21:34 +0000 (17:21 +0100)]
Fix plug conversion with mmap emulation

If the slave PCM supports only another type of interleaved format,
plug did convert it wrongly and resulted in an unused access type
error.  For example, if a slave PCM supporst only RW_NONINTERLEAVE
access and you try to play an interleaved format file, it resulted
in an error.

This patch fixes the conversion rule.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix GUS.conf to be usable
Krzysztof Helt [Tue, 27 Jan 2009 10:44:14 +0000 (11:44 +0100)]
Fix GUS.conf to be usable

Fix GUS.conf to work for default PCM.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoAdd missing -ldl to modules/mixer/simple/*
Takashi Iwai [Wed, 21 Jan 2009 08:29:35 +0000 (09:29 +0100)]
Add missing -ldl to modules/mixer/simple/*

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix build with softfloat option
Takashi Iwai [Wed, 21 Jan 2009 08:25:48 +0000 (09:25 +0100)]
Fix build with softfloat option

Fix build of alsa-lib when --with-softfloat is used:
 - disable ladspa plugin
 - don't use sqrt() function

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoRelease v1.0.19
Jaroslav Kysela [Mon, 19 Jan 2009 11:17:18 +0000 (12:17 +0100)]
Release v1.0.19

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoadd softvol for CMI8788
Clemens Ladisch [Mon, 19 Jan 2009 09:20:38 +0000 (10:20 +0100)]
add softvol for CMI8788

Master Volume controls were removed from Xonar D2/D2X cards; add the
softvol plugin so that we have at least PCM volume.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agoAdd m4/attributes.m4 as dist file..
Jaroslav Kysela [Mon, 5 Jan 2009 12:10:32 +0000 (13:10 +0100)]
Add m4/attributes.m4 as dist file..

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoDon't accept an empty string for $ALSA_CONFIG_PATH
Takashi Iwai [Wed, 10 Dec 2008 17:20:50 +0000 (18:20 +0100)]
Don't accept an empty string for $ALSA_CONFIG_PATH

The variable $ALSA_CONFIG_PATH specifies the config path, but the current
code accepts the empty string and results in a mysterious error because
no config file is found.

This patch fixes the check of the variable and takes the default value
if the string is empty.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix softvol access refine
Takashi Iwai [Thu, 4 Dec 2008 14:21:40 +0000 (15:21 +0100)]
Fix softvol access refine

The commit a13707da6bb0161db855a146c3e4d1d849e4108b

    pcm_softvol plugin: remove access type change for refine

breaks the softvol in the case of RW -> MMAP.  The slave of softvol
must be an mmap although the previous fix forces RW access.

This patch reverts the commit, and the fixed access refine method
to hanle non-interleaved <-> interleaved changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix snd-pcsp default configuration
Takashi Iwai [Wed, 26 Nov 2008 13:09:06 +0000 (14:09 +0100)]
Fix snd-pcsp default configuration

The softvol must be inside the plug.  Otherwise it gets stuck.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMark static tables as constant when possible.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 21:19:28 +0000 (22:19 +0100)]
Mark static tables as constant when possible.

This makes it possible to write them to .data.rel.ro or to .rodata if
there is no relocation involved (arrays of character arrays).

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake string arrays as constant as possible.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 18:46:44 +0000 (19:46 +0100)]
Make string arrays as constant as possible.

Use "const char *const []" as type for string arrays, or convert to
"const char [][x]" when it makes sense.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake all the remaining ops structure constants.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 18:43:33 +0000 (19:43 +0100)]
Make all the remaining ops structure constants.

This excludes the mixer for now since it requires a change to the
public headers.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake all the PCM plugins ops structure constant.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 19:38:09 +0000 (20:38 +0100)]
Make all the PCM plugins ops structure constant.

This ensures they are emitted in .data.rel.ro rather than .data.rel,
which should make a nice difference when using prelink.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake snd_pcm_hw_params_names static to pcm_params.c .
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 19:28:56 +0000 (20:28 +0100)]
Make snd_pcm_hw_params_names static to pcm_params.c .

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake seq, rawmidi and control operation structures static const.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 19:26:12 +0000 (20:26 +0100)]
Make seq, rawmidi and control operation structures static const.

Since they are never changed it does not make sense to have them in
the writeable .data section, just make sure to add const to the ops
member in the structure definitions so that there are no extra
warnings added.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake some static tables and strings constants.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 00:21:32 +0000 (01:21 +0100)]
Make some static tables and strings constants.

By doing this we move them from the .data section to .rodata setion,
or from .data.rel to .data.rel.ro.

The .rodata section is mapped directly from the on-disk file, which is
always a save, while .data.rel.ro is mapped directly when using
prelink, which is a save in a lot of cases.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake sure that python libraries are passed through LIBADD.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 00:19:17 +0000 (01:19 +0100)]
Make sure that python libraries are passed through LIBADD.

Also avoid an indirection by using $(PYTHON_LIBS) and
$(PYTHON_INCLUDES) directly.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoCheck for --no-undefined linker flag and use it.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 00:16:37 +0000 (01:16 +0100)]
Check for --no-undefined linker flag and use it.

This adds extra safety that the built libraries will have all the
correct dependencies linked in.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoAdd the attributes.m4 macro file from xine/lscube.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 00:08:42 +0000 (01:08 +0100)]
Add the attributes.m4 macro file from xine/lscube.

This is a shared macro file that is currently maintained in both xine
and lscube repositories and contains a series of utility macros to
check compiler and linker features.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoDon't use AC_CANONICAL_SYSTEM, only use AC_CANONICAL_HOST.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 00:02:55 +0000 (01:02 +0100)]
Don't use AC_CANONICAL_SYSTEM, only use AC_CANONICAL_HOST.

Since alsa-lib is not a tool generating architecture code, the target
definition does not matter, instead use $host and $build properly.

See http://blog.flameeyes.eu/2008/10/11 for a detailed explanation of
the problem and the fix.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoFix segfault with invalid meter plugin option
Takashi Iwai [Wed, 19 Nov 2008 15:14:27 +0000 (16:14 +0100)]
Fix segfault with invalid meter plugin option

snd_pcm_meter_add_scope_conf() may cause a segfault when pcm_scope_type
isn't defined.

Initialize type_conf properly to avoid it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoAdd linear plugin wrapping iec958 PCM for ice1724-based boards
Takashi Iwai [Wed, 19 Nov 2008 13:59:03 +0000 (14:59 +0100)]
Add linear plugin wrapping iec958 PCM for ice1724-based boards

The ice1724-based cards can handle only 32bit while the apps almost
expet 16bit format for SPDIF I/O.  This prevents the default config
working on many apps like mplayer, xine, etc.

This patch simply adds the least automatic conversion by linear plugin.
Note that "plug" isn't used here.  Otherwise we get a problem of the
routing (plug over plug is buggy).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix volume/switch updates for global/simple mixer elements
Takashi Iwai [Mon, 10 Nov 2008 16:39:11 +0000 (17:39 +0100)]
Fix volume/switch updates for global/simple mixer elements

Fixed a long-standing bug that the values of global or simple mixer
elements aren't updated when dir = SM_CAPT is given.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoRelease v1.0.18
Jaroslav Kysela [Wed, 29 Oct 2008 12:42:10 +0000 (13:42 +0100)]
Release v1.0.18

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoMerge branch 'master' of git@git.alsa-project.org:alsa-lib
Jaroslav Kysela [Thu, 23 Oct 2008 07:58:10 +0000 (09:58 +0200)]
Merge branch 'master' of git@git.alsa-project.org:alsa-lib

15 years agoAdd snd_pcm_avail() and snd_pcm_avail_delay() prototypes
Jaroslav Kysela [Thu, 23 Oct 2008 07:57:11 +0000 (09:57 +0200)]
Add snd_pcm_avail() and snd_pcm_avail_delay() prototypes

Prototypes for new functions from commit
fe5391c9da2212dc594d1ee7f366e55432af0454
were lost somehow.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoAdd iec958 PCM definition for PS3
Takashi Iwai [Mon, 20 Oct 2008 09:25:12 +0000 (11:25 +0200)]
Add iec958 PCM definition for PS3

Added the iec958 PCM definition for PS3.
Since it's a new feature, the definition is marked as optional.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix sort-out of non-existing devices in namehint
Takashi Iwai [Fri, 17 Oct 2008 15:51:45 +0000 (17:51 +0200)]
Fix sort-out of non-existing devices in namehint

get_dev_name() checks wrongly the device_output, and it doesn't check
properly the case when only device is set and device_input and output
are unset.  This resulted in listing of non-existing HDMI device, for
example.  The patch fixes both issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoIncrease the components array size
Takashi Iwai [Tue, 7 Oct 2008 10:08:29 +0000 (12:08 +0200)]
Increase the components array size

Increase the components array size from 80 to 128 chars.
The string there is supposed to be null-terminated, so it can cover
the smaller array size in the older version, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix return value of snd_ctl_hw_subscribe_events()
Takashi Iwai [Tue, 30 Sep 2008 12:44:12 +0000 (14:44 +0200)]
Fix return value of snd_ctl_hw_subscribe_events()

snd_ctl_subscribe_events() must return 0 when succeeded.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoReplace some assert() with runtime checks
Takashi Iwai [Tue, 30 Sep 2008 12:43:14 +0000 (14:43 +0200)]
Replace some assert() with runtime checks

assert() for sanity checks that can happen in runtime isn't a good idea.
Replaced it with the real check.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agotest/pcm: Fix error messages in async callback and add snd_pcm_start() condition
Jaroslav Kysela [Mon, 15 Sep 2008 13:14:58 +0000 (15:14 +0200)]
test/pcm: Fix error messages in async callback and add snd_pcm_start() condition

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoFix comment typos for snd_pcm_read[in]()
Jaroslav Kysela [Tue, 9 Sep 2008 17:56:17 +0000 (19:56 +0200)]
Fix comment typos for snd_pcm_read[in]()

From: William Estrada <MrUmunhum@popdial.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoRelease v1.0.18rc3
Jaroslav Kysela [Tue, 9 Sep 2008 16:55:49 +0000 (18:55 +0200)]
Release v1.0.18rc3

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agopcm_softvol plugin: remove access type change for refine
Jaroslav Kysela [Tue, 9 Sep 2008 11:07:39 +0000 (13:07 +0200)]
pcm_softvol plugin: remove access type change for refine

The softvol plugin does in-place sample recalculation. The access type
cannot be changed like in linear plugins. Remove access type change
in refine functions.

This bug was detected with PulseAudio on Sony PS3 platform.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoAdd snd_pcm_avail() and snd_pcm_avail_delay() functions. Make snd_pcm_hwsync() deprec...
Jaroslav Kysela [Mon, 1 Sep 2008 09:38:53 +0000 (11:38 +0200)]
Add snd_pcm_avail() and snd_pcm_avail_delay() functions. Make snd_pcm_hwsync() deprecated.

As proposed in http://mailman.alsa-project.org/pipermail/alsa-devel/2008-June/008558.html
the snd_pcm_avail() and snd_pcm_avail_delay() functions are now available
to get accurate stream position in a straight way. The snd_pcm_avail_delay()
function was added to ensure full sync between avail and delay values. It's
actually implemented using delay() + avail_update() calls but it might be
changed in future.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoalsa-lib: Don't call the simple mixer interface "legacy"
Lennart Poettering [Sun, 31 Aug 2008 01:42:56 +0000 (03:42 +0200)]
alsa-lib: Don't call the simple mixer interface "legacy"

The simpler mixer interface is not legacy, so the header file shouldn't claim
otherwise.

Fixes bug#3569

From: Lennart Poettering <mznyfn@0pointer.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoalsa-lib: Reword doxygen doc for snd_pcm_delay()
Lennart Poettering [Sun, 31 Aug 2008 01:42:20 +0000 (03:42 +0200)]
alsa-lib: Reword doxygen doc for snd_pcm_delay()

snd_pcm_delay() is for synchronization purposes, it returns the overall latency
of the stream, not just the latency induced by the hardware playback buffer.
The documentation is a bit misleading about this fact, and some people already
misunderstood it. So let's reword this to make the explanation clearer and
explicit.

This is a result of the discussions of the thread this mail belongs to:

http://mailman.alsa-project.org/pipermail/alsa-devel/2008-June/008456.html

From: Lennart Poettering <mznyfn@0pointer.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoalsa-lib: Make sure SND_PCM_NO_xxx flags don't get lost when nonblocking mode is...
Lennart Poettering [Sun, 31 Aug 2008 01:41:48 +0000 (03:41 +0200)]
alsa-lib: Make sure SND_PCM_NO_xxx flags don't get lost when nonblocking mode is enabled

The plug PCM copies the 'mode' field from the slave PCM. If blocking mode is
enabled for the plug PCM the mode is subsequently overwritten with the original
requested 'mode'. If non-blocking mode is requested this does not happen.

Because the hw PCM synthesizes the 'mode' from the actual file descriptor flags
no SND_PCM_NO_xxx will ever be set for it. This has the effect that the 'mode'
of the plug PCM will also not include those flags anymore -- unless they are
overwritten as mentioned above. This basically means SND_PCM_NO_xxx is ignored
for plug:hw:4711 style device strings opened in non-blocking mode.

You can easily test this with "aplay --channels 7 --disable-channels -f S16_LE
-r 44100 -D plug:hw:0" on a device that cannot do 7 channels. Normally this
call should fail, however if you add "-N" to the command line this call will
succeed.

This patch simply copies the SND_PCM_NO_xxx flags back into the 'mode' field in
case we don't overwrite it with the original anyway.

Probably closes bug 3571 for good.

From: Lennart Poettering <mznyfn@0pointer.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoRelease v1.0.17a
Jaroslav Kysela [Fri, 15 Aug 2008 11:28:55 +0000 (13:28 +0200)]
Release v1.0.17a

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoIEC958 definition for consumer status channel update
Pawel MOLL [Fri, 1 Aug 2008 10:23:50 +0000 (11:23 +0100)]
IEC958 definition for consumer status channel update

Updated IEC958 consumer status channel definitions according
to the third edition of IEC60958-3 spec.

Signed-off-by: Pawel Moll <pawel.moll@st.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoFix non-tread mode with PCM direct plugins
Takashi Iwai [Thu, 31 Jul 2008 10:18:08 +0000 (12:18 +0200)]
Fix non-tread mode with PCM direct plugins

tread=0 wasn't set properly for very old ALSA drivers with no timer
tread support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoFix interleave check in pcm_direct.c
Takashi Iwai [Tue, 29 Jul 2008 12:41:51 +0000 (14:41 +0200)]
Fix interleave check in pcm_direct.c

Fix the check of interleaved format.  It checked a totally bogus value
as PCM format.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agofix return value of snd_pcm_rewind()/snd_pcm_forward() to return how much actually...
Lennart Poettering [Fri, 18 Jul 2008 19:24:38 +0000 (21:24 +0200)]
fix return value of snd_pcm_rewind()/snd_pcm_forward() to return how much actually has been rewound, instead of what actually could have rewound

Make snd_pcm_plugin_rewind()/_forward() actually return how much has
been rewound/forwarded instead of how much could have been
rewounded/forwarded. This makes the code actually do what the
documentation of snd_pcm_rewind() suggests.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agofix type of internally used sframes variable, to avoid unnecessary casts
Lennart Poettering [Fri, 18 Jul 2008 19:22:50 +0000 (21:22 +0200)]
fix type of internally used sframes variable, to avoid unnecessary casts

This minor patch fixes the type of the sframes variable in
snd_pcm_plugin_forward(). With this fix we need to cast less and the
code is less confusing.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoclamp snd_pcm_rewind()/snd_pcm_forward() into the right direction
Lennart Poettering [Fri, 18 Jul 2008 19:21:23 +0000 (21:21 +0200)]
clamp snd_pcm_rewind()/snd_pcm_forward() into the right direction

The clamping of the input parameter in snd_pcm_rewind()/_forward() is
in the wrong direction.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoAdd boolean (mute) functionality to softvol plugin
Takashi Iwai [Wed, 16 Jul 2008 10:37:51 +0000 (12:37 +0200)]
Add boolean (mute) functionality to softvol plugin

When the resolution is set to 2, a boolean control is created as a
mute switch instead of a volume control.
Also, fixed the possible zero-division error.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoRelease v1.0.17
Jaroslav Kysela [Mon, 14 Jul 2008 08:57:56 +0000 (10:57 +0200)]
Release v1.0.17

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agotest/pcm.c: Fix SND_PCM_FORMAT_S24 support
Takashi Iwai [Thu, 10 Jul 2008 16:45:23 +0000 (18:45 +0200)]
test/pcm.c: Fix SND_PCM_FORMAT_S24 support

The program uses snd_pcm_format_width() wrongly to calculate the sample
size.  It must be snd_pcm_format_physical_width() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoFix type-punning in test/pcm.c
Takashi Iwai [Thu, 10 Jul 2008 16:44:15 +0000 (18:44 +0200)]
Fix type-punning in test/pcm.c

The cast won't work well with strict aliasing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopcm: fix comment for snd_pcm_avail_update()
Jaroslav Kysela [Mon, 16 Jun 2008 11:23:22 +0000 (13:23 +0200)]
pcm: fix comment for snd_pcm_avail_update()

In some cases, value might be used for r/w ops, too.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoRelease v1.0.17rc2
Jaroslav Kysela [Mon, 16 Jun 2008 07:40:42 +0000 (09:40 +0200)]
Release v1.0.17rc2

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoFix segfault with dmix of 3-bytes formats
Josh Green [Sat, 7 Jun 2008 08:10:49 +0000 (10:10 +0200)]
Fix segfault with dmix of 3-bytes formats

The i386 and x86-64 dmix may cause segfaults when 3-bytes formats are used
due to btsl asm code, which may overcome the buffer end-boundary.
The patch changes btsl to btsw so that it doesn't happen.

ALSA bug#3341:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3341

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoPCM: allow mmap-access conversion in plug
Takashi Iwai [Fri, 6 Jun 2008 15:10:41 +0000 (17:10 +0200)]
PCM: allow mmap-access conversion in plug

The plug plugin has a long-standing problem that it can handle only
slaves that support mmap because of format/rate/access conversions
(these corresponding plugins work only with mmap).

This patch adds the support of automatic mmap->rw conversion via
mmap_emul plugin.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoExport __snd_pcm_mmap_emul_open()
Takashi Iwai [Fri, 6 Jun 2008 15:09:07 +0000 (17:09 +0200)]
Export __snd_pcm_mmap_emul_open()

Export __snd_pcm_mmap_emul_open() for plug layer.  This isn't exported
globally, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopcm_mmap_emul: clean up
Takashi Iwai [Fri, 6 Jun 2008 15:07:45 +0000 (17:07 +0200)]
pcm_mmap_emul: clean up

A little bit of code clean up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopcm_mmap_emul: Fix invalid check
Takashi Iwai [Fri, 6 Jun 2008 15:05:56 +0000 (17:05 +0200)]
pcm_mmap_emul: Fix invalid check

The check in snd_pcm_mmap_emul_refine() is bogus and buggy.

Since the changed access type is took back at snd_pcm_mmap_emul_refine
again, it has to check the availability of mmap at each time.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoFix compile warnings in pcm_hw.c
Takashi Iwai [Fri, 6 Jun 2008 14:59:47 +0000 (16:59 +0200)]
Fix compile warnings in pcm_hw.c

Two trivial compile warning fixes:

- Add a missing return to snd_pcm_hw_clear_timer_queue()
- params->info is no long but int

The second one might have hit already on 64bit machine, but alas,
no one didn't notice it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoFix cast warning
Takashi Iwai [Fri, 6 Jun 2008 14:58:02 +0000 (16:58 +0200)]
Fix cast warning

int64_t and long long isn't strictly identical, and thus gcc gives us
a heartful warning.  Suppress the warning by a pointer cast.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoRelease v1.0.17rc1
Jaroslav Kysela [Tue, 3 Jun 2008 08:18:14 +0000 (10:18 +0200)]
Release v1.0.17rc1

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agohgcompile -> gitcompile
Jaroslav Kysela [Tue, 3 Jun 2008 08:17:48 +0000 (10:17 +0200)]
hgcompile -> gitcompile

16 years agoremoved .hg files and renamed hgcompile to gitcompile
Jaroslav Kysela [Tue, 20 May 2008 11:29:44 +0000 (13:29 +0200)]
removed .hg files and renamed hgcompile to gitcompile

16 years agoImplemented snd_pcm_sw_params_(set|get)_period_event for interrupt wakeup like behaviour
Jaroslav Kysela [Fri, 9 May 2008 14:02:02 +0000 (16:02 +0200)]
Implemented snd_pcm_sw_params_(set|get)_period_event for interrupt wakeup like behaviour

Actually, PCM timer is used as source for poll(). It might be optimized
in the kernel code later.

16 years agoimplemented snd_pcm_rewindable() and snd_pcm_forwardable(), removed can_rewind and...
Jaroslav Kysela [Mon, 21 Apr 2008 10:46:50 +0000 (12:46 +0200)]
implemented snd_pcm_rewindable() and snd_pcm_forwardable(), removed can_rewind and can_forward

16 years agoimplemented integer volume <-> dB volume conversion functions for simple mixer
Jaroslav Kysela [Mon, 21 Apr 2008 09:44:20 +0000 (11:44 +0200)]
implemented integer volume <-> dB volume conversion functions for simple mixer

16 years agoadded snd_pcm_hw_params_is_monotonic/can_forward/can_rewind functions
Jaroslav Kysela [Fri, 11 Apr 2008 12:11:04 +0000 (14:11 +0200)]
added snd_pcm_hw_params_is_monotonic/can_forward/can_rewind functions

16 years agoPCM API - explain more trigger timestamp
Jaroslav Kysela [Thu, 10 Apr 2008 07:46:10 +0000 (09:46 +0200)]
PCM API - explain more trigger timestamp