aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Arlott <simon@fire.lp0.eu>2009-06-21 14:50:48 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-22 01:54:58 -0400
commit115551d98e4c05bb982bd940f08a489fa9b0a4a1 (patch)
tree16a5f9bdeabd03f6c52905e693a469e4d8784af5
parent1f3fff7bda95b75a6be5a02c2a6902573d8c18e6 (diff)
ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
There's a large 500ms delay in snd_via82xx_codec_wait() that, at least on my hardware, appears to be unnecessary. The rest of the init of the card works without logging any warnings or errors and both audio and mixer settings work. This adds an "nodelay" parameter to disable this (undocumented in the code) large delay improving bootup time by 489-500ms. [ 1.034217] initcall alsa_card_via82xx_init+0x0/0x16 returned 0 after 505757 usecs vs. [ 0.533136] initcall alsa_card_via82xx_init+0x0/0x16 returned 0 after 15915 usecs Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/via82xx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 1ef58c51c213..949fcaf6b70e 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -85,6 +85,7 @@ static int joystick;
85static int ac97_clock = 48000; 85static int ac97_clock = 48000;
86static char *ac97_quirk; 86static char *ac97_quirk;
87static int dxs_support; 87static int dxs_support;
88static int nodelay;
88 89
89module_param(index, int, 0444); 90module_param(index, int, 0444);
90MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge."); 91MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge.");
@@ -102,6 +103,8 @@ module_param(ac97_quirk, charp, 0444);
102MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware."); 103MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
103module_param(dxs_support, int, 0444); 104module_param(dxs_support, int, 0444);
104MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA, 5 = enable any sample rate)"); 105MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA, 5 = enable any sample rate)");
106module_param(nodelay, int, 0444);
107MODULE_PARM_DESC(nodelay, "Disable 500ms init delay");
105 108
106/* just for backward compatibility */ 109/* just for backward compatibility */
107static int enable; 110static int enable;
@@ -549,7 +552,8 @@ static void snd_via82xx_codec_wait(struct snd_ac97 *ac97)
549 int err; 552 int err;
550 err = snd_via82xx_codec_ready(chip, ac97->num); 553 err = snd_via82xx_codec_ready(chip, ac97->num);
551 /* here we need to wait fairly for long time.. */ 554 /* here we need to wait fairly for long time.. */
552 msleep(500); 555 if (!nodelay)
556 msleep(500);
553} 557}
554 558
555static void snd_via82xx_codec_write(struct snd_ac97 *ac97, 559static void snd_via82xx_codec_write(struct snd_ac97 *ac97,