ALSA: HDSP: check for io box before uploading firmware

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>

authored by Tim Blechmann and committed by Takashi Iwai 00c9ddd1 fcef7836

+5 -1
+5 -1
sound/pci/rme9652/hdsp.c
··· 5045 5045 /* we wait 2 seconds to let freshly inserted cardbus cards do their hardware init */ 5046 5046 ssleep(2); 5047 5047 5048 + err = hdsp_check_for_iobox(hdsp); 5049 + if (err < 0) 5050 + return err; 5051 + 5048 5052 if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) { 5049 5053 #ifdef HDSP_FW_LOADER 5050 5054 if ((err = hdsp_request_fw_loader(hdsp)) < 0) ··· 5061 5057 /* init is complete, we return */ 5062 5058 return 0; 5063 5059 #endif 5064 - /* no iobox connected, we defer initialization */ 5060 + /* we defer initialization */ 5065 5061 snd_printk(KERN_INFO "Hammerfall-DSP: card initialization pending : waiting for firmware\n"); 5066 5062 if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) 5067 5063 return err;