forked from alsa-project/alsa-lib
-
Notifications
You must be signed in to change notification settings - Fork 3
rebase to upstream master #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Both USB audio cards on Lenovo ThinkStation P620 don't support IEC958, so disable IEC958 accordingly. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
When dmix uses non-interleaved mixing mode the offset and step width
to sum_buffer was calculated by using the dmix channels instead of
the slave channels. This leads to audio distortions due to frame
corruption.
example:
- With below configuratio, Do aplay on both device in parallel for
audio distortion
pcm.dmix_2_channels {
type dmix
ipc_key 5678293
ipc_perm 0660
ipc_gid audio
bindings [0 1]
slave {
pcm "hardware"
channels 2
periods 4
period_time 40000
}
}
pcm.dmix_1_channels {
type dmix
ipc_key 5678293
ipc_perm 0660
ipc_gid audio
bindings [0]
slave {
pcm "hardware"
channels 1
periods 4
period_time 40000
}
}
pcm.hardware {
type hw
card 0
channels 2
rate 48000
format S16_LE
}
Signed-off-by: Vijay Palaniswamy <vijay.palaniswamy@in.bosch.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Tanjeff-N. Moos <tanjeff@cccmz.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Memory allocated on the stack was referenced outside of the function scope caused undefined behaviour. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Accessing memory outside of allocated boundaries caused segmentation fault. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Values have no representation in standard ALSA configuration files, therefore there is no need to populate them. Also memory for values wasn't allocated which was causing undefined behaviour. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Texts are separate sections that should referenced by enum control. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Size constraints are always checked before invoking tplg_decode_control_enum1. There is no need to validate it twice. Alos moved debug print about size to invoking function, since now it's it responsibility to check size. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Not checking _LAST format and rate, which are valid indexes in arrays, makes data loss while converting binary to standard ALSA configuration file. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Not printing this field makes data loss while converting from binary to standard ALSA configuration file. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
DAI name is a part of topology binary. Not printing makes data loss while converting from binary to standard ALSA configuration file. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Some fields can exceed size limit, e.g. private data has no size restriction. Therefore it needs to be dynamically increased. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The temporary config array must be initialized for all compound types. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Introduce unaligned_get32/put32 helpers to deal with the packed structures. Use the gcc __BYTE_ORDER__ defines for the endian checks. It may be improved to support other compilation environment. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The commit d04e72c introduced the dynamic printf buffer allocation for each tplg_save_printf() call. Introduce 'struct tplg_buf' which carries extra information about the temporary printf buffer and the destination buffer to save allocation requests. The printf buffer is also allocated using 1024 bytes chunks. A comparison between 'alloc everyting' and 'cache+chunk alloc' for the random picked topology file: 1: 18,620 allocs, 18,620 frees, 7,239,688 bytes allocated 2: 12,490 allocs, 12,490 frees, 962,568 bytes allocated Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Tanjeff-N. Moos <tanjeff@cccmz.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Tanjeff-N. Moos <tanjeff@cccmz.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
With the conditional blocks, it may be useful to terminate the hardware detection from the configuration. Introduce 'Error' keyword for the master UCM configuration file. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Return an error if the UCM configuration is empty (no verbs or no boot sequence). Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The avail and delay fields in the returned status structure does not reflect the actual hw_ptr/appl_ptr. This change correct this. TODO: Unfortunately, the delay might contain also information about extra hardware / buffering delay which is hidden with this change. Link: https://lore.kernel.org/alsa-devel/d9c1f37e-5c8d-f289-270e-c6cda7a56ce3@axis.com/ Reported-by: Jonas Holmberg <jonashg@axis.com> Tested-by: Jonas Holmberg <jonashg@axis.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
In some cases, it may be useful to specify the plugin directory using the environment variable. BugLink: alsa-project#82 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
All old symbols must be visible (exported) for -flto. BugLink: alsa-project#56 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The commit b2a4272 introduced a slightly different behaviour for ALSA_PLUGIN_DIR. The fallback causes that the alsa libraries are searched in all library directories. It was never intended to do the system wide library lookups for internal modules. Fixes: b2a4272 ("snd_dlopen: do not use absolute plugin path for snd_dlopen() calls") Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The rewind or forward may cause the stream pointer change. Although this patch does not fix the real meter update issue, it breaks the possible big loops when the stream pointers are desynced with the meters. It does not make sense to copy more samples than the pcm buffer contains. Link: https://lore.kernel.org/alsa-devel/f56d6a67-014a-e562-c253-830c0ec03717@ivitera.com/ Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
BugLink: alsa-project#84 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
BugLink: alsa-project#85 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The syscalls may return EINTR when a signal is handled. Implement safe_write() function which does simple write retry. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
BugLink: alsa-project/alsa-ucm-conf#54 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
… for \!DL_ORIGIN_AVAILABLE Fixes: 8580c08 ("dlsym: add support for ALSA_PLUGIN_DIR environment variable") BugLink: alsa-project#91 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Fixes: 8580c08 ("dlsym: add support for ALSA_PLUGIN_DIR environment variable") Signed-off-by: Jaroslav Kysela <perex@perex.cz>
\param size frames to be *read* Signed-off-by: Jaroslav Kysela <perex@perex.cz>
use bclk_provider for structure fields, 'codec_provider' and 'codec_consumer' for options and modify #defines to use CP and CC suffixes. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
use fsync_provider for structure fields, 'codec_provider' and 'codec_consumer' for options and modify #defines to use CP and CC suffixes. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use codec_provider and codec_consumer for bclk and fsync Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Set the status tstamp field so that it can be accessed with snd_pcm_status_get_htstamp(). Signed-off-by: Jonas Holmberg <jonashg@axis.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Enum kcontrol text value parsing is broken. Fix it. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
rebase to upstream master