aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliot Blennerhassett <eblennerhassett@audioscience.com>2011-02-09 23:26:13 -0500
committerTakashi Iwai <tiwai@suse.de>2011-02-10 12:49:34 -0500
commitee246fc041c4ace7a8cc3d995716cbc8f8f6cd5c (patch)
tree4c30bfad1e7c694f7c1873b7e493516ae61a3c26
parentd6f1c1c3646276c0784398d4ab31a9c307a6e15f (diff)
ALSA: asihpi - Clarify firmware id selection.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/asihpi/hpi6205.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c
index 971c59313d75..377e56f59a86 100644
--- a/sound/pci/asihpi/hpi6205.c
+++ b/sound/pci/asihpi/hpi6205.c
@@ -1290,33 +1290,36 @@ static u16 adapter_boot_load_dsp(struct hpi_adapter_obj *pao,
1290 struct hpi_hw_obj *phw = pao->priv; 1290 struct hpi_hw_obj *phw = pao->priv;
1291 struct dsp_code dsp_code; 1291 struct dsp_code dsp_code;
1292 u16 boot_code_id[HPI6205_MAX_FILES_TO_LOAD]; 1292 u16 boot_code_id[HPI6205_MAX_FILES_TO_LOAD];
1293 u16 firmware_id = pao->pci.pci_dev->subsystem_device;
1294 u32 temp; 1293 u32 temp;
1295 int dsp = 0, i = 0; 1294 int dsp = 0, i = 0;
1296 u16 err = 0; 1295 u16 err = 0;
1297 1296
1298 boot_code_id[0] = HPI_ADAPTER_ASI(0x6205); 1297 boot_code_id[0] = HPI_ADAPTER_ASI(0x6205);
1299 1298
1300 /* special cases where firmware_id != subsys ID */ 1299 boot_code_id[1] = pao->pci.pci_dev->subsystem_device;
1301 switch (firmware_id) { 1300 boot_code_id[1] = HPI_ADAPTER_FAMILY_ASI(boot_code_id[1]);
1301
1302 /* fix up cases where bootcode id[1] != subsys id */
1303 switch (boot_code_id[1]) {
1302 case HPI_ADAPTER_FAMILY_ASI(0x5000): 1304 case HPI_ADAPTER_FAMILY_ASI(0x5000):
1303 boot_code_id[0] = firmware_id; 1305 boot_code_id[0] = boot_code_id[1];
1304 firmware_id = 0; 1306 boot_code_id[1] = 0;
1305 break; 1307 break;
1306 case HPI_ADAPTER_FAMILY_ASI(0x5300): 1308 case HPI_ADAPTER_FAMILY_ASI(0x5300):
1307 case HPI_ADAPTER_FAMILY_ASI(0x5400): 1309 case HPI_ADAPTER_FAMILY_ASI(0x5400):
1308 case HPI_ADAPTER_FAMILY_ASI(0x6300): 1310 case HPI_ADAPTER_FAMILY_ASI(0x6300):
1309 firmware_id = HPI_ADAPTER_FAMILY_ASI(0x6400); 1311 boot_code_id[1] = HPI_ADAPTER_FAMILY_ASI(0x6400);
1310 break; 1312 break;
1311 case HPI_ADAPTER_FAMILY_ASI(0x5600): 1313 case HPI_ADAPTER_FAMILY_ASI(0x5600):
1312 case HPI_ADAPTER_FAMILY_ASI(0x6500): 1314 case HPI_ADAPTER_FAMILY_ASI(0x6500):
1313 firmware_id = HPI_ADAPTER_FAMILY_ASI(0x6600); 1315 boot_code_id[1] = HPI_ADAPTER_FAMILY_ASI(0x6600);
1314 break; 1316 break;
1315 case HPI_ADAPTER_FAMILY_ASI(0x8800): 1317 case HPI_ADAPTER_FAMILY_ASI(0x8800):
1316 firmware_id = HPI_ADAPTER_FAMILY_ASI(0x8900); 1318 boot_code_id[1] = HPI_ADAPTER_FAMILY_ASI(0x8900);
1319 break;
1320 default:
1317 break; 1321 break;
1318 } 1322 }
1319 boot_code_id[1] = firmware_id;
1320 1323
1321 /* reset DSP by writing a 1 to the WARMRESET bit */ 1324 /* reset DSP by writing a 1 to the WARMRESET bit */
1322 temp = C6205_HDCR_WARMRESET; 1325 temp = C6205_HDCR_WARMRESET;