Commit graph

1590 commits

Author SHA1 Message Date
Jaroslav Kysela
aa7a0dd70b add card number to ipc key for dmix / dsnoop PCM definitions
See ALSA bug#1573
Also add card_inum, iadd, imul functions to configuration files.
2006-10-11 15:59:19 +02:00
Jaroslav Kysela
faf8aad99a fix two issues in snd_device_name_hint()
- returned wrong error when the namehint section does not exist
- variable underflow for the rawmidi interface
2006-10-11 13:59:42 +02:00
Jaroslav Kysela
13fdc41785 add snd_device_name_hint() function and initial implementation
- add snd_device_name_hint() and snd_device_name_free_hint() functions
- add snd_ctl_iface_conf_name() functions
- do not accept parameters for the plugin definition without @args section
- add defaults.pcm.dmix.card/device and dsnoop.card/device definitions
- add hints for HDA-Intel.conf, pcm/dmix.conf, pcm/dsnoop.conf and alsa.conf
- add test/namehint test utility
- doxygen related cleanups
2006-10-11 13:18:57 +02:00
Jaroslav Kysela
b223fbba23 revert back one diff from changeset 2219 (fix various warnings) 2006-10-06 15:22:34 +02:00
Jaroslav Kysela
57eb3145b8 fix various warnings
See also ALSA bug#1689
2006-10-06 13:18:34 +02:00
Takashi Iwai
1a87651393 Use dmix/dsnoop for maestro3 boards
Use dmix/dsnoop for maestro3 boards.  Although maestro3 has multiple
playback capability, it supports only two streams (with the currently
available firmware).
2006-10-04 17:33:25 +02:00
Takashi Iwai
1827d9ccff Fix snd_pcm_open_noupdate() to refer alias
Fixed snd_pcm_open_noupdate() to refer alias.  This fixes the call like

	% aplay -Dplug:bah

where bah is an alias of a certain definition.
2006-10-04 17:32:22 +02:00
Jaroslav Kysela
275afa4d70 simple mixer - fix error recovery path for volume / switch write
If volume or switch write fails, the internal contents for element
is changed, but it is wrong. Reread the whole simple element in this
case to get correct values.
2006-10-01 17:57:36 +02:00
Jaroslav Kysela
10c396516a timer_hw: fix file descriptor leak
See: bug#2465
2006-09-29 10:34:22 +02:00
Jaroslav Kysela
35b1df509f configuration: added one more alias check to detect a circular configuration 2006-09-28 16:42:19 +02:00
Jaroslav Kysela
1dc96732c2 configuration: avoid endless loop when a key refers to itself
remove one warning from tlv_read routine in control.c
2006-09-28 15:47:25 +02:00
Clemens Ladisch
436b003173 rate plugin: fix boundary calculations
Make sure that the rate plugin does not try to change the slave's
boundary value when setting software parameters; such a change wouldn't
affect the slave pcm.

Furthermore, the stop_threshold conversion code used the wrong boundary
value, and the silence_size conversion code did not take into account
the boundary value at all.
2006-09-27 11:11:29 +02:00
Mike Frysinger
43b2802216 remove unneeded headers from alsa-lib/src/alisp/alisp.c
the alisp.c file includes wordexp.h even though it doesnt actually use any
wordexp functions ... causes trouble when target doesnt have wordexp
support :)

patch attached to scrub said headers

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2006-09-26 15:38:35 +02:00
Mike Frysinger
0a8bd08c62 remove unneeded headers from src/names.c
the src/names.c file includes many more headers than it actually needs ...
this causes troubles when porting to a target that lacks those headers :)

patch attached to scrub said headers

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2006-09-26 15:37:47 +02:00
Clemens Ladisch
0211bc3b68 fix parsing of non-decimal integers in configuration files
safe_strtoll() now accepts numbers in any base. It formerly assumed that
its input was a decimal number, which had the consequence that
hexadecimal or octal numbers would be parsed as strings when occurring
outside of parameter lists.

