Skip to content

Commit

Permalink
ALSA: HDSP: check for io box before uploading firmware
Browse files Browse the repository at this point in the history
currently the hdsp driver tries to upload the firmware, even if the
io box is not connected. this patch adds a check for the io box
before trying to upload the firmware.
thus instead of messages complaining about the fifo status and firmware
loading failure, the driver gives a message that no multiface or
digiface is connected.

[A minor coding-style fix by tiwai]

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Tim Blechmann authored and Takashi Iwai committed Nov 9, 2008
1 parent fcef783 commit 00c9ddd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sound/pci/rme9652/hdsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -5045,6 +5045,10 @@ static int __devinit snd_hdsp_create(struct snd_card *card,
/* we wait 2 seconds to let freshly inserted cardbus cards do their hardware init */
ssleep(2);

err = hdsp_check_for_iobox(hdsp);
if (err < 0)
return err;

if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) {
#ifdef HDSP_FW_LOADER
if ((err = hdsp_request_fw_loader(hdsp)) < 0)
Expand All @@ -5057,7 +5061,7 @@ static int __devinit snd_hdsp_create(struct snd_card *card,
/* init is complete, we return */
return 0;
#endif
/* no iobox connected, we defer initialization */
/* we defer initialization */
snd_printk(KERN_INFO "Hammerfall-DSP: card initialization pending : waiting for firmware\n");
if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0)
return err;
Expand Down

0 comments on commit 00c9ddd

Please sign in to comment.