Lines Matching refs:dvbdemux
870 struct dvb_demux *dvbdemux = dvbdmxfeed->demux; in dmx_section_feed_allocate_filter() local
873 if (mutex_lock_interruptible(&dvbdemux->mutex)) in dmx_section_feed_allocate_filter()
876 dvbdmxfilter = dvb_dmx_filter_alloc(dvbdemux); in dmx_section_feed_allocate_filter()
878 mutex_unlock(&dvbdemux->mutex); in dmx_section_feed_allocate_filter()
882 spin_lock_irq(&dvbdemux->lock); in dmx_section_feed_allocate_filter()
891 spin_unlock_irq(&dvbdemux->lock); in dmx_section_feed_allocate_filter()
893 mutex_unlock(&dvbdemux->mutex); in dmx_section_feed_allocate_filter()
1118 struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; in dvbdmx_open() local
1120 if (dvbdemux->users >= MAX_DVB_DEMUX_USERS) in dvbdmx_open()
1123 dvbdemux->users++; in dvbdmx_open()
1129 struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; in dvbdmx_close() local
1131 if (dvbdemux->users == 0) in dvbdmx_close()
1134 dvbdemux->users--; in dvbdmx_close()
1141 struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; in dvbdmx_write() local
1150 if (mutex_lock_interruptible(&dvbdemux->mutex)) { in dvbdmx_write()
1154 dvb_dmx_swfilter(dvbdemux, p, count); in dvbdmx_write()
1156 mutex_unlock(&dvbdemux->mutex); in dvbdmx_write()
1166 struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; in dvbdmx_add_frontend() local
1167 struct list_head *head = &dvbdemux->frontend_list; in dvbdmx_add_frontend()
1177 struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; in dvbdmx_remove_frontend() local
1178 struct list_head *pos, *n, *head = &dvbdemux->frontend_list; in dvbdmx_remove_frontend()
1192 struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; in dvbdmx_get_frontends() local
1194 if (list_empty(&dvbdemux->frontend_list)) in dvbdmx_get_frontends()
1197 return &dvbdemux->frontend_list; in dvbdmx_get_frontends()
1203 struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; in dvbdmx_connect_frontend() local
1208 mutex_lock(&dvbdemux->mutex); in dvbdmx_connect_frontend()
1211 mutex_unlock(&dvbdemux->mutex); in dvbdmx_connect_frontend()
1217 struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; in dvbdmx_disconnect_frontend() local
1219 mutex_lock(&dvbdemux->mutex); in dvbdmx_disconnect_frontend()
1222 mutex_unlock(&dvbdemux->mutex); in dvbdmx_disconnect_frontend()
1228 struct dvb_demux *dvbdemux = (struct dvb_demux *)demux; in dvbdmx_get_pes_pids() local
1230 memcpy(pids, dvbdemux->pids, 5 * sizeof(u16)); in dvbdmx_get_pes_pids()
1234 int dvb_dmx_init(struct dvb_demux *dvbdemux) in dvb_dmx_init() argument
1237 struct dmx_demux *dmx = &dvbdemux->dmx; in dvb_dmx_init()
1239 dvbdemux->cnt_storage = NULL; in dvb_dmx_init()
1240 dvbdemux->users = 0; in dvb_dmx_init()
1241 dvbdemux->filter = vmalloc(array_size(sizeof(struct dvb_demux_filter), in dvb_dmx_init()
1242 dvbdemux->filternum)); in dvb_dmx_init()
1244 if (!dvbdemux->filter) in dvb_dmx_init()
1247 dvbdemux->feed = vmalloc(array_size(sizeof(struct dvb_demux_feed), in dvb_dmx_init()
1248 dvbdemux->feednum)); in dvb_dmx_init()
1249 if (!dvbdemux->feed) { in dvb_dmx_init()
1250 vfree(dvbdemux->filter); in dvb_dmx_init()
1251 dvbdemux->filter = NULL; in dvb_dmx_init()
1254 for (i = 0; i < dvbdemux->filternum; i++) { in dvb_dmx_init()
1255 dvbdemux->filter[i].state = DMX_STATE_FREE; in dvb_dmx_init()
1256 dvbdemux->filter[i].index = i; in dvb_dmx_init()
1258 for (i = 0; i < dvbdemux->feednum; i++) { in dvb_dmx_init()
1259 dvbdemux->feed[i].state = DMX_STATE_FREE; in dvb_dmx_init()
1260 dvbdemux->feed[i].index = i; in dvb_dmx_init()
1263 dvbdemux->cnt_storage = vmalloc(MAX_PID + 1); in dvb_dmx_init()
1264 if (!dvbdemux->cnt_storage) in dvb_dmx_init()
1267 INIT_LIST_HEAD(&dvbdemux->frontend_list); in dvb_dmx_init()
1270 dvbdemux->pesfilter[i] = NULL; in dvb_dmx_init()
1271 dvbdemux->pids[i] = 0xffff; in dvb_dmx_init()
1274 INIT_LIST_HEAD(&dvbdemux->feed_list); in dvb_dmx_init()
1276 dvbdemux->playing = 0; in dvb_dmx_init()
1277 dvbdemux->recording = 0; in dvb_dmx_init()
1278 dvbdemux->tsbufp = 0; in dvb_dmx_init()
1280 if (!dvbdemux->check_crc32) in dvb_dmx_init()
1281 dvbdemux->check_crc32 = dvb_dmx_crc32; in dvb_dmx_init()
1283 if (!dvbdemux->memcopy) in dvb_dmx_init()
1284 dvbdemux->memcopy = dvb_dmx_memcopy; in dvb_dmx_init()
1287 dmx->priv = dvbdemux; in dvb_dmx_init()
1303 mutex_init(&dvbdemux->mutex); in dvb_dmx_init()
1304 spin_lock_init(&dvbdemux->lock); in dvb_dmx_init()
1311 void dvb_dmx_release(struct dvb_demux *dvbdemux) in dvb_dmx_release() argument
1313 vfree(dvbdemux->cnt_storage); in dvb_dmx_release()
1314 vfree(dvbdemux->filter); in dvb_dmx_release()
1315 vfree(dvbdemux->feed); in dvb_dmx_release()