All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: David Henningsson <david.henningsson@canonical.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [RFC PATCH] ALSA: hda - Implement a poll loop for jacks as a module parameter
Date: Tue, 09 Oct 2012 15:32:36 +0200	[thread overview]
Message-ID: <s5hbogbg497.wl%tiwai@suse.de> (raw)
In-Reply-To: <1349788784-11700-1-git-send-email-david.henningsson@canonical.com>

At Tue,  9 Oct 2012 15:19:44 +0200,
David Henningsson wrote:
> 
> Now that we have a generic unsol mechanism, we can implement a generic
> poll loop, which can be used for debugging, or if a codec's unsol
> mechanism is broken.
> 
> Signed-off-by: David Henningsson <david.henningsson@canonical.com>

The patch almost looks good, but I postpone as a 3.8 thing.

> ---
> 
> I'm also considering activating it by default if we go into single_cmd mode
> due to codec not responding. What do you think?

Well, I don't buy it.  Falling back to single_cmd doesn't mean that we
are saving the world perfectly.  I recently even think it might be
even better not to do that, otherwise people won't notice the
breakage.


> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index f09ff6c..b4f1ab8 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -68,6 +68,7 @@ static int position_fix[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
>  static int bdl_pos_adj[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
>  static int probe_mask[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
>  static int probe_only[SNDRV_CARDS];
> +static int jackpoll_ms[SNDRV_CARDS];
>  static bool single_cmd;
>  static int enable_msi = -1;
>  #ifdef CONFIG_SND_HDA_PATCH_LOADER
> @@ -95,6 +96,8 @@ module_param_array(probe_mask, int, NULL, 0444);
>  MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1).");
>  module_param_array(probe_only, int, NULL, 0444);
>  MODULE_PARM_DESC(probe_only, "Only probing and no codec initialization.");
> +module_param_array(jackpoll_ms, int, NULL, 0444);
> +MODULE_PARM_DESC(jackpoll_ms, "Ms between polling for jack events (default = 0, using unsol events only)");
>  module_param(single_cmd, bool, 0444);
>  MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs "
>  		 "(for debugging only).");
> @@ -1666,6 +1669,8 @@ static int DELAYED_INIT_MARK azx_codec_create(struct azx *chip, const char *mode
>  			err = snd_hda_codec_new(chip->bus, c, &codec);
>  			if (err < 0)
>  				continue;
> +			codec->jackpoll_interval =
> +				msecs_to_jiffies(jackpoll_ms[chip->dev_index]);

Better to add a sanity check of the interval value.


Takashi

  reply	other threads:[~2012-10-09 13:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09 13:19 [RFC PATCH] ALSA: hda - Implement a poll loop for jacks as a module parameter David Henningsson
2012-10-09 13:32 ` Takashi Iwai [this message]
2012-10-09 14:28   ` David Henningsson
2012-10-09 14:57     ` Takashi Iwai
2012-10-10 13:47       ` David Henningsson
2012-10-10 14:07         ` Takashi Iwai
2012-10-10 15:36           ` David Henningsson
2012-10-10 15:59             ` Takashi Iwai
2012-10-12  6:49               ` David Henningsson
2012-10-12  7:03                 ` 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=s5hbogbg497.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.