This obsoletes some workarounds in the file permission parsing code that
relied on this bug.
2006-09-18 17:57:58 +02:00
Takashi Iwai
a7bc1dd80c Check control API protocol version for TLV control
Check control API protocol version to avoid unnecessary ioctl
access for TLV stuff on the older drivers.
2006-09-17 22:06:46 +02:00
Takashi Iwai
9d2518bb91 Fix wrong scales in linear volume calculation
Fixed wrong scales of dB values (TLV is 0.01dB unit) in the linear
volume calculation.
2006-09-07 20:51:41 +02:00
Takashi Iwai
70825bb7e6 Fix a typo
Fixed a typo, wrongly placed endif.
2006-09-07 20:43:41 +02:00
Takashi Iwai
612216db0d Add --disable-alisp configure option
Added --disable-alisp configure option to disable alsip support.
2006-09-06 14:39:01 +02:00
Takashi Iwai
fba26cd668 Add support of dB range compound TLV
Added the support of dB range compound TLV type in the simple mixer layer.
All get_dB, get_dB_range and set_dB ops are supported.
2006-09-06 12:17:29 +02:00
Takashi Iwai
b0bbcd0697 Add handling of linear volume in simple mixer
Added the handling of linear volume TLV in the simple mixer layer.
2006-08-28 13:27:41 +02:00
Takashi Iwai
4962ec5a5c Add set_dB ops to simple mixer
Added the set_dB ops to simple mixer.
2006-08-25 11:56:50 +02:00
Takashi Iwai
448cbb6141 Add dB_range ops for simple mixer
Added the dB_range ops for simple mixer.
2006-08-25 11:54:59 +02:00
Takashi Iwai
5c71dd3ee7 Add dB range information to PCM softvol plugin
Added the dB range information to PCM softvol plugin.
Also, fixed the coefficient table to match with the
accurate dB step 0.20dB.
2006-08-25 11:46:19 +02:00
Takashi Iwai
d5caee8d36 Fix bogus value when no user TLV is defined
Check whether non-zero size TLV is really returned by comparing
with the pre-filled pattern.  ALSA 1.0.12 driver doesn't notify
the error even if user TLV is empty, so the previous value is
passed bogusly.
2006-08-25 11:43:22 +02:00
Takashi Iwai
66f3749cab Fix segfault when invalid TLV is passed
Fix segfault when invalid TLV is passed.
The invalid TLV entries must be ignored as error.
2006-08-23 15:44:09 +02:00
Takashi Iwai
4165a5bfd1 Fix dB ops for global volume
Fixed dB ops for global volume.
2006-08-23 15:25:43 +02:00
Tobin Davis
da076c868c Fix build issue on earler x86_64 based distributions
This patch fixes a build issue on systems with Gnu assembler
prior to 2.15.92.  Instead of having the inline assembler
translate the leal function on a 32 bit register, it is byte encoded.

