diff options
Diffstat (limited to 'sound/pci/asihpi/hpicmn.c')
-rw-r--r-- | sound/pci/asihpi/hpicmn.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/pci/asihpi/hpicmn.c b/sound/pci/asihpi/hpicmn.c index fcd64539d9ef..dda4f1c6f658 100644 --- a/sound/pci/asihpi/hpicmn.c +++ b/sound/pci/asihpi/hpicmn.c | |||
@@ -353,7 +353,12 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache, | |||
353 | phr->u.c.param1 = pC->u.t.band; | 353 | phr->u.c.param1 = pC->u.t.band; |
354 | else if ((phm->u.c.attribute == HPI_TUNER_LEVEL) | 354 | else if ((phm->u.c.attribute == HPI_TUNER_LEVEL) |
355 | && (phm->u.c.param1 == HPI_TUNER_LEVEL_AVERAGE)) | 355 | && (phm->u.c.param1 == HPI_TUNER_LEVEL_AVERAGE)) |
356 | phr->u.c.param1 = pC->u.t.level; | 356 | if (pC->u.t.level == HPI_ERROR_ILLEGAL_CACHE_VALUE) { |
357 | phr->u.c.param1 = 0; | ||
358 | phr->error = | ||
359 | HPI_ERROR_INVALID_CONTROL_ATTRIBUTE; | ||
360 | } else | ||
361 | phr->u.c.param1 = pC->u.t.level; | ||
357 | else | 362 | else |
358 | found = 0; | 363 | found = 0; |
359 | break; | 364 | break; |
@@ -397,7 +402,8 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache, | |||
397 | if (pC->u.clk.source_index == | 402 | if (pC->u.clk.source_index == |
398 | HPI_ERROR_ILLEGAL_CACHE_VALUE) { | 403 | HPI_ERROR_ILLEGAL_CACHE_VALUE) { |
399 | phr->u.c.param1 = 0; | 404 | phr->u.c.param1 = 0; |
400 | phr->error = HPI_ERROR_INVALID_OPERATION; | 405 | phr->error = |
406 | HPI_ERROR_INVALID_CONTROL_ATTRIBUTE; | ||
401 | } else | 407 | } else |
402 | phr->u.c.param1 = pC->u.clk.source_index; | 408 | phr->u.c.param1 = pC->u.clk.source_index; |
403 | } else if (phm->u.c.attribute == HPI_SAMPLECLOCK_SAMPLERATE) | 409 | } else if (phm->u.c.attribute == HPI_SAMPLECLOCK_SAMPLERATE) |