* [PATCH] Return hw error directly from oustream_write.
@ 2010-08-28 7:52 linux
2010-08-28 10:01 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: linux @ 2010-08-28 7:52 UTC (permalink / raw)
To: patch; +Cc: tiwai, Eliot Blennerhassett, alsa-devel
From: Eliot Blennerhassett <eblennerhassett@audioscience.com>
If hw error is ignored, status is updated with invalid info.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
---
sound/pci/asihpi/hpi6205.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c
index 3b44134..22c5fc6 100644
--- a/sound/pci/asihpi/hpi6205.c
+++ b/sound/pci/asihpi/hpi6205.c
@@ -941,8 +941,7 @@ static void outstream_host_buffer_free(struct hpi_adapter_obj *pao,
}
-static u32 outstream_get_space_available(struct hpi_hostbuffer_status
- *status)
+static u32 outstream_get_space_available(struct hpi_hostbuffer_status *status)
{
return status->size_in_bytes - (status->host_index -
status->dSP_index);
@@ -987,6 +986,10 @@ static void outstream_write(struct hpi_adapter_obj *pao,
/* write it */
phm->function = HPI_OSTREAM_WRITE;
hw_message(pao, phm, phr);
+
+ if (phr->error)
+ return;
+
/* update status information that the DSP would typically
* update (and will update next time the DSP
* buffer update task reads data from the host BBM buffer)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Return hw error directly from oustream_write.
2010-08-28 7:52 [PATCH] Return hw error directly from oustream_write linux
@ 2010-08-28 10:01 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2010-08-28 10:01 UTC (permalink / raw)
To: linux; +Cc: Eliot Blennerhassett, alsa-devel
At Sat, 28 Aug 2010 19:52:24 +1200,
linux@audioscience.com wrote:
>
> From: Eliot Blennerhassett <eblennerhassett@audioscience.com>
>
> If hw error is ignored, status is updated with invalid info.
>
> Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Thanks, applied now.
Takashi
> ---
> sound/pci/asihpi/hpi6205.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c
> index 3b44134..22c5fc6 100644
> --- a/sound/pci/asihpi/hpi6205.c
> +++ b/sound/pci/asihpi/hpi6205.c
> @@ -941,8 +941,7 @@ static void outstream_host_buffer_free(struct hpi_adapter_obj *pao,
>
> }
>
> -static u32 outstream_get_space_available(struct hpi_hostbuffer_status
> - *status)
> +static u32 outstream_get_space_available(struct hpi_hostbuffer_status *status)
> {
> return status->size_in_bytes - (status->host_index -
> status->dSP_index);
> @@ -987,6 +986,10 @@ static void outstream_write(struct hpi_adapter_obj *pao,
> /* write it */
> phm->function = HPI_OSTREAM_WRITE;
> hw_message(pao, phm, phr);
> +
> + if (phr->error)
> + return;
> +
> /* update status information that the DSP would typically
> * update (and will update next time the DSP
> * buffer update task reads data from the host BBM buffer)
> --
> 1.7.0.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-28 10:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-28 7:52 [PATCH] Return hw error directly from oustream_write linux
2010-08-28 10:01 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).