Skip to content

Commit

Permalink
ALSA: asihpi - Return hw error directly from oustream_write.
Browse files Browse the repository at this point in the history
If hw error is ignored, status is updated with invalid info.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Eliot Blennerhassett authored and Takashi Iwai committed Aug 28, 2010
1 parent e9a8a85 commit 60f1deb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sound/pci/asihpi/hpi6205.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 60f1deb

Please sign in to comment.