From: Rene Herman <rene.herman@keyaccess.nl>
To: Takashi Iwai <tiwai@suse.de>
Cc: ALSA devel <alsa-devel@alsa-project.org>,
Krzysztof Helt <krzysztof.h1@poczta.fm>
Subject: [PATCH] ALSA: wss_lib: fix AZT2320 probe.
Date: Tue, 05 Aug 2008 09:49:52 +0200 [thread overview]
Message-ID: <48980620.3050504@keyaccess.nl> (raw)
[-- Attachment #1: Type: text/plain, Size: 424 bytes --]
Hi Takashi
The attached is needed and sufficient to get AZT2320 back in line.
Trouble is with non-settable MIC gain bits on AZT2320 which fools
snd_ad1848_probe() and makes snd-azt2320 fail to load after the wss_lib
merge.
Krzysztof should ACK/NAK this -- he was busy there with CS4248 and might
have other plans for it.
Krzysztof, do you? I'm rather itching to rewrite that function
otherwise. It's horrible.
Rene.
[-- Attachment #2: 0001-ALSA-wss_lib-fix-AZT2320-probe.patch --]
[-- Type: text/plain, Size: 1315 bytes --]
>From 988ae22373fafa8a0059457eafc737a01c471fe4 Mon Sep 17 00:00:00 2001
From: Rene Herman <rene.herman@gmail.com>
Date: Tue, 5 Aug 2008 09:33:33 +0200
Subject: [PATCH] ALSA: wss_lib: fix AZT2320 probe.
After the transition from cs4321_lib to wss_lib, azt2320 probe visits
snd_ad1848_probe during detection. It expects register 0 (LEFT_INPUT)
to be able to retain the value 0xaa during detection but AZT2320 does
not support MIC gain meaning it reads back as 0x8a instead.
Signed-off-by: Rene Herman <rene.herman@gmail.com>
---
sound/isa/wss/wss_lib.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c
index f2df77b..955db45 100644
--- a/sound/isa/wss/wss_lib.c
+++ b/sound/isa/wss/wss_lib.c
@@ -1168,11 +1168,13 @@ static int snd_ad1848_probe(struct snd_wss *chip)
ad1847 = 1;
break;
}
- if (snd_wss_in(chip, CS4231_LEFT_INPUT) == 0xaa &&
- rev == 0x45) {
- spin_unlock_irqrestore(&chip->reg_lock, flags);
- id = 1;
- break;
+ if (rev == 0x45) {
+ rev = snd_wss_in(chip, CS4231_LEFT_INPUT);
+ if (rev == 0xaa || rev == 0x8a) {
+ spin_unlock_irqrestore(&chip->reg_lock, flags);
+ id = 1;
+ break;
+ }
}
spin_unlock_irqrestore(&chip->reg_lock, flags);
}
--
1.5.5
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next reply other threads:[~2008-08-05 7:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 7:49 Rene Herman [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-08-05 8:23 [PATCH] ALSA: wss_lib: fix AZT2320 probe krzysztof.h1
2008-08-05 9:55 ` 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=48980620.3050504@keyaccess.nl \
--to=rene.herman@keyaccess.nl \
--cc=alsa-devel@alsa-project.org \
--cc=krzysztof.h1@poczta.fm \
--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