提交 1a59fa7c 编写于 作者: E Eliot Blennerhassett 提交者: Takashi Iwai

ALSA: asihpi - Fix bug preventing outstream_write preload from happening

Signed-off-by: NEliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 bca516bf
...@@ -965,24 +965,17 @@ static void outstream_write(struct hpi_adapter_obj *pao, ...@@ -965,24 +965,17 @@ static void outstream_write(struct hpi_adapter_obj *pao,
hpi_init_response(phr, phm->object, phm->function, 0); hpi_init_response(phr, phm->object, phm->function, 0);
status = &interface->outstream_host_buffer_status[phm->obj_index]; status = &interface->outstream_host_buffer_status[phm->obj_index];
if (phw->flag_outstream_just_reset[phm->obj_index]) {
/* Format can only change after reset. Must tell DSP. */
u16 function = phm->function;
phw->flag_outstream_just_reset[phm->obj_index] = 0;
phm->function = HPI_OSTREAM_SET_FORMAT;
hw_message(pao, phm, phr); /* send the format to the DSP */
phm->function = function;
if (phr->error)
return;
}
#if 1
if (phw->flag_outstream_just_reset[phm->obj_index]) { if (phw->flag_outstream_just_reset[phm->obj_index]) {
/* First OutStremWrite() call following reset will write data to the /* First OutStremWrite() call following reset will write data to the
adapter's buffers, reducing delay before stream can start adapter's buffers, reducing delay before stream can start. The DSP
takes care of setting the stream data format using format information
embedded in phm.
*/ */
int partial_write = 0; int partial_write = 0;
unsigned int original_size = 0; unsigned int original_size = 0;
phw->flag_outstream_just_reset[phm->obj_index] = 0;
/* Send the first buffer to the DSP the old way. */ /* Send the first buffer to the DSP the old way. */
/* Limit size of first transfer - */ /* Limit size of first transfer - */
/* expect that this will not usually be triggered. */ /* expect that this will not usually be triggered. */
...@@ -1012,7 +1005,6 @@ static void outstream_write(struct hpi_adapter_obj *pao, ...@@ -1012,7 +1005,6 @@ static void outstream_write(struct hpi_adapter_obj *pao,
original_size - HPI6205_SIZEOF_DATA; original_size - HPI6205_SIZEOF_DATA;
phm->u.d.u.data.pb_data += HPI6205_SIZEOF_DATA; phm->u.d.u.data.pb_data += HPI6205_SIZEOF_DATA;
} }
#endif
space_available = outstream_get_space_available(status); space_available = outstream_get_space_available(status);
if (space_available < (long)phm->u.d.u.data.data_size) { if (space_available < (long)phm->u.d.u.data.data_size) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册