Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TBS 5922 with Openelec on Raspberry Pi B+ #55

Closed
BTopbas opened this issue Dec 5, 2014 · 19 comments
Closed

TBS 5922 with Openelec on Raspberry Pi B+ #55

BTopbas opened this issue Dec 5, 2014 · 19 comments
Labels

Comments

@BTopbas
Copy link

BTopbas commented Dec 5, 2014

Hi developers! I am very grateful for your hard works. My problem is i ahve raspberry pi and i love my pi. (Ambilight and other great stuffs on pi). I have tbs 5922 usb device. And i love openelec system. I use special building image for raspberry pi. Build is use this repostory and i have issue with this. I dont know maybe other issue. Dmesg output is here

[ 10.574942] dvb-usb: found a 'TBS QBOX22 DVBS2 USB2.0' in cold state, will try to load a firmware
[ 10.628633] usb 1-1.4: Direct firmware load for dvb-usb-tbsqbox-id5922.fw failed with error -2
[ 10.628660] dvb-usb: did not find the firmware file. (dvb-usb-tbsqbox-id5922.fw) Please see linux/Documentation/dvb/ for more details on firmware-problems. (-2)
[ 10.628829] usbcore: registered new interface driver tbsqbox22
[ 10.636897] usbcore: registered new interface driver snd-usb-audio

whats problem? 5922 is unsupported arm system like raspberry pi?

@crazycat69
Copy link
Contributor

need put device firmware dvb-usb-tbsqbox-id5922.fw to /lib/firmware

@BTopbas
Copy link
Author

BTopbas commented Dec 5, 2014

Okey. Now Openelec see device correctly. Here is dmesg:

[ 10.652506] dvb-usb: found a 'TBS QBOX22 DVBS2 USB2.0' in cold state, will try to load a firmware
[ 10.667753] usbcore: registered new interface driver snd-usb-audio
[ 10.715314] dvb-usb: downloading firmware from file 'dvb-usb-tbsqbox-id5922.fw'
[ 10.715373] tbsqbox22: start downloading TBSQBOX firmware
[ 10.899998] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
[ 10.961929] dvb-usb: found a 'TBS QBOX22 DVBS2 USB2.0' in warm state.
[ 10.962286] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[ 10.962449] DVB: registering new adapter (TBS QBOX22 DVBS2 USB2.0)
[ 11.089361] usbcore: registered new interface driver r8188eu
[ 11.380501] dvb-usb: MAC address: 00:22:ab:c0:1d:d2
[ 11.381727] i2c i2c-2: Added multiplexed i2c bus 3
[ 11.382013] i2c i2c-2: Added multiplexed i2c bus 4
[ 11.633106] i2c i2c-4: av201x: Airoha Technology AV201x successfully attached
[ 11.633126] QBOX22: TBS5922 attached.
[ 11.633434] QBOX22: frontend attached
[ 11.633459] usb 1-1.4: DVB: registering adapter 0 frontend 0 (Tmax TAS2101)...
[ 11.634112] input: IR-receiver inside an USB DVB receiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/input/input2
[ 11.634304] dvb-usb: schedule remote query interval to 150 msecs.
[ 11.634323] dvb-usb: TBS QBOX22 DVBS2 USB2.0 successfully initialized and connected.

Thank you for your quick answer :)

@BTopbas
Copy link
Author

BTopbas commented Dec 6, 2014

Here is another issue today. I install w_scan and i scan services. Scan is perfect. All channels names found and created channels.conf. But problem is Horizontal poloration is not working. Vertical channels is okey but horizantal channels give me no data error :/

Here is second edit:
This device connected ubuntu. And use with kaffeine. There is no problem. All channel is stable. Working like a charm.
But on the pi. Only vertical channels working horizontal channels no working. I thinking maybe usb 2.0 power issue but my raspberry pi connected 5.25v 10A power source. And model type is b+ (So usb 2.0 ports is can out more power if device need.) My brain confused.

@BTopbas
Copy link
Author

BTopbas commented Dec 9, 2014

DVB: adapter 0 frontend 0 frequency 3745000 out of range (950000..2150000). Beckend is no problem with w_scan. Found and listed all channel. But frontend not tune channel. I think this is bug?

@ljalves
Copy link
Owner

ljalves commented Dec 9, 2014

@BTopbas,
Did you follow this recomendation (by @mpmc):
https://github.com/ljalves/linux_media/wiki/TBS-5922-(aka-tbs-qbox22)

(If not please try it)

@BTopbas
Copy link
Author

BTopbas commented Dec 9, 2014

How can i try? Where can i add this? After make command on terminal ?

Edit: I create a options.conf in etc/modprobe.d/ and added here. Checked dmesg and manually remote not working. So i disable ir. Now i try searching channels in tvheadned.

@mpmc
Copy link

mpmc commented Dec 9, 2014

Just to add, I'm not currently using my 5922 it's in my junk cupboard, I have a DVBSky T9580 now =D. However I am willing to hook it back up if needed to help test any changes.

@BTopbas Please report back how you're getting on using the 5922 with your Pi - sounds interesting.

And @ljalves keep up the good work!

@BTopbas
Copy link
Author

BTopbas commented Dec 10, 2014

Hi all again;
Today fresh installition openelec on raspberry pi. Disabled tbs5922 ir receiver. İnstall w_scan and scanning channels.

Here is w_scan scanning on bash: http://pastebin.com/NvQ9sLk1

Here is w_scan genereted channels.conf file: http://pastebin.com/7184aZtE

And i replaced pvr channels.conf to genereted channels.conf. But i want watch give me no data error most channels. A few useless channels working but most of(%90) give no data.

Here is images: https://www.facebook.com/media/set/?set=a.10205489740466478.1073741837.1340150893&type=1&l=11708a597a

@mpmc
Copy link

mpmc commented Dec 10, 2014

Have you tried something other than VDR?
I'm really tempted to try my 5922 on my Pi now..

@BTopbas
Copy link
Author

BTopbas commented Dec 10, 2014

@mpmc Openelec have 2 pvr services on Raspberry. 1 VDR, 2 Tvheadend. I try tvheadend last night. But most muxes return back scan no data. Tvheadend found 10-20 useless channels. But w_scan found all channels.

@mpmc
Copy link

mpmc commented Dec 10, 2014

Is Tvheadend finding these muxes or are you manually adding them, IIRC I had to add a single mux with all the correct tuning data and Tvheadend found the rest of the muxes without issue.

I'm currently running Tvheadend on a Pi with a Technisat SkyStar USB HD and that has no issues, when I get the chance I'll try the 5922, I have a feeling it'll take hours to build though 😞

@BTopbas
Copy link
Author

BTopbas commented Dec 10, 2014

I try both of them. Tvheadend finding muxes, and i adding muxes. I added but scan no data....
Here is openelec raspberry pi build with tbs 5922 driver. https://www.dropbox.com/sh/t3jtx83mcs03wpw/AACRQ4hooqTbna4lmFViVa1Ua?dl=0

File name: OpenELEC-RPi.arm-5.0RC1-fljalves-fw_fix.tar

@mpmc
Copy link

mpmc commented Dec 11, 2014

OK I've built the drivers on my Pi, but unfortunately all I'm getting is..

[    9.509551] tas2101: Unknown symbol i2c_del_mux_adapter (err 0)
[    9.517388] tas2101: Unknown symbol i2c_add_mux_adapter (err 0)

using kernel 3.12.34+ Not sure how to fix it :p

Edit:

Looks like I need to build my own kernel as the one on the RPI does not have CONFIG_I2C_MUX enabled, bah!

@mpmc
Copy link

mpmc commented Dec 12, 2014

Another update,
Having built a new kernel that includes i2c_mux and built @ljalves 's tree, loading the module dvb-usb-tbsqbox22 results in a kernel oops [Null pointer dereference], This is without even having the thing attached, unfortunately I'm unable to save a copy of the error.

Luis, I'm not sure if you have a Pi, but if you do you may want to try loading the module :p it completely blows up, I used the raspberry pi's kernel source and built the modules directly on the Pi (twice) took 2-3 hours each time.

I'll have to try the Openelec image above at some point.

@saeedmou
Copy link

@BTopbas , @mpmc
hi guy, i compiled my own raspian with CONFIG_I2C_MUX enabled and compile this driver, but i couldn`t load the module. here is the issue: #51
if you done this, plz make a installation guide. :)

ljalves pushed a commit that referenced this issue Apr 25, 2015
img_ir_remove() passes a pointer to the ISR function as the 2nd
parameter to irq_free() instead of a pointer to the device data
structure.
This issue causes unloading img-ir module to fail with the below
warning after building and loading img-ir as a module.

WARNING: CPU: 2 PID: 155 at ../kernel/irq/manage.c:1278
__free_irq+0xb4/0x214() Trying to free already-free IRQ 58
Modules linked in: img_ir(-)
CPU: 2 PID: 155 Comm: rmmod Not tainted 3.14.0 #55 ...
Call Trace:
...
[<8048d420>] __free_irq+0xb4/0x214
[<8048d6b4>] free_irq+0xac/0xf4
[<c009b130>] img_ir_remove+0x54/0xd4 [img_ir] [<8073ded0>]
platform_drv_remove+0x30/0x54 ...

Fixes: 160a8f8 ("[media] rc: img-ir: add base driver")

Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
Cc: <stable@vger.kernel.org> # 3.15+
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
@alessandro-dallatorre
Copy link

Hi guys,
I have a TBS 5922SE and a Raspberry Pi 2. I'm trying to compile the linux_media drivers with no success (kernel headers not found, dependencies of a previous toolchain gcc 4.7), so I stopped and I wanted to download this raspberry pi Openelec build with tbs 5922 driver. Could anyone please help me by providing a working link to this Openelec build?

@mpmc
Copy link

mpmc commented Jun 11, 2015

@alessandro-dallatorre

I managed to get it working look at my comment on #101

@ljalves
Copy link
Owner

ljalves commented Jun 24, 2016

Closing old issue.
Re-open if needed.

@ljalves ljalves closed this as completed Jun 24, 2016
@mpmc
Copy link

mpmc commented Jun 24, 2016

I'd completely forgot about the TBS5922, I shall have to build again to see if it still works!

Thanks for the reminder @ljalves !

crazycat69 pushed a commit to crazycat69/linux_media that referenced this issue May 3, 2022
After rx/tx ring buffer size is changed, kernel panic occurs when
it acts XDP_TX or XDP_REDIRECT.

When tx/rx ring buffer size is changed(ethtool -G), sfc driver
reallocates and reinitializes rx and tx queues and their buffer
(tx_queue->buffer).
But it misses reinitializing xdp queues(efx->xdp_tx_queues).
So, while it is acting XDP_TX or XDP_REDIRECT, it uses the uninitialized
tx_queue->buffer.

A new function efx_set_xdp_channels() is separated from efx_set_channels()
to handle only xdp queues.

Splat looks like:
   BUG: kernel NULL pointer dereference, address: 000000000000002a
   #PF: supervisor write access in kernel mode
   #PF: error_code(0x0002) - not-present page
   PGD 0 P4D 0
   Oops: 0002 [ljalves#4] PREEMPT SMP NOPTI
   RIP: 0010:efx_tx_map_chunk+0x54/0x90 [sfc]
   CPU: 2 PID: 0 Comm: swapper/2 Tainted: G      D           5.17.0+ ljalves#55 e8beeee8289528f11357029357cf
   Code: 48 8b 8d a8 01 00 00 48 8d 14 52 4c 8d 2c d0 44 89 e0 48 85 c9 74 0e 44 89 e2 4c 89 f6 48 80
   RSP: 0018:ffff92f121e45c60 EFLAGS: 00010297
   RIP: 0010:efx_tx_map_chunk+0x54/0x90 [sfc]
   RAX: 0000000000000040 RBX: ffff92ea506895c0 RCX: ffffffffc0330870
   RDX: 0000000000000001 RSI: 00000001139b10ce RDI: ffff92ea506895c0
   RBP: ffffffffc0358a80 R08: 00000001139b110d R09: 0000000000000000
   R10: 0000000000000001 R11: ffff92ea414c0088 R12: 0000000000000040
   R13: 0000000000000018 R14: 00000001139b10ce R15: ffff92ea506895c0
   FS:  0000000000000000(0000) GS:ffff92f121ec0000(0000) knlGS:0000000000000000
   CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
   Code: 48 8b 8d a8 01 00 00 48 8d 14 52 4c 8d 2c d0 44 89 e0 48 85 c9 74 0e 44 89 e2 4c 89 f6 48 80
   CR2: 000000000000002a CR3: 00000003e6810004 CR4: 00000000007706e0
   RSP: 0018:ffff92f121e85c60 EFLAGS: 00010297
   PKRU: 55555554
   RAX: 0000000000000040 RBX: ffff92ea50689700 RCX: ffffffffc0330870
   RDX: 0000000000000001 RSI: 00000001145a90ce RDI: ffff92ea50689700
   RBP: ffffffffc0358a80 R08: 00000001145a910d R09: 0000000000000000
   R10: 0000000000000001 R11: ffff92ea414c0088 R12: 0000000000000040
   R13: 0000000000000018 R14: 00000001145a90ce R15: ffff92ea50689700
   FS:  0000000000000000(0000) GS:ffff92f121e80000(0000) knlGS:0000000000000000
   CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
   CR2: 000000000000002a CR3: 00000003e6810005 CR4: 00000000007706e0
   PKRU: 55555554
   Call Trace:
    <IRQ>
    efx_xdp_tx_buffers+0x12b/0x3d0 [sfc 84c94b8e32d44d296c17e10a634d3ad454de4ba5]
    __efx_rx_packet+0x5c3/0x930 [sfc 84c94b8e32d44d296c17e10a634d3ad454de4ba5]
    efx_rx_packet+0x28c/0x2e0 [sfc 84c94b8e32d44d296c17e10a634d3ad454de4ba5]
    efx_ef10_ev_process+0x5f8/0xf40 [sfc 84c94b8e32d44d296c17e10a634d3ad454de4ba5]
    ? enqueue_task_fair+0x95/0x550
    efx_poll+0xc4/0x360 [sfc 84c94b8e32d44d296c17e10a634d3ad454de4ba5]

Fixes: 3990a8f ("sfc: allocate channels for XDP tx queues")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants