diff options
author | Eliot Blennerhassett <eblennerhassett@audioscience.com> | 2011-07-22 15:52:38 +1200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-07-22 07:45:26 +0200 |
commit | c6c2c9aba16c41a8f72bec0738880447d158bdf7 (patch) | |
tree | 5b89bbe77676b528fd40c939d160689d4ec3f726 /sound/pci/asihpi/hpicmn.c | |
parent | 82b5774fe02c61fc70aed6bc885f0d26b708e925 (diff) | |
download | linux-c6c2c9aba16c41a8f72bec0738880447d158bdf7.tar.bz2 |
ALSA: asihpi - Increase request and response buffer sizes
Allow for up to 256 bytes of extra data on top of standard hpi
request and response sizes.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/asihpi/hpicmn.c')
-rw-r--r-- | sound/pci/asihpi/hpicmn.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/pci/asihpi/hpicmn.c b/sound/pci/asihpi/hpicmn.c index 801dcd89c86e..fe2e1ae3853d 100644 --- a/sound/pci/asihpi/hpicmn.c +++ b/sound/pci/asihpi/hpicmn.c @@ -315,8 +315,7 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache, short found = 1; struct hpi_control_cache_info *pI; struct hpi_control_cache_single *pC; - struct hpi_control_cache_pad *p_pad; - + u16 response_size; if (!find_control(phm->obj_index, p_cache, &pI)) { HPI_DEBUG_LOG(VERBOSE, "HPICMN find_control() failed for adap %d\n", @@ -326,11 +325,15 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache, phr->error = 0; + /* set the default response size */ + response_size = + sizeof(struct hpi_response_header) + + sizeof(struct hpi_control_res); + /* pC is the default cached control strucure. May be cast to something else in the following switch statement. */ pC = (struct hpi_control_cache_single *)pI; - p_pad = (struct hpi_control_cache_pad *)pI; switch (pI->control_type) { @@ -529,9 +532,7 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache, pI->control_index, pI->control_type, phm->u.c.attribute); if (found) - phr->size = - sizeof(struct hpi_response_header) + - sizeof(struct hpi_control_res); + phr->size = response_size; return found; } |