提交 60f1deb5 编写于 作者: E Eliot Blennerhassett 提交者: Takashi Iwai

ALSA: asihpi - Return hw error directly from oustream_write.

If hw error is ignored, status is updated with invalid info.
Signed-off-by: NEliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 e9a8a85d
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册