Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __PVRUSB2_DVB_H__
0003 #define __PVRUSB2_DVB_H__
0004 
0005 #include <media/dvb_frontend.h>
0006 #include <media/dvb_demux.h>
0007 #include <media/dvb_net.h>
0008 #include <media/dmxdev.h>
0009 #include "pvrusb2-context.h"
0010 
0011 #define PVR2_DVB_BUFFER_COUNT 32
0012 #define PVR2_DVB_BUFFER_SIZE PAGE_ALIGN(0x4000)
0013 
0014 struct pvr2_dvb_adapter {
0015     struct pvr2_channel channel;
0016 
0017     struct dvb_adapter  dvb_adap;
0018     struct dmxdev       dmxdev;
0019     struct dvb_demux    demux;
0020     struct dvb_net      dvb_net;
0021     struct dvb_frontend *fe[2];
0022 
0023     struct i2c_client   *i2c_client_demod[2];
0024     struct i2c_client   *i2c_client_tuner;
0025 
0026     int         feedcount;
0027     int         max_feed_count;
0028 
0029     struct task_struct  *thread;
0030     struct mutex        lock;
0031 
0032     unsigned int        stream_run:1;
0033 
0034     wait_queue_head_t   buffer_wait_data;
0035     char            *buffer_storage[PVR2_DVB_BUFFER_COUNT];
0036 };
0037 
0038 struct pvr2_dvb_props {
0039     int (*frontend_attach) (struct pvr2_dvb_adapter *);
0040     int (*tuner_attach) (struct pvr2_dvb_adapter *);
0041 };
0042 
0043 struct pvr2_dvb_adapter *pvr2_dvb_create(struct pvr2_context *pvr);
0044 
0045 #endif /* __PVRUSB2_DVB_H__ */