Signed-off-by: Tobin Davis <tobinx.b.davis@intel.com>
2006-08-21 19:12:33 +02:00
Takashi Iwai
ae76129999 Move dB parser to mixer abstraction
Moved the parser of dB value to mixer abstraction from hcontrol layer.
Also, cleaned up codes.
2006-07-28 14:36:37 +02:00
Jaroslav Kysela
c4a5efeba3 mixer - cleanups for dB scale parsing 2006-07-27 10:45:25 +02:00
Takashi Iwai
a98fd022fa Remove dependencies with kernel headers from instrument layer codes
Don't include kernel headers from alsa-lib codes.
Still remained in instrument layer codes, but now all should be gone.
2006-07-25 15:36:14 +02:00
Takashi Iwai
982786e9eb Fix bogus pause flag on dmix
Fix bogus PCM pause flag on dmix.  It doesn't support pause properly.
2006-07-25 15:36:13 +02:00
James Courtier-Dutton
5e3fc87888 Implement support for dB gain display in alsamixer. 2006-07-22 14:56:48 +01:00
Jaroslav Kysela
91273c228f Fix examples for PCM API. Fix dogygen warnings. 2006-07-11 21:48:51 +02:00
Jaroslav Kysela
c7a0708a23 Control API - add TLV support
snd_ctl_elem_tlv_read
snd_ctl_elem_tlv_write
snd_ctl_elem_tlv_command
snd_ctl_elem_info_is_tlv_readable
snd_ctl_elem_info_is_tlv_writable
snd_ctl_elem_info_is_tlv_commandable
snd_hctl_elem_tlv_read
snd_hctl_elem_tlv_write
snd_hctl_elem_tlv_command
2006-07-05 17:42:16 +02:00
Takashi Iwai
408697bfe2 Add config for new snd-aoa driver
Add a new config for new snd-aoa driver, aliased to PMacToonie.
2006-06-30 11:34:30 +02:00
Takashi Iwai
67ff9b7bf0 Fixed driver alias of Aureon 7.1 Universe
Fixed driver alias of Aureon 7.1 Universe.  Aureon71Universe was too long
as the driver name.  The corrected name is Aureon71Univ.
2006-06-29 16:43:56 +02:00
Takashi Iwai
f725af9987 Fix segfault with bindings parameters of dmix/dshare
Fix segfault with bindings parameters of dmix/dshare (bug#2235).
2006-06-27 12:08:38 +02:00
Takashi Iwai
bbbb06bc8f Turn on iec958 capture of iec1724 boards with spdif PCM
Automatically turn on iec958 capture of iec1724 boards
with spdif PCM via hooks plugin.
2006-06-23 14:42:59 +02:00
Takashi Iwai
da17b50892 Add default dmix rate and format definitions in alsa.conf
Added defaults.pcm.dmix_format and dmix_rate definitions to
alsa.conf.  They are referred as the default values of standard
dmix/dsnoop PCM.
2006-06-16 19:27:35 +02:00
Takashi Iwai
9984a0a4b4 Fix division-by-zero in snd_pcm_dump_hw_setup()
Fixed division-by-zero error in snd_pcm_dump_hw_setup().
2006-06-16 18:53:32 +02:00
Takashi Iwai
b3c3e355d9 Initialize all fields of slave PCM instance of direct plugins
Initialize all fields of slave PCM instance of direct plugins.
Some fields were not initialized properly.
2006-06-16 18:52:12 +02:00
Pierre Ossman
2a7f35347b Make snd_hctl_wait() respect the API
snd_hctl_wait() currently makes a lot of assumptions that fall outside
the defined API. snd_pcm_wait(), however, follows the API nicely so the
new version is based on that.

Signed-off-by: Pierre Ossman <ossman@cendio.se>
2006-05-26 17:27:00 +02:00
Pierre Ossman
3fd9369990 Allow ioplugins to override snd_pcm_delay()
Some io plug-ins might want to adjust the reported delay value and not
strictly follow the current buffer usage (that's why we have two calls
after all).

Allow them to specify a delay() callback and use the previous behaviour
if they don't.

Signed-off-by: Pierre Ossman <ossman@cendio.se>
2006-05-26 17:08:18 +02:00
Juan Carlos Castro y Castro
1d80c5b901 Addition of "infile" parameter (virtual mic) to the file plugin
When this new parameter is specified, the behavior of opening a file PCM
for input is changed to the following: reads from the device, instead of
being passed down to the slave PCM, will read the raw data from the
specified file. No file writes will take place in this case. In the
absence of this parameter, previous behavior is unchanged.

The input file name and descriptor are kept in the snd_pcm_file_t struct
in a manner analogous to the already existing output file parameter.

TODO:

(1) Only interleaved reads (snd_pcm_file_readi) have been implemented
for now.

(2) File read()'s that return a number of bytes that's not a multiple of
the frame size will result in data loss (choppiness). The rbuf,
rbuf_size_bytes, and rbuf_used_bytes members of the snd_pcm_file_t
struct will be used to address this problem in the future.

(3) Mind whether the PCM was opened in blocking mode. If so, we'll have
to loop until the buffer has been filled with read()'s.

Signed-off-by: Juan Carlos Castro y Castro <jcastro@vialink.com.br>
2006-05-19 18:26:41 +02:00
Takashi Iwai
daed233936 Fix surround40 config for ens1370
Fixed surround40 config for ens1370.  Added missing interface for
the hook control.
2006-05-18 11:26:00 +02:00
Takashi Iwai
ffebf01d61 Correction for fixing alsa-lib static build
Added the missing _snd_module_pcm_* definitions for static alsa-lib.

From: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
2006-05-12 14:43:26 +02:00
Takashi Iwai
308f52e65a Fix a typo in pcm_file.c
Fix a typo in snd_pcm_file_readn().
2006-05-12 12:09:33 +02:00
Takashi Iwai
f9e0c56c46 Fix hwptr update in rate plugin
Fixed the update of hwptr in rate plugin.
This caused bad sounds on rate expansion and invalid memory access.
2006-05-03 19:18:28 +02:00
Takashi Iwai
ae363f57be Fix the description of return value of snd_config_search_definition()
Fixed the description of the return value of snd_config_search_definition().
2006-05-02 17:48:47 +02:00