alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Dylan Reid <dgreid@chromium.org>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, Dylan Reid <dgreid@chromium.org>,
	chee_kin@ctl.creative.com, ian_minett@creativelabs.com
Subject: [PATCH 2/3] ALSA: hda/ca0132 - Check download state of DSP.
Date: Thu, 14 Mar 2013 17:27:45 -0700	[thread overview]
Message-ID: <1363307266-30055-3-git-send-email-dgreid@chromium.org> (raw)
In-Reply-To: <1363307266-30055-1-git-send-email-dgreid@chromium.org>

Instead of using the dspload_is_loaded() function, check the dsp_state
that is kept in the spec.  The dspload_is_loaded() function returns
true if the DSP transfer was never started.  This false-positive leads
to multiple second delays when ca0132_setup_efaults() times out on
each write.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
---
 sound/pci/hda/patch_ca0132.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index cf24b75..225d1d5 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -3239,7 +3239,7 @@ static int ca0132_set_vipsource(struct hda_codec *codec, int val)
 	struct ca0132_spec *spec = codec->spec;
 	unsigned int tmp;
 
-	if (!dspload_is_loaded(codec))
+	if (spec->dsp_state != DSP_DOWNLOADED)
 		return 0;
 
 	/* if CrystalVoice if off, vipsource should be 0 */
@@ -4267,11 +4267,12 @@ static void ca0132_refresh_widget_caps(struct hda_codec *codec)
  */
 static void ca0132_setup_defaults(struct hda_codec *codec)
 {
+	struct ca0132_spec *spec = codec->spec;
 	unsigned int tmp;
 	int num_fx;
 	int idx, i;
 
-	if (!dspload_is_loaded(codec))
+	if (spec->dsp_state != DSP_DOWNLOADED)
 		return;
 
 	/* out, in effects + voicefx */
-- 
1.8.1.3.605.g02339dd

  parent reply	other threads:[~2013-03-15  0:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15  0:27 [PATCH 0/3] ALSA: hda/ca0132 - Better handle a failed DSP firmware load Dylan Reid
2013-03-15  0:27 ` [PATCH 1/3] ALSA: hda/ca0132 - Check if dspload_image succeeded Dylan Reid
2013-03-15  0:27 ` Dylan Reid [this message]
2013-03-15  0:27 ` [PATCH 3/3] ALSA: hda/ca0132 - Remove extra setting of dsp_state Dylan Reid
2013-03-15  6:46 ` [PATCH 0/3] ALSA: hda/ca0132 - Better handle a failed DSP firmware load 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=1363307266-30055-3-git-send-email-dgreid@chromium.org \
    --to=dgreid@chromium.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=chee_kin@ctl.creative.com \
    --cc=ian_minett@creativelabs.com \
    --cc=tiwai@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).