Lines Matching refs:itv
131 static int try_mailbox(struct ivtv *itv, struct ivtv_mailbox_data *mbdata, int mb) in try_mailbox() argument
146 static int get_mailbox(struct ivtv *itv, struct ivtv_mailbox_data *mbdata, int flags) in get_mailbox() argument
161 if (try_mailbox(itv, mbdata, mb)) in get_mailbox()
188 static void clear_all_mailboxes(struct ivtv *itv, struct ivtv_mailbox_data *mbdata) in clear_all_mailboxes() argument
200 static int ivtv_api_call(struct ivtv *itv, int cmd, int args, u32 data[]) in ivtv_api_call() argument
202 struct ivtv_mailbox_data *mbdata = (cmd >= 128) ? &itv->enc_mbox : &itv->dec_mbox; in ivtv_api_call()
233 if (itv->api_cache[cmd].last_jiffies && in ivtv_api_call()
235 itv->api_cache[cmd].last_jiffies + in ivtv_api_call()
237 !memcmp(data, itv->api_cache[cmd].data, sizeof(itv->api_cache[cmd].data))) { in ivtv_api_call()
238 itv->api_cache[cmd].last_jiffies = jiffies; in ivtv_api_call()
247 if (try_mailbox(itv, mbdata, mb)) { in ivtv_api_call()
256 clear_all_mailboxes(itv, mbdata); in ivtv_api_call()
263 mb = get_mailbox(itv, mbdata, flags); in ivtv_api_call()
266 clear_all_mailboxes(itv, mbdata); in ivtv_api_call()
272 memcpy(itv->api_cache[cmd].data, data, sizeof(itv->api_cache[cmd].data)); in ivtv_api_call()
273 itv->api_cache[cmd].last_jiffies = jiffies; in ivtv_api_call()
315 int ivtv_api(struct ivtv *itv, int cmd, int args, u32 data[]) in ivtv_api() argument
317 int res = ivtv_api_call(itv, cmd, args, data); in ivtv_api()
322 return (res == -EBUSY) ? ivtv_api_call(itv, cmd, args, data) : res; in ivtv_api()
330 int ivtv_vapi_result(struct ivtv *itv, u32 data[CX2341X_MBOX_MAX_DATA], int cmd, int args, ...) in ivtv_vapi_result() argument
340 return ivtv_api(itv, cmd, args, data); in ivtv_vapi_result()
343 int ivtv_vapi(struct ivtv *itv, int cmd, int args, ...) in ivtv_vapi() argument
354 return ivtv_api(itv, cmd, args, data); in ivtv_vapi()
368 void ivtv_mailbox_cache_invalidate(struct ivtv *itv) in ivtv_mailbox_cache_invalidate() argument
372 itv->api_cache[i].last_jiffies = 0; in ivtv_mailbox_cache_invalidate()