diff options
author | Eliot Blennerhassett <eblennerhassett@audioscience.com> | 2011-02-09 23:26:03 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-02-10 12:49:25 -0500 |
commit | deb21a233470537276ee39239441d1bf679223cd (patch) | |
tree | d8cb6c717abef2f998396e56f4b47db975fdb18d /sound/pci/asihpi | |
parent | 1528fbb5dcb5089652147bc6b76aa1f15e50c078 (diff) |
ALSA: asihpi - Update error codes.
Some error codes had duplicate meanings. Just use one.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/asihpi')
-rw-r--r-- | sound/pci/asihpi/hpi6205.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c index 5ebf8f886ad7..a3f650d8b94f 100644 --- a/sound/pci/asihpi/hpi6205.c +++ b/sound/pci/asihpi/hpi6205.c | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | /*****************************************************************************/ | 39 | /*****************************************************************************/ |
40 | /* HPI6205 specific error codes */ | 40 | /* HPI6205 specific error codes */ |
41 | #define HPI6205_ERROR_BASE 1000 /* not actually used anywhere */ | 41 | #define HPI6205_ERROR_BASE 1000 /* not actually used anywhere */ |
42 | 42 | ||
43 | /* operational/messaging errors */ | 43 | /* operational/messaging errors */ |
44 | #define HPI6205_ERROR_MSG_RESP_IDLE_TIMEOUT 1015 | 44 | #define HPI6205_ERROR_MSG_RESP_IDLE_TIMEOUT 1015 |
@@ -293,7 +293,7 @@ static void outstream_message(struct hpi_adapter_obj *pao, | |||
293 | { | 293 | { |
294 | 294 | ||
295 | if (phm->obj_index >= HPI_MAX_STREAMS) { | 295 | if (phm->obj_index >= HPI_MAX_STREAMS) { |
296 | phr->error = HPI_ERROR_INVALID_STREAM; | 296 | phr->error = HPI_ERROR_INVALID_OBJ_INDEX; |
297 | HPI_DEBUG_LOG(WARNING, | 297 | HPI_DEBUG_LOG(WARNING, |
298 | "Message referencing invalid stream %d " | 298 | "Message referencing invalid stream %d " |
299 | "on adapter index %d\n", phm->obj_index, | 299 | "on adapter index %d\n", phm->obj_index, |
@@ -337,7 +337,7 @@ static void instream_message(struct hpi_adapter_obj *pao, | |||
337 | { | 337 | { |
338 | 338 | ||
339 | if (phm->obj_index >= HPI_MAX_STREAMS) { | 339 | if (phm->obj_index >= HPI_MAX_STREAMS) { |
340 | phr->error = HPI_ERROR_INVALID_STREAM; | 340 | phr->error = HPI_ERROR_INVALID_OBJ_INDEX; |
341 | HPI_DEBUG_LOG(WARNING, | 341 | HPI_DEBUG_LOG(WARNING, |
342 | "Message referencing invalid stream %d " | 342 | "Message referencing invalid stream %d " |
343 | "on adapter index %d\n", phm->obj_index, | 343 | "on adapter index %d\n", phm->obj_index, |
@@ -864,6 +864,7 @@ static void outstream_host_buffer_allocate(struct hpi_adapter_obj *pao, | |||
864 | status->dSP_index = 0; | 864 | status->dSP_index = 0; |
865 | status->host_index = status->dSP_index; | 865 | status->host_index = status->dSP_index; |
866 | status->size_in_bytes = phm->u.d.u.buffer.buffer_size; | 866 | status->size_in_bytes = phm->u.d.u.buffer.buffer_size; |
867 | status->auxiliary_data_available = 0; | ||
867 | 868 | ||
868 | hw_message(pao, phm, phr); | 869 | hw_message(pao, phm, phr); |
869 | 870 | ||
@@ -995,8 +996,8 @@ static void outstream_write(struct hpi_adapter_obj *pao, | |||
995 | /* | 996 | /* |
996 | * This version relies on the DSP code triggering an OStream buffer | 997 | * This version relies on the DSP code triggering an OStream buffer |
997 | * update immediately following a SET_FORMAT call. The host has | 998 | * update immediately following a SET_FORMAT call. The host has |
998 | * already written data into the BBM buffer, but the DSP won't know about | 999 | * already written data into the BBM buffer, but the DSP won't know |
999 | * it until dwHostIndex is adjusted. | 1000 | * about it until dwHostIndex is adjusted. |
1000 | */ | 1001 | */ |
1001 | if (phw->flag_outstream_just_reset[phm->obj_index]) { | 1002 | if (phw->flag_outstream_just_reset[phm->obj_index]) { |
1002 | /* Format can only change after reset. Must tell DSP. */ | 1003 | /* Format can only change after reset. Must tell DSP. */ |
@@ -1140,6 +1141,7 @@ static void instream_host_buffer_allocate(struct hpi_adapter_obj *pao, | |||
1140 | status->dSP_index = 0; | 1141 | status->dSP_index = 0; |
1141 | status->host_index = status->dSP_index; | 1142 | status->host_index = status->dSP_index; |
1142 | status->size_in_bytes = phm->u.d.u.buffer.buffer_size; | 1143 | status->size_in_bytes = phm->u.d.u.buffer.buffer_size; |
1144 | status->auxiliary_data_available = 0; | ||
1143 | 1145 | ||
1144 | hw_message(pao, phm, phr); | 1146 | hw_message(pao, phm, phr); |
1145 | if (phr->error | 1147 | if (phr->error |
@@ -1982,7 +1984,7 @@ static short hpi6205_transfer_data(struct hpi_adapter_obj *pao, u8 *p_data, | |||
1982 | struct bus_master_interface *interface = phw->p_interface_buffer; | 1984 | struct bus_master_interface *interface = phw->p_interface_buffer; |
1983 | 1985 | ||
1984 | if (!p_data) | 1986 | if (!p_data) |
1985 | return HPI_ERROR_INVALID_DATA_TRANSFER; | 1987 | return HPI_ERROR_INVALID_DATA_POINTER; |
1986 | 1988 | ||
1987 | data_size &= ~3L; /* round data_size down to nearest 4 bytes */ | 1989 | data_size &= ~3L; /* round data_size down to nearest 4 bytes */ |
1988 | 1990 | ||
@@ -2122,8 +2124,7 @@ static u16 message_response_sequence(struct hpi_adapter_obj *pao, | |||
2122 | 2124 | ||
2123 | message_count++; | 2125 | message_count++; |
2124 | if (phm->size > sizeof(interface->u)) { | 2126 | if (phm->size > sizeof(interface->u)) { |
2125 | /* really MESSAGE buffer too small */ | 2127 | phr->error = HPI_ERROR_MESSAGE_BUFFER_TOO_SMALL; |
2126 | phr->error = HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL; | ||
2127 | phr->specific_error = sizeof(interface->u); | 2128 | phr->specific_error = sizeof(interface->u); |
2128 | phr->size = sizeof(struct hpi_response_header); | 2129 | phr->size = sizeof(struct hpi_response_header); |
2129 | HPI_DEBUG_LOG(ERROR, | 2130 | HPI_DEBUG_LOG(ERROR, |