Skip to content

Commit

Permalink
ALSA: sc6000: fix older card initialization
Browse files Browse the repository at this point in the history
The last patch to handle newer cards like SC7000
broke initialization of the SC6000. Fix this.

Signed-off-by: Krzysztof Helt <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Krzysztof-H authored and tiwai committed Apr 24, 2009
1 parent c282866 commit 0cfcded
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions sound/isa/sc6000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit 0cfcded

Please sign in to comment.