The extplug sets incorrectly the timestamping type to
gettimeofday. Copy the timestamp type from the slave pcm
as other plugins do.
The problem is visible when the
"pcm: dmix: fix sw_params handling of timestamp types in direct plugins"
patch was applied for the direct plugins.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1847508
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The syntax is ${CardNumberByName:CARDNAME[#INDEX]}.
The CARDNAME is the ALSA's soundcard name (short form).
The INDEX is the instance (0 = first, 1 = second etc.).
Example: ${CardNumberByName:HDA Intel PCH}
(which is identical to ${CardNumberByName:HDA Intel PCH#0})
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Example (set variable 'Module' to the kernel module name for the given card):
Define.SysfsPath "class/sound/card${CardNumber}/device/driver"
Define.Module "${sys:$SysfsPath}"
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
It may be useful to ignore the errors where the environment
or sysfs values are not defined for the specific hardware.
Enhance substitution for 'syntax 3' so $${} substitution
means ignore the errors (return an empty string).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
snd_dlobj_cache_cleanup() function frees snd_libdir_origin, but
the pointer may be used again in snd_dlpath().
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1847508
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
x32 is the x86_64 ABI that uses 32-bit pointers, so requires loading
addresses into edi/esi/ebx rather than rdi/rsi/rbx.
Note that instructions such as movl %eax, (%rdi) do not require
updating, as loading an address into %edi zeroes the high bits, causing
the full %rdi register to hold a valid address.
Signed-off-by: Harald van Dijk <harald@gigawatt.nl>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Feature 'variable periodsize' allows to extend user period size up to
buffer_size/2 independent of slave period. On enlargement of the settings
for period_time.max and period_size.max the setting for openmax
was not updated.
This lead to the effect, that if the slave period itself had openmax
set it was still set on the extended size. Configuration of a period
matching half buffer size was thus rejected.
Example for failure: period size of 384 (half buffer size) is requested
which is rejected and rounded down to 352:
PERIOD_SIZE: [32 352]
BUFFER_SIZE: [64 768]
When correctly applying the openmax setting:
PERIOD_SIZE: [32 384]
BUFFER_SIZE: [64 768]
Signed-off-by: Andreas Pape <apape@de.adit-jv.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Using a fixed bound of 128 means that too many values may be set for an
INTEGER64 type and that any elements past 128 are out of reach for BYTE
type controls.
Derive the maximum number of elements from the type so that the full
range is parsed for all types.
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
There is a case where the original array has already new indexes
(the merged array is placed before the original nodes).
Set the temporary index string identifiers to unique strings.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Both headset and speaker on HP Thunderbolt Dock don't support IEC958
interface.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The pthread_mutexattr_t object should be destroyed by calling
pthread_mutexattr_destroy(), otherwise it may cause a potential
memory leak due to the different implement of pthread_mutexattr_init()
Signed-off-by: chunxu.li <chunxuxiao@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
We have a requirement to "hide" some hardware drivers, because
other (main) UCM configuration will refer them.
BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/30
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
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>