/* NOTE: calling this function always switches to the stream mode. you'll need to disconnect the host to get back to the normal mode.  */
static int vx_query_hbuffer_size(struct vx_core *chip, struct vx_pipe *pipe)
/* NOTE: calling this function always switches to the stream mode. you'll need to disconnect the host to get back to the normal mode.  */
static int vx_query_hbuffer_size(struct vx_core *chip, struct vx_pipe *pipe)
{
	int result;
	struct vx_rmh rmh;
	vx_init_rmh(&rmh, CMD_SIZE_HBUFFER);
	vx_set_pipe_cmd_params(&rmh, pipe->is_capture, pipe->number, 0);
	if (pipe->is_capture)
		rmh.Cmd[0] |= 0x00000001;
	result = vx_send_msg(chip, &rmh);
	if (! result)
		result = rmh.Stat[0] & 0xffff;
	return result;
}