| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simple test to create playback and capture streams, and
check elapsed time vs. sample counts reported by driver.
This should be helpful for driver developers and anyone
interested in system/audio time drift.
tested only on HDAudio
[added Makefile.am change by tiwai]
TODO:
- make period configurable
- better output messages
- support for wall clock when it's in the mainline
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
| |
Instead of SND_CHMAP_UNKNOWN, fill SND_CHMAP_NA to the silent channels.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
Use strncasecmp() to allow lower cases, and also evaluate the inverted
phase suffix, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
Follow the new definitions in the kernel side. MONO and others have
been added, and the order of position table was changed again.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
Manually add the channel map definitions as the channel front/rear is
determined dynamically.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
| |
Instead of a single channel map, multiple channel maps can be provided
in a form of compound (array) to hw and null plugins. In null
get_chmap, the channel map corresponding to the current channels is
copied from the given channel maps.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
| |
These cards won't provide the channel maps from the driver itself
because of the dynamic routing. For simplicity, define chmaps in the
configurations, so that chmap querying of individual stereo streams
and combined multi streams works properly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
| |
Also fix the channel count in get_chmap for route plugin.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
| |
Add a config definition "chmap" to override (or enhance) the channel
maps. So far, only a single channel map can be provided, and the
channel count consistency isn't strictly tested at all.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
| |
Also fix some bugs in get_chmap().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
Just return a more verbose name than snd_pcm_chmap_name(), but
including white spaces.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
Just to make it easier for apps to support chmap conditionally via
simple ifdefs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Added a few helper functions between chmap and string.
snd_pcm_chmap_type_name() -- a string of the given chmap type
snd_pcm_chmap_name() -- a string of the given channel position
snd_pcm_chmap_print() -- print channel map on the given buffer
snd_pcm_chmap_from_string() -- get a channel position from string
snd_pcm_parse_string() -- parse the whole channel map from string
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
| |
Add _TYPE prefix to distinguish from the channel position.
Also add SND_CHMAP_TYPE_LAST entry pointing the last one like other
enums.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
| |
This is a function similar like snd_pcm_query_chmaps() but performs
the query without a PCM handle. The card, device and substream
numbers are passed as well as stream direction.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
| |
Instead of passing ambiguous integer array, define snd_pcm_chmap_t and
snd_pcm_chmap_query_t so that user can understand more easily which
element is for what.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mixer.h already contains some channel position definitions.
To be more consistent over all systems, better to follow the same
order for the new channel map, too. But since UNKNOWN channel must be
zero but the definition in mixer.h contains -1 as UNKNOWN, simply
shift the value with 1.
If the conversion is required between SND_CHMAP and SND_MIXER_SCHN,
just increment/decrement 1. Eventually I'll provide helper functions
for that...
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
The original definition is in sound/asound.h, but we need to export to
alsa-lib users, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
| |
... not to retry the same error again.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
Added the new ops for both external plugins, so the protocol numbers
are incremented.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
Still incomplete implementations. The query and set ops are missing
for route and multi plugins.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
| |
Added new channel-mapping API functions.
Not all plugins are covered, especially the route, multi and external
plugins don't work yet.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
The plug plugin copies the fast_ops structure and fast_op_arg from its
slave PCM on initialization and after inserting a new plugin. This works
unless the slave PCM is also an instance of the plug plugin because plug
can change its fast_ops structure during _snd_pcm_hw_params.
Instead of copying fast_ops in snd_pcm_plug_insert_plugins wait until
the end of snd_pcm_plug_hw_params when the slave has been fully
initialized.
This fixes a crash when two instances of plug are instantiated back to
back and the format conversion plugin inserted by the second is skipped
by the first because the fast_ops pointer is not properly updated.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
| |
Also show the incompatible plugin version number in error messages.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
Now with the previous rewrite of execute_cset(), the cset string is no
longer modified, thus we can pass const safely.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cset command parsing in ucm/main.c assumes implicitly that the
argument contains no space, thus an example below wouldn't work:
cset "name='Input Select' Digital Mic"
This patch introduces a new internal API function
__snd_ctl_ascii_elem_id_parse() to improve the cset parser.
Reported-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
|
| |
alloc_str_list() sets the result to NULL too, so this patch
makes the behavior more consistent. This also fixes a crash
in PulseAudio, because PulseAudio assumes that
snd_use_case_get_list() always initializes the result, and
since snd_use_case_get_list() uses get_list20(), this
assumption didn't hold.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
| |
Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
| |
Needed for the use of pthread_mutex_t
Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
| |
versionsort() is a GNU-ism and can't be relied on for non-GNU systems.
[modified to define SORTFUNC instead of copying lines by tiwai]
Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to build in environments that don't provide stpcpy().
This makes it necessary to traverse the string twice, but should not be
noticeable in clients since this function is very unlikely to be part of
a performance-critical path.
[coding style fixed by tiwai]
Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
The case where the element is unavailable (for example gone away since
the event was created) is handled beneath.
See also bug 5471.
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5471
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
| |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, enabling a device twice can cause it to be added to
snd_use_case_mgr_t->active_devices twice, causing the list to become a
loop and subsequent uses to result in an infinite loop.
This patch makes sure we don't enable/disable a device twice, and avoid
doing the same for modifiers.
Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
| |
These devices don't have digital in/out, so prevent them from being
opened.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
| |
snd_tlv_convert_from_dB() relies on rangemin/max blindly.
Since this function is exported, it is better for robustness and
consistency to parse the range properly, which this patch does.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
| |
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A missing "break" in procedure snd_pcm_write_mmap() causes
execution of "case SND_PCM_ACCESS_MMAP_NONINTERLEAVED" to
fall through next "default" case of the "switch" statement.
Since "default" handles error cases, the procedure returns
error.
The error fixed by this patch blocks transfer of capture
data from kernel to application. Execution get stuck in
alsa-lib, that discards all received data.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|