From: linux@audioscience.com
To: patch@alsa-project.org
Cc: tiwai@suse.de,
Eliot Blennerhassett <eblennerhassett@audioscience.com>,
alsa-devel@alsa-project.org
Subject: [PATCH 5/6] Minor HPI error handling fixes.
Date: Tue, 06 Jul 2010 08:37:10 +1200 [thread overview]
Message-ID: <1278362231-10160-6-git-send-email-linux@audioscience.com> (raw)
In-Reply-To: <1278362231-10160-1-git-send-email-linux@audioscience.com>
From: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Handle errors in tuner level caching,
Ccorrect error code for aesebu rx status.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
---
pci/asihpi/hpicmn.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/pci/asihpi/hpicmn.c b/pci/asihpi/hpicmn.c
index fcd6453..dda4f1c 100644
--- a/pci/asihpi/hpicmn.c
+++ b/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)
--
1.7.0.4
next prev parent reply other threads:[~2010-07-05 20:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-05 20:37 Resent HPI 4.03.36 updated summaries linux
2010-07-05 20:37 ` [PATCH 1/6] HPI API updates linux
2010-07-05 20:37 ` [PATCH 2/6] Use version string instead of printf formatting linux
2010-07-05 20:37 ` [PATCH 3/6] Add ASI5200 family linux
2010-07-05 20:37 ` [PATCH 4/6] Change compander API and tidy linux
2010-07-05 20:37 ` linux [this message]
2010-07-05 20:37 ` [PATCH 6/6] Remove unneeded ; linux
2010-07-06 6:24 ` Resent HPI 4.03.36 updated summaries Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1278362231-10160-6-git-send-email-linux@audioscience.com \
--to=linux@audioscience.com \
--cc=alsa-devel@alsa-project.org \
--cc=eblennerhassett@audioscience.com \
--cc=patch@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.