diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2009-04-23 15:46:19 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-04-24 02:12:06 -0400 |
commit | 0cfcdedaddf2468cb53e3cff9c3abfef14b4d784 (patch) | |
tree | 3aba0f055287897ba2dd183629e9d927b4d667d2 /sound/isa | |
parent | c282866101bfde888a44da3babd2f9ab265ca6f9 (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.c | 22 |
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, | |||
391 | int config = mss_config | | 391 | int config = mss_config | |
392 | sc6000_mpu_irq_to_softcfg(mpu_irq[dev]); | 392 | sc6000_mpu_irq_to_softcfg(mpu_irq[dev]); |
393 | int err; | 393 | int err; |
394 | int cfg[2]; | ||
395 | int old = 0; | 394 | int old = 0; |
396 | 395 | ||
397 | err = sc6000_dsp_reset(vport); | 396 | err = sc6000_dsp_reset(vport); |
@@ -421,11 +420,18 @@ static int __devinit sc6000_init_board(char __iomem *vport, | |||
421 | answer, version[0], version[1]); | 420 | answer, version[0], version[1]); |
422 | 421 | ||
423 | /* set configuration */ | 422 | /* set configuration */ |
424 | sc6000_hw_cfg_encode(vport, &cfg[0], port[dev], mpu_port[dev], | 423 | sc6000_write(vport, COMMAND_5C); |
425 | mss_port[dev]); | 424 | if (sc6000_read(vport) < 0) |
426 | if (sc6000_hw_cfg_write(vport, cfg) < 0) { | 425 | old = 1; |
427 | snd_printk(KERN_ERR "sc6000_hw_cfg_write: failed!\n"); | 426 | |
428 | return -EIO; | 427 | if (!old) { |
428 | int cfg[2]; | ||
429 | sc6000_hw_cfg_encode(vport, &cfg[0], port[dev], mpu_port[dev], | ||
430 | mss_port[dev]); | ||
431 | if (sc6000_hw_cfg_write(vport, cfg) < 0) { | ||
432 | snd_printk(KERN_ERR "sc6000_hw_cfg_write: failed!\n"); | ||
433 | return -EIO; | ||
434 | } | ||
429 | } | 435 | } |
430 | err = sc6000_setup_board(vport, config); | 436 | err = sc6000_setup_board(vport, config); |
431 | if (err < 0) { | 437 | if (err < 0) { |
@@ -434,10 +440,6 @@ static int __devinit sc6000_init_board(char __iomem *vport, | |||
434 | } | 440 | } |
435 | 441 | ||
436 | sc6000_dsp_reset(vport); | 442 | sc6000_dsp_reset(vport); |
437 | sc6000_write(vport, COMMAND_5C); | ||
438 | if (sc6000_read(vport) < 0) | ||
439 | old = 1; | ||
440 | sc6000_dsp_reset(vport); | ||
441 | 443 | ||
442 | if (!old) { | 444 | if (!old) { |
443 | sc6000_write(vport, COMMAND_60); | 445 | sc6000_write(vport, COMMAND_60); |