* [PATCH] sc6000: fix older card initialization
@ 2009-04-23 19:46 Krzysztof Helt
2009-04-24 6:13 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Helt @ 2009-04-23 19:46 UTC (permalink / raw)
To: Alsa-devel; +Cc: Rene Herman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=US-ASCII, Size: 1825 bytes --]
From: Krzysztof Helt <krzysztof.h1@wp.pl>
The last patch to handle newer cards like SC7000
broke initialization of the SC6000. Fix this.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
---
sound/isa/sc6000.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/sound/isa/sc6000.c b/sound/isa/sc6000.c
index 983ab7e..c803b2e 100644
--- a/sound/isa/sc6000.c
+++ b/sound/isa/sc6000.c
@@ -391,7 +391,6 @@ static int __devinit sc6000_init_board(char __iomem *vport,
int config = mss_config |
sc6000_mpu_irq_to_softcfg(mpu_irq[dev]);
int err;
- int cfg[2];
int old = 0;
err = sc6000_dsp_reset(vport);
@@ -421,11 +420,18 @@ static int __devinit sc6000_init_board(char __iomem *vport,
answer, version[0], version[1]);
/* set configuration */
- sc6000_hw_cfg_encode(vport, &cfg[0], port[dev], mpu_port[dev],
- mss_port[dev]);
- if (sc6000_hw_cfg_write(vport, cfg) < 0) {
- snd_printk(KERN_ERR "sc6000_hw_cfg_write: failed!\n");
- return -EIO;
+ sc6000_write(vport, COMMAND_5C);
+ if (sc6000_read(vport) < 0)
+ old = 1;
+
+ if (!old) {
+ int cfg[2];
+ sc6000_hw_cfg_encode(vport, &cfg[0], port[dev], mpu_port[dev],
+ mss_port[dev]);
+ if (sc6000_hw_cfg_write(vport, cfg) < 0) {
+ snd_printk(KERN_ERR "sc6000_hw_cfg_write: failed!\n");
+ return -EIO;
+ }
}
err = sc6000_setup_board(vport, config);
if (err < 0) {
@@ -434,10 +440,6 @@ static int __devinit sc6000_init_board(char __iomem *vport,
}
sc6000_dsp_reset(vport);
- sc6000_write(vport, COMMAND_5C);
- if (sc6000_read(vport) < 0)
- old = 1;
- sc6000_dsp_reset(vport);
if (!old) {
sc6000_write(vport, COMMAND_60);
--
1.6.0.3
----------------------------------------------------------------------
Dzwonki na komorkê!
Sprawdz >> http://link.interia.pl/f2127
[-- Attachment #2: 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] 2+ messages in thread
* Re: [PATCH] sc6000: fix older card initialization
2009-04-23 19:46 [PATCH] sc6000: fix older card initialization Krzysztof Helt
@ 2009-04-24 6:13 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2009-04-24 6:13 UTC (permalink / raw)
To: Krzysztof Helt; +Cc: Alsa-devel, Rene Herman
At Thu, 23 Apr 2009 21:46:19 +0200,
Krzysztof Helt wrote:
>
> From: Krzysztof Helt <krzysztof.h1@wp.pl>
>
> The last patch to handle newer cards like SC7000
> broke initialization of the SC6000. Fix this.
>
> Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Thanks, applied now.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-24 6:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-23 19:46 [PATCH] sc6000: fix older card initialization Krzysztof Helt
2009-04-24 6:13 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox