The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger@queued.net>
To: "Jaya Kumar" <jayakumar.lkml@gmail.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	Takashi Iwai <tiwai@suse.de>
Subject: [PATCH 8/14] ALSA: cs5535audio: check OLPC's Analog Input status vis GPIO
Date: Thu, 6 Nov 2008 16:49:55 -0500	[thread overview]
Message-ID: <20081106164955.507e05a2@ephemeral> (raw)


Checking the HPF register is irrelevant; HPF is secondary to the AI mode.
Instead, check for Analog Input mode via GPIO.

Signed-off-by: Andres Salomon <dilinger@debian.org>
---
 sound/pci/cs5535audio/cs5535audio_olpc.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/sound/pci/cs5535audio/cs5535audio_olpc.c b/sound/pci/cs5535audio/cs5535audio_olpc.c
index 2c148b9..f59af91 100644
--- a/sound/pci/cs5535audio/cs5535audio_olpc.c
+++ b/sound/pci/cs5535audio/cs5535audio_olpc.c
@@ -43,13 +43,8 @@ static int olpc_dc_info(struct snd_kcontrol *kctl,
 
 static int olpc_dc_get(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *v)
 {
-	struct cs5535audio *cs5535au = snd_kcontrol_chip(kctl);
-	u8 val;
-
-	val = snd_ac97_read(cs5535au->ac97, AC97_AD_TEST2);
-	val >>= AC97_AD_HPFD_SHIFT;
-	v->value.integer.value[0] = val & 0x1;
-
+	v->value.integer.value[0] = geode_gpio_isset(OLPC_GPIO_MIC_AC,
+			GPIO_OUTPUT_VAL);
 	return 0;
 }
 
-- 
1.5.6.5


                 reply	other threads:[~2008-11-06 21:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20081106164955.507e05a2@ephemeral \
    --to=dilinger@queued.net \
    --cc=akpm@linux-foundation.org \
    --cc=jayakumar.lkml@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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