Takashi Iwai [Wed, 26 Nov 2008 13:27:24 +0000 (14:27 +0100)]
speaker-test: Fix floating-point exception bug
The period_size an buffer_size parameters must be taken after calling
snd_pcm_hw_params(). Otherwise they could be undefined numbers.
For example, period_size gets 0 when pcsp driver is used, resulting in
a floating-point exception error.
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>
Move conditional inclusion of locale.h further down.
Without this patch, ENABLE_NLS is checked before ever being defined
(aconfig.h is not yet included), and thus locale.h would never be
included even when NLS is enabled.
Signed-off-by: Diego 'Flameeyes' Pettenò <flameeyes@gmail.com>
Takashi Iwai [Thu, 30 Oct 2008 10:50:17 +0000 (11:50 +0100)]
Add --disable-xmlto configure option
Added the check of xmlto program in configure script.
Also added --disable-xmlto configure option for systems with a broken
or older xmlto that doesn't work properly.
Jaroslav Kysela [Thu, 23 Oct 2008 09:13:24 +0000 (11:13 +0200)]
aplay/arecord: add --test-position test
In some cases (HDA audio) the ring buffer position values returned
from alsa-lib are inaccurate. The added --test-position option will
print suspicious values.
Jaroslav Kysela [Mon, 18 Aug 2008 13:01:44 +0000 (15:01 +0200)]
alsactl init - CTL{values}, CTL{enums} and default "guess method" initialization
Implemented CTL{values)=value to set all values at once.
Implemented CTL{enums} to match against strings in enum list.
Added 'default' (guess method) initialization configuration.
Jaroslav Kysela [Thu, 14 Aug 2008 14:46:27 +0000 (16:46 +0200)]
alsactl init - restore calls also init on failure
The initialization procedure consist from default initialization and
state restoration. When restore fails for a reason or the config file
contains inaccurate information, then init is called.
Also, if something fails (init or restore), a file specified using -r
option can be created with description what failed. It can be useful
when user space decides to notify user to set the sound driver properly.
Jaroslav Kysela [Wed, 13 Aug 2008 18:49:07 +0000 (20:49 +0200)]
alsactl init configuration syntax changes
- change SYSFS_DEVICE to CONFIG{sysfs_device}
- INCLUDE key now handles also directories
- RESULT key can assign value now
- EXIT="return" operation returns from included file immediately
Default 00main and hda configuration files changes:
Here is a small patch for alsaconf, which removes an useless dependency
on `which' by using a bash built-in instead : `type -p'. I encountered
the problem of the missing `which' while using alsaconf on a clfs-built
linux system. It is useless to install `which' when we already have
`type -p', and alsaconf already needs bash, so this does not replace
a dependency by another one, but really removes a dependency for alsaconf.
speaker-test.c - fix sine generator on big-endian archs
speaker-test doesn't work well when you choose a little-endian format on a
big-endian processor, or the opposite. Yes, I know about plughw:, but for
debugging purposes it may not be an option. The following patch add proper
support for S32 and S16 support for but LE and BE processors:
- The "if (bits-per-sample)" construct was replaced by case (format).
- Support for S16_BE, S32_BE formats was added.
- S16_LE and S32_LE were made compatible with big-endian processors.
- NB: The pink noise generator wasn't changed (I'll do if this patch is OK).
The recent ncurses package provides ncurses*-config program to give the
proper cflags and libs. Let's use them if available.
Right now, the ncurses version (5) is hard-coded. It should be better
to be variable as well, but it'd be messy. Hope the ncurses version won't
change rapidly.
Pawel MOLL [Thu, 6 Mar 2008 16:34:21 +0000 (17:34 +0100)]
Support for playing WAV files with "extensible format" header using aplay.
WAV files with more than 2 channels or with more than 16 bits per samples
can be saved with "extensible format" chunk
(see http://msdn2.microsoft.com/en-us/library/ms713496(VS.85).aspx).
For instance, sox, when converting data to 24- or 32-bits per sample format
uses this format, and aplay was unable to play such file. Now the problem
is solved :-)
Andrew Paprocki [Wed, 6 Feb 2008 13:05:07 +0000 (14:05 +0100)]
aplay/arecord - Add support for IEEE float 32-bit WAV files
This patch modifies aplay/arecord to support playing/capturing IEEE float
32-bit WAV files. Tested on HDA hardware in both stereo and multi-channel
modes. Added the WAV file constant for Dolby AC-3 S/PDIF passthrough to
formats.h for future use when AC-3 passthrough is better supported.
Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Takashi Iwai [Mon, 17 Dec 2007 10:49:00 +0000 (11:49 +0100)]
alsactl: skip inactive controls
When using alsactl to save or restore the card settings, it currently
skips over controls that don't have the appropriate read/write
permissions. It should also skip over inactive controls, otherwise it
will get an error when it tries to access that control, and will fail to
save the card state (or fully restore it.)
Takashi Iwai [Fri, 14 Dec 2007 14:29:51 +0000 (15:29 +0100)]
aplay - Reset non-blocking flag before snd_pcm_drain()
snd_pcm_drain() doesn't block when running with O_NONBLOCK.
Reset the non-blocking mode before calling snd_pcm_drain() properly
(and restore again for any further operations).
Takashi Iwai [Wed, 24 Oct 2007 11:53:14 +0000 (13:53 +0200)]
alsactl - restore dB level
When alsactl saved state has dB level information and an attribute
of a control element is changed after save (e.g. volume range is
changed), try to restore the values to keep the same dB level.
This change requires the new alsa-lib functions for TLV dB
conversion, so we check it in configure (until AM_PATH_ALSA(1.0.16)
works).
Takashi Iwai [Wed, 24 Oct 2007 11:08:28 +0000 (13:08 +0200)]
Make alsactl restore a bit more robust
Make "alsactl restore" a bit more robust. Now it tries to parse the
compound items in the case that the number of channels was changed.
The former mono-value is expanded to all channels.
amixer - Allow to pass enum item string for cset, too
cset accepts only integer values as indices, so far, but it's a bit
unfriendly. Now it accepts the item name as a string argument, too.
The index can be given using numbers as fallback.