ALSA: asihpi - Give more meaningful name to hpi request message type
Having a 'request message' makes more sense than a 'message message' Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
6a6d822e12
commit
82b5774fe0
@ -359,7 +359,7 @@ void HPI_6000(struct hpi_message *phm, struct hpi_response *phr)
|
|||||||
HPI_ERROR_PROCESSING_MESSAGE);
|
HPI_ERROR_PROCESSING_MESSAGE);
|
||||||
|
|
||||||
switch (phm->type) {
|
switch (phm->type) {
|
||||||
case HPI_TYPE_MESSAGE:
|
case HPI_TYPE_REQUEST:
|
||||||
switch (phm->object) {
|
switch (phm->object) {
|
||||||
case HPI_OBJ_SUBSYSTEM:
|
case HPI_OBJ_SUBSYSTEM:
|
||||||
subsys_message(phm, phr);
|
subsys_message(phm, phr);
|
||||||
@ -538,7 +538,7 @@ static short create_adapter_obj(struct hpi_adapter_obj *pao,
|
|||||||
|
|
||||||
HPI_DEBUG_LOG(VERBOSE, "send ADAPTER_GET_INFO\n");
|
HPI_DEBUG_LOG(VERBOSE, "send ADAPTER_GET_INFO\n");
|
||||||
memset(&hm, 0, sizeof(hm));
|
memset(&hm, 0, sizeof(hm));
|
||||||
hm.type = HPI_TYPE_MESSAGE;
|
hm.type = HPI_TYPE_REQUEST;
|
||||||
hm.size = sizeof(struct hpi_message);
|
hm.size = sizeof(struct hpi_message);
|
||||||
hm.object = HPI_OBJ_ADAPTER;
|
hm.object = HPI_OBJ_ADAPTER;
|
||||||
hm.function = HPI_ADAPTER_GET_INFO;
|
hm.function = HPI_ADAPTER_GET_INFO;
|
||||||
|
@ -392,7 +392,7 @@ void _HPI_6205(struct hpi_adapter_obj *pao, struct hpi_message *phm,
|
|||||||
|
|
||||||
HPI_DEBUG_LOG(VERBOSE, "start of switch\n");
|
HPI_DEBUG_LOG(VERBOSE, "start of switch\n");
|
||||||
switch (phm->type) {
|
switch (phm->type) {
|
||||||
case HPI_TYPE_MESSAGE:
|
case HPI_TYPE_REQUEST:
|
||||||
switch (phm->object) {
|
switch (phm->object) {
|
||||||
case HPI_OBJ_SUBSYSTEM:
|
case HPI_OBJ_SUBSYSTEM:
|
||||||
subsys_message(pao, phm, phr);
|
subsys_message(pao, phm, phr);
|
||||||
@ -634,11 +634,12 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao,
|
|||||||
|
|
||||||
HPI_DEBUG_LOG(VERBOSE, "init ADAPTER_GET_INFO\n");
|
HPI_DEBUG_LOG(VERBOSE, "init ADAPTER_GET_INFO\n");
|
||||||
memset(&hm, 0, sizeof(hm));
|
memset(&hm, 0, sizeof(hm));
|
||||||
hm.type = HPI_TYPE_MESSAGE;
|
/* wAdapterIndex == version == 0 */
|
||||||
|
hm.type = HPI_TYPE_REQUEST;
|
||||||
hm.size = sizeof(hm);
|
hm.size = sizeof(hm);
|
||||||
hm.object = HPI_OBJ_ADAPTER;
|
hm.object = HPI_OBJ_ADAPTER;
|
||||||
hm.function = HPI_ADAPTER_GET_INFO;
|
hm.function = HPI_ADAPTER_GET_INFO;
|
||||||
hm.adapter_index = 0;
|
|
||||||
memset(&hr, 0, sizeof(hr));
|
memset(&hr, 0, sizeof(hr));
|
||||||
hr.size = sizeof(hr);
|
hr.size = sizeof(hr);
|
||||||
|
|
||||||
|
@ -364,7 +364,7 @@ Used in DLL to indicate device not present
|
|||||||
#define HPI_ADAPTER_ASI(f) (f)
|
#define HPI_ADAPTER_ASI(f) (f)
|
||||||
|
|
||||||
enum HPI_MESSAGE_TYPES {
|
enum HPI_MESSAGE_TYPES {
|
||||||
HPI_TYPE_MESSAGE = 1,
|
HPI_TYPE_REQUEST = 1,
|
||||||
HPI_TYPE_RESPONSE = 2,
|
HPI_TYPE_RESPONSE = 2,
|
||||||
HPI_TYPE_DATA = 3,
|
HPI_TYPE_DATA = 3,
|
||||||
HPI_TYPE_SSX2BYPASS_MESSAGE = 4
|
HPI_TYPE_SSX2BYPASS_MESSAGE = 4
|
||||||
|
@ -682,7 +682,7 @@ static void subsys_message(struct hpi_message *phm, struct hpi_response *phr)
|
|||||||
void HPI_COMMON(struct hpi_message *phm, struct hpi_response *phr)
|
void HPI_COMMON(struct hpi_message *phm, struct hpi_response *phr)
|
||||||
{
|
{
|
||||||
switch (phm->type) {
|
switch (phm->type) {
|
||||||
case HPI_TYPE_MESSAGE:
|
case HPI_TYPE_REQUEST:
|
||||||
switch (phm->object) {
|
switch (phm->object) {
|
||||||
case HPI_OBJ_SUBSYSTEM:
|
case HPI_OBJ_SUBSYSTEM:
|
||||||
subsys_message(phm, phr);
|
subsys_message(phm, phr);
|
||||||
|
@ -46,7 +46,7 @@ static void hpi_init_message(struct hpi_message *phm, u16 object,
|
|||||||
if (gwSSX2_bypass)
|
if (gwSSX2_bypass)
|
||||||
phm->type = HPI_TYPE_SSX2BYPASS_MESSAGE;
|
phm->type = HPI_TYPE_SSX2BYPASS_MESSAGE;
|
||||||
else
|
else
|
||||||
phm->type = HPI_TYPE_MESSAGE;
|
phm->type = HPI_TYPE_REQUEST;
|
||||||
phm->object = object;
|
phm->object = object;
|
||||||
phm->function = function;
|
phm->function = function;
|
||||||
phm->version = 0;
|
phm->version = 0;
|
||||||
@ -89,7 +89,7 @@ static void hpi_init_messageV1(struct hpi_message_header *phm, u16 size,
|
|||||||
memset(phm, 0, sizeof(*phm));
|
memset(phm, 0, sizeof(*phm));
|
||||||
if ((object > 0) && (object <= HPI_OBJ_MAXINDEX)) {
|
if ((object > 0) && (object <= HPI_OBJ_MAXINDEX)) {
|
||||||
phm->size = size;
|
phm->size = size;
|
||||||
phm->type = HPI_TYPE_MESSAGE;
|
phm->type = HPI_TYPE_REQUEST;
|
||||||
phm->object = object;
|
phm->object = object;
|
||||||
phm->function = function;
|
phm->function = function;
|
||||||
phm->version = 1;
|
phm->version = 1;
|
||||||
|
@ -315,7 +315,7 @@ void hpi_send_recv_ex(struct hpi_message *phm, struct hpi_response *phr,
|
|||||||
{
|
{
|
||||||
HPI_DEBUG_MESSAGE(DEBUG, phm);
|
HPI_DEBUG_MESSAGE(DEBUG, phm);
|
||||||
|
|
||||||
if (phm->type != HPI_TYPE_MESSAGE) {
|
if (phm->type != HPI_TYPE_REQUEST) {
|
||||||
hpi_init_response(phr, phm->object, phm->function,
|
hpi_init_response(phr, phm->object, phm->function,
|
||||||
HPI_ERROR_INVALID_TYPE);
|
HPI_ERROR_INVALID_TYPE);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user