• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * drivers/amlogic/media/stream_input/amports/amports_priv.h
3  *
4  * Copyright (C) 2016 Amlogic, Inc. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14  * more details.
15  *
16  */
17 
18 #ifndef AMPORTS_PRIV_HEAD_HH
19 #define AMPORTS_PRIV_HEAD_HH
20 #include "../amports/streambuf.h"
21 #include "../../common/media_clock/switch/amports_gate.h"
22 #include <linux/amlogic/media/vfm/vframe.h>
23 #include <linux/amlogic/media/registers/register.h>
24 #include <linux/amlogic/media/utils/log.h>
25 
26 struct port_priv_s {
27 	struct vdec_s *vdec;
28 	struct stream_port_s *port;
29 	struct mutex mutex;
30 };
31 
32 struct stream_buf_s *get_buf_by_type(u32 type);
33 
34 /*video.c provide*/
35 extern u32 trickmode_i;
36 struct amvideocap_req;
37 extern u32 set_blackout_policy(int policy);
38 extern u32 get_blackout_policy(void);
39 int calculation_stream_ext_delayed_ms(u8 type);
40 int ext_get_cur_video_frame(struct vframe_s **vf, int *canvas_index);
41 int ext_put_video_frame(struct vframe_s *vf);
42 int ext_register_end_frame_callback(struct amvideocap_req *req);
43 int amstream_request_firmware_from_sys(const char *file_name,
44 	char *buf, int size);
45 void set_vsync_pts_inc_mode(int inc);
46 
47 void set_real_audio_info(void *arg);
48 void amstream_wakeup_userdata_poll(struct vdec_s *vdec);
49 #define dbg() pr_info("on %s,line %d\n", __func__, __LINE__);
50 
51 struct device *amports_get_dma_device(void);
52 struct device *get_codec_cma_device(void);
53 
54 #endif
55