mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
ALSA: usb-audio: Add quirk_flags module option
This patch adds a new module option, quirk_flags, for allowing user to try some additional device-specific quirk behavior more easily. When this option is set to non-zero, it overrides the quirk_flags, and the specific workaround is applied. Link: https://lore.kernel.org/r/20210729074404.19728-5-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
68e851ee4c
commit
5b51785442
@ -71,6 +71,7 @@ static bool autoclock = true;
|
|||||||
static char *quirk_alias[SNDRV_CARDS];
|
static char *quirk_alias[SNDRV_CARDS];
|
||||||
static char *delayed_register[SNDRV_CARDS];
|
static char *delayed_register[SNDRV_CARDS];
|
||||||
static bool implicit_fb[SNDRV_CARDS];
|
static bool implicit_fb[SNDRV_CARDS];
|
||||||
|
static unsigned int quirk_flags[SNDRV_CARDS];
|
||||||
|
|
||||||
bool snd_usb_use_vmalloc = true;
|
bool snd_usb_use_vmalloc = true;
|
||||||
bool snd_usb_skip_validation;
|
bool snd_usb_skip_validation;
|
||||||
@ -98,6 +99,8 @@ module_param_array(delayed_register, charp, NULL, 0444);
|
|||||||
MODULE_PARM_DESC(delayed_register, "Quirk for delayed registration, given by id:iface, e.g. 0123abcd:4.");
|
MODULE_PARM_DESC(delayed_register, "Quirk for delayed registration, given by id:iface, e.g. 0123abcd:4.");
|
||||||
module_param_array(implicit_fb, bool, NULL, 0444);
|
module_param_array(implicit_fb, bool, NULL, 0444);
|
||||||
MODULE_PARM_DESC(implicit_fb, "Apply generic implicit feedback sync mode.");
|
MODULE_PARM_DESC(implicit_fb, "Apply generic implicit feedback sync mode.");
|
||||||
|
module_param_array(quirk_flags, uint, NULL, 0444);
|
||||||
|
MODULE_PARM_DESC(quirk_flags, "Driver quirk bit flags.");
|
||||||
module_param_named(use_vmalloc, snd_usb_use_vmalloc, bool, 0444);
|
module_param_named(use_vmalloc, snd_usb_use_vmalloc, bool, 0444);
|
||||||
MODULE_PARM_DESC(use_vmalloc, "Use vmalloc for PCM intermediate buffers (default: yes).");
|
MODULE_PARM_DESC(use_vmalloc, "Use vmalloc for PCM intermediate buffers (default: yes).");
|
||||||
module_param_named(skip_validation, snd_usb_skip_validation, bool, 0444);
|
module_param_named(skip_validation, snd_usb_skip_validation, bool, 0444);
|
||||||
@ -631,7 +634,10 @@ static int snd_usb_audio_create(struct usb_interface *intf,
|
|||||||
INIT_LIST_HEAD(&chip->midi_list);
|
INIT_LIST_HEAD(&chip->midi_list);
|
||||||
INIT_LIST_HEAD(&chip->mixer_list);
|
INIT_LIST_HEAD(&chip->mixer_list);
|
||||||
|
|
||||||
snd_usb_init_quirk_flags(chip);
|
if (quirk_flags[idx])
|
||||||
|
chip->quirk_flags = quirk_flags[idx];
|
||||||
|
else
|
||||||
|
snd_usb_init_quirk_flags(chip);
|
||||||
|
|
||||||
card->private_free = snd_usb_audio_free;
|
card->private_free = snd_usb_audio_free;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user