| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
| |
- use typedef rather than structure to follow other alsa-lib's APIs
for snd_scenario
- merge functions with same type
- use snd_ctl_elem_id_t for kcontrol ids
- change inline comments to doxygen
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It allows switching audio settings between scenarios or uses-cases like
listening to music and answering an incoming phone call. Made of control
aliasing for playback, capture master and switch as well as the option to
post- and prefix a sequence of control changes avoiding pops and other
unwanted noise. Some example programs will be available in alsa-utils.
CC: Ian Molton <ian@mnementh.co.uk>
CC: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
|
|
|
|
|
|
|
| |
In case when kcontrol differs only by device or subdevice numbers, the
find function can give wrong results.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
| |
The function should be useful later so keep it in place and just comment it out
until it is actually used.
Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
| |
Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
| |
Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
Kbuild like output for automake (>=1.11). It's no hard dependency as it needs
the newest automake, but enable it by default if it is available. To turn it off
you can either use --disable-silent-rules at configure time or make V=0 at
compile time.
Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
| |
Alsa-lib is no longer hosted in cvs but in git and the only difference between
both helper scripts is the name of the NO_MAKE env VAR check.
Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
| |
Call the slave snd_pcm_info() as long as possible in the direct plugins
(i.e. when the PCM device could be opened with O_APPEND mode).
This allows dmix/dsnoop as a salve for PCM hook controls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As the result of snd_pcm_delay() is affected not only by hw_ptr
and appl_ptr, but also by 'runtime->delay' property,
either SNDRV_PCM_IOCTL_DELAY or SNDRV_PCM_IOCTL_STATUS ioctl
must be used to get the correct result.
Previously 'runtime->delay' was ignored in case 'hw->sync_ptr'
was used.
Signed-off-by: Kai Vehmanen <kvehmanen@eca.cx>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In snd_pcm_hw_params_choose(), set the buffer size before the period
size and time as default. This will give more useful configuration for
most of apps, i.e. larger buffer size.
For apps that require the old behavior, now the function checks the
environment variable $LIBASOUND_COMPAT. If this variable is set to
non-empty, the hw_params is determined in the old way, first period
then buffer sizes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
An attempt to fix problem described in reverted patch "Fix driver conf
parsing in snd_config_hook_load_for_all_cards()".
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 96da0c842d14b40ce8e37726b259229634b3aa21.
This way of fix brokes card-specific configuration loading.
See http://bugzilla.redhat.com bug#521988 for details.
Appropriate way to handle this problem is to fix the dmix configuration file.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
| |
Added strings "Speaker" and "Beep" to the weight list so that the entries
appear in more appropriate positions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
| |
When snd_pcm_start() is called in the invalid state, it should return
-EBADFD. But ioplug plugin returns -EAGAIN. Let's fix it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the normal mmap mode, the stream isn't started automatically even after
the data >= start_threshold has been written. However, in the
mmap-emulation mode, the stream is started because it uses
snd_pcm_write_areas() internally.
As a workaround for this inconsistency, start_threshold value is changed
dynamically in sw_parmams and mmap_commit callbacks in mmap-emul plugin.
Meanwhile, start_threshold for slave PCM is set to boundary so that only
this plugin (or the one over it) can control the start of the stream.
This will fix problems in some apps using pulse plugin in the mmap mode.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Kevin Goodsell.
Summary: load_for_all_cards fails with existing configuration elements
In snd_config_hook_load_for_all_cards, the first call to
snd_config_search attempts to locate an existing configuration node with
the name of the driver. Typically none is found, and everything is
good. However, if such a node is located, the next line assumes it is a
leaf node with type 'string' and calls snd_config_get_string to fetch
the string value. If this fails, the entire hook is abandoned.
Because of this, setting something like the following in asoundrc:
cards.<driver name>.foo 0
is sufficient to disable the entire card-specific configuration.
As a concrete example, I have a HDA-Intel sound card. dmix.conf includes
a way to set period_size, period_time, and periods by using
configuration elements of the form cards.<driver name>.pcm.dmix.<var>.
In ~/.asoundrc I add
cards.HDA-Intel.pcm.dmix.period_size 1024
This will cause HDA-Intel.conf to fail to load, and the pcm defined in
default.conf will fail to find the device-specific pcm
cards.HDA-Intel.pcm.default, and fall back on the default pcm using
plughw. By attempting to configure dmix, I have disabled it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
The revents parameter of snd_ctl_poll_descriptors_revents() is a single
value, not an array.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
|
| |
The contents of the snd_timer_query_ops structure are not going to be
changed, so we might as well declare is as constant. This change avoids
a warning if some ops structure is actually defined as const.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
|
|
| |
The contents of the snd_pcm_scope_ops structure are not going to be
changed, so we might as well declare is as constant. This change is
backwards compatible, and avoids warnings if some ops structure is
actually defined as const.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
| |
Patch from Debian bug#539454
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
| |
Fix various errors in the documentation that make doxygen complain.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
|
| |
In the documentation, hide structure types that have a corresponding
typedef. Since doxygen 1.5.4, this is no longer the default when
OPTIMIZE_OUTPUT_FOR_C is set.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
|
|
|
| |
The value of top_srcdir should be replaced in the config file, not in
the makefile, so we have to escape it in the makefile.
In the default case, the value of top_srcdir is ".." which, when used as
a regular expression, is a little bit too inclusive.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
| |
Remove some function declarations that are not (no longer) implemented.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
| |
Add some test for the snd_config_* functions.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
| |
Expand the documentation for the snd_config_* functions.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
| |
Just for consistency with the parameter names of all the other
functions.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
| |
Nodes that (might) have children are not leaves.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
| |
I haven't found anything that would make compound nodes specifically
male ...
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
|
| |
When adding a configuration node to another, check that the child node
does not already have a parent. Otherwise, the old parent's children
list would become corrupted.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
|
|
| |
Sending an Active Sensing message when closing a port can interfere with
the following data if the port is reopened and a note-on is sent before
the device's timeout has elapsed. Therefore, it is better to disable
this setting by default.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
| |
Add custom definitions for the AudioPhile "default" and "iec958" devices
so that output and input are routed to the correct PCM device.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
| |
Make sure that we do not crash when encountering configuration nodes
with a NULL string value, or that at least we run into an assert().
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
|
| |
snd_config_add() checks for duplicate ids, but it was possible to create
duplicates by adding a note and changing the id afterwards with
snd_config_set_id(); so we have to add a check there, too.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
|
| |
Make sure that we do not crash when encountering configuration nodes
with a NULL id. Furthermore, since we cannot avoid having NULL ids
anyway, allow the id of a top-level node to be reset to NULL.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
| |
Add a test to check that snd_midi_event_decode() checks its output
buffer size.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|
|
|
|
|
|
| |
If snd_midi_event_fails(), we cannot use the object and must abort the
current test.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Add some tests for the snd_midi_event_* functions.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
| |
| |
| |
| |
| |
| | |
Expand the documentation for the snd_midi_event_* functions.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
| |
| |
| |
| | |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
- Fix the support of non-native endianness
- Conversion for unsigned formats
- Only allow linear formats
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|/
|
|
|
|
|
|
| |
S24 format has different bit width and physical width.
For calculating the byte offset for big-endian packing, the latter value
has to be used.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
Has not worked since commit 3d1fa924906996463ac33cba5b5143f762d913cf
Signed-off-by: Kenneth Johansson <kenneth@southpole.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
| |
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
| |
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>
|