aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/asihpi/hpi6205.c
diff options
context:
space:
mode:
authorEliot Blennerhassett <eblennerhassett@audioscience.com>2011-02-10 17:26:05 +1300
committerTakashi Iwai <tiwai@suse.de>2011-02-10 18:49:27 +0100
commit0a00044d26489c1907b9e8b3e633e6b9a6d2200e (patch)
tree463ea7d845a63493c81971e7cbc2e7235b213bda /sound/pci/asihpi/hpi6205.c
parentba94455c29c383713c360537b6323e3bd4c76434 (diff)
ALSA: asihpi - Reduce number of error codes returned to upper layers.
Create and use HPI_ERROR_DSP_COMMUNICATION _DSP_BOOTLOAD, rather than backend-specific error codes (now returned as data with the error). Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/asihpi/hpi6205.c')
-rw-r--r--sound/pci/asihpi/hpi6205.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c
index a3f650d8b94..5fe535b1b09 100644
--- a/sound/pci/asihpi/hpi6205.c
+++ b/sound/pci/asihpi/hpi6205.c
@@ -478,7 +478,12 @@ static void subsys_create_adapter(struct hpi_message *phm,
err = create_adapter_obj(&ao, &os_error_code);
if (err) {
delete_adapter_obj(&ao);
- phr->error = err;
+ if (err >= HPI_ERROR_BACKEND_BASE) {
+ phr->error = HPI_ERROR_DSP_BOOTLOAD;
+ phr->specific_error = err;
+ } else {
+ phr->error = err;
+ }
phr->u.s.data = os_error_code;
return;
}
@@ -2242,7 +2247,13 @@ static void hw_message(struct hpi_adapter_obj *pao, struct hpi_message *phm,
/* maybe an error response */
if (err) {
/* something failed in the HPI/DSP interface */
- phr->error = err;
+ if (err >= HPI_ERROR_BACKEND_BASE) {
+ phr->error = HPI_ERROR_DSP_COMMUNICATION;
+ phr->specific_error = err;
+ } else {
+ phr->error = err;
+ }
+
pao->dsp_crashed++;
/* just the header of the response is valid */