The ICE1712 kernel driver accepts 10 playback channels and
12 recording channels only. Therefore fix this channel count
in alsa-lib.
BugLink: http://bugs.launchpad.net/bugs/178442 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Liam Girdwood [Tue, 21 Dec 2010 22:11:51 +0000 (23:11 +0100)]
ucm: modifiers names must be compound parse
Modifier names must end in a .index to ensure we can support
same named modifiers. However the modifier index will be for internal
use only and the client will not use the index when setting modifier.
The modifier selection for same name modifiers will be based upon supported
device.
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Thu, 18 Nov 2010 08:27:07 +0000 (09:27 +0100)]
pcm: fix snd_pcm_avail_delay() function
For capture stream, the delay must be obtained as last, but we need to
update the ring buffer pointers for the avail_update call. So, rearrange
the code a bit and add hwsync call as first.
Clemens Ladisch [Mon, 15 Nov 2010 09:33:35 +0000 (10:33 +0100)]
pcm: pass hw_params flags to slave
Fix required before interrupt disabling routines patch can be applied.
Without this fix, the interrupts are only disabled when directly
accessing hw devices.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Simon McVittie [Fri, 8 Oct 2010 08:06:29 +0000 (09:06 +0100)]
Version-check libtool correctly when doing an out-of-tree build
libtool is only created at the end of ./configure, so it doesn't make
sense to grep it in ./configure (the check would always fail the first
time). However, ltmain.sh is copied into the ${srcdir} by libtoolize and
should be safe to check at any time that configure can be run.
Signed-off-by: Simon McVittie <smcv@debian.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Fri, 15 Oct 2010 08:33:20 +0000 (10:33 +0200)]
tlv: fix returned dB information for min-is-mute controls
For TLV information that indicates that the minimum value is actually
muted, the returned range used the wrong minimum dB value, and
converting dB values to raw control values did not round up correctly
near the minimum.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Mon, 11 Oct 2010 08:34:12 +0000 (10:34 +0200)]
config file processing: rewrite the locking - use one recursive mutex
Avoid configuration file processing races when multiple threads call
the *open() functions together (for example using alsaloop with
multiple -T jobs can reproduce this issue).
Jaroslav Kysela [Wed, 22 Sep 2010 12:31:15 +0000 (14:31 +0200)]
ucm: Introduce "Value {}" section, more implementation work
- new "Value {}" section is introduced for read-only values
describing the PCM and control/mixer IDs (or any other
things)
- more complete implementation for API functions
Jaroslav Kysela [Wed, 25 Aug 2010 07:03:36 +0000 (09:03 +0200)]
ucm: Recode header to be more universal
- merge all similar functions to one - make everything
string based
- add possibility to create virtual cards
- add comment pairs for the end user interface
Liam Girdwood [Mon, 23 Aug 2010 16:17:18 +0000 (18:17 +0200)]
ucm: core - Add initial Use Case Manager support.
This patch adds audio Use Case management support to alsa-lib.
UCM is designed to abstract the audio device hardware mixer controls into
high level abstract use cases.
The use case manager works by configuring the sound card ALSA kcontrols to
change the hardware digital and analog audio routing to match the requested
device use case. The use case manager kcontrol configurations are stored in
easy to modify text files.
UCM development has been kindly sponsored by Texas Instruments Inc,
Wolfson Microelectronics PLC and Slimlogic Ltd.
CC: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk> Signed-off-by: Justin Xu <justinx@slimlogic.co.uk> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Liam Girdwood [Mon, 23 Aug 2010 16:17:17 +0000 (18:17 +0200)]
ucm: header - ALSA Use Case Manager
This patch adds the API header for alsa-lib Use Case Management support.
This file defines the public interface exported by UCM to client
applications.
UCM development has been kindly sponsored by Texas Instruments Inc,
Wolfson Microelectronics PLC and Slimlogic Ltd.
CC: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Justin Xu <justinx@slimlogic.co.uk> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Jaroslav Kysela [Wed, 11 Aug 2010 18:20:40 +0000 (20:20 +0200)]
pcm: introduce defaults.pcm.compat to change the params choose behaviour
Having getenv directly in the function is not a good idea. Allow
configuration of the behaviour change in snd_pcm_param_choose() function
using alsa.conf. Use the environment variable LIBASOUND_COMPAT only
as fallback.
Jaroslav Kysela [Wed, 11 Aug 2010 17:45:40 +0000 (19:45 +0200)]
pcm: add defaults.pcm.minperiodtime parsing
Some broken applications like Audacious don't set any timing parameters.
While the alsa-lib behaviour is to select the smallest period size and
biggest buffer size, the result is the generation of thousands
interrupts per second.
If user asks for 1dB the snd_tlv_convert_from_dB will not find
the raw value, since the 1dB is not part of either range.
To fix this, we will store the previous non maching range's
maximum raw value. If the dB value is not found in the next range,
we will check, if the requested dB value is in between the current
and the previous range, and if it is than pick the apropriate raw
value based on the xdir (up or down rounding).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Peter Ujfalusi [Wed, 19 May 2010 06:19:26 +0000 (08:19 +0200)]
control: tlv: Check dB range only within the control's volume range
The DB_RANGE need to be used on some HW, since the gain on
volume control is not continuous, and has to be divided into
several sub DB_SCALE ranges.
ASoC has a feature to override the HW default volume range,
and in this case when the volume range is less than the
HW maximum we do not need to go through the whole DB_RANGE,
but we need to stop where the kcontrol's maximum tell us.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
snd_seq_parse_address() uses strncmp() to compare the client name
in the string argument with the existing clients, until it finds one
name matching the same leading characters. This may produce wrong
results when there are two sequencer clients with similar names.
Example: "KMidimon" : "Kmid"
Signed-off-by: Pedro Lopez-Cabanillas <pedro.lopez.cabanillas@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
setlocale() is not thread-safe. It can actually trigger a crash if
another thread uses locale informations at the same time in the process.
Library code should use POSIX newlocale/duplocale/uselocale/freelocale
instead. Those functions only change the locale data for the calling
thread.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
David Fries [Fri, 25 Dec 2009 20:22:38 +0000 (14:22 -0600)]
modem.conf Off-hook improve behavior
Only restore the old value if it differs from the requested
value, because if it has changed restoring the old value
overrides the change. Take for example, a voice modem with
a .conf that sets preserve off-hook. Start playback (on-hook
to off-hook), start record (off-hook to off-hook), stop
playback (off-hook to restore on-hook), stop record (on-hook
to restore off-hook), Clearly you don't want to leave the
modem "on the phone" now that there isn't any playback or
recording active.
Signed-off-by: David Fries <david@fries.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jaroslav Kysela [Mon, 21 Dec 2009 08:09:42 +0000 (09:09 +0100)]
pcm: Close event timer in pcm_hw plugin
Dan McCombs discovered that snd_pcm_close() invocations are not leading
to associated timers being closed, which results in successively more
timers being created but not freed.
Original patch from Daniel T Chen <crimsun@ubuntu.com>.
Clemens Ladisch [Mon, 23 Nov 2009 09:56:46 +0000 (10:56 +0100)]
mixer: fix enum check
The recent CHECK_ENUM fix uncovered a bug in snd_mixer_selem_is_enumerated()
which would now return -EINVAL for any non-enum control, which would be
interpreted as 'true' by callers like amixer or alsamixer.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Michael Olbrich [Mon, 16 Nov 2009 10:31:49 +0000 (11:31 +0100)]
simple_none.c uses HAVE_SOFT_FLOAT it has to include config.h
for this to work properly.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>