aboutsummaryrefslogtreecommitdiff
path: root/sound/isa
diff options
context:
space:
mode:
authorKrzysztof Helt2009-04-23 21:46:19 +0200
committerTakashi Iwai2009-04-24 08:12:06 +0200
commit0cfcdedaddf2468cb53e3cff9c3abfef14b4d784 (patch)
tree3aba0f055287897ba2dd183629e9d927b4d667d2 /sound/isa
parentc282866101bfde888a44da3babd2f9ab265ca6f9 (diff)
ALSA: sc6000: fix older card initialization
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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/sc6000.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/sound/isa/sc6000.c b/sound/isa/sc6000.c
index 983ab7e3b5b4..c803b2e30df9 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);