Commit graph

2540 commits

Author SHA1 Message Date
Clemens Ladisch
7f73f1bb15 add midi event tests
Add some tests for the snd_midi_event_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-06 12:00:04 +02:00
Clemens Ladisch
8541983799 more midi_event documentation
Expand the documentation for the snd_midi_event_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-06 11:55:31 +02:00
Kenneth Johansson
d23845e563 test/pcm.c: Sample generation on big endian platforms was broken.
Has not worked since commit 3d1fa92490

Signed-off-by: Kenneth Johansson <kenneth@southpole.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03 22:49:59 +02:00
Paul Fertser
5a70411d6c pcm_hooks: cosmetic removal of unused variables
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-30 14:53:42 +02:00
Takashi Iwai
2a77d217a6 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>
2009-06-30 11:11:34 +02:00
Takashi Iwai
608cccb088 Merge branch 'master' of git@git.alsa-project.org:alsa-lib 2009-06-24 12:25:47 +02:00
Clemens Ladisch
394b376b3b 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>
2009-06-22 10:00:46 +02:00
Clemens Ladisch
cbf395d692 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>
2009-06-22 10:00:03 +02:00
Jaroslav Kysela
e94f3cfdf9 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>
2009-06-16 20:10:19 +02:00
Takashi Iwai
f8a34aa683 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>
2009-06-16 14:28:57 +02:00
Takashi Iwai
e5ca075cde 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>
2009-06-09 04:49:57 +02:00
Takashi Iwai
4d2ba6a460 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>
2009-06-09 04:45:18 +02:00
Takashi Iwai
bb956b7b70 Add IEC958 status bits support to SB-XFi.conf
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 17:21:26 +02:00
Takashi Iwai
1929c55d2e 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>
2009-06-02 16:26:03 +02:00
Takashi Iwai
29841e67e9 Add config file for SB-XFi driver
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 16:08:57 +02:00
Jaroslav Kysela
d2aadec5e4 snd_card_get_index() - extend comment for last change
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-05-12 08:28:06 +02:00
Jaroslav Kysela
33ab0b5381 Extend snd_card_get_index() to accept also control device name like /dev/snd/controlC0
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-05-12 08:06:41 +02:00
Jaroslav Kysela
3e30007a19 Release v1.0.20
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-05-06 09:07:23 +02:00
Takashi Iwai
646f24a04c Merge branch 'master' of /export/git/alsa/alsa-lib/ 2009-04-23 14:58:59 +02:00
Jaroslav Kysela
0de385109a pcm: more better documentation for snd_pcm_poll_descriptors
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-21 14:36:33 +02:00
Jaroslav Kysela
a987a692bf pcm_hw plugin: show appl_ptr and hw_ptr in dump() callback
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-09 10:49:57 +02:00
Jaroslav Kysela
fb12b89453 pcm_hw plugin: preserve monotonic flag also after snd_pcm_hw_params() call
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-08 09:29:35 +02:00
Takashi Iwai
59c774ed5e 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>
2009-03-23 09:06:23 +01:00
Pavel Hofman
0fe807dedd Change "%b" to represent bits instead of bytes in PCM file plugin
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-03 17:07:55 +01:00
Patricio Paez
50e9cd9525 Fix typos in ALSA Lib documentation
Signed-off-by: Patricio Paez <pp@pp.com.mx>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-23 10:00:06 +01:00
Takashi Iwai
59826eab77 Merge branch 'master' of git@git.alsa-project.org:alsa-lib 2009-02-17 17:01:06 +01:00
Takashi Iwai
81241ffb81 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>
2009-02-17 16:58:12 +01:00
Clemens Ladisch
91f1b4b96f 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>
2009-02-17 09:45:57 +01:00
Takashi Iwai
e38f921625 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>
2009-02-13 17:19:52 +01:00
Clemens Ladisch
1009f9859c 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>
2009-02-11 09:53:29 +01:00
Takashi Iwai
548dd9be90 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>
2009-02-02 16:11:39 +01:00
Takashi Iwai
cb66600dd3 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>
2009-02-02 16:10:08 +01:00
Pavel Hofman
59ebaa8e9d 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>
2009-01-29 11:59:27 +01:00
Takashi Iwai
c821f2e7f2 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>
2009-01-28 15:00:35 +01:00
Takashi Iwai
56fa81fdab 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>
2009-01-28 09:07:53 +01:00
Takashi Iwai
d3a8e853fb 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>
2009-01-27 17:21:34 +01:00
Krzysztof Helt
777a869769 Fix GUS.conf to be usable
Fix GUS.conf to work for default PCM.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-27 11:44:14 +01:00
Takashi Iwai
3b728db20d Add missing -ldl to modules/mixer/simple/*
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-21 09:29:35 +01:00
Takashi Iwai
a789b66d00 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>
2009-01-21 09:25:48 +01:00
Jaroslav Kysela
b06414151d Release v1.0.19
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-01-19 12:17:18 +01:00
Clemens Ladisch
c8567c5870 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>
2009-01-19 10:20:38 +01:00
Jaroslav Kysela
81e1550fe5 Add m4/attributes.m4 as dist file..
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-01-05 13:21:12 +01:00
Takashi Iwai
0400fa6f8d 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>
2008-12-10 18:20:50 +01:00
Takashi Iwai
48e4d089dc Fix softvol access refine
The commit a13707da6b

    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>
2008-12-04 16:01:22 +01:00
Takashi Iwai
c0fd854ff1 Fix snd-pcsp default configuration
The softvol must be inside the plug.  Otherwise it gets stuck.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-26 14:09:06 +01:00
Diego E. 'Flameeyes' Pettenò
03388ca6d3 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>
2008-11-21 22:39:38 +01:00
Diego E. 'Flameeyes' Pettenò
fc8d8bb2e6 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>
2008-11-21 22:14:52 +01:00
Diego E. 'Flameeyes' Pettenò
2eaf9403d2 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>
2008-11-21 20:48:33 +01:00
Diego E. 'Flameeyes' Pettenò
8b14625cc3 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>
2008-11-21 20:38:49 +01:00
Diego E. 'Flameeyes' Pettenò
1f734e3058 Make snd_pcm_hw_params_names static to pcm_params.c .
Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
2008-11-21 20:28:56 +01:00