ALSA: asihpi - Correct headers in cached control responses.
authorEliot Blennerhassett <eblennerhassett@audioscience.com>
Thu, 22 Dec 2011 00:38:49 +0000 (13:38 +1300)
committerTakashi Iwai <tiwai@suse.de>
Thu, 22 Dec 2011 07:13:10 +0000 (08:13 +0100)
Previously, only payload and size were correct, sufficient for reading,
but other fields produced spurious debug output.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/asihpi/hpicmn.c

index c54a49f0e6d14c56324056c5fdfa62c819fe6569..7ed5c26c3737f11fd2eb98a5c4da858ac23f3731 100644 (file)
@@ -324,6 +324,8 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache,
        }
 
        phr->error = 0;
+       phr->specific_error = 0;
+       phr->version = 0;
 
        /* set the default response size */
        response_size =
@@ -531,8 +533,12 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache,
                found ? "Cached" : "Uncached", phm->adapter_index,
                pI->control_index, pI->control_type, phm->u.c.attribute);
 
-       if (found)
+       if (found) {
                phr->size = (u16)response_size;
+               phr->type = HPI_TYPE_RESPONSE;
+               phr->object = phm->object;
+               phr->function = phm->function;
+       }
 
        return found;
 }