chromiumos/third_party/alsa-lib.git
3 years agoUCM: get: Implement 'exact' value retrieval 0.15.877.B factory-1020.B factory-1235.B factory-1284.B factory-1412.B factory-1987.B factory-980.B firmware-881-u-boot-v1 firmware-kiev-2.112.B firmware-u-boot-v1 firmware-uboot_v2-1299.B master release-1011.B release-R16-1193.B release-R17-1412.B release-R18-1660.B release-R19-2046.B stabilize2 test-982.B
Stephen Warren [Mon, 6 Jun 2011 20:16:57 +0000 (14:16 -0600)]
UCM: get: Implement 'exact' value retrieval

[=]<NAME>[/[<modifier>|</device>][/<verb>]]
- value identifier <NAME>
- Search starts at given modifier or device if any,
    else at a verb
- Search starts at given verb if any,
    else current verb
- Searches modifier/device, then verb, then defaults
- Specify a leading "=" to search only the exact
  device/modifier/verb specified, and not search
  through each object in turn.
- Examples:
    "PlaybackPCM/Play Music"
    "CapturePCM/SPDIF"
  From ValueDefaults only:
    "=Variable"
  From current active verb:
    "=Variable//"
  From verb "Verb":
    "=Variable//Verb"
  From "Modifier" in current active verb:
    "=Variable/Modifier/"
  From "Modifier" in "Verb":
    "=Variable/Modifier/Verb"

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoUCM: snd_use_case_get: Don't segfault when no current verb
Stephen Warren [Fri, 3 Jun 2011 20:56:34 +0000 (14:56 -0600)]
UCM: snd_use_case_get: Don't segfault when no current verb

get_value, called by snd_use_case_get, uses uc_mgr->active_verb without
checking there is one, and hence can segfault. Fix this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoUCM: Allow querying of {Supported,Conflicting}Devices
Stephen Warren [Fri, 3 Jun 2011 20:56:33 +0000 (14:56 -0600)]
UCM: Allow querying of {Supported,Conflicting}Devices

At any time, one can query:

_supporteddevs/<modifier>|<device>/<verb>
_conflictingdevs/<modifier>|<device>/<verb>

If a verb is current, one can query:

_supporteddevs/<modifier>|<device>
_conflictingdevs/<modifier>|<device>

Note that at most one of the supported/conflicting devs lists has
any entries, and when neither is present, all devices are supported.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoUCM: Disallow gets of undefined system properties
Stephen Warren [Fri, 3 Jun 2011 20:56:32 +0000 (14:56 -0600)]
UCM: Disallow gets of undefined system properties

In UCM, there are various system-defined properties whose names start
with "_". Explicitly prevent any gets from falling back to properties
defined in a config file if the property name starts with "_", in order
to reserve the entire "_" namespace for system-defined properties.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoUCM: Implement ConflictingDevices, add device list to devices
Stephen Warren [Fri, 3 Jun 2011 20:56:31 +0000 (14:56 -0600)]
UCM: Implement ConflictingDevices, add device list to devices

Wherever SupportedDevice can appear, also allow ConflictingDevice. Only
one or the other (or neither) may be specified. When neither is
specified, allow anything. Sometimes, listing ConflictingDevices may
result in a shorter list than explicitly listing all SupportedDevices.

Add support for SupportedDevice and ConflictingDevice to SectionDevice.
This allows representing devices which are mutually exclusive, e.g. due
to a mux that switches between capturing from two different microphones,
without the possibility of mixing.

Enhance is_modifier_supported to allow ignoring SupportedDevice and
ConflictingDevice. This is useful when querying values from a
SectionModifier; there's no reason we shouldn't be able to query values
just because the current configuration would prevent enabling that
device. The new is_device_supported is implemented similarly.

Enhance switch_device to remove the old device from the current device
list before querying for the new device, and add it back immediately
afterwards. This allows the query for the new device to ignore any
conflicts caused solely by the old device.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoUCM: Deprecate index on Section{Device,Modifier}
Stephen Warren [Fri, 3 Jun 2011 20:56:30 +0000 (14:56 -0600)]
UCM: Deprecate index on Section{Device,Modifier}

