mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Simon Arlott <simon@fire.lp0.eu>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	perex@perex.cz, alsa-devel@alsa-project.org
Subject: Re: [PATCH] via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
Date: Mon, 22 Jun 2009 07:57:11 +0200	[thread overview]
Message-ID: <s5hljnkoloo.wl%tiwai@suse.de> (raw)
In-Reply-To: <4A3E8108.5010001@simon.arlott.org.uk>

At Sun, 21 Jun 2009 19:50:48 +0100,
Simon Arlott wrote:
> 
> 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>

Thanks, applied now.


Takashi

> ---
>  sound/pci/via82xx.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
> index 1ef58c5..949fcaf 100644
> --- a/sound/pci/via82xx.c
> +++ b/sound/pci/via82xx.c
> @@ -85,6 +85,7 @@ static int joystick;
>  static int ac97_clock = 48000;
>  static char *ac97_quirk;
>  static int dxs_support;
> +static int nodelay;
>  
>  module_param(index, int, 0444);
>  MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge.");
> @@ -102,6 +103,8 @@ module_param(ac97_quirk, charp, 0444);
>  MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
>  module_param(dxs_support, int, 0444);
>  MODULE_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)");
> +module_param(nodelay, int, 0444);
> +MODULE_PARM_DESC(nodelay, "Disable 500ms init delay");
>  
>  /* just for backward compatibility */
>  static int enable;
> @@ -549,7 +552,8 @@ static void snd_via82xx_codec_wait(struct snd_ac97 *ac97)
>  	int err;
>  	err = snd_via82xx_codec_ready(chip, ac97->num);
>  	/* here we need to wait fairly for long time.. */
> -	msleep(500);
> +	if (!nodelay)
> +		msleep(500);
>  }
>  
>  static void snd_via82xx_codec_write(struct snd_ac97 *ac97,
> -- 
> 1.6.3.1
> 
> -- 
> Simon Arlott
> 

      reply	other threads:[~2009-06-22  5:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-21 18:50 Simon Arlott
2009-06-22  5:57 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hljnkoloo.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=simon@fire.lp0.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®