Commit 0cfcdedaddf2468cb53e3cff9c3abfef14b4d784

Authored by Krzysztof Helt
Committed by Takashi Iwai
1 parent c282866101

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>

Showing 1 changed file with 12 additions and 10 deletions Side-by-side Diff

... ... @@ -391,7 +391,6 @@
391 391 int config = mss_config |
392 392 sc6000_mpu_irq_to_softcfg(mpu_irq[dev]);
393 393 int err;
394   - int cfg[2];
395 394 int old = 0;
396 395  
397 396 err = sc6000_dsp_reset(vport);
... ... @@ -421,11 +420,18 @@
421 420 answer, version[0], version[1]);
422 421  
423 422 /* set configuration */
424   - sc6000_hw_cfg_encode(vport, &cfg[0], port[dev], mpu_port[dev],
425   - mss_port[dev]);
426   - if (sc6000_hw_cfg_write(vport, cfg) < 0) {
427   - snd_printk(KERN_ERR "sc6000_hw_cfg_write: failed!\n");
428   - return -EIO;
  423 + sc6000_write(vport, COMMAND_5C);
  424 + if (sc6000_read(vport) < 0)
  425 + old = 1;
  426 +
  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 436 err = sc6000_setup_board(vport, config);
431 437 if (err < 0) {
... ... @@ -433,10 +439,6 @@
433 439 return -ENODEV;
434 440 }
435 441  
436   - sc6000_dsp_reset(vport);
437   - sc6000_write(vport, COMMAND_5C);
438   - if (sc6000_read(vport) < 0)
439   - old = 1;
440 442 sc6000_dsp_reset(vport);
441 443  
442 444 if (!old) {