aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/asihpi/hpicmn.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-08-05 11:17:04 +0200
committerTakashi Iwai <tiwai@suse.de>2010-08-05 11:17:04 +0200
commit74bf40f0793fed9e01eb6164c2ce63e8c27ca205 (patch)
treef41312c0943978842ac258873b29da04d72d0625 /sound/pci/asihpi/hpicmn.c
parente71981343ad29b5d929f82ac56c0b27b8ea0e540 (diff)
parentc4685849b4d725ab80cd29f5e09f5f128b4724b5 (diff)
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'sound/pci/asihpi/hpicmn.c')
-rw-r--r--sound/pci/asihpi/hpicmn.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/pci/asihpi/hpicmn.c b/sound/pci/asihpi/hpicmn.c
index fcd64539d9e..dda4f1c6f65 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,
phr->u.c.param1 = pC->u.t.band;
else if ((phm->u.c.attribute == HPI_TUNER_LEVEL)
&& (phm->u.c.param1 == HPI_TUNER_LEVEL_AVERAGE))
- phr->u.c.param1 = pC->u.t.level;
+ if (pC->u.t.level == HPI_ERROR_ILLEGAL_CACHE_VALUE) {
+ phr->u.c.param1 = 0;
+ phr->error =
+ HPI_ERROR_INVALID_CONTROL_ATTRIBUTE;
+ } else
+ phr->u.c.param1 = pC->u.t.level;
else
found = 0;
break;
@@ -397,7 +402,8 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache,
if (pC->u.clk.source_index ==
HPI_ERROR_ILLEGAL_CACHE_VALUE) {
phr->u.c.param1 = 0;
- phr->error = HPI_ERROR_INVALID_OPERATION;
+ phr->error =
+ HPI_ERROR_INVALID_CONTROL_ATTRIBUTE;
} else
phr->u.c.param1 = pC->u.clk.source_index;
} else if (phm->u.c.attribute == HPI_SAMPLECLOCK_SAMPLERATE)