This error code can be used e.g. with echo reference PCM devices
(the SND_USE_CASE_MOD_ECHO_REF UCM token).
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
In commit b906db19ef, the snd_dlopen()
implements the automatic lookup to the ALSA_PLUGIN_DIR directory.
It is not necessary to add the absolute paths in callers now.
The plugin names are also searched in ld.so.conf paths as the fallback now,
but it should not be a big problem.
BugLink: https://github.com/alsa-project/alsa-lib/issues/34
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Include $XDG_CONFIG_HOME/alsa/asoundrc _or_ ~/.config/alsa/asoundrc as
the last user-defined configuration.
BugLink: https://github.com/alsa-project/alsa-lib/issues/49
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
While I was trying to work on XDG_CONFIG_HOME support, I though
that it may be nice to support OR for the file specification.
But then I found that we can already do this via the refer hook.
I commit this change anyway, because the snd_config_hook_load()
function is more clean now.
The OR is implemented with three | characters like:
"~/.asoundrc|||~/.asoundrc2|||/opt/some/other/path"
(first file found wins)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
once draining is done, the pcm enters the SETUP state, which ought to
be valid for snd_pcm_drain()
signed-off-by: Sylvain BERTRAND <sylvain.bertrand@legeek.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The syntax is ${CardIdByName:CARDNAME[#INDEX]}.
The CARDNAME is the ALSA's soundcard name (short form).
The INDEX is the instance (0 = first, 1 = second etc.).
Example: ${CardIdByName:HDA Intel PCH}
(which is identical to ${CardIdByName:HDA Intel PCH#0})
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
There is a big issue to validate all possible configuration paths.
Let create ucm2/ucm.conf file which describe the lookups. It may
be also customized later to follow the kernel-side development.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Syntax:
DefineRegex.VariableName {
String "something to match"
Regex "(me)thi(ng)"
}
Result:
- configuration variable "VariableName" is equal to "mething"
- configuration variable "VariableName1" is equal to "me"
- configuration variable "VariableName2" is equal to "ng"
Notes:
The "Flags" string in the DefineRegex compound may specify
the compilation flags (e = extended, i = ignore case,
s = no substitutes, n = newline). See 'man 3 regex' for
more details.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
It may be useful for the library files to use the runtime configuration
variables.
Example:
Define.Var1 "hw:${CardId},2"
Value.PlaybackPCM "${var:Var1}"
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
We need a way to set the SectionOnce at first before SectionDefaults.
It also does not make sense to run SectionDefaults when the API is
used only to query for values or so.
Execute the SectionDefaults commands only when the first verb
is set (before the verb specific commands).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The recent gcc warning indicates the uninitialized variable commit_err:
pcm_rate.c:1104:6: warning: ‘commit_err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (commit_err < 0)
^
Add a proper initialization to commit_err.
Fixes: 29041c5220 ("fix infinite draining of the rate plugin in SND_PCM_NONBLOCK mode")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We've got a gcc warning:
pcm_rate.c: In function ‘snd_pcm_rate_drain’:
pcm_rate.c:1090:19: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
if (pcm->mode & SND_PCM_NONBLOCK != 0) {
^
Drop the zero comparison for fixing the warning and for simplicity.
Fixes: 29041c5220 ("fix infinite draining of the rate plugin in SND_PCM_NONBLOCK mode")
Signed-off-by: Takashi Iwai <tiwai@suse.de>