diff options
author | Eliot Blennerhassett <eblennerhassett@audioscience.com> | 2011-07-21 23:52:38 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-07-22 01:45:26 -0400 |
commit | c6c2c9aba16c41a8f72bec0738880447d158bdf7 (patch) | |
tree | 5b89bbe77676b528fd40c939d160689d4ec3f726 /sound/pci/asihpi/hpicmn.c | |
parent | 82b5774fe02c61fc70aed6bc885f0d26b708e925 (diff) |
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, | |||
315 | short found = 1; | 315 | short found = 1; |
316 | struct hpi_control_cache_info *pI; | 316 | struct hpi_control_cache_info *pI; |
317 | struct hpi_control_cache_single *pC; | 317 | struct hpi_control_cache_single *pC; |
318 | struct hpi_control_cache_pad *p_pad; | 318 | u16 response_size; |
319 | |||
320 | if (!find_control(phm->obj_index, p_cache, &pI)) { | 319 | if (!find_control(phm->obj_index, p_cache, &pI)) { |
321 | HPI_DEBUG_LOG(VERBOSE, | 320 | HPI_DEBUG_LOG(VERBOSE, |
322 | "HPICMN find_control() failed for adap %d\n", | 321 | "HPICMN find_control() failed for adap %d\n", |
@@ -326,11 +325,15 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache, | |||
326 | 325 | ||
327 | phr->error = 0; | 326 | phr->error = 0; |
328 | 327 | ||
328 | /* set the default response size */ | ||
329 | response_size = | ||
330 | sizeof(struct hpi_response_header) + | ||
331 | sizeof(struct hpi_control_res); | ||
332 | |||
329 | /* pC is the default cached control strucure. May be cast to | 333 | /* pC is the default cached control strucure. May be cast to |
330 | something else in the following switch statement. | 334 | something else in the following switch statement. |
331 | */ | 335 | */ |
332 | pC = (struct hpi_control_cache_single *)pI; | 336 | pC = (struct hpi_control_cache_single *)pI; |
333 | p_pad = (struct hpi_control_cache_pad *)pI; | ||
334 | 337 | ||
335 | switch (pI->control_type) { | 338 | switch (pI->control_type) { |
336 | 339 | ||
@@ -529,9 +532,7 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache, | |||
529 | pI->control_index, pI->control_type, phm->u.c.attribute); | 532 | pI->control_index, pI->control_type, phm->u.c.attribute); |
530 | 533 | ||
531 | if (found) | 534 | if (found) |
532 | phr->size = | 535 | phr->size = response_size; |
533 | sizeof(struct hpi_response_header) + | ||
534 | sizeof(struct hpi_control_res); | ||
535 | 536 | ||
536 | return found; | 537 | return found; |
537 | } | 538 | } |