xref: /rockchip-linux_mpp/mpp/hal/dummy/hal_dummy_enc_api.c (revision 437bfbeb9567cca9cd9080e3f6954aa9d6a94f18)
1 /*
2 *
3 * Copyright 2015 Rockchip Electronics Co. LTD
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 
18 #define MODULE_TAG "hal_dummy_enc"
19 
20 #include "hal_dummy_enc_api.h"
21 
22 
hal_dummy_enc_init(void * hal,MppHalCfg * cfg)23 MPP_RET hal_dummy_enc_init(void *hal, MppHalCfg *cfg)
24 {
25     (void)hal;
26     (void)cfg;
27     return MPP_OK;
28 }
29 
hal_dummy_enc_deinit(void * hal)30 MPP_RET hal_dummy_enc_deinit(void *hal)
31 {
32     (void)hal;
33     return MPP_OK;
34 }
35 
hal_dummy_enc_gen_regs(void * hal,HalTaskInfo * task)36 MPP_RET hal_dummy_enc_gen_regs(void *hal, HalTaskInfo *task)
37 {
38     (void)hal;
39     (void)task;
40     return MPP_OK;
41 }
hal_dummy_enc_start(void * hal,HalTaskInfo * task)42 MPP_RET hal_dummy_enc_start(void *hal, HalTaskInfo *task)
43 {
44     (void)hal;
45     (void)task;
46     return MPP_OK;
47 }
48 
hal_dummy_enc_wait(void * hal,HalTaskInfo * task)49 MPP_RET hal_dummy_enc_wait(void *hal, HalTaskInfo *task)
50 {
51     (void)hal;
52     (void)task;
53     return MPP_OK;
54 }
55 
hal_dummy_enc_reset(void * hal)56 MPP_RET hal_dummy_enc_reset(void *hal)
57 {
58     (void)hal;
59     return MPP_OK;
60 }
61 
hal_dummy_enc_flush(void * hal)62 MPP_RET hal_dummy_enc_flush(void *hal)
63 {
64     (void)hal;
65     return MPP_OK;
66 }
67 
hal_dummy_enc_control(void * hal,MpiCmd cmd_type,void * param)68 MPP_RET hal_dummy_enc_control(void *hal, MpiCmd cmd_type, void *param)
69 {
70     (void)hal;
71     (void)cmd_type;
72     (void)param;
73     return MPP_OK;
74 }
75 
76 const MppHalApi hal_api_dummy_enc = {
77     .name = "dummy_hw_enc",
78     .type = MPP_CTX_ENC,
79     .coding = MPP_VIDEO_CodingUnused,
80     .ctx_size = 0,
81     .flag = 0,
82     .init = hal_dummy_enc_init,
83     .deinit = hal_dummy_enc_deinit,
84     .reg_gen = hal_dummy_enc_gen_regs,
85     .start = hal_dummy_enc_start,
86     .wait = hal_dummy_enc_wait,
87     .reset = hal_dummy_enc_reset,
88     .flush = hal_dummy_enc_flush,
89     .control = hal_dummy_enc_control,
90 };
91 
92 
93