The previous supported "legacy" syntax was:

SectionDevice."Speaker".0 {
SectionModifier."Capture Voice".0 {

This change supports new syntax:

SectionDevice."Speaker" {
SectionModifier."Capture Voice" {

... but also allows the old syntax, iff the index is exactly "0". If an
index is present, but not exactly "0", parsing will appear to succeed,
but produce an empty device or modifier.

When naming devices and modifiers, even if the legacy format is used,
any index is not included in the name; i.e. both sets of syntax above
name the device just "Speaker".

The SupportedDevice list syntax still also accepts either "x" or "x.0",
but internally strips ".0" from the tail of any device name. Any other
name including "." is disallowed.

Finally, when comparing device or modifier names, a simple exact string
compare is now used, since no index data is ever present in device or
modifier names.

The one functional change introduced here is that a SupportedDevice
entry of just "x" will now only ever match a single device. It previously
acted as a wildcard for any device named "x.foo".

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoFix missing error code in snd_ctl_hw_open()
Takashi Iwai [Fri, 3 Jun 2011 15:27:27 +0000 (17:27 +0200)]
Fix missing error code in snd_ctl_hw_open()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoUCM: Fix deadlock following failed get _verb
Stephen Warren [Thu, 2 Jun 2011 22:44:39 +0000 (16:44 -0600)]
UCM: Fix deadlock following failed get _verb

When querying the current verb without a verb set, snd_use_case_get bails
out early without unlocking uc_mgr->mutex. This causes subsequent API calls
to hang. Instead, s/return/goto __end/.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoUCM: Fix typo in error message
Stephen Warren [Thu, 2 Jun 2011 22:44:38 +0000 (16:44 -0600)]
UCM: Fix typo in error message

parse_name_is_safe disallows dots in the name, so not is the correct
word to use

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoctlparse: Respect softfloat configure option
Alexander Stein [Thu, 19 May 2011 13:16:36 +0000 (15:16 +0200)]
ctlparse: Respect softfloat configure option

If we want softlfoat we can't use ceil which uses libm.

Signed-off-by: Alexander Stein <a.stein@systec-electronic.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoemu10k1.conf - Fix no sound problem when using SB Live! Platinum
Raymond Yau [Fri, 13 May 2011 02:40:28 +0000 (10:40 +0800)]
emu10k1.conf - Fix no sound problem when using SB Live! Platinum

Add asym to front, rear and center_lfe to prevent route change after
removed the lock.

After removed the lock, when application using "hw", "front", "rear",
"surround40" and "surround51",  the route of the front channel is
changed (lost right channel or both channels) when other application
using "front", "rear" or "center_lfe" to record

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoSpecficy subdevice 0 for front/surround* of HDA-Intel.conf
Takashi Iwai [Mon, 9 May 2011 12:11:22 +0000 (14:11 +0200)]
Specficy subdevice 0 for front/surround* of HDA-Intel.conf

The subdevice 0 is used for multi-channel outputs.
This fixes the detection of multi-channel devices of VIA codecs
by PulseAudio.

Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoUCM: fix memory leak when executing cset commands
Baek Chang [Tue, 3 May 2011 17:52:34 +0000 (10:52 -0700)]
UCM: fix memory leak when executing cset commands

fix memory leak when executing cset commands.
snd_ctl_elem's are allocated, but never free'ed

Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoAdd test/lsb/config to .gitignore
Takashi Iwai [Wed, 4 May 2011 07:20:23 +0000 (09:20 +0200)]
Add test/lsb/config to .gitignore

Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoFix printf for size_t
Takashi Iwai [Wed, 4 May 2011 07:19:09 +0000 (09:19 +0200)]
Fix printf for size_t

Need to use z prefix for size_t type.

midiloop.c: In function ‘main’:
midiloop.c:172:2: warning: format ‘%i’ expects type ‘int’, but argument 2 has type ‘size_t’
....

Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoFix compile warnings
Takashi Iwai [Wed, 4 May 2011 07:14:29 +0000 (09:14 +0200)]
Fix compile warnings

strstr() returns a char pointer

simple_none.c: In function ‘base_len’:
simple_none.c:940:33: warning: ordered comparison of pointer with integer zero
simple_none.c:941:29: warning: ordered comparison of pointer with integer zero

Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoalsa-lib: fixed coverity reported issues under "FORWARD_NULL" checker.
Sudarshan Bisht [Tue, 12 Apr 2011 10:09:45 +0000 (13:09 +0300)]
alsa-lib: fixed coverity reported issues under "FORWARD_NULL" checker.

Coverity Static Analysis helps developers find hard-to-spot,
yet potentially crash-causing defects early in the development phase,
reducing the cost,time, and risk of software errors.

This patch has fix for situations where variable can be NULL
but not been checked beforehand

Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoHDA-Intel.conf - Fix low mic volume due to pulseaudio using "front" device for playba...
Raymond Yau [Sun, 24 Apr 2011 03:56:44 +0000 (11:56 +0800)]
HDA-Intel.conf - Fix low mic volume due to pulseaudio using "front" device for playback and capture

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoEMU10K1.conf: Don't lock hook controls
Takashi Iwai [Wed, 20 Apr 2011 12:32:06 +0000 (14:32 +0200)]
EMU10K1.conf: Don't lock hook controls

Locking the controls in hooks causes a BUSY error when multiple
streams are opened, typically in PulseAudio.  Better not to touch
the locking in hooks in such a case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agotest/latency: print error message when 2 periods per buffer not supported
Raymond Yau [Wed, 20 Apr 2011 08:18:50 +0000 (16:18 +0800)]
test/latency: print error message when 2 periods per buffer not supported

Print error message when playback/capture does not support 2 periods
per buffer.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoFix typo in comment in surround71.conf
David Henningsson [Tue, 19 Apr 2011 06:05:08 +0000 (08:05 +0200)]
Fix typo in comment in surround71.conf

BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591318
Reported-by: Ariel <asdebian@dsgml.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoMark Heaphone {Center|LFE} control of emu10k1 conf as optional
Takashi Iwai [Wed, 6 Apr 2011 06:34:56 +0000 (08:34 +0200)]
Mark Heaphone {Center|LFE} control of emu10k1 conf as optional

The controls referred in center_lfe definition in EMU10K1.conf should be
marked as optional since some boards don't have these.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoconfigure: Fail when the user attempts to compile shared and static libs
Jaroslav Kysela [Wed, 30 Mar 2011 15:30:09 +0000 (17:30 +0200)]
configure: Fail when the user attempts to compile shared and static libs

There are some issues with libtool breaking the possibility to build both
types of libraries in one shot. Compile libraries separately.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoUCM: Fix LGPL licence ("how to receive" part referred GPL instead LGPL)
Jaroslav Kysela [Mon, 28 Mar 2011 09:04:19 +0000 (11:04 +0200)]
UCM: Fix LGPL licence ("how to receive" part referred GPL instead LGPL)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoConf: Fix channels of ICE1712 to 10/12
David Henningsson [Mon, 28 Mar 2011 08:19:16 +0000 (10:19 +0200)]
Conf: Fix channels of ICE1712 to 10/12

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>
3 years agoUCM: Fix empty get_list - initialize returned pointer to NULL
Jaroslav Kysela [Sat, 19 Mar 2011 00:09:41 +0000 (01:09 +0100)]
UCM: Fix empty get_list - initialize returned pointer to NULL

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoUCM: comment fixes and fix myvalue initialization fix in add_values()
Jaroslav Kysela [Fri, 18 Mar 2011 23:54:43 +0000 (00:54 +0100)]
UCM: comment fixes and fix myvalue initialization fix in add_values()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoalsa-lib: ucm: allow values to be read from devices
Margarita Olaya [Fri, 18 Mar 2011 17:26:22 +0000 (11:26 -0600)]
alsa-lib: ucm: allow values to be read from devices

This allows devices value to be read using the get_value().
Also fix a little formatting.

Signed-off-by: Margarita Olaya Cabrera <magi@slimlogic.co.uk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoalsa-lib: add LaCie Firewire Speakers/Griffin FireWave Surround driver
Clemens Ladisch [Tue, 15 Mar 2011 07:02:59 +0000 (08:02 +0100)]
alsa-lib: add LaCie Firewire Speakers/Griffin FireWave Surround driver

Add configuration files for the "default"/"front"/"surround51" devices
of the FireWire driver.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
3 years agoFix alsa-lib to regard 3D control - Depth as Playback Controls
Raymond Yau [Sat, 26 Feb 2011 01:24:43 +0000 (09:24 +0800)]
Fix alsa-lib to regard 3D control - Depth as Playback Controls

This allow those mixer or recording application to find those controls which
are really used for capturing.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoRelease v1.0.24.1
Jaroslav Kysela [Mon, 31 Jan 2011 14:18:50 +0000 (15:18 +0100)]
Release v1.0.24.1

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm: add more error messages for cdev and cset commands
Jaroslav Kysela [Mon, 31 Jan 2011 14:06:03 +0000 (15:06 +0100)]
ucm: add more error messages for cdev and cset commands

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm: allow bind modifier to specific instances, other fixes
Jaroslav Kysela [Mon, 31 Jan 2011 13:24:19 +0000 (14:24 +0100)]
ucm: allow bind modifier to specific instances, other fixes

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm: make verb comments optional
Pierre-Louis Bossart [Fri, 28 Jan 2011 05:17:43 +0000 (23:17 -0600)]
ucm: make verb comments optional

avoid seg fault if no comment is provided

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoRelease v1.0.24
Jaroslav Kysela [Thu, 27 Jan 2011 13:58:51 +0000 (14:58 +0100)]
Release v1.0.24

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoreal fix for the UCM code compilation issue
Jaroslav Kysela [Thu, 27 Jan 2011 13:56:53 +0000 (14:56 +0100)]
real fix for the UCM code compilation issue

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoFix UCM component handling in configure.in
Jaroslav Kysela [Thu, 27 Jan 2011 13:40:31 +0000 (14:40 +0100)]
Fix UCM component handling in configure.in

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoUpdate hdspm.h file from Adrian Knoth - final version
Jaroslav Kysela [Thu, 27 Jan 2011 10:50:40 +0000 (11:50 +0100)]
Update hdspm.h file from Adrian Knoth - final version

This one matches the settled driver version.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoUpdate hdspm.h file from Adrian Knoth
Jaroslav Kysela [Wed, 26 Jan 2011 10:33:55 +0000 (11:33 +0100)]
Update hdspm.h file from Adrian Knoth

To satisfy new hdspmixer requirements, update hdspm.h file.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoAdd hdspm.h kernel header to include/alsa/sound tree for the hdspmixer app
Jaroslav Kysela [Wed, 26 Jan 2011 09:35:56 +0000 (10:35 +0100)]
Add hdspm.h kernel header to include/alsa/sound tree for the hdspmixer app

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoMerge branch 'ucm'
Jaroslav Kysela [Mon, 24 Jan 2011 13:55:23 +0000 (14:55 +0100)]
Merge branch 'ucm'

3 years agopcm: fix typo in snd_pcm_recover() error message
Francesco Cosoleto [Sat, 22 Jan 2011 01:27:54 +0000 (02:27 +0100)]
pcm: fix typo in snd_pcm_recover() error message

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm: fix switch device & modifier when no transition is found
Liam Girdwood [Tue, 11 Jan 2011 17:56:30 +0000 (18:56 +0100)]
ucm: fix switch device & modifier when no transition is found

Fix some logic bugs in switch device and switch modifier when
transition sequences are not found. Also fix check for new device.

Reported-by: w0806.kim@samsung.com
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
3 years agoucm: add snd_use_case_verb_list() inline function
Jaroslav Kysela [Tue, 11 Jan 2011 18:05:12 +0000 (19:05 +0100)]
ucm: add snd_use_case_verb_list() inline function

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoaliases.conf: add aliases for CMI8788-based cards
Clemens Ladisch [Mon, 10 Jan 2011 15:22:15 +0000 (16:22 +0100)]
aliases.conf: add aliases for CMI8788-based cards

Add entries for all the aliases of the CMI8788 chip.
(Not all of them are currently used by the driver.)

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
3 years agoucm: ctlparse - always terminate cset buffer
Liam Girdwood [Tue, 21 Dec 2010 22:12:00 +0000 (23:12 +0100)]
ucm: ctlparse - always terminate cset buffer

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
3 years agoucm: fix handling of cset with spaces in the control name
Liam Girdwood [Tue, 21 Dec 2010 22:11:59 +0000 (23:11 +0100)]
ucm: fix handling of cset with spaces in the control name

Always terminate the cset command based on the last space found within the
cset command since the control name may contain spaces.

3 years agoucm: only select modifier when supported device is enabled
Liam Girdwood [Tue, 21 Dec 2010 22:11:58 +0000 (23:11 +0100)]
ucm: only select modifier when supported device is enabled

Make sure the supported device of a modifier is enabled before
we enable the modifier.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
3 years agoucm: implement basic script exec functionality
Liam Girdwood [Tue, 21 Dec 2010 22:11:53 +0000 (23:11 +0100)]
ucm: implement basic script exec functionality

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
3 years agoucm: check the correct return value for modifier
Liam Girdwood [Tue, 21 Dec 2010 22:11:57 +0000 (23:11 +0100)]
ucm: check the correct return value for modifier

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
3 years agoucm: check for valid value list before dereference.
Liam Girdwood [Tue, 21 Dec 2010 22:11:56 +0000 (23:11 +0100)]
ucm: check for valid value list before dereference.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
3 years agoucm: remove unused code.
Liam Girdwood [Tue, 21 Dec 2010 22:11:55 +0000 (23:11 +0100)]
ucm: remove unused code.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
3 years agoucm: make sure active modifier and device lists are initialised
Liam Girdwood [Tue, 21 Dec 2010 22:11:54 +0000 (23:11 +0100)]
ucm: make sure active modifier and device lists are initialised

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
3 years agoucm: remove parse_device() and call parse_compound() directly
Liam Girdwood [Tue, 21 Dec 2010 22:11:52 +0000 (23:11 +0100)]
ucm: remove parse_device() and call parse_compound() directly

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
3 years agoucm: modifiers names must be compound parse
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>
3 years agoucm: removed unused 'active' member in struct use_case_device
Liam Girdwood [Tue, 21 Dec 2010 22:11:50 +0000 (23:11 +0100)]
ucm: removed unused 'active' member in struct use_case_device

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm: initial implementation for cdev/cset
Jaroslav Kysela [Mon, 29 Nov 2010 16:33:27 +0000 (17:33 +0100)]
ucm: initial implementation for cdev/cset

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm: CTL devices are only one per card (remove DEV from comments)
Jaroslav Kysela [Mon, 29 Nov 2010 14:49:13 +0000 (15:49 +0100)]
ucm: CTL devices are only one per card (remove DEV from comments)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm: add ValueDefaults section to the master file
Jaroslav Kysela [Mon, 29 Nov 2010 14:41:34 +0000 (15:41 +0100)]
ucm: add ValueDefaults section to the master file

- the get_value() function is recoded (tries to find the value in
  parent's list)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agopcm_plugin: fix delay
Pierre-Louis Bossart [Tue, 23 Nov 2010 14:47:08 +0000 (08:47 -0600)]
pcm_plugin: fix delay

PulseAudio ALSA modules report errors after calling
snd_pcm_avail_delay(), with a delay lower than the number of samples
available.

Correct delay using Jaroslav's recommendation:
"the result should be 'delay(slave) + mmap_capture_avail(pcm)"

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm: add cdev
Jaroslav Kysela [Tue, 23 Nov 2010 14:58:14 +0000 (15:58 +0100)]
ucm: add cdev

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agopcm: add MMAP_EMUL to type names
Jaroslav Kysela [Tue, 23 Nov 2010 12:40:25 +0000 (13:40 +0100)]
pcm: add MMAP_EMUL to type names

If we try to print this then it causes a read past the end of the array
in snd_pcm_type_name().

From: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agopcm_plugin: remove unused client_frames and slave_frames routines
Pierre-Louis Bossart [Fri, 19 Nov 2010 16:35:31 +0000 (10:35 -0600)]
pcm_plugin: remove unused client_frames and slave_frames routines

plug->client_frames and plug->slave_frames are not used by
any plugin, remove dead code.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agopcm: fix snd_pcm_avail_delay() function
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.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agosupport for period wakeup disabling
Clemens Ladisch [Mon, 15 Nov 2010 09:43:13 +0000 (10:43 +0100)]
support for period wakeup disabling

Add API to disable period wakeups.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
3 years agopcm: pass hw_params flags to slave
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>
3 years agoucm: fix parser for sequences and fix wrong strcmp
Jaroslav Kysela [Wed, 10 Nov 2010 15:06:29 +0000 (16:06 +0100)]
ucm: fix parser for sequences and fix wrong strcmp

The sequences are not parsed correctly. First cfg value is the command
and second value is the command argument.

Also, fix strcmp calls in ucm/main.c (reported by
abraham duenas <aduejazz@gmail.com>).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoUSB-Audio.conf: fix Audiophile USB card name
Clemens Ladisch [Wed, 10 Nov 2010 09:11:51 +0000 (10:11 +0100)]
USB-Audio.conf: fix Audiophile USB card name

The device name of the M-Audio AudioPhile USB is actually "Audiophile USB (tm)".
Also keep the old string, just to be sure.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
3 years agocontrol: add ASCII parsers from amixer
Jaroslav Kysela [Thu, 4 Nov 2010 18:58:44 +0000 (19:58 +0100)]
control: add ASCII parsers from amixer

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agopcm direct plugins: change timestamping in dsnoop
Jaroslav Kysela [Fri, 29 Oct 2010 15:36:41 +0000 (17:36 +0200)]
pcm direct plugins: change timestamping in dsnoop

Do not use own timestamps, try to sync hw.ptr with real timestamp.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoucm: debug parser
Jaroslav Kysela [Tue, 26 Oct 2010 12:26:46 +0000 (14:26 +0200)]
ucm: debug parser

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoconfigure.in: don't rely on test -a, not all shells support it
Simon McVittie [Fri, 8 Oct 2010 08:06:58 +0000 (09:06 +0100)]
configure.in: don't rely on test -a, not all shells support it

Notably, /bin/sh in older Debian and Ubuntu is dash, which doesn't.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoVersion-check libtool correctly when doing an out-of-tree build
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>
4 years agotlv: fix returned dB information for min-is-mute controls
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>
4 years agoucm: implemented card list feature
Jaroslav Kysela [Wed, 13 Oct 2010 09:48:52 +0000 (11:48 +0200)]
ucm: implemented card list feature

- also added some test files to test/ucm tree

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoucm: unify snd_use_case_geti(), add snd_use_case_card_list() template
Jaroslav Kysela [Tue, 12 Oct 2010 11:29:05 +0000 (13:29 +0200)]
ucm: unify snd_use_case_geti(), add snd_use_case_card_list() template

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoconfig file processing: rewrite the locking - use one recursive mutex
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).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agonamehint: Another fix to properly evaluate hw devices
Jaroslav Kysela [Fri, 1 Oct 2010 12:08:03 +0000 (14:08 +0200)]
namehint: Another fix to properly evaluate hw devices

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agonamehint: Fix hw device evaluation (missing last device)
Jaroslav Kysela [Fri, 1 Oct 2010 11:31:45 +0000 (13:31 +0200)]
namehint: Fix hw device evaluation (missing last device)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoucm: cosmetic fix
Jaroslav Kysela [Fri, 1 Oct 2010 11:30:59 +0000 (13:30 +0200)]
ucm: cosmetic fix

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoucm: added implementation for other ucm parts, only card name list is missing
Jaroslav Kysela [Wed, 22 Sep 2010 13:35:11 +0000 (15:35 +0200)]
ucm: added implementation for other ucm parts, only card name list is missing

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoucm: Introduce "Value {}" section, more implementation work
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

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoFix typo for surround PCMs in src/conf/cards/Loopback.conf
Jaroslav Kysela [Wed, 15 Sep 2010 06:11:42 +0000 (08:11 +0200)]
Fix typo for surround PCMs in src/conf/cards/Loopback.conf

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoucm: Moved ucm to src/ucm subdirectory
Jaroslav Kysela [Tue, 7 Sep 2010 13:35:14 +0000 (15:35 +0200)]
ucm: Moved ucm to src/ucm subdirectory

- separate code to more files
- use standard lists to represent structures
- use alsa-lib configuration parser

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoucm: Recode header to be more universal
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

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoAdd Loopback.conf to define standard PCM devices for snd-aloop driver
Jaroslav Kysela [Wed, 25 Aug 2010 07:04:51 +0000 (09:04 +0200)]
Add Loopback.conf to define standard PCM devices for snd-aloop driver

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoucm: build - add build support for Use Case Manager
Liam Girdwood [Mon, 23 Aug 2010 16:17:19 +0000 (18:17 +0200)]
ucm: build - add build support for Use Case Manager

Add doxygen and make support for UCM.

CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Justin Xu <justinx@slimlogic.co.uk>
Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
4 years agoucm: core - Add initial Use Case Manager support.
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>
4 years agoucm: header - ALSA Use Case Manager
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>
4 years agogeneral: recoded snd_dlobj_ functions
Jaroslav Kysela [Mon, 23 Aug 2010 15:05:36 +0000 (17:05 +0200)]
general: recoded snd_dlobj_ functions

- changed logic to get/put blocks
- added mutex locking of the symbol list
- added reference counting (do not free used dl handles)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoHDA-Intel: do not lock IEC958 Playback switch
Pierre-Louis Bossart [Fri, 20 Aug 2010 01:42:30 +0000 (20:42 -0500)]
HDA-Intel: do not lock IEC958 Playback switch

As discussed with Takashi, removing the lock allows apps to mute
the output using the mixer interface.
Other AES controls remain locked.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agonamehint: Evaluate more possibilities for hw devices
Jaroslav Kysela [Fri, 20 Aug 2010 08:31:17 +0000 (10:31 +0200)]
namehint: Evaluate more possibilities for hw devices

This tries to fix the issue when logical device indexes does not match the
hardware device indexes (like hdmi -> 0:3, 1:7, 2:8, 3:9).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoAdd missing support for 3-byte formats for 16bit put conversion
Takashi Iwai [Fri, 13 Aug 2010 14:11:36 +0000 (16:11 +0200)]
Add missing support for 3-byte formats for 16bit put conversion

In the put conversion, the support for 3-byte formats was missing.
This resulted in inaudible volume with rate plugin & co.

Typos fixed by Mark Hills <mark@pogo.org.uk>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agopcm: Fixed typo (wrong deleted line) instroduced in the minperiodsize patch
Jaroslav Kysela [Thu, 12 Aug 2010 06:21:26 +0000 (08:21 +0200)]
pcm: Fixed typo (wrong deleted line) instroduced in the minperiodsize patch

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agopcm: introduce defaults.pcm.compat to change the params choose behaviour
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.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agopcm: add defaults.pcm.minperiodtime parsing
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.

The default value in alsa.conf is 5000usec.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agoHDA-Intel: present all 4 HDMI outputs instead of just the first one
Anssi Hannula [Tue, 3 Aug 2010 17:27:49 +0000 (20:27 +0300)]
HDA-Intel: present all 4 HDMI outputs instead of just the first one

Commit 92608badc519a8c1f65d93743396517aaa582b53 in linux kernel added
the possibility of 3 additional HDMI devices on indexes 7-9.

Present all those additional devices using the "hdmi" alias as well.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agotest/latency: fix timediff calculation
Jaroslav Kysela [Wed, 4 Aug 2010 17:47:01 +0000 (19:47 +0200)]
test/latency: fix timediff calculation

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
4 years agopcm_plug: fix comparison always true
Anssi Hannula [Mon, 2 Aug 2010 15:50:08 +0000 (18:50 +0300)]
pcm_plug: fix comparison always true

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agopcm - ladspa: fix small memory leak in snd_pcm_ladspa_free_instances()
Jaroslav Kysela [Thu, 22 Jul 2010 09:33:20 +0000 (11:33 +0200)]
pcm - ladspa: fix small memory leak in snd_pcm_ladspa_free_instances()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>