mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-06 05:13:18 +00:00
ALSA: control: Rename CONFIG_SND_CTL_VALIDATION to CONFIG_SND_CTL_DEBUG
The purpose of CONFIG_SND_CTL_VALIDATION is rather to enable the debugging feature for the control API. The validation is only a part of it. Let's rename it to be more explicit and intuitive. While we're at it, let's advertise, give more comment to recommend this feature for development in the kconfig help text. Link: https://lore.kernel.org/r/20220609120219.3937-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
2c7463d070
commit
1b7ec5143c
@ -23,7 +23,7 @@ typedef int (snd_kcontrol_tlv_rw_t)(struct snd_kcontrol *kcontrol,
|
|||||||
unsigned int __user *tlv);
|
unsigned int __user *tlv);
|
||||||
|
|
||||||
/* internal flag for skipping validations */
|
/* internal flag for skipping validations */
|
||||||
#ifdef CONFIG_SND_CTL_VALIDATION
|
#ifdef CONFIG_SND_CTL_DEBUG
|
||||||
#define SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK (1 << 24)
|
#define SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK (1 << 24)
|
||||||
#define snd_ctl_skip_validation(info) \
|
#define snd_ctl_skip_validation(info) \
|
||||||
((info)->access & SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK)
|
((info)->access & SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK)
|
||||||
|
@ -188,14 +188,19 @@ config SND_PCM_XRUN_DEBUG
|
|||||||
sound clicking when system is loaded, it may help to determine
|
sound clicking when system is loaded, it may help to determine
|
||||||
the process or driver which causes the scheduling gaps.
|
the process or driver which causes the scheduling gaps.
|
||||||
|
|
||||||
config SND_CTL_VALIDATION
|
config SND_CTL_DEBUG
|
||||||
bool "Perform sanity-checks for each control element access"
|
bool "Enable debugging feature for control API"
|
||||||
depends on SND_DEBUG
|
depends on SND_DEBUG
|
||||||
help
|
help
|
||||||
Say Y to enable the additional validation of each control element
|
Say Y to enable the debugging feature for ALSA control API.
|
||||||
access, including sanity-checks like whether the values returned
|
It performs the additional sanity-checks for each control element
|
||||||
from the driver are in the proper ranges or the check of the invalid
|
read access, such as whether the values returned from the driver
|
||||||
access at out-of-array areas.
|
are in the proper ranges or the check of the invalid access at
|
||||||
|
out-of-array areas. The error is printed when the driver gives
|
||||||
|
such unexpected values.
|
||||||
|
When you develop a driver that deals with control elements, it's
|
||||||
|
strongly recommended to try this one once and verify whether you see
|
||||||
|
any relevant errors or not.
|
||||||
|
|
||||||
config SND_JACK_INJECTION_DEBUG
|
config SND_JACK_INJECTION_DEBUG
|
||||||
bool "Sound jack injection interface via debugfs"
|
bool "Sound jack injection interface via debugfs"
|
||||||
|
@ -966,7 +966,7 @@ static const unsigned int value_sizes[] = {
|
|||||||
[SNDRV_CTL_ELEM_TYPE_INTEGER64] = sizeof(long long),
|
[SNDRV_CTL_ELEM_TYPE_INTEGER64] = sizeof(long long),
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_SND_CTL_VALIDATION
|
#ifdef CONFIG_SND_CTL_DEBUG
|
||||||
/* fill the remaining snd_ctl_elem_value data with the given pattern */
|
/* fill the remaining snd_ctl_elem_value data with the given pattern */
|
||||||
static void fill_remaining_elem_value(struct snd_ctl_elem_value *control,
|
static void fill_remaining_elem_value(struct snd_ctl_elem_value *control,
|
||||||
struct snd_ctl_elem_info *info,
|
struct snd_ctl_elem_info *info,
|
||||||
@ -1188,7 +1188,7 @@ static int snd_ctl_elem_read(struct snd_card *card,
|
|||||||
|
|
||||||
snd_ctl_build_ioff(&control->id, kctl, index_offset);
|
snd_ctl_build_ioff(&control->id, kctl, index_offset);
|
||||||
|
|
||||||
#ifdef CONFIG_SND_CTL_VALIDATION
|
#ifdef CONFIG_SND_CTL_DEBUG
|
||||||
/* info is needed only for validation */
|
/* info is needed only for validation */
|
||||||
memset(&info, 0, sizeof(info));
|
memset(&info, 0, sizeof(info));
|
||||||
info.id = control->id;
|
info.id = control->id;
|
||||||
|
Loading…
Reference in New Issue
Block a user