mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Thadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Correct type and description of	CONFIG_AC97_POWER_SAVE_DEFAULT
Date: Sat, 07 Jun 2008 19:48:16 +0200	[thread overview]
Message-ID: <s5hlk1hp25b.wl%tiwai@suse.de> (raw)
In-Reply-To: <20080607162238.GA7893@vespa.holoscopio.com>

At Sat, 7 Jun 2008 13:22:39 -0300,
Thadeu Lima de Souza Cascardo wrote:
> 
> While CONFIG_HDA_POWER_SAVE_DEFAULT is used as a timeout in seconds,
> CONFIG_AC97_POWER_SAVE_DEFAULT simply enables or disables AC97 power
> saving.

Thanks for the patch.  However, I can't take this as is.  The reasons
are below:

The power_save option takes indeed an integer value, and this kconfig
is nothing but its default value.

In your way, it's set always 1 if selected.  This is a very bad choice
as power_save value, because you'll turn on/off after one second.
This may lead to too frequent click noises. 
Thus, even if we need to make it bool, a more sensitive value must be
chosen.  And, which value is sensitive is a matter of taste, and you
cannot define it alone by yourself.


thanks,

Takashi

> ---
>  sound/pci/Kconfig           |    6 +++---
>  sound/pci/ac97/ac97_codec.c |    6 +++++-
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
> index 7e47421..fe6aad2 100644
> --- a/sound/pci/Kconfig
> +++ b/sound/pci/Kconfig
> @@ -968,11 +968,11 @@ config SND_AC97_POWER_SAVE
>  	  sysfs, too.
>  
>  config SND_AC97_POWER_SAVE_DEFAULT
> -	int "Default time-out for AC97 power-save mode"
> +	bool "Activate AC97 power-save mode by default"
>  	depends on SND_AC97_POWER_SAVE
>  	default 0
>  	help
> -	  The default time-out value in seconds for AC97 automatic
> -	  power-save mode.  0 means to disable the power-save mode.
> +    By default, AC97 power-save mode is not active. This option
> +    activates it by default.
>  
>  endmenu
> diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
> index 45fd290..0566e3a 100644
> --- a/sound/pci/ac97/ac97_codec.c
> +++ b/sound/pci/ac97/ac97_codec.c
> @@ -48,7 +48,11 @@ module_param(enable_loopback, bool, 0444);
>  MODULE_PARM_DESC(enable_loopback, "Enable AC97 ADC/DAC Loopback Control");
>  
>  #ifdef CONFIG_SND_AC97_POWER_SAVE
> -static int power_save = CONFIG_SND_AC97_POWER_SAVE_DEFAULT;
> +#ifdef CONFIG_SND_AC97_POWER_SAVE_DEFAULT
> +static int power_save = 1;
> +#else
> +static int power_save = 0;
> +#endif
>  module_param(power_save, bool, 0644);
>  MODULE_PARM_DESC(power_save, "Enable AC97 power-saving control");
>  #endif
> -- 
> 1.5.5.3
> 

  reply	other threads:[~2008-06-07 17:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-07 16:22 Thadeu Lima de Souza Cascardo
2008-06-07 17:48 ` Takashi Iwai [this message]
2008-06-07 19:40   ` Thadeu Lima de Souza Cascardo
2008-06-08  7:23     ` Takashi Iwai

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=s5hlk1hp25b.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=cascardo@minaslivre.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®