Commit ee246fc0 authored by Eliot Blennerhassett's avatar Eliot Blennerhassett Committed by Takashi Iwai

ALSA: asihpi - Clarify firmware id selection.

Signed-off-by: default avatarEliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d6f1c1c3
...@@ -1290,33 +1290,36 @@ static u16 adapter_boot_load_dsp(struct hpi_adapter_obj *pao, ...@@ -1290,33 +1290,36 @@ static u16 adapter_boot_load_dsp(struct hpi_adapter_obj *pao,
struct hpi_hw_obj *phw = pao->priv; struct hpi_hw_obj *phw = pao->priv;
struct dsp_code dsp_code; struct dsp_code dsp_code;
u16 boot_code_id[HPI6205_MAX_FILES_TO_LOAD]; u16 boot_code_id[HPI6205_MAX_FILES_TO_LOAD];
u16 firmware_id = pao->pci.pci_dev->subsystem_device;
u32 temp; u32 temp;
int dsp = 0, i = 0; int dsp = 0, i = 0;
u16 err = 0; u16 err = 0;
boot_code_id[0] = HPI_ADAPTER_ASI(0x6205); boot_code_id[0] = HPI_ADAPTER_ASI(0x6205);
/* special cases where firmware_id != subsys ID */ boot_code_id[1] = pao->pci.pci_dev->subsystem_device;
switch (firmware_id) { boot_code_id[1] = HPI_ADAPTER_FAMILY_ASI(boot_code_id[1]);
/* fix up cases where bootcode id[1] != subsys id */
switch (boot_code_id[1]) {
case HPI_ADAPTER_FAMILY_ASI(0x5000): case HPI_ADAPTER_FAMILY_ASI(0x5000):
boot_code_id[0] = firmware_id; boot_code_id[0] = boot_code_id[1];
firmware_id = 0; boot_code_id[1] = 0;
break; break;
case HPI_ADAPTER_FAMILY_ASI(0x5300): case HPI_ADAPTER_FAMILY_ASI(0x5300):
case HPI_ADAPTER_FAMILY_ASI(0x5400): case HPI_ADAPTER_FAMILY_ASI(0x5400):
case HPI_ADAPTER_FAMILY_ASI(0x6300): case HPI_ADAPTER_FAMILY_ASI(0x6300):
firmware_id = HPI_ADAPTER_FAMILY_ASI(0x6400); boot_code_id[1] = HPI_ADAPTER_FAMILY_ASI(0x6400);
break; break;
case HPI_ADAPTER_FAMILY_ASI(0x5600): case HPI_ADAPTER_FAMILY_ASI(0x5600):
case HPI_ADAPTER_FAMILY_ASI(0x6500): case HPI_ADAPTER_FAMILY_ASI(0x6500):
firmware_id = HPI_ADAPTER_FAMILY_ASI(0x6600); boot_code_id[1] = HPI_ADAPTER_FAMILY_ASI(0x6600);
break; break;
case HPI_ADAPTER_FAMILY_ASI(0x8800): case HPI_ADAPTER_FAMILY_ASI(0x8800):
firmware_id = HPI_ADAPTER_FAMILY_ASI(0x8900); boot_code_id[1] = HPI_ADAPTER_FAMILY_ASI(0x8900);
break;
default:
break; break;
} }
boot_code_id[1] = firmware_id;
/* reset DSP by writing a 1 to the WARMRESET bit */ /* reset DSP by writing a 1 to the WARMRESET bit */
temp = C6205_HDCR_WARMRESET; temp = C6205_HDCR_WARMRESET;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment