ttusb 132 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_cmd(struct ttusb *ttusb, ttusb 146 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (mutex_lock_interruptible(&ttusb->semusb) < 0) ttusb 149 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = usb_bulk_msg(ttusb->dev, ttusb->bulk_out_pipe, ttusb 154 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c mutex_unlock(&ttusb->semusb); ttusb 160 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c mutex_unlock(&ttusb->semusb); ttusb 164 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = usb_bulk_msg(ttusb->dev, ttusb->bulk_in_pipe, ttusb 165 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->last_result, 32, &actual_len, 1000); ttusb 170 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c mutex_unlock(&ttusb->semusb); ttusb 175 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c actual_len = ttusb->last_result[3] + 4; ttusb 178 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c printk(KERN_CONT " %02x", ttusb->last_result[i]); ttusb 183 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c mutex_unlock(&ttusb->semusb); ttusb 187 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_result(struct ttusb *ttusb, u8 * data, int len) ttusb 189 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c memcpy(data, ttusb->last_result, len); ttusb 190 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c mutex_unlock(&ttusb->semusb); ttusb 194 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_i2c_msg(struct ttusb *ttusb, ttusb 199 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 id = ++ttusb->c; ttusb 216 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_cmd(ttusb, b, snd_len + 7, 1); ttusb 221 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_result(ttusb, b, 0x20); ttusb 244 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb *ttusb = i2c_get_adapdata(adapter); ttusb 248 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (mutex_lock_interruptible(&ttusb->semi2c) < 0) ttusb 271 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_i2c_msg(ttusb, addr, ttusb 282 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c mutex_unlock(&ttusb->semi2c); ttusb 286 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_boot_dsp(struct ttusb *ttusb) ttusb 293 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c &ttusb->dev->dev); ttusb 309 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c b[1] = ++ttusb->c; ttusb 311 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_cmd(ttusb, b, 32, 0); ttusb 317 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c b[1] = ++ttusb->c; ttusb 321 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_cmd(ttusb, b, 4, 0); ttusb 326 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c b[1] = ++ttusb->c; ttusb 330 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_cmd(ttusb, b, 4, 0); ttusb 342 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_set_channel(struct ttusb *ttusb, int chan_id, int filter_type, ttusb 347 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 b[] = { 0xaa, ++ttusb->c, 0x22, 4, chan_id, filter_type, ttusb 351 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_cmd(ttusb, b, sizeof(b), 0); ttusb 355 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_del_channel(struct ttusb *ttusb, int channel_id) ttusb 359 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 b[] = { 0xaa, ++ttusb->c, 0x23, 1, channel_id }; ttusb 361 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_cmd(ttusb, b, sizeof(b), 0); ttusb 366 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_set_filter(struct ttusb *ttusb, int filter_id, ttusb 380 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_cmd(ttusb, b, sizeof(b), 0); ttusb 384 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_del_filter(struct ttusb *ttusb, int filter_id) ttusb 388 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 b[] = { 0xaa, ++ttusb->c, 0x25, 1, filter_id }; ttusb 390 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_cmd(ttusb, b, sizeof(b), 0); ttusb 395 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_init_controller(struct ttusb *ttusb) ttusb 397 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 b0[] = { 0xaa, ++ttusb->c, 0x15, 1, 0 }; ttusb 398 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 b1[] = { 0xaa, ++ttusb->c, 0x15, 1, 1 }; ttusb 399 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 b2[] = { 0xaa, ++ttusb->c, 0x32, 1, 0 }; ttusb 402 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c { 0xaa, ++ttusb->c, 0x31, 5, 0x10, 0x02, 0x01, 0x00, 0x1e }; ttusb 404 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c { 0x55, ttusb->c, 0x31, 4, 0x10, 0x02, 0x01, 0x00, 0x1e }; ttusb 406 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 get_version[] = { 0xaa, ++ttusb->c, 0x17, 5, 0, 0, 0, 0, 0 }; ttusb 408 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c { 0xaa, ++ttusb->c, 0x26, 28, 0, 0, 0, 0, 0 }; ttusb 412 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((err = ttusb_cmd(ttusb, b0, sizeof(b0), 0))) ttusb 416 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((err = ttusb_cmd(ttusb, b1, sizeof(b1), 0))) ttusb 419 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_boot_dsp(ttusb); ttusb 422 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((err = ttusb_cmd(ttusb, b2, sizeof(b2), 0))) ttusb 425 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((err = ttusb_cmd(ttusb, b3, sizeof(b3), 1))) ttusb 428 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_result(ttusb, b4, sizeof(b4)); ttusb 430 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((err = ttusb_cmd(ttusb, get_version, sizeof(get_version), 1))) ttusb 433 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((err = ttusb_result(ttusb, get_version, sizeof(get_version)))) ttusb 450 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->revision = ((get_version[6] - '0') << 4) | ttusb 454 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_cmd(ttusb, get_dsp_version, sizeof(get_dsp_version), 1); ttusb 459 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_result(ttusb, get_dsp_version, sizeof(get_dsp_version)); ttusb 471 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb 472 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 b[12] = { 0xaa, ++ttusb->c, 0x18 }; ttusb 483 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((err = ttusb_cmd(ttusb, b, 4 + b[3], 0))) { ttusb 492 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_update_lnb(struct ttusb *ttusb) ttusb 494 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 b[] = { 0xaa, ++ttusb->c, 0x16, 5, /*power: */ 1, ttusb 495 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->voltage == SEC_VOLTAGE_18 ? 0 : 1, ttusb 496 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->tone == SEC_TONE_ON ? 1 : 0, 1, 1 ttusb 501 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((err = ttusb_cmd(ttusb, b, sizeof(b), 0))) { ttusb 512 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb 514 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->voltage = voltage; ttusb 515 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c return ttusb_update_lnb(ttusb); ttusb 521 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb 523 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->tone = tone; ttusb 524 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c return ttusb_update_lnb(ttusb); ttusb 530 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static void ttusb_set_led_freq(struct ttusb *ttusb, u8 freq) ttusb 532 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 b[] = { 0xaa, ++ttusb->c, 0x19, 1, freq }; ttusb 535 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c err = ttusb_cmd(ttusb, b, sizeof(b), 0); ttusb 555 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static void ttusb_process_muxpack(struct ttusb *ttusb, const u8 * muxpack, ttusb 578 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((cc != ttusb->cc) && (ttusb->cc != -1)) ttusb 580 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c __func__, (cc - ttusb->cc) & 0x7FFF); ttusb 581 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->cc = (cc + 1) & 0x7FFF; ttusb 593 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_handle_sec_data(ttusb->channel + channel, data, ttusb 597 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((!!(ttusb->muxpack[0] & 0x20)) ^ ttusb 598 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c !!(ttusb->muxpack[1] & 1)) ttusb 610 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->channel[channel].active ttusb 611 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c && (pid == ttusb->channel[channel].pid)) ttusb 612 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_handle_ts_data(ttusb->channel + ttusb 617 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_dmx_swfilter_packets(&ttusb->dvb_demux, muxpack, 1); ttusb 625 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static void ttusb_process_frame(struct ttusb *ttusb, u8 * data, int len) ttusb 634 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c switch (ttusb->mux_state) { ttusb 640 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ++ttusb->mux_state; ttusb 642 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->mux_state = 0; ttusb 643 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->insync) { ttusb 648 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->insync = 0; ttusb 653 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->insync = 1; ttusb 655 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->mux_npacks = *data++; ttusb 656 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ++ttusb->mux_state; ttusb 657 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_ptr = 0; ttusb 659 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_len = 2; ttusb 666 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c (ttusb->muxpack_len - ttusb 667 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_ptr)) ttusb 669 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_len - ttusb 670 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_ptr; ttusb 671 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c memcpy(ttusb->muxpack + ttusb->muxpack_ptr, ttusb 673 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_ptr += avail; ttusb 674 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c BUG_ON(ttusb->muxpack_ptr > 264); ttusb 678 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->muxpack_ptr == 2) { ttusb 679 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->muxpack[0] & 0x80) { ttusb 680 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_len = ttusb 681 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack[1] + 2; ttusb 682 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb-> ttusb 684 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb-> ttusb 687 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c (ttusb-> ttusb 689 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c !!(ttusb-> ttusb 691 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb-> ttusb 693 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_len += 4; ttusb 694 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c } else if (ttusb->muxpack[0] == ttusb 696 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_len = ttusb 698 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (ttusb->muxpack[0] == 0x00) ttusb 699 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_len = ttusb 700 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack[1] + 2 + ttusb 706 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack[0]); ttusb 707 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->mux_state = 0; ttusb 715 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((ttusb->muxpack_ptr >= 2) && ttusb 716 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c (ttusb->muxpack_ptr == ttusb 717 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_len)) { ttusb 718 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_process_muxpack(ttusb, ttusb 719 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb-> ttusb 721 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb-> ttusb 723 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_ptr = 0; ttusb 725 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->muxpack_len = 2; ttusb 731 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (!ttusb->mux_npacks--) { ttusb 732 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->mux_state = 0; ttusb 747 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb *ttusb = urb->context; ttusb 752 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (!ttusb->iso_streaming) ttusb 778 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_process_frame(ttusb, data, len); ttusb 784 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static void ttusb_free_iso_urbs(struct ttusb *ttusb) ttusb 789 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c usb_free_urb(ttusb->iso_urb[i]); ttusb 790 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c kfree(ttusb->iso_buffer); ttusb 793 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_alloc_iso_urbs(struct ttusb *ttusb) ttusb 797 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->iso_buffer = kcalloc(FRAMES_PER_ISO_BUF * ISO_BUF_COUNT, ttusb 799 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (!ttusb->iso_buffer) ttusb 808 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_free_iso_urbs(ttusb); ttusb 812 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->iso_urb[i] = urb; ttusb 818 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static void ttusb_stop_iso_xfer(struct ttusb *ttusb) ttusb 823 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c usb_kill_urb(ttusb->iso_urb[i]); ttusb 825 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->iso_streaming = 0; ttusb 828 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_start_iso_xfer(struct ttusb *ttusb) ttusb 832 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->iso_streaming) { ttusb 837 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->cc = -1; ttusb 838 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->insync = 0; ttusb 839 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->mux_state = 0; ttusb 843 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct urb *urb = ttusb->iso_urb[i]; ttusb 845 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c urb->dev = ttusb->dev; ttusb 846 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c urb->context = ttusb; ttusb 848 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c urb->pipe = ttusb->isoc_in_pipe; ttusb 854 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c urb->transfer_buffer = ttusb->iso_buffer + buffer_offset; ttusb 865 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((err = usb_submit_urb(ttusb->iso_urb[i], GFP_ATOMIC))) { ttusb 866 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_stop_iso_xfer(ttusb); ttusb 874 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->iso_streaming = 1; ttusb 897 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb *ttusb = (struct ttusb *) dvbdmxfeed->demux; ttusb 933 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_set_channel(ttusb, dvbdmxfeed->index, feed_type, dvbdmxfeed->pid); ttusb 935 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (0 == ttusb->running_feed_count++) ttusb 936 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_start_iso_xfer(ttusb); ttusb 943 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb *ttusb = (struct ttusb *) dvbdmxfeed->demux; ttusb 945 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_del_channel(ttusb, dvbdmxfeed->index); ttusb 947 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (--ttusb->running_feed_count == 0) ttusb 948 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_stop_iso_xfer(ttusb); ttusb 953 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static int ttusb_setup_interfaces(struct ttusb *ttusb) ttusb 955 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c usb_set_interface(ttusb->dev, 1, 1); ttusb 957 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->bulk_out_pipe = usb_sndbulkpipe(ttusb->dev, 1); ttusb 958 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->bulk_in_pipe = usb_rcvbulkpipe(ttusb->dev, 1); ttusb 959 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->isoc_in_pipe = usb_rcvisocpipe(ttusb->dev, 2); ttusb 969 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb *ttusb = file->private_data; ttusb 974 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_i2c_msg(ttusb, 0x50, snd_buf, 2, stc_firmware + addr, ttusb 1010 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb 1024 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) return -EIO; ttusb 1038 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb 1046 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) return -EIO; ttusb 1055 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) { ttusb 1056 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1); ttusb 1065 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb 1129 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) ttusb 1138 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb 1140 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c return request_firmware(fw, name, &ttusb->dev->dev); ttusb 1272 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb 1290 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->revision == TTUSB_REV_2_2) ttusb 1295 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) ttusb 1316 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; ttusb 1330 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) ttusb 1344 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb* ttusb = fe->dvb->priv; ttusb 1358 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (i2c_transfer (&ttusb->i2c_adap, &msg, 1) != 1) ttusb 1372 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static u8 read_pwm(struct ttusb* ttusb) ttusb 1379 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if ((i2c_transfer(&ttusb->i2c_adap, msg, 2) != 2) || (pwm == 0xff)) ttusb 1389 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb *ttusb = (struct ttusb *) fe->dvb->priv; ttusb 1428 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) { ttusb 1437 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) { ttusb 1555 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c static void frontend_init(struct ttusb* ttusb) ttusb 1557 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c switch(le16_to_cpu(ttusb->dev->descriptor.idProduct)) { ttusb 1560 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe = dvb_attach(stv0299_attach, &alps_stv0299_config, &ttusb->i2c_adap); ttusb 1561 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->fe != NULL) { ttusb 1562 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe->ops.tuner_ops.set_params = philips_tsa5059_tuner_set_params; ttusb 1564 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if(ttusb->revision == TTUSB_REV_2_2) { // ALPS BSBE1 ttusb 1566 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_attach(lnbp21_attach, ttusb->fe, &ttusb->i2c_adap, 0, 0); ttusb 1568 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe->ops.set_voltage = ttusb_set_voltage; ttusb 1574 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe = dvb_attach(tda8083_attach, &ttusb_novas_grundig_29504_491_config, &ttusb->i2c_adap); ttusb 1575 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->fe != NULL) { ttusb 1576 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe->ops.tuner_ops.set_params = ttusb_novas_grundig_29504_491_tuner_set_params; ttusb 1577 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe->ops.set_voltage = ttusb_set_voltage; ttusb 1583 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &ttusb->i2c_adap, read_pwm(ttusb)); ttusb 1584 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->fe != NULL) { ttusb 1585 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; ttusb 1589 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe = dvb_attach(stv0297_attach, &dvbc_philips_tdm1316l_config, &ttusb->i2c_adap); ttusb 1590 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->fe != NULL) { ttusb 1591 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe->ops.tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params; ttusb 1598 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe = dvb_attach(cx22700_attach, &alps_tdmb7_config, &ttusb->i2c_adap); ttusb 1599 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->fe != NULL) { ttusb 1600 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe->ops.tuner_ops.set_params = alps_tdmb7_tuner_set_params; ttusb 1605 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe = dvb_attach(tda10046_attach, &philips_tdm1316l_config, &ttusb->i2c_adap); ttusb 1606 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->fe != NULL) { ttusb 1607 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe->ops.tuner_ops.init = philips_tdm1316l_tuner_init; ttusb 1608 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params; ttusb 1614 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->fe == NULL) { ttusb 1616 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c le16_to_cpu(ttusb->dev->descriptor.idVendor), ttusb 1617 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c le16_to_cpu(ttusb->dev->descriptor.idProduct)); ttusb 1619 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (dvb_register_frontend(&ttusb->adapter, ttusb->fe)) { ttusb 1621 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_frontend_detach(ttusb->fe); ttusb 1622 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->fe = NULL; ttusb 1637 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb *ttusb; ttusb 1646 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (!(ttusb = kzalloc(sizeof(struct ttusb), GFP_KERNEL))) ttusb 1649 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dev = udev; ttusb 1650 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->c = 0; ttusb 1651 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->mux_state = 0; ttusb 1652 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c mutex_init(&ttusb->semi2c); ttusb 1654 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c mutex_lock(&ttusb->semi2c); ttusb 1656 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c mutex_init(&ttusb->semusb); ttusb 1658 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_setup_interfaces(ttusb); ttusb 1660 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c result = ttusb_alloc_iso_urbs(ttusb); ttusb 1663 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c mutex_unlock(&ttusb->semi2c); ttusb 1664 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c kfree(ttusb); ttusb 1668 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb_init_controller(ttusb)) ttusb 1671 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c mutex_unlock(&ttusb->semi2c); ttusb 1673 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c result = dvb_register_adapter(&ttusb->adapter, ttusb 1677 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_free_iso_urbs(ttusb); ttusb 1678 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c kfree(ttusb); ttusb 1681 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->adapter.priv = ttusb; ttusb 1684 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c memset(&ttusb->i2c_adap, 0, sizeof(struct i2c_adapter)); ttusb 1685 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c strscpy(ttusb->i2c_adap.name, "TTUSB DEC", sizeof(ttusb->i2c_adap.name)); ttusb 1687 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c i2c_set_adapdata(&ttusb->i2c_adap, ttusb); ttusb 1689 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->i2c_adap.algo = &ttusb_dec_algo; ttusb 1690 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->i2c_adap.algo_data = NULL; ttusb 1691 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->i2c_adap.dev.parent = &udev->dev; ttusb 1693 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c result = i2c_add_adapter(&ttusb->i2c_adap); ttusb 1697 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c memset(&ttusb->dvb_demux, 0, sizeof(ttusb->dvb_demux)); ttusb 1699 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dvb_demux.dmx.capabilities = ttusb 1701 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dvb_demux.priv = NULL; ttusb 1703 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dvb_demux.filternum = TTUSB_MAXFILTER; ttusb 1705 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dvb_demux.filternum = 32; ttusb 1707 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dvb_demux.feednum = TTUSB_MAXCHANNEL; ttusb 1708 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dvb_demux.start_feed = ttusb_start_feed; ttusb 1709 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dvb_demux.stop_feed = ttusb_stop_feed; ttusb 1710 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dvb_demux.write_to_decoder = NULL; ttusb 1712 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c result = dvb_dmx_init(&ttusb->dvb_demux); ttusb 1719 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dmxdev.filternum = ttusb->dvb_demux.filternum; ttusb 1720 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dmxdev.demux = &ttusb->dvb_demux.dmx; ttusb 1721 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dmxdev.capabilities = 0; ttusb 1723 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c result = dvb_dmxdev_init(&ttusb->dmxdev, &ttusb->adapter); ttusb 1731 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (dvb_net_init(&ttusb->adapter, &ttusb->dvbnet, &ttusb->dvb_demux.dmx)) { ttusb 1737 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c usb_set_intfdata(intf, (void *) ttusb); ttusb 1739 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c frontend_init(ttusb); ttusb 1744 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_dmxdev_release(&ttusb->dmxdev); ttusb 1746 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_dmx_release(&ttusb->dvb_demux); ttusb 1748 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c i2c_del_adapter(&ttusb->i2c_adap); ttusb 1750 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_unregister_adapter (&ttusb->adapter); ttusb 1751 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_free_iso_urbs(ttusb); ttusb 1752 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c kfree(ttusb); ttusb 1758 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c struct ttusb *ttusb = usb_get_intfdata(intf); ttusb 1762 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->disconnecting = 1; ttusb 1764 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_stop_iso_xfer(ttusb); ttusb 1766 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb->dvb_demux.dmx.close(&ttusb->dvb_demux.dmx); ttusb 1767 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_net_release(&ttusb->dvbnet); ttusb 1768 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_dmxdev_release(&ttusb->dmxdev); ttusb 1769 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_dmx_release(&ttusb->dvb_demux); ttusb 1770 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c if (ttusb->fe != NULL) { ttusb 1771 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_unregister_frontend(ttusb->fe); ttusb 1772 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_frontend_detach(ttusb->fe); ttusb 1774 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c i2c_del_adapter(&ttusb->i2c_adap); ttusb 1775 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c dvb_unregister_adapter(&ttusb->adapter); ttusb 1777 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c ttusb_free_iso_urbs(ttusb); ttusb 1779 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c kfree(ttusb);