All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: wss_lib: fix AZT2320 probe.
@ 2008-08-05  7:49 Rene Herman
  0 siblings, 0 replies; 3+ messages in thread
From: Rene Herman @ 2008-08-05  7:49 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: ALSA devel, Krzysztof Helt

[-- 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: wss_lib: fix AZT2320 probe.
@ 2008-08-05  8:23 krzysztof.h1
  2008-08-05  9:55 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: krzysztof.h1 @ 2008-08-05  8:23 UTC (permalink / raw)
  To: Rene Herman, Takashi Iwai; +Cc: ALSA devel, Krzysztof Helt

> 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.
> 

Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>

If you want to rewrite this function go for it. I'll try to solve cs4248 misdetection and forward you all details (or make a patch after your rewrite).

Kind regards,
Krzysztof

----------------------------------------------------------------------
Te newsy nakreca Cie na caly dzien!
Sprawdz >>> http://link.interia.pl/f1e94

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-05  9:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-05  7:49 [PATCH] ALSA: wss_lib: fix AZT2320 probe Rene Herman
  -- strict thread matches above, loose matches on Subject: below --
2008-08-05  8:23 krzysztof.h1
2008-08-05  9:55 ` Takashi Iwai